how do i use this thermostat in node-red??

1,054 views
Skip to first unread message

ivar denstore

unread,
Jul 15, 2017, 6:05:32 AM7/15/17
to Node-RED
Hi, I'm trying to get this thermostat to work both day and night.
Right now the thermostat only works on the day not at night i want the thermostat to work both day and night.

I do not find much information about this thermostat unfortunately :(

In the info box at node-red they say the suncalc module and timing options as well as temperature input from one of 2 sensors to act as a thermostat


I do not really understand how they mean. I have a suncalc node and a dht22 but what timing opt do they mean? How should I use these nodes in a flow for it to work

Sorry is not good at this with node red trying as best i can. Is new with this so it can come a little strange questions: P

If i  look in the thermostat node, I have set the node to start 20:00 and the disable  08:00 (European time) (Stockholm)

This is the same as start 8pm and the disable 8am

why do this not work ? please help :) 

Name thermostat air night right
Type thermostat
ID"7f2e4b31.454214"
outtopic"payload"
outpayload1"1"
outpayload2"0"
lat"58.322691"
lon"15.133535"
start"sunrise"
end"sunset"
on1"1200"
off1"480"
on2"16:00"
off2"23:00"
peak"25"
offpeak"22"
frost"10"
suntrue
montrue
tuetrue
wedtrue
thutrue
fritrue
sattrue
jantrue
febtrue
martrue
aprtrue
maytrue
juntrue
jultrue
augtrue
septrue
octtrue
novtrue
dectrue

