SergiuToporjinschi / node-red-contrib-heater-controller

Heater controller for node-red dashboard
GNU General Public License v3.0
18 stars 17 forks source link

How does it work #1

Closed inventvictor closed 5 years ago

inventvictor commented 5 years ago

What does this do? How does it work?

SergiuToporjinschi commented 5 years ago

Hi, is not ready yet. I would say that is functional now but some issues with statuses sent from it. is an interface for a heater; the slider is the custom temperature set by the user, the slider is changing the target temperature. the node should receive a message with topic "currentTemp" which is the refere temperature. That message triggers also the calculation to decide if it should turn the heater on or off which is outputting a message with "heatterStatus" and this value you can tune the heater on or off. I'm publishing it because on my local server I have to get it from internet.

SergiuToporjinschi commented 5 years ago

if you have any improvement ideas... I would like to hear them :)

SergiuToporjinschi commented 5 years ago

here is a testing schema [{"id":"e46f3c73.cf7c","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"f41b3621.6bf3b8","type":"inject","z":"e46f3c73.cf7c","name":"currentTemp25","topic":"currentTemp","payload":"25","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":440,"wires":[["341466f0.92458a"]]},{"id":"9d4d8b48.228078","type":"debug","z":"e46f3c73.cf7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":650,"y":440,"wires":[]},{"id":"e3821c5c.8a1d7","type":"inject","z":"e46f3c73.cf7c","name":"","topic":"usrVal","payload":"{\"userTargetValue\":30,\"isUserCustom\":true}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":280,"wires":[["76775de6.626e34"]]},{"id":"a9453a28.50e1d8","type":"inject","z":"e46f3c73.cf7c","name":"","topic":"currentHeaterStatus","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":480,"wires":[["341466f0.92458a"]]},{"id":"76775de6.626e34","type":"debug","z":"e46f3c73.cf7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":370,"y":280,"wires":[]},{"id":"341466f0.92458a","type":"heater-controller","z":"e46f3c73.cf7c","group":"b0258c63.bbce3","name":"t","width":"0","height":"0","sliderMinValue":"11","sliderMaxValue":35,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n \"Monday\" : {\n \"00:00\" : 19,\n \"06:20\" : 22,\n \"08:00\" : 19,\n \"16:40\" : 22,\n \"23:59\" : 19\n },\n \"Tuesday\" : {\n \"00:00\" : 19,\n \"06:20\" : 22,\n \"08:00\" : 19,\n \"16:40\" : 22,\n \"23:59\" : 19\n },\n \"Wednesday\" : {\n \"00:00\" : 19,\n \"06:20\" : 22,\n \"08:00\" : 19,\n \"16:40\" : 22,\n \"23:59\" : 19\n },\n \"Thursday\" : {\n \"00:00\" : 19,\n \"06:20\" : 22,\n \"08:00\" : 19,\n \"16:40\" : 22,\n \"23:59\" : 19\n },\n \"Friday\" : {\n \"00:00\" : 19,\n \"06:20\" : 23,\n \"08:00\" : 19,\n \"16:40\" : 22,\n \"23:59\" : 19\n },\n \"Saturday\" : {\n \"00:00\" : 19,\n \"08:00\" : 20,\n \"20:00\" : 22,\n \"23:59\" : 19\n },\n \"Sunday\" : {\n \"00:00\" : 19,\n \"08:00\" : 20,\n \"20:00\" : 22,\n \"23:59\" : 19\n }\n}","x":470,"y":440,"wires":[["9d4d8b48.228078"]]},{"id":"db0e2e7.d4974d","type":"template","z":"e46f3c73.cf7c","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the payload: {{payload}} !","output":"str","x":360,"y":200,"wires":[[]]},{"id":"6eef11a7.aefe7","type":"inject","z":"e46f3c73.cf7c","name":"","topic":"currentHeaterStatus","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":520,"wires":[["341466f0.92458a"]]},{"id":"997fce.a985a03","type":"inject","z":"e46f3c73.cf7c","name":"currentTemp10","topic":"currentTemp","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":400,"wires":[["341466f0.92458a"]]},{"id":"124896d5.9a1c49","type":"inject","z":"e46f3c73.cf7c","name":"currentTemp25.5","topic":"currentTemp","payload":"25.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":560,"wires":[["341466f0.92458a"]]},{"id":"b0258c63.bbce3","type":"ui_group","z":"","name":"Group 1","tab":"e816c0b4.2172d","order":1,"disp":true,"width":"8","collapse":false},{"id":"e816c0b4.2172d","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

inventvictor commented 5 years ago

One quick question is that: What temperature hardware are you targeting?

You said that "is an interface for a heater; the slider is the custom temperature set by the user, the slider is changing the target temperature."

Please what do u mean exactly?