Toon Thermostat
With this flow you can get control over your Toon Thermostat.
Setting the temperature, switching between the programs and switch the program on and off.
Reading back from the Toon: Temperature, burner state, boiler info and energy use now and energy used today.
Note: Your Toon must be rooted to get this flow working
This is a basic flow that shows/operate the primary use of the Toon Thermostat.
Because I don't have my Toon connected to the Boiler and energy use sensors, it's for now just lying on my workbench, I couldn't tested everything full.
[{"id":"7ecea0bf.17ab3","type":"inject","z":"347d3e92.99b6a2","name":"Make request","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":290,"y":220,"wires":[["7eb913ef.e82a44","ce3b0bc3.f3a9e8","3f6d9df6.f74c82"]]},{"id":"f8630018.8c626","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":750,"y":220,"wires":[["755108cc.c3704"]]},{"id":"1a65f079.fe6118","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":200,"wires":[]},{"id":"755108cc.c3704","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":930,"y":220,"wires":[["1a65f079.fe6118","65b34395.2d6b14"]]},{"id":"7a0f4433.335a04","type":"ui_numeric","z":"347d3e92.99b6a2","name":"","label":"Set temperature","group":"8aaf42a4.55f13","order":2,"width":0,"height":0,"passthru":false,"topic":"","format":"{{value | number:1}}","min":"15","max":"28","step":"0.5","x":520,"y":460,"wires":[["37f42f5d.0bff08"]]},{"id":"2092c805.256a1","type":"function","z":"347d3e92.99b6a2","name":"GetCurrentSetpoint","func":"var CurrentSetpoint = parseInt(msg.payload.currentSetpoint)\n//CurrentSetpoint = CurrentSetpoint /1000\nmsg.payload=CurrentSetpoint /100\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":460,"wires":[["7a0f4433.335a04"]]},{"id":"8da51475.80d3f","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":910,"y":460,"wires":[["fd1fe43b.50411"]]},{"id":"4dc369ad.6df25","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":460,"wires":[]},{"id":"fd1fe43b.50411","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":1090,"y":460,"wires":[["4dc369ad.6df25"]]},{"id":"37f42f5d.0bff08","type":"function","z":"347d3e92.99b6a2","name":"SetSetPoint","func":"msg.url = flow.get(\"ToonUrl\") + \"/happ_thermstat?action=setSetpoint&Setpoint=\" + msg.payload *100\nconsole.log(global.get(\"ToonUrl\"));\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":460,"wires":[["8da51475.80d3f"]]},{"id":"1a94e270.b8719e","type":"ui_template","z":"347d3e92.99b6a2","group":"8aaf42a4.55f13","name":"Page Got Loaded","order":1,"width":0,"height":0,"format":"<script>\n(function() {\n (function(scope) {\n scope.send({payload: \"preload\"}); // this gets sent when the view is opened in the browser\n })(scope);\n})();\n</script>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":270,"y":160,"wires":[["7eb913ef.e82a44","ce3b0bc3.f3a9e8","3f6d9df6.f74c82"]]},{"id":"1adf070.54a8e79","type":"ui_button","z":"347d3e92.99b6a2","name":"","group":"95d43be3.cbc488","order":7,"width":"2","height":"1","passthru":false,"label":"Weg","color":"{{msg.color}}","bgcolor":"","icon":"","payload":"3","payloadType":"str","topic":"","x":550,"y":580,"wires":[["8a742a11.c1a198"]]},{"id":"b9d44b49.4f1a3","type":"ui_button","z":"347d3e92.99b6a2","name":"","group":"95d43be3.cbc488","order":5,"width":"2","height":"1","passthru":false,"label":"Thuis","color":"{{msg.color}}","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":550,"y":620,"wires":[["8a742a11.c1a198"]]},{"id":"2616706f.0e71f8","type":"ui_button","z":"347d3e92.99b6a2","name":"","group":"95d43be3.cbc488","order":6,"width":"2","height":"1","passthru":false,"label":"Slapen","color":"{{msg.color}}","bgcolor":"","icon":"","payload":"2","payloadType":"str","topic":"","x":540,"y":660,"wires":[["8a742a11.c1a198"]]},{"id":"a744e3ff.99e738","type":"ui_button","z":"347d3e92.99b6a2","name":"","group":"95d43be3.cbc488","order":8,"width":"2","height":"1","passthru":false,"label":"Comfort","color":"{{msg.color}}","bgcolor":"","icon":"","payload":"0","payloadType":"str","topic":"","x":540,"y":700,"wires":[["8a742a11.c1a198"]]},{"id":"8a742a11.c1a198","type":"function","z":"347d3e92.99b6a2","name":"SetSetPoint","func":"msg.url = flow.get(\"ToonUrl\") + \"/happ_thermstat?action=changeSchemeState&state=2&temperatureState=\" + msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":640,"wires":[["30895abf.20e1e6"]]},{"id":"f4e7c57b.080588","type":"function","z":"347d3e92.99b6a2","name":"CurrentSetpointFontColor","func":"var ActiveState = msg.payload.activeState\nvar Offcolor = \"white\";\nvar Oncolor = \"orange\";\n\n\nvar msg1= {color: Offcolor};\nvar msg2= {color: Offcolor};\nvar msg3= {color: Offcolor};\nvar msg4= {color: Offcolor};\n\nswitch (ActiveState) {\n case \"0\":\n msg4.color = Oncolor;\n break;\n case \"1\":\n msg2.color = Oncolor;\n break;\n case \"2\":\n msg3.color = Oncolor;\n break;\n case \"3\":\n msg1.color = Oncolor;\n break;\n default:\n console.log(\"Error, unknown state: \" + msg.payload.activeState)\n \tbreak;\n } \n//var msg1 = { payload:\"first out of output 1\" };\n//var msg2 = { payload:\"second out of output 1\" };\n//var msg3 = { payload:\"third out of output 1\" };\n//var msg4 = { payload:\"only message from output 2\" };\nreturn [ msg1, msg2, msg3 , msg4 ];\n\n//var newMsg = { payload: msg.payload.length };\n//return [msg, newMsg];\n//return msg1;","outputs":4,"noerr":0,"x":250,"y":640,"wires":[["1adf070.54a8e79"],["b9d44b49.4f1a3"],["2616706f.0e71f8"],["a744e3ff.99e738"]]},{"id":"461ee9b9.5136b8","type":"change","z":"347d3e92.99b6a2","name":"RefreshInfo","rules":[{"t":"delete","p":"url","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":280,"wires":[["7eb913ef.e82a44","ce3b0bc3.f3a9e8","3f6d9df6.f74c82"]]},{"id":"dbcdb202.fea488","type":"ui_text","z":"347d3e92.99b6a2","group":"8aaf42a4.55f13","order":3,"width":0,"height":0,"name":"","label":"Temperature","format":"{{msg.payload.currentTemp /100 | number:1}} °C","layout":"row-spread","x":530,"y":860,"wires":[]},{"id":"ca136d6e.157888","type":"ui_switch","z":"347d3e92.99b6a2","name":"","label":"Program","group":"95d43be3.cbc488","order":9,"width":"4","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":780,"wires":[["6eee230f.bc0d44"]]},{"id":"6eee230f.bc0d44","type":"function","z":"347d3e92.99b6a2","name":"ProgramOnOff","func":"msg.url = flow.get(\"ToonUrl\") +\"/happ_thermstat?action=changeSchemeState&state=\" + msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":720,"y":780,"wires":[["13c7c5fc.7cb61a"]]},{"id":"fccd656c.718828","type":"change","z":"347d3e92.99b6a2","name":"SetCurrentState","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.programState","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":780,"wires":[["ca136d6e.157888"]]},{"id":"faa56b45.f0e52","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":750,"y":160,"wires":[["d9e441b6.dabd"]]},{"id":"76332982.88e64","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":140,"wires":[]},{"id":"d9e441b6.dabd","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":930,"y":160,"wires":[["76332982.88e64","708b895.ab0b878"]]},{"id":"f848fd2d.b5fb78","type":"function","z":"347d3e92.99b6a2","name":"ToonIP","func":"//Set here the IP of the Toon\nflow.set(\"ToonUrl\", \"http://192.168.1.235\");\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":60,"wires":[[]]},{"id":"708b895.ab0b878","type":"link out","z":"347d3e92.99b6a2","name":"Boilerinfo","links":["cc3e5c5b.48441","68f02e1.7ba195","b7560943.c88ec","2f2d1c9a.58275c","38eae98b.64a7ae"],"x":1135,"y":160,"wires":[]},{"id":"65b34395.2d6b14","type":"link out","z":"347d3e92.99b6a2","name":"ThermostatInfo","links":["57d7f6ec.8707e8","d3a96d23.18d2a","7951975e.719348","fc83235d.71ed78","c4539b9a.23191"],"x":1135,"y":220,"wires":[]},{"id":"57d7f6ec.8707e8","type":"link in","z":"347d3e92.99b6a2","name":"","links":["65b34395.2d6b14"],"x":55,"y":640,"wires":[["f4e7c57b.080588"]]},{"id":"d3a96d23.18d2a","type":"link in","z":"347d3e92.99b6a2","name":"","links":["65b34395.2d6b14"],"x":55,"y":780,"wires":[["fccd656c.718828"]]},{"id":"30895abf.20e1e6","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":910,"y":640,"wires":[["934234aa.64b5d"]]},{"id":"13c7c5fc.7cb61a","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":910,"y":780,"wires":[["b8439468.f03c58"]]},{"id":"934234aa.64b5d","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":1090,"y":640,"wires":[["b948b05a.1c9bd8","461ee9b9.5136b8"]]},{"id":"b8439468.f03c58","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":1090,"y":780,"wires":[["ae39a33a.c9c8c8","461ee9b9.5136b8"]]},{"id":"b948b05a.1c9bd8","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":640,"wires":[]},{"id":"ae39a33a.c9c8c8","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":780,"wires":[]},{"id":"7951975e.719348","type":"link in","z":"347d3e92.99b6a2","name":"","links":["65b34395.2d6b14"],"x":55,"y":460,"wires":[["2092c805.256a1"]]},{"id":"fc83235d.71ed78","type":"link in","z":"347d3e92.99b6a2","name":"","links":["65b34395.2d6b14"],"x":55,"y":860,"wires":[["dbcdb202.fea488"]]},{"id":"3fc1a5f6.05a1d2","type":"inject","z":"347d3e92.99b6a2","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":0.1,"x":290,"y":60,"wires":[["f848fd2d.b5fb78"]]},{"id":"20607758.79e41","type":"http request","z":"347d3e92.99b6a2","name":"","method":"GET","ret":"txt","url":"","tls":"","x":750,"y":280,"wires":[["c05a09ea.1afe"]]},{"id":"c05a09ea.1afe","type":"json","z":"347d3e92.99b6a2","name":"","property":"payload","action":"","pretty":false,"x":930,"y":280,"wires":[["640d1423.83909c","2dadc345.8e76e4"]]},{"id":"640d1423.83909c","type":"debug","z":"347d3e92.99b6a2","name":"","active":false,"console":"false","complete":"false","x":1270,"y":260,"wires":[]},{"id":"2dadc345.8e76e4","type":"link out","z":"347d3e92.99b6a2","name":"ZwaveDevices","links":["78bfca74.bdab8c","1b8d2933.fbfb3f","9e489130.63d07","bf57bdb2.5c2398"],"x":1135,"y":280,"wires":[]},{"id":"9f0587f0.51b0f","type":"ui_text","z":"347d3e92.99b6a2","group":"68262ae8.a7954c","order":1,"width":0,"height":0,"name":"","label":"Current Now","format":"{{msg.payload[\"dev_4.2\"].CurrentElectricityFlow | number:0}} Watt","layout":"row-spread","x":530,"y":1020,"wires":[]},{"id":"78bfca74.bdab8c","type":"link in","z":"347d3e92.99b6a2","name":"","links":["2dadc345.8e76e4"],"x":55,"y":1020,"wires":[["9f0587f0.51b0f"]]},{"id":"98e97308.9de358","type":"ui_text","z":"347d3e92.99b6a2","group":"68262ae8.a7954c","order":3,"width":0,"height":0,"name":"","label":"Gas Now","format":"{{msg.payload[\"dev_4.1\"].CurrentGasFlow | number:2}} M²","layout":"row-spread","x":520,"y":1100,"wires":[]},{"id":"1b8d2933.fbfb3f","type":"link in","z":"347d3e92.99b6a2","name":"","links":["2dadc345.8e76e4"],"x":55,"y":1100,"wires":[["98e97308.9de358"]]},{"id":"c02b3730.834548","type":"ui_text","z":"347d3e92.99b6a2","group":"68262ae8.a7954c","order":4,"width":0,"height":0,"name":"","label":"Gas Today","format":"{{msg.payload[\"dev_4.1\"].CurrentGasQuantity | number:2}} M²","layout":"row-spread","x":530,"y":1140,"wires":[]},{"id":"9e489130.63d07","type":"link in","z":"347d3e92.99b6a2","name":"","links":["2dadc345.8e76e4"],"x":55,"y":1140,"wires":[["c02b3730.834548"]]},{"id":"8a9d8782.18fe48","type":"ui_text","z":"347d3e92.99b6a2","group":"68262ae8.a7954c","order":2,"width":0,"height":0,"name":"","label":"Current Today","format":"{{msg.payload[\"dev_4.2\"].CurrentElectricityQuantity | number:0}} KwH","layout":"row-spread","x":540,"y":1060,"wires":[]},{"id":"bf57bdb2.5c2398","type":"link in","z":"347d3e92.99b6a2","name":"","links":["2dadc345.8e76e4"],"x":55,"y":1060,"wires":[["8a9d8782.18fe48"]]},{"id":"398e2267.33384e","type":"ui_text","z":"347d3e92.99b6a2","group":"4a9bd976.5ef068","order":3,"width":0,"height":0,"name":"","label":"Boiler Set Point","format":"{{msg.payload.boilerSetpoint}} °C","layout":"row-spread","x":540,"y":1220,"wires":[]},{"id":"cc3e5c5b.48441","type":"link in","z":"347d3e92.99b6a2","name":"","links":["708b895.ab0b878"],"x":55,"y":1220,"wires":[["398e2267.33384e"]]},{"id":"adc9bc5c.070918","type":"ui_text","z":"347d3e92.99b6a2","group":"4a9bd976.5ef068","order":3,"width":0,"height":0,"name":"","label":"Boiler Out Temperature","format":"{{msg.payload.boilerOutTemp}} °C","layout":"row-spread","x":570,"y":1260,"wires":[]},{"id":"68f02e1.7ba195","type":"link in","z":"347d3e92.99b6a2","name":"","links":["708b895.ab0b878"],"x":55,"y":1260,"wires":[["adc9bc5c.070918"]]},{"id":"2a9fff46.39e03","type":"ui_text","z":"347d3e92.99b6a2","group":"4a9bd976.5ef068","order":3,"width":0,"height":0,"name":"","label":"Boiler In Temperature","format":"{{msg.payload.boilerInTemp}} °C","layout":"row-spread","x":560,"y":1300,"wires":[]},{"id":"b7560943.c88ec","type":"link in","z":"347d3e92.99b6a2","name":"","links":["708b895.ab0b878"],"x":55,"y":1300,"wires":[["2a9fff46.39e03"]]},{"id":"d9b161ee.1a13b8","type":"ui_text","z":"347d3e92.99b6a2","group":"4a9bd976.5ef068","order":3,"width":0,"height":0,"name":"","label":"Boiler Pressure","format":"{{msg.payload.boilerPressure}} Bar","layout":"row-spread","x":540,"y":1340,"wires":[]},{"id":"2f2d1c9a.58275c","type":"link in","z":"347d3e92.99b6a2","name":"","links":["708b895.ab0b878"],"x":55,"y":1340,"wires":[["d9b161ee.1a13b8"]]},{"id":"b0a4b156.c27f4","type":"ui_text","z":"347d3e92.99b6a2","group":"4a9bd976.5ef068","order":3,"width":0,"height":0,"name":"","label":"Modulation Level","format":"{{msg.payload.boilerModulationLevel}} %","layout":"row-spread","x":550,"y":1380,"wires":[]},{"id":"38eae98b.64a7ae","type":"link in","z":"347d3e92.99b6a2","name":"","links":["708b895.ab0b878"],"x":55,"y":1380,"wires":[["b0a4b156.c27f4"]]},{"id":"7eb913ef.e82a44","type":"function","z":"347d3e92.99b6a2","name":"GetBoilerInfo","func":"msg.url = flow.get(\"ToonUrl\") + \"/boilerstatus/boilervalues.txt\"\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":160,"wires":[["faa56b45.f0e52"]]},{"id":"ce3b0bc3.f3a9e8","type":"function","z":"347d3e92.99b6a2","name":"GetThermostatInfo","func":"msg.url = flow.get(\"ToonUrl\") + \"/happ_thermstat?action=getThermostatInfo\"\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":220,"wires":[["f8630018.8c626"]]},{"id":"3f6d9df6.f74c82","type":"function","z":"347d3e92.99b6a2","name":"GetZwaveDevices","func":"msg.url = flow.get(\"ToonUrl\") + \"/hdrv_zwave?action=getDevices.json\"\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":280,"wires":[["20607758.79e41"]]},{"id":"5361090b.ec599","type":"ui_text","z":"347d3e92.99b6a2","group":"8aaf42a4.55f13","order":0,"width":"0","height":"0","name":"Burner","label":"Burner","format":"<font color={{msg.color}}><i class=\"fa fa-fire fa-2x\" style= \"font-size:12px;\"></i></font>","layout":"row-spread","x":510,"y":920,"wires":[]},{"id":"f5abd84e.142128","type":"switch","z":"347d3e92.99b6a2","name":"Burner on/off","property":"payload.burnerInfo","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":920,"wires":[["fd73a2d2.5ffa38"],["b8202ffc.a40bd"]]},{"id":"fd73a2d2.5ffa38","type":"change","z":"347d3e92.99b6a2","name":"Orange","rules":[{"t":"set","p":"color","pt":"msg","to":"orange","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":900,"wires":[["5361090b.ec599"]]},{"id":"b8202ffc.a40bd","type":"change","z":"347d3e92.99b6a2","name":"Black","rules":[{"t":"set","p":"color","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":940,"wires":[["5361090b.ec599"]]},{"id":"c4539b9a.23191","type":"link in","z":"347d3e92.99b6a2","name":"","links":["65b34395.2d6b14"],"x":55,"y":920,"wires":[["f5abd84e.142128"]]},{"id":"da1985fa.aa2e38","type":"ui_button","z":"347d3e92.99b6a2","name":"Refresh button","group":"8aaf42a4.55f13","order":0,"width":"1","height":"1","passthru":false,"label":"","color":"black","bgcolor":"white","icon":"refresh","payload":"","payloadType":"str","topic":"","x":520,"y":520,"wires":[["461ee9b9.5136b8"]]},{"id":"5cdf3739.05d72","type":"comment","z":"347d3e92.99b6a2","name":"www.EvertDekker.com","info":"Toon laten rooten?\nInfo, mail me ToonRooten@ bovenstaande domein","x":640,"y":1460,"wires":[]},{"id":"dde6c551.51bc1","type":"comment","z":"347d3e92.99b6a2","name":"<-Change you ip adres here, click for more info","info":"Set here here the ip address your Toon uses.\n\n========================================\nVer 1.0 12-01-2019 EvertDekker.com\n========================================\nNote: This flow only works with rooted Toons.\nTested with Toon version 4.22.7\n========================================\n\nThis is a basic flow that shows/operate the primary use of the Toon Thermostat.\nBecause I don't have my Toon connected to the Boiler and energy use sensors,\nit's for now just lying on my workbench, I couldn't tested everything full.\n\n\n\nMore info about Toon Rooten:\nhttps://ehoco.nl/rooten-van-enecos-toon-thermostaat/\n\nor if you want your Toon get rooted mail me, see at the end of this flow.\n\n","x":840,"y":60,"wires":[]},{"id":"8aaf42a4.55f13","type":"ui_group","z":"","name":"Toon","tab":"82f3c11c.0fb79","disp":true,"width":"6"},{"id":"95d43be3.cbc488","type":"ui_group","z":"","name":"Program","tab":"82f3c11c.0fb79","order":2,"disp":true,"width":"6"},{"id":"68262ae8.a7954c","type":"ui_group","z":"","name":"Energy use","tab":"82f3c11c.0fb79","order":3,"disp":true,"width":"6"},{"id":"4a9bd976.5ef068","type":"ui_group","z":"","name":"Boiler Info","tab":"82f3c11c.0fb79","order":4,"disp":true,"width":"6"},{"id":"82f3c11c.0fb79","type":"ui_tab","z":"","name":"Toon","icon":"dashboard"}]