[{"id":"132c424.37088be","type":"inject","z":"4251d470.1c915c","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"x":107,"y":363,"wires":[["31c34154.e55a7e"]]},{"id":"31c34154.e55a7e","type":"rpi-dht22","z":"4251d470.1c915c","name":"dht 22 right","topic":"dht22","dht":"22","pintype":"0","pin":"18","x":287,"y":363,"wires":[["10e0b15c.3b302f","f8a59fe4.cab2d"]]},{"id":"10e0b15c.3b302f","type":"function","z":"4251d470.1c915c","name":"temp","func":"msg.payload\nreturn msg;","outputs":"1","noerr":0,"x":447,"y":303,"wires":[["a80f65e6.16ffe8","cc7ab12.7ced35","3e2840fe.d409a"]]},{"id":"f8a59fe4.cab2d","type":"function","z":"4251d470.1c915c","name":"humidity","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":457,"y":423,"wires":[["bf054f6d.75daf","1da55813.ab4e48","4cc57dd1.2ec384"]]},{"id":"a6a9210b.75136","type":"comment","z":"4251d470.1c915c","name":"gpio 18","info":"","x":271,"y":324,"wires":[]},{"id":"9b5d0bd7.4de398","type":"comment","z":"4251d470.1c915c","name":"gpio22","info":"","x":1090,"y":460,"wires":[]},{"id":"729e0893.b0bc98","type":"comment","z":"4251d470.1c915c","name":"gpio23","info":"","x":1090,"y":520,"wires":[]},{"id":"db14c013.49a29","type":"comment","z":"4251d470.1c915c","name":"gpio25","info":"","x":1111,"y":45,"wires":[]},{"id":"97913e23.e2e0f","type":"comment","z":"4251d470.1c915c","name":"gpio6","info":"","x":1110,"y":100,"wires":[]},{"id":"7060077e.a5e3a8","type":"rpi-gpio out","z":"4251d470.1c915c","name":"fogger out day","pin":"16","set":"","level":"0","freq":"","out":"out","x":940,"y":520,"wires":[]},{"id":"bb174a91.985a68","type":"rpi-gpio out","z":"4251d470.1c915c","name":"fogger out night","pin":"15","set":"","level":"0","freq":"","out":"out","x":943,"y":461,"wires":[]},{"id":"9e121a2d.2d2a58","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":7,"width":"4","height":"1","name":"status luftfuktare dag","label":"status luftfuktare dag","format":"{{msg.payload}}","layout":"row-spread","x":960,"y":620,"wires":[]},{"id":"70136df1.d7cf04","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":8,"width":"4","height":"1","name":"status luftfuktare kväll","label":"status luftfuktare kväll","format":"{{msg.payload}}","layout":"row-spread","x":960,"y":580,"wires":[]},{"id":"bf054f6d.75daf","type":"change","z":"4251d470.1c915c","name":"","rules":[{"t":"set","p":"humidity","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":653,"y":422,"wires":[["95ffc24e.251da","ce7b7b6.357cf88"]]},{"id":"1da55813.ab4e48","type":"thermostat","z":"4251d470.1c915c","outtopic":"payload","outpayload1":"1","outpayload2":"0","name":"hygrometer air right day","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunset","on1":"480","off1":"1200","on2":"16:00","off2":"23:00","peak":"65","offpeak":"60","frost":"10","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"x":670,"y":520,"wires":[["7060077e.a5e3a8","9e121a2d.2d2a58"]]},{"id":"4cc57dd1.2ec384","type":"thermostat","z":"4251d470.1c915c","outtopic":"payload","outpayload1":"1","outpayload2":"0","name":"hygrometer air right night","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunset","on1":"1200","off1":"480","on2":"16:00","off2":"23:00","peak":"55","offpeak":"50","frost":"10","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"x":670,"y":460,"wires":[["bb174a91.985a68","70136df1.d7cf04"]]},{"id":"95ffc24e.251da","type":"ui_gauge","z":"4251d470.1c915c","name":"himidity right","group":"20b33049.ea3b3","order":2,"width":"6","height":"6","gtype":"gage","title":"luftfuktighet höger","label":"%","format":"{{value}}","min":0,"max":"80","colors":["#0000ff","#00ff00","#ff0000"],"seg1":"54","seg2":"70","x":984,"y":394,"wires":[]},{"id":"ce7b7b6.357cf88","type":"ui_chart","z":"4251d470.1c915c","name":"humidity right chart","group":"20b33049.ea3b3","order":4,"width":"4","height":"3","label":"luftfuktighet höger","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"50","ymax":"80","removeOlder":"5","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":1005,"y":349,"wires":[[],[]]},{"id":"a80f65e6.16ffe8","type":"ui_chart","z":"4251d470.1c915c","name":"air temp chart right","group":"20b33049.ea3b3","order":3,"width":"4","height":"3","label":"luft temperatur höger","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"35","removeOlder":"5","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":750,"y":300,"wires":[[],[]]},{"id":"cc7ab12.7ced35","type":"ui_gauge","z":"4251d470.1c915c","name":"air temp right","group":"20b33049.ea3b3","order":1,"width":"6","height":"6","gtype":"gage","title":"luft temperatur varma sidan","label":"°C","format":"{{value}}","min":0,"max":"40","colors":["#0000ff","#00ff00","#ff0000"],"seg1":"24","seg2":"27","x":730,"y":260,"wires":[]},{"id":"d7ac98ba.ea4a38","type":"rpi-gpio out","z":"4251d470.1c915c","name":"fan out night","pin":"22","set":"","level":"0","freq":"","out":"out","x":935,"y":46,"wires":[]},{"id":"f3036545.ecd4b8","type":"rpi-gpio out","z":"4251d470.1c915c","name":"fan out day","pin":"31","set":"","level":"0","freq":"","out":"out","x":950,"y":100,"wires":[]},{"id":"565aa714.ee7738","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":1,"width":"4","height":"1","name":"fan day","label":"status fläkt dag ","format":"{{msg.payload}}","layout":"row-spread","x":920,"y":220,"wires":[]},{"id":"140d9aff.1b8c75","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":2,"width":"4","height":"1","name":"fan night","label":"status fläkt kväll","format":"{{msg.payload}}","layout":"row-spread","x":920,"y":180,"wires":[]},{"id":"3e2840fe.d409a","type":"thermostat","z":"4251d470.1c915c","outtopic":"payload","outpayload1":"1","outpayload2":"0","name":"thermostat air day right","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunset","on1":"480","off1":"1200","on2":"16:00","off2":"23:00","peak":"26","offpeak":"24","frost":"10","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"x":660,"y":200,"wires":[["f3036545.ecd4b8","565aa714.ee7738"]]},{"id":"818a94b.6706168","type":"sunrise","z":"4251d470.1c915c","name":"","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunsetStart","x":250,"y":60,"wires":[[],["7f2e4b31.454214"]]},{"id":"a988005f.6858a","type":"sunrise","z":"4251d470.1c915c","name":"","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunsetStart","x":370,"y":640,"wires":[["356fcfc4.de1f3"],[]]},{"id":"7a953ed0.741c","type":"sunrise","z":"4251d470.1c915c","name":"","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunsetStart","x":250,"y":120,"wires":[[],["3e2840fe.d409a"]]},{"id":"7f2e4b31.454214","type":"thermostat","z":"4251d470.1c915c","outtopic":"payload","outpayload1":"1","outpayload2":"0","name":"thermostat air night  right","lat":"58.322691","lon":"15.133535","start":"sunrise","end":"sunset","on1":"1200","off1":"480","on2":"16:00","off2":"23:00","peak":"25","offpeak":"22","frost":"10","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"x":670,"y":140,"wires":[["d7ac98ba.ea4a38","140d9aff.1b8c75"]]},{"id":"34005fda.cc805","type":"ui_group","z":"","name":"status","tab":"91e4af9a.f1a05","order":4,"disp":true,"width":"6"},{"id":"20b33049.ea3b3","type":"ui_group","z":"","name":"terrarium klimat höger","tab":"91e4af9a.f1a05","order":1,"disp":true,"width":"6"},{"id":"91e4af9a.f1a05","type":"ui_tab","z":"","name":"terrarium","icon":"dashboard"}]

Zenofmud

unread,
Jul 15, 2017, 6:58:34 AM7/15/17
to node...@googlegroups.com
If you are talking about node-red-contrib-thermostat you might notice that it is an experimental  node with no documentation. You could try contacting the node’s author.

fluri...@gmail.com

unread,
Jul 15, 2017, 2:22:14 PM7/15/17
to Node-RED
Hi, I made the same experience last year, so I decided to implement a new node. Have a look here:

ivar denstore

unread,
Jul 15, 2017, 5:53:25 PM7/15/17
to Node-RED
okey yes i will check it out! :)  . yes i will try the ramp and see ho it go:D thanks both
 of you !:) 

