Comparison of two temperatures

[{"id":"2359a6f.6d6f85a","type":"tab","label":"Warm","disabled":false,"info":""},{"id":"3faaa291.62672e","type":"comment","z":"2359a6f.6d6f85a","name":"Батарея в кабинете","info":"","x":240,"y":40,"wires":[]},{"id":"a4b33d28.92113","type":"function","z":"2359a6f.6d6f85a","name":"set current","func":"let z = Number(msg.payload);\nmsg = {\n    payload: z,\n    topic: 'setCurrent',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload});\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":120,"wires":[["e84ca637.d8d478","b55a10cf.c78568"]]},{"id":"53011dcc.f405c4","type":"function","z":"2359a6f.6d6f85a","name":"set target","func":"let z = Number(msg.payload);\nmsg = {\n    payload: z,\n    topic: 'setTarget',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":220,"wires":[["e84ca637.d8d478","b55a10cf.c78568"]]},{"id":"e84ca637.d8d478","type":"debug","z":"2359a6f.6d6f85a","name":"debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"b55a10cf.c78568","type":"ramp-thermostat","z":"2359a6f.6d6f85a","name":"test","profile":"79f20c8c.fe6764","hysteresisplus":"1","hysteresisminus":"1","x":790,"y":220,"wires":[["d8c8af25.7b31c8"],["bdb90a8a.0b02d8"],["af6efea8.67e878"]]},{"id":"872e9ee6.23ca38","type":"inject","z":"2359a6f.6d6f85a","name":"current temp 21","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setCurrent","payload":"21","payloadType":"str","x":280,"y":120,"wires":[["a4b33d28.92113"]]},{"id":"9d9d8dca.7732a8","type":"inject","z":"2359a6f.6d6f85a","name":"target","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setTarget","payload":"25","payloadType":"str","x":290,"y":220,"wires":[["53011dcc.f405c4"]]},{"id":"d8c8af25.7b31c8","type":"debug","z":"2359a6f.6d6f85a","name":"A","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":160,"wires":[]},{"id":"bdb90a8a.0b02d8","type":"debug","z":"2359a6f.6d6f85a","name":"B","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":220,"wires":[]},{"id":"af6efea8.67e878","type":"debug","z":"2359a6f.6d6f85a","name":"C","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":280,"wires":[]},{"id":"b351a6e0.7595a","type":"inject","z":"2359a6f.6d6f85a","name":"hysteresis plus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":260,"y":300,"wires":[["bd34c740.60466"]]},{"id":"bd34c740.60466","type":"function","z":"2359a6f.6d6f85a","name":"set hysteresis plus","func":"let z = Number(msg.payload);\nmsg = {\n    payload: z,\n    topic: 'setHysteresisPlus',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":300,"wires":[["b55a10cf.c78568","e84ca637.d8d478"]]},{"id":"9e24fb02.4ad3d8","type":"inject","z":"2359a6f.6d6f85a","name":"hysteresis minus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":260,"y":380,"wires":[["4d43a817.260308"]]},{"id":"4d43a817.260308","type":"function","z":"2359a6f.6d6f85a","name":"set hysterisis minus","func":"let z = Number(msg.payload);\nmsg = {\n    payload: z,\n    topic: 'setHysteresisMinus',\n}\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload });\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":380,"wires":[["b55a10cf.c78568","e84ca637.d8d478"]]},{"id":"f676a5ad.ec8888","type":"inject","z":"2359a6f.6d6f85a","name":"current temp 27","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setCurrent","payload":"27","payloadType":"str","x":280,"y":180,"wires":[["a4b33d28.92113"]]},{"id":"79f20c8c.fe6764","type":"profile","name":"test","time1":"00:00","temp1":"10","time2":"23:59","temp2":"10","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""}]

latest demo, promise this is the last for a while

Thank you, but I'll translate and try again tomorrow night.

Thanks. Exactly what you need. I couldn't figure out how to set a msg.topic. I did it by analogy and already at the output I make a replacement for openhab true = on, false = off.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.