Hi all,
Is there anyone using node red to control their heating using shelly TRVs? I have a sheely relay controlling the boiler. I have it working kind of but I need to refine my flow as it's not working well and would love some help.
[{"id":"199927621f74dae7","type":"shelly-gen1","z":"621e13c065c90b68","hostname":"192.168.1.13","description":"Upstairs TRV","pollinginterval":"20000","pollstatus":false,"getstatusoncommand":true,"devicetype":"Thermostat","outputs":1,"rgbwmode":"color","x":1070,"y":600,"wires":[["732aad396e2a7494","bb66b1491f9717a9","2e9dc0aafae6db31"]]},{"id":"3cde6b496e57a52d","type":"inject","z":"621e13c065c90b68","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":620,"y":460,"wires":[["b7eff84fe58778f4"]]},{"id":"e5a025a3cb4ac8dc","type":"debug","z":"621e13c065c90b68","name":"debug 29","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2280,"y":480,"wires":[]},{"id":"732aad396e2a7494","type":"change","z":"621e13c065c90b68","name":"MY TRV Temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.thermostats[0].tmp.value","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":620,"wires":[["77c696e9e1c904ef"]]},{"id":"2e9dc0aafae6db31","type":"switch","z":"621e13c065c90b68","name":"Above or Below Setpoint?","property":"payload.thermostats[0].tmp.value","propertyType":"jsonata","rules":[{"t":"lt","v":"payload.thermostats[0].target_t.value","vt":"jsonata"},{"t":"gte","v":"payload.thermostats[0].target_t.value","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":2,"x":1350,"y":520,"wires":[["bc1b15b9303cbe96","84d9c421fa5ad887"],["71a371970da5ab47","c5a9c8ee733f7937"]]},{"id":"bb66b1491f9717a9","type":"change","z":"621e13c065c90b68","name":"Set point Temp?","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.thermostats[0].target_t.value","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":720,"wires":[["80ca104e29336005"]]},{"id":"69639a8497ad18f9","type":"shelly-gen1","z":"621e13c065c90b68","hostname":"192.168.1.28","description":"Boiler ","pollinginterval":"5000","pollstatus":false,"getstatusoncommand":true,"devicetype":"Relay","outputs":1,"rgbwmode":"color","x":2070,"y":280,"wires":[["f0ecf23892a193f6","d9d51e43bc742c4e"]],"outputLabels":["Heating ON"]},{"id":"1efbc40ebce3bbef","type":"shelly-gen1","z":"621e13c065c90b68","hostname":"192.168.1.28","description":"Boiler ","pollinginterval":"5000","pollstatus":false,"getstatusoncommand":true,"devicetype":"Relay","outputs":1,"rgbwmode":"color","x":2070,"y":380,"wires":[["e5a025a3cb4ac8dc","d9d51e43bc742c4e"]]},{"id":"bc1b15b9303cbe96","type":"function","z":"621e13c065c90b68","name":"If Temp Below Set Point - Boiler On","func":"msg.payload = {\n relay:0,\n on:true\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1680,"y":300,"wires":[["9585d6ed3ca183eb"]]},{"id":"c5a9c8ee733f7937","type":"function","z":"621e13c065c90b68","name":"If Temp Above Set Point - Boiler Off","func":"msg.payload = {\n relay:0, \n on:false\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1680,"y":500,"wires":[["bbd97d47e44755ad"]]},{"id":"77c696e9e1c904ef","type":"debug","z":"621e13c065c90b68","name":"debug 30","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1620,"y":680,"wires":[]},{"id":"80ca104e29336005","type":"debug","z":"621e13c065c90b68","name":"debug 31","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1620,"y":760,"wires":[]},{"id":"84d9c421fa5ad887","type":"debug","z":"621e13c065c90b68","name":"debug 32","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1620,"y":400,"wires":[]},{"id":"71a371970da5ab47","type":"debug","z":"621e13c065c90b68","name":"debug 33","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1620,"y":600,"wires":[]},{"id":"d9d51e43bc742c4e","type":"link out","z":"621e13c065c90b68","name":"link out 2","mode":"link","links":[],"x":2385,"y":340,"wires":[]},{"id":"62af04d43ea81058","type":"link in","z":"621e13c065c90b68","name":"link in 2","links":[],"x":675,"y":580,"wires":[["b7eff84fe58778f4"]]},{"id":"b7eff84fe58778f4","type":"function","z":"621e13c065c90b68","name":"schedule profile 4","func":"// see https://shelly-api-docs.shelly.cloud/gen1/#shelly-trv-thermostats-0\nmsg.payload = {\n scheduleProfile : 4\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":520,"wires":[["199927621f74dae7","16b821ed5473ee9f","9d19952ccac5f813"]]},{"id":"16b821ed5473ee9f","type":"shelly-gen1","z":"621e13c065c90b68","hostname":"192.168.1.14","description":"Bedroom 1 TRV","pollinginterval":"20000","pollstatus":false,"getstatusoncommand":true,"devicetype":"Thermostat","outputs":1,"rgbwmode":"color","x":1060,"y":520,"wires":[["2e9dc0aafae6db31"]]},{"id":"9d19952ccac5f813","type":"shelly-gen1","z":"621e13c065c90b68","hostname":"192.168.1.15","description":"Bedroom 2 TRV","pollinginterval":"20000","pollstatus":false,"getstatusoncommand":true,"devicetype":"Thermostat","outputs":1,"rgbwmode":"color","x":1060,"y":440,"wires":[["2e9dc0aafae6db31"]]},{"id":"f0ecf23892a193f6","type":"debug","z":"621e13c065c90b68","name":"debug 34","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2300,"y":220,"wires":[]},{"id":"bbd97d47e44755ad","type":"delay","z":"621e13c065c90b68","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1910,"y":440,"wires":[["1efbc40ebce3bbef"]]},{"id":"9585d6ed3ca183eb","type":"delay","z":"621e13c065c90b68","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1910,"y":280,"wires":[["69639a8497ad18f9"]]}]
This is where I am at, but it drives the relay mad with multiple outputs to the relay. I'm relatively new to node red and still very much learning as I go so please be kind.
Thanks in advance.