ivar denstore

unread,
Jul 22, 2017, 7:05:24 PM7/22/17
to Node-RED
hi  sorry for not geting back whit info from me trying to get the whit the ramp thermostat . 

i am trying to understad how the ramp thermostat works . :P 
cant get the termostat to read med numbers  in dbug window it says "msg.topic undefined" and if i try to whrite dht22 or payload or anything else in name or topic window it "invalide topic '

i do not understad how this node Works:(

how can i create a flow there the dht22 provides a payload number to te ramp thermostat ??

sorry  for the bad english
my  current flow is this 

[{"id":"132c424.37088be","type":"inject","z":"4251d470.1c915c","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"x":110,"y":360,"wires":[["31c34154.e55a7e"]]},{"id":"31c34154.e55a7e","type":"rpi-dht22","z":"4251d470.1c915c","name":"","topic":"","dht":"22","pintype":"0","pin":"18","x":280,"y":360,"wires":[["10e0b15c.3b302f","f8a59fe4.cab2d"]]},{"id":"10e0b15c.3b302f","type":"function","z":"4251d470.1c915c","name":"temp","func":"msg.payload\nreturn msg;","outputs":"1","noerr":0,"x":447,"y":303,"wires":[["cc7ab12.7ced35","a80f65e6.16ffe8","64109a7d.28d324"]]},{"id":"f8a59fe4.cab2d","type":"function","z":"4251d470.1c915c","name":"humidity","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":457,"y":423,"wires":[["bf054f6d.75daf"]]},{"id":"a6a9210b.75136","type":"comment","z":"4251d470.1c915c","name":"gpio 18","info":"","x":271,"y":324,"wires":[]},{"id":"9e121a2d.2d2a58","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":7,"width":"4","height":"1","name":"status luftfuktare dag","label":"status luftfuktare dag","format":"{{msg.payload}}","layout":"row-spread","x":960,"y":620,"wires":[]},{"id":"70136df1.d7cf04","type":"ui_text","z":"4251d470.1c915c","group":"34005fda.cc805","order":8,"width":"4","height":"1","name":"status luftfuktare kväll","label":"status luftfuktare kväll","format":"{{msg.payload}}","layout":"row-spread","x":960,"y":580,"wires":[]},{"id":"bf054f6d.75daf","type":"change","z":"4251d470.1c915c","name":"","rules":[{"t":"set","p":"humidity","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":653,"y":422,"wires":[["95ffc24e.251da","ce7b7b6.357cf88"]]},{"id":"a80f65e6.16ffe8","type":"ui_chart","z":"4251d470.1c915c","name":"air temp chart right","group":"20b33049.ea3b3","order":3,"width":"4","height":"3","label":"luft temperatur höger","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"35","removeOlder":"5","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":950,"y":300,"wires":[[],[]]},{"id":"cc7ab12.7ced35","type":"ui_gauge","z":"4251d470.1c915c","name":"air temp right","group":"20b33049.ea3b3","order":1,"width":"6","height":"6","gtype":"gage","title":"luft temperatur varma sidan","label":"°C","format":"{{value}}","min":0,"max":"40","colors":["#0000ff","#00ff00","#ff0000"],"seg1":"24","seg2":"27","x":930,"y":260,"wires":[]},{"id":"64109a7d.28d324","type":"ramp-thermostat","z":"4251d470.1c915c","name":"mark temp","profile":"1611a792.9e3828","hysteresisplus":"2","hysteresisminus":"1","x":530,"y":60,"wires":[[],["949e466.cbfc7b8"],[]]},{"id":"949e466.cbfc7b8","type":"debug","z":"4251d470.1c915c","name":"","active":true,"console":"false","complete":"true","x":730,"y":60,"wires":[]},{"id":"34005fda.cc805","type":"ui_group","z":"","name":"status","tab":"91e4af9a.f1a05","order":4,"disp":true,"width":"6"},{"id":"20b33049.ea3b3","type":"ui_group","z":"","name":"terrarium klimat höger","tab":"91e4af9a.f1a05","order":1,"disp":true,"width":"6"},{"id":"1611a792.9e3828","type":"profile","z":"","name":"terrarium mark temp","time1":"00:00","temp1":"32","time2":"24:00","temp2":"32","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"91e4af9a.f1a05","type":"ui_tab","z":"","name":"terrarium","icon":"dashboard"}]

fluri...@gmail.com

unread,
Jul 23, 2017, 5:26:02 AM7/23/17
to Node-RED
Take a look at the Documentation: "This node expects a numeric msg.payload containing the current temperature (number). The msg.topic should be empty or set to setCurrent".

Change your temp function:

msg.payload = parseFloat(msg.payload);
msg.topic = "setCurrent";
return msg;

Yannick Laouénan

unread,
Oct 9, 2017, 1:04:13 AM10/9/17
to Node-RED
merci ca fonctionne chez moi merci de ton aide
Reply all
Reply to author
Forward
0 new messages