Closed jannnfe closed 6 years ago
Before going into details do you know node-red-contrib-ramp-thermostat. May be you can simplify your flow. Have a look here: https://flows.nodered.org/node/node-red-contrib-ramp-thermostat
Yes @cflurin, I've already seen your flow and installed it, but I'm not sure how to integrate it into my system. I would like to control my different phases via automation in HomeKit, so that I do not always have to switch to Node-RED for eg summertime.
Maybe you have an example that you would like to share, preferably to insert in Node Red. I would be very happy about that.
Thanks for your Help.
As this isn't a homebridge-mqtt issue it's better to ask for help here:
https://groups.google.com/forum/#!forum/node-red
or slack:
Yes, I know that this is not really a homebridge-mqtt issue. However, I was hoping someone might be able to share a working example, so that those who are looking for something like that can directly find an example, because my question was more related to Node-Red in relation to Homebridge. But if nobody can help me here, I'll probably have to ask again. Thank you anyway.
[{"id":"631660ae.0f5f7","type":"subflow","name":"MyRBEnode","info":"","in":[{"x":50,"y":30,"wires":[{"id":"8f67c618.9091f8"},{"id":"e0d8de85.45f84"}]}],"out":[{"x":432,"y":36,"wires":[{"id":"8f67c618.9091f8","port":0},{"id":"e0d8de85.45f84","port":0}]}]},{"id":"8f67c618.9091f8","type":"rbe","z":"631660ae.0f5f7","name":"","func":"rbe","gap":"","start":"","inout":"out","x":216.5,"y":54,"wires":[[]]},{"id":"e0d8de85.45f84","type":"delay","z":"631660ae.0f5f7","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":226.5,"y":99,"wires":[[]]},{"id":"7c3336c0.e077e8","type":"subflow","name":"Thermostat","info":"","in":[{"x":40,"y":120,"wires":[{"id":"37b49520.9f3bfa"}]}],"out":[{"x":1280,"y":60,"wires":[{"id":"fd7e2447.f39d48","port":0},{"id":"541f25aa.b7869c","port":0}]},{"x":1240,"y":240,"wires":[{"id":"515a6669.8dea88","port":0},{"id":"5c79e63.14eb618","port":0}]},{"x":1240,"y":340,"wires":[{"id":"9761b047.07231","port":0},{"id":"6ce53b15.2c35b4","port":0}]},{"x":1000,"y":660,"wires":[{"id":"519e8ef3.e9f2c","port":0},{"id":"91ee0830.b95a48","port":0}]}],"outputLabels":["CurrentHeatingCoolingState","CurrentTemperature","TargetTemperature","TargetHeatingCoolingState"]},{"id":"37b49520.9f3bfa","type":"switch","z":"7c3336c0.e077e8","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"TargetHeatingCoolingState","vt":"str"},{"t":"eq","v":"CurrentTemperature","vt":"str"},{"t":"eq","v":"TargetTemperature","vt":"str"}],"checkall":"false","outputs":3,"x":150,"y":120,"wires":[["9887363a.a1dac8"],["1ff2b9d2.f64a76"],["7fd4597a.ee7098"]]},{"id":"9887363a.a1dac8","type":"switch","z":"7c3336c0.e077e8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":2,"x":410,"y":80,"wires":[["4c9ba387.91734c"],["ddfcbc1c.935f3"]]},{"id":"58884980.cb6ac8","type":"ramp-thermostat","z":"7c3336c0.e077e8","name":"","profile":"319cdba9.8b1dcc","hysteresisplus":"0","hysteresisminus":"0.4","x":640,"y":180,"wires":[["9bddc991.e5e848"],["44252276.17ba9c"],["4b0d8248.9ed13c"]]},{"id":"1ff2b9d2.f64a76","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"setCurrent","tot":"str"},{"t":"set","p":"setCurrent","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":120,"wires":[["58884980.cb6ac8"]]},{"id":"7fd4597a.ee7098","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"setTarget","tot":"str"},{"t":"set","p":"setTarget","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":160,"wires":[["58884980.cb6ac8"]]},{"id":"4c9ba387.91734c","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"Power","pt":"flow","to":"false","tot":"bool"},{"t":"set","p":"TargetHeatingCoolingState","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":40,"wires":[["9bddc991.e5e848"]]},{"id":"9bddc991.e5e848","type":"function","z":"7c3336c0.e077e8","name":"","func":"var power = flow.get('Power');\n\nif (power===false || power === undefined)\n{\n msg.payload=0;\n return msg;\n}\n\n if (msg.topic == \"state\")\n {\n if (msg.payload===false)\n {\n msg.payload=0;\n }\n\n if (msg.payload===true)\n {\n msg.payload=1;\n }\n return msg;\n }\n","outputs":1,"noerr":0,"x":790,"y":100,"wires":[["c6e32c83.95c0b"]]},{"id":"7a2ea0e5.31d3d","type":"inject","z":"7c3336c0.e077e8","name":"","topic":"setCurrent","payload":"setCurrent","payloadType":"flow","repeat":"10","crontab":"","once":false,"x":387.5,"y":216,"wires":[["58884980.cb6ac8"]]},{"id":"c9e4eec.3ead11","type":"inject","z":"7c3336c0.e077e8","name":"","topic":"TargetHeatingCoolingState","payload":"TargetHeatingCoolingState","payloadType":"flow","repeat":"10","crontab":"","once":false,"x":430,"y":680,"wires":[["a1bc9913.cd29d8"]]},{"id":"ddfcbc1c.935f3","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"Power","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"TargetHeatingCoolingState","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":80,"wires":[["9bddc991.e5e848"]]},{"id":"c6e32c83.95c0b","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"CurrentHeatingCoolingState","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"CurrentHeatingCoolingState","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":140,"wires":[["fd7e2447.f39d48","541f25aa.b7869c"]]},{"id":"da2d8fe3.d459c","type":"inject","z":"7c3336c0.e077e8","name":"","topic":"CurrentHeatingCoolingState","payload":"CurrentHeatingCoolingState","payloadType":"flow","repeat":"60","crontab":"","once":false,"x":930,"y":80,"wires":[["fd7e2447.f39d48","541f25aa.b7869c"]]},{"id":"a1bc9913.cd29d8","type":"function","z":"7c3336c0.e077e8","name":"","func":"if (msg.payload===undefined)\n{\n msg.payload=0;\n}\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":680,"wires":[["519e8ef3.e9f2c","91ee0830.b95a48"]]},{"id":"44252276.17ba9c","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"CurrentTemperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":260,"wires":[["515a6669.8dea88","5c79e63.14eb618"]]},{"id":"4b0d8248.9ed13c","type":"change","z":"7c3336c0.e077e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"TargetTemperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":340,"wires":[["9761b047.07231","6ce53b15.2c35b4"]]},{"id":"91ee0830.b95a48","type":"delay","z":"7c3336c0.e077e8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":840,"y":680,"wires":[[]]},{"id":"519e8ef3.e9f2c","type":"rbe","z":"7c3336c0.e077e8","name":"","func":"rbe","gap":"","start":"","inout":"out","x":870,"y":640,"wires":[[]]},{"id":"6ce53b15.2c35b4","type":"delay","z":"7c3336c0.e077e8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1080,"y":360,"wires":[[]]},{"id":"9761b047.07231","type":"rbe","z":"7c3336c0.e077e8","name":"","func":"rbe","gap":"","start":"","inout":"out","x":1110,"y":320,"wires":[[]]},{"id":"5c79e63.14eb618","type":"delay","z":"7c3336c0.e077e8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1080,"y":260,"wires":[[]]},{"id":"515a6669.8dea88","type":"rbe","z":"7c3336c0.e077e8","name":"","func":"rbe","gap":"","start":"","inout":"out","x":1110,"y":220,"wires":[[]]},{"id":"fd7e2447.f39d48","type":"rbe","z":"7c3336c0.e077e8","name":"","func":"rbe","gap":"","start":"","inout":"out","x":1090,"y":60,"wires":[[]]},{"id":"541f25aa.b7869c","type":"delay","z":"7c3336c0.e077e8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1140,"y":100,"wires":[[]]},{"id":"cab45f3e.49325","type":"inject","z":"7c3336c0.e077e8","name":"","topic":"setTarget","payload":"setTarget","payloadType":"flow","repeat":"10","crontab":"","once":false,"x":400,"y":260,"wires":[["58884980.cb6ac8"]]},{"id":"319cdba9.8b1dcc","type":"profile","z":"","name":"winter","time1":"00:00","temp1":"19","time2":"24:00","temp2":"19","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"b2a0c627.9967f","type":"mqtt in","z":"392a15fc.5924ba","name":"","topic":"/LivingRoom/DHT/Temperature","qos":"2","broker":"26d6c372.eab9cc","x":190,"y":480,"wires":[["19867af9.53efb5","4d714546.85df4c"]]},{"id":"5ecd10ce.c84138","type":"homekit-service","z":"392a15fc.5924ba","accessory":"ef6092ac.555ca","name":"Heating Thermostat","serviceName":"Thermostat","x":927,"y":224,"wires":[["50683e5f.dd3b8"]]},{"id":"cf7a87a1.a01478","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/ESP4/pcfgpio/66","qos":"1","retain":"true","broker":"26d6c372.eab9cc","x":1090,"y":1100,"wires":[]},{"id":"14d21b84.157dec","type":"mqtt in","z":"392a15fc.5924ba","name":"","topic":"/openhab/get/Thermostat_Setting","qos":"2","broker":"26d6c372.eab9cc","x":173,"y":575,"wires":[["def94c36.fc644"]]},{"id":"da2a7398.857bd","type":"mqtt in","z":"392a15fc.5924ba","name":"","topic":"/openhab/get/Thermostat_Power","qos":"2","broker":"26d6c372.eab9cc","x":190,"y":340,"wires":[["394125ac.0f674a"]]},{"id":"27b64cb1.7777ac","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/openhab/set/Thermostat_Setting","qos":"","retain":"","broker":"26d6c372.eab9cc","x":1200,"y":440,"wires":[]},{"id":"f2772305.b792f","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/openhab/set/CurrentThermostatMode","qos":"","retain":"","broker":"26d6c372.eab9cc","x":954,"y":939,"wires":[]},{"id":"144c5bc5.28bc44","type":"function","z":"392a15fc.5924ba","name":"","func":"msg.payload = msg.payload.toString();\nreturn msg;","outputs":1,"noerr":0,"x":970,"y":440,"wires":[["27b64cb1.7777ac"]]},{"id":"496bae91.494f","type":"mqtt in","z":"392a15fc.5924ba","name":"Wemos1.Status","topic":"/ESP4/Thermostat/Status","qos":"2","broker":"26d6c372.eab9cc","x":96,"y":939,"wires":[["43def901.b60d38","3124463c.7f89fa"]]},{"id":"70c2f444.89351c","type":"inject","z":"392a15fc.5924ba","name":"","topic":"","payload":"0","payloadType":"str","repeat":"","crontab":"","once":false,"x":830,"y":1100,"wires":[["cf7a87a1.a01478"]]},{"id":"cb4e01e7.03c1a","type":"subflow:7c3336c0.e077e8","z":"392a15fc.5924ba","name":"","x":750,"y":440,"wires":[["b4e9cc9d.512b6"],["89151096.3804f"],["144c5bc5.28bc44","9e9527f.1d84ed8"],["9e9527f.1d84ed8","9e2766bd.062168","272c821a.cef72e"]]},{"id":"4d714546.85df4c","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"CurrentTemperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":555,"y":414,"wires":[["cb4e01e7.03c1a"]]},{"id":"def94c36.fc644","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"TargetTemperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":558,"y":575,"wires":[["cb4e01e7.03c1a"]]},{"id":"85cdfd1.f0c8b","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"TargetHeatingCoolingState","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":340,"wires":[["cb4e01e7.03c1a"]]},{"id":"e95ba078.19c23","type":"function","z":"392a15fc.5924ba","name":"","func":"var Standby = flow.get('Standby');\n\n\nif (msg.topic==\"CurrentHeatingCoolingState\")\n{\n\n if (msg.payload==\"1\")\n {\n msg.payload=\"HEAT\";\n \n }\n else\n {\n msg.payload=\"OFF\";\n }\n}\n\nif (Standby==1 && msg.payload==\"OFF\")\n{\n msg.payload=\"STANDBY\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":519,"y":992,"wires":[["97e39fb5.8d414"]]},{"id":"43def901.b60d38","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"CurrentHeatingCoolingState","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":940,"wires":[["e95ba078.19c23","a40d5b14.154e88","656a79df.9443e8"]]},{"id":"296bbb83.a19834","type":"debug","z":"392a15fc.5924ba","name":"","active":false,"console":"false","complete":"false","x":876,"y":1034,"wires":[]},{"id":"96cc2049.14858","type":"link in","z":"392a15fc.5924ba","name":"ToHomekit","links":["f3df47fb.b72758","f55e990e.6c58a8","89151096.3804f","9e9527f.1d84ed8"],"x":75,"y":220,"wires":[["fd346b74.1b1de8"]]},{"id":"fd346b74.1b1de8","type":"switch","z":"392a15fc.5924ba","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"CurrentTemperature","vt":"str"},{"t":"eq","v":"CurrentHeatingCoolingState","vt":"str"},{"t":"eq","v":"TargetHeatingCoolingState","vt":"str"},{"t":"eq","v":"TargetTemperature","vt":"str"}],"checkall":"true","outputs":4,"x":210,"y":220,"wires":[["5ff7c598.3068dc"],["7faac7a9.ba39c8"],["f602ffdd.0aac4"],["ab662ecb.2f7bc"]]},{"id":"5ff7c598.3068dc","type":"function","z":"392a15fc.5924ba","name":"CurrentTemperature","func":"var msgs = {};\nmsgs.payload={};\nmsgs.payload.CurrentTemperature=msg.payload;\nreturn msgs;","outputs":1,"noerr":0,"x":480,"y":160,"wires":[["bbaabd45.8c5c3"]]},{"id":"7faac7a9.ba39c8","type":"function","z":"392a15fc.5924ba","name":"CurrentHeatingCoolingState","func":"var msgs = {};\nmsgs.payload={};\nmsgs.payload.CurrentHeatingCoolingState=Number(msg.payload);\nreturn msgs;","outputs":1,"noerr":0,"x":460,"y":200,"wires":[["bbaabd45.8c5c3"]]},{"id":"f602ffdd.0aac4","type":"function","z":"392a15fc.5924ba","name":"TargetHeatingCoolingState","func":"var msgs = {};\nmsgs.payload={};\nmsgs.payload.TargetHeatingCoolingState=msg.payload;\nreturn msgs;","outputs":1,"noerr":0,"x":460,"y":240,"wires":[["bbaabd45.8c5c3"]]},{"id":"ab662ecb.2f7bc","type":"function","z":"392a15fc.5924ba","name":"TargetTemperature","func":"var msgs = {};\nmsgs.payload={};\nmsgs.payload.TargetTemperature=Number(msg.payload);\nreturn msgs;","outputs":1,"noerr":0,"x":490,"y":280,"wires":[["bbaabd45.8c5c3"]]},{"id":"f3df47fb.b72758","type":"link out","z":"392a15fc.5924ba","name":"","links":["96cc2049.14858"],"x":690,"y":843,"wires":[]},{"id":"83347b6e.70b2a8","type":"inject","z":"392a15fc.5924ba","name":"","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":110.55555555555554,"y":823.3333333333334,"wires":[["43def901.b60d38"]]},{"id":"2f85ddc1.586ef2","type":"inject","z":"392a15fc.5924ba","name":"","topic":"","payload":"0","payloadType":"str","repeat":"","crontab":"","once":false,"x":110,"y":880,"wires":[["43def901.b60d38"]]},{"id":"89151096.3804f","type":"link out","z":"392a15fc.5924ba","name":"","links":["96cc2049.14858"],"x":935,"y":400,"wires":[]},{"id":"9e9527f.1d84ed8","type":"link out","z":"392a15fc.5924ba","name":"","links":["96cc2049.14858"],"x":935,"y":480,"wires":[]},{"id":"50683e5f.dd3b8","type":"link out","z":"392a15fc.5924ba","name":"FromHomeKit","links":["25e371b9.520e6e"],"x":1111,"y":223,"wires":[]},{"id":"25e371b9.520e6e","type":"link in","z":"392a15fc.5924ba","name":"","links":["50683e5f.dd3b8"],"x":41,"y":681,"wires":[["41f0a64d.0b38f8"]]},{"id":"fbf0480.53951b8","type":"debug","z":"392a15fc.5924ba","name":"","active":false,"console":"false","complete":"false","x":950,"y":640,"wires":[]},{"id":"b324b30f.ae9be","type":"switch","z":"392a15fc.5924ba","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"TargetHeatingCoolingState","vt":"str"},{"t":"cont","v":"TargetTemperature","vt":"str"}],"checkall":"false","outputs":2,"x":316,"y":681,"wires":[["fe452e16.9b24d"],["791aae49.2d781"]]},{"id":"41f0a64d.0b38f8","type":"json","z":"392a15fc.5924ba","name":"","pretty":false,"x":164.33333333333337,"y":681,"wires":[["b324b30f.ae9be"]]},{"id":"fe452e16.9b24d","type":"json","z":"392a15fc.5924ba","name":"","pretty":false,"x":476,"y":681,"wires":[["5557d902.b7fba8"]]},{"id":"5557d902.b7fba8","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"TargetHeatingCoolingState","tot":"str"},{"t":"move","p":"payload.TargetHeatingCoolingState","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":646,"y":681,"wires":[["fbf0480.53951b8","cb4e01e7.03c1a"]]},{"id":"791aae49.2d781","type":"json","z":"392a15fc.5924ba","name":"","pretty":false,"x":476,"y":721,"wires":[["8b502be5.9361e8"]]},{"id":"8b502be5.9361e8","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"TargetTemperature","tot":"str"},{"t":"move","p":"payload.TargetTemperature","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":646,"y":721,"wires":[["fbf0480.53951b8","cb4e01e7.03c1a"]]},{"id":"3b843053.9091b","type":"debug","z":"392a15fc.5924ba","name":"","active":false,"console":"false","complete":"false","x":1170,"y":560,"wires":[]},{"id":"394125ac.0f674a","type":"function","z":"392a15fc.5924ba","name":"","func":"if (msg.payload==\"ON\")\n{\n msg.payload=1;\n}\nelse\n{\n msg.payload=0;\n}\nreturn msg;","outputs":1,"noerr":0,"x":419.44444444444446,"y":346.66666666666663,"wires":[["85cdfd1.f0c8b"]]},{"id":"9e2766bd.062168","type":"function","z":"392a15fc.5924ba","name":"","func":"if (msg.payload==\"1\")\n{\n msg.payload=\"ON\";\n \n}\nelse\n{\n msg.payload=\"OFF\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":930,"y":520,"wires":[["a89c188b.347a58"]]},{"id":"a89c188b.347a58","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/openhab/set/Thermostat_Power","qos":"","retain":"","broker":"26d6c372.eab9cc","x":1360,"y":520,"wires":[]},{"id":"bbaabd45.8c5c3","type":"delay","z":"392a15fc.5924ba","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":708,"y":224,"wires":[["5ecd10ce.c84138"]]},{"id":"b4e9cc9d.512b6","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/ESP4/pcfgpio/65","qos":"1","retain":"true","broker":"26d6c372.eab9cc","x":1010,"y":320,"wires":[]},{"id":"272c821a.cef72e","type":"change","z":"392a15fc.5924ba","name":"","rules":[{"t":"set","p":"Standby","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":560,"wires":[["3b843053.9091b"]]},{"id":"97e39fb5.8d414","type":"subflow:631660ae.0f5f7","z":"392a15fc.5924ba","x":690.5,"y":991,"wires":[["f2772305.b792f","296bbb83.a19834"]]},{"id":"a40d5b14.154e88","type":"subflow:631660ae.0f5f7","z":"392a15fc.5924ba","x":534,"y":843,"wires":[["f3df47fb.b72758"]]},{"id":"19867af9.53efb5","type":"debug","z":"392a15fc.5924ba","name":"","active":false,"console":"false","complete":"false","x":462,"y":515,"wires":[]},{"id":"656a79df.9443e8","type":"function","z":"392a15fc.5924ba","name":"","func":"\n\nif (msg.topic==\"CurrentHeatingCoolingState\")\n{\n\n if (msg.payload==\"1\")\n {\n msg.payload=\"ON\";\n \n }\n else\n {\n msg.payload=\"OFF\";\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":534,"y":927,"wires":[["bad6fad2.cc3c28"]]},{"id":"bad6fad2.cc3c28","type":"subflow:631660ae.0f5f7","z":"392a15fc.5924ba","x":695,"y":905,"wires":[["b087bbf0.3a2c78"]]},{"id":"b087bbf0.3a2c78","type":"mqtt out","z":"392a15fc.5924ba","name":"","topic":"/openhab/set/DummyThermostatMode","qos":"","retain":"","broker":"26d6c372.eab9cc","x":950,"y":880,"wires":[]},{"id":"3124463c.7f89fa","type":"debug","z":"392a15fc.5924ba","name":"","active":false,"console":"false","complete":"false","x":293.5,"y":1001,"wires":[]},{"id":"723a74c6.89eb5c","type":"mqtt in","z":"392a15fc.5924ba","name":"","topic":"/ESP5/Thermostat/Temperature","qos":"2","broker":"26d6c372.eab9cc","x":220,"y":420,"wires":[["4d714546.85df4c"]]},{"id":"152ade2e.2bd602","type":"comment","z":"392a15fc.5924ba","name":"pcfGpio 66","info":"Use This onn ESP4","x":1090,"y":1052,"wires":[]},{"id":"26d6c372.eab9cc","type":"mqtt-broker","z":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"ef6092ac.555ca","type":"homekit-accessory","z":"","accessoryName":"Pellet_thermostat","pinCode":"210-28-553","port":"","manufacturer":"Pellet Thermostat","model":"Default Model","serialNo":"Default Serial Number","accessoryType":"9"}]
That for starters @jannnfe delete any nodes you dont need like openhab nodes
Hello, can someone help me please with a working thermostat. I get my current temperature from a thermometer over MQTT. I currently have such an approach:
I would like to get the set temperature of Homekit and the heater should only heat as long as the temperature is below this value in the room and only if the thermometer in Homebridge is set to "Heat".
How can I compare two temperatures? The thermometer and the Homebridge?
Thanks!