Mqtt and ramp-thermostat

i have problem with reading my mqtt send payload (temperature) but my thermostat doesnt recognize payload or idc i have no input normal i need output 1 or 0

[{"id":"53fe1dfa.050d84","type":"mqtt in","z":"d8e8a97b.a83608","name":"/espDHT11terari/DHT11/Temp","topic":"/espDHT11terari/DHT11/Temp","qos":"2","broker":"19efa301.6c402d","x":480,"y":1280,"wires":[["a4e1b4cf.38fcd8","da0c378c.df0d68","4910fc94.8b85d4","77c1a06.0ec066"]]},{"id":"77c1a06.0ec066","type":"ramp-thermostat","z":"d8e8a97b.a83608","name":"","profile":"6ec0545d.80524c","hysteresisplus":"0.5","hysteresisminus":"0.5","x":940,"y":1220,"wires":[["daf3059c.139e88"],[],[]],"inputLabels":["msg.payload"]},{"id":"19efa301.6c402d","type":"mqtt-broker","z":"","name":"","broker":"192.168.178.35","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"6ec0545d.80524c","type":"profile","z":"","name":"controll temperature","time1":"00:00","temp1":"20","time2":"04:00","temp2":"21","time3":"07:00","temp3":"21","time4":"10:00","temp4":"23","time5":"12:00","temp5":"25","time6":"15:00","temp6":"27","time7":"18:00","temp7":"25","time8":"20:00","temp8":"23","time9":"22:00","temp9":"21","time10":"23:59","temp10":"20"}]

Have you read the node-red-contrib-ramp-thermostat readme?
It say's;

This node expects a numeric msg.payload containing the current temperature (number). The msg.topic should be set to setCurrent

You are injecting a 'string' msg.payload instead of a 'number'. ALSO the message topic is something like "/espDHT11terary/DHT11/Temp" instead of either setCurrent (or undefined).

The node will probably accept the msg.payload because although a 'string', it takes the form of a number, but the topic MUST be either setCurrent or 'undefined'.

Try adding this in front of the node-red-contrib-ramp-thermostat node.

[{"id":"6bc0bf32.bb4d9","type":"template","z":"222e1ed4.53fd52","name":"Change topic","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"setCurrent","output":"str","x":765,"y":325,"wires":[["5dcd016b.4c18f"]]}]

now input is good but output i need 1 or 0

A Change node can change the output to 1 or 0.

thank you everybody i made it

1 Like

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