Hey team,
I've had this strange issue for a little while on a flow I'm working on. Fresh installation on Pi-Zero. Everything else works as expected.
The Thermostat node is not receiving Target and Hysteresis messages in this setup:
When I paste these connected nodes into a fresh flow, they work exactly as expected.
I couldn't understand why, so I disabled every node in the flow and discovered that when I connect the Thermostat node's OUTPUT to a function node, the Thermostat ceases to accept inputs.
This is the function node:
msg.payload = 1;
} else{
msg.payload = 0;
}
msg.topic = ""
return msg;
When I move THOSE nodes to a new flow, the Function node no longer causes a problem. I'm struggling to understand how something 'downstream' could cause this problem. Is this a crazy bug?
[{"id":"1442387b.fdb018","type":"tab","label":"Mars 2 Pro","disabled":false,"info":""},{"id":"ca241512.98ec18","type":"inject","z":"1442387b.fdb018","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":680,"wires":[["bfa37e35.01991"]]},{"id":"bfa37e35.01991","type":"rpi-dht22","z":"1442387b.fdb018","name":"Temp sensor","topic":"current","dht":"11","pintype":"0","pin":4,"x":310,"y":680,"wires":[["80b76955.2f0f58"]]},{"id":"99e645cc.586648","type":"ui_numeric","z":"1442387b.fdb018","name":"Target Temp","label":"Target temperature (°C)","tooltip":"","group":"ed061fb1.0c51e","order":2,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"target","topicType":"str","format":"{{value}}","min":"15","max":"30","step":1,"x":310,"y":740,"wires":[["80b76955.2f0f58"]]},{"id":"80b76955.2f0f58","type":"dynamic thermostat","z":"1442387b.fdb018","name":"","x":510,"y":680,"wires":[["20e43bda.666854"]]},{"id":"dc1f60e2.014d6","type":"ui_numeric","z":"1442387b.fdb018","name":"Hysteresis","label":"Temperature hysteresis","tooltip":"","group":"ed061fb1.0c51e","order":3,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"hysteresis","topicType":"str","format":"{{value}}","min":"0","max":"10","step":"0.1","x":310,"y":800,"wires":[["80b76955.2f0f58"]]},{"id":"86843653.b9b6d8","type":"inject","z":"1442387b.fdb018","name":"Default: 25","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"25","payloadType":"num","x":110,"y":740,"wires":[["99e645cc.586648"]]},{"id":"ca1aca99.d989c8","type":"inject","z":"1442387b.fdb018","name":"Default: 0.3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.2","topic":"hysteresis","payload":"0.3","payloadType":"num","x":110,"y":800,"wires":[["dc1f60e2.014d6"]]},{"id":"20e43bda.666854","type":"function","z":"1442387b.fdb018","name":"Translate thermostat","func":"if (msg.payload.onoff == true) {\n msg.payload = 1;\n} else{\n msg.payload = 0;\n }\n\nmsg.topic = \"\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":680,"wires":[[]]},{"id":"ed061fb1.0c51e","type":"ui_group","name":"Cabinet Temperature","tab":"f2c5d087.7b932","order":2,"disp":true,"width":"6","collapse":false},{"id":"f2c5d087.7b932","type":"ui_tab","name":"Mars 2 Pro monitoring","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
EDIT: Sorry, additional information related to the post topic, the Inject nodes are giving the Dashboard Numeric widgets their value which is shown in the Dashboard on restarting the flow. For some reason, however, that value is not being passed to the output on the Numeric node, even though these are the settings:
Changed the Inject node to this and now it's working, BUT, I definitely had msg.topic defined exactly like this previously and it did not work.