Closed GravityRZ closed 4 years ago
i fixed it by changing the payload to this apparently the acceptable json formatted string changed in 0.0.34
temperature = msg.payload.svalue1;
humidity = msg.payload.svalue2;
setpoint = 21.5;
mode = "heat";
msg.payload = {"mode":"heat",
"setpoint":setpoint,
"setpointLow":20,
"setpointHigh":25,
"humidity":humidity,
"temperature": temperature}
I tried the exact same thing above, and I still get the error. How should it be done?
i also had problems once in a while. when i tried it with fixed numbers the problem was gone. i rounded the humidity and now it seems to work. hopefully this will fix things on your end because it took me a while to fix it on my end.
setpoint = 21; humidity = Math.round(msg.payload.svalue2); temperature = msg.payload.svalue1; msg.payload = {"mode":"heat", "setpoint":setpoint, "setpointLow":20, "setpointHigh":25, "humidity":humidity, "temperature": temperature};
Yes, have it working now as well, using:
temperature = msg.payload.svalue1;
humidity = msg.payload.svalue2;
msg.topic = msg.payload.idx
msg.payload = {
"mode":"off",
"temperature":Number(temperature).toFixed(1),
"humidity":Number(humidity)}
return msg;
nice. looks like a better solution
hello, i just upgrade to v 0.0.34
now i get this error on al my thermostat devices i suspect this was always part of the complete msg.payload but was ignored in the past. now it seems to generate an error
Error: Invalid property msg.payload.Battery with value 100
this is what i have in my functionnode which i feed into the thermostat node
if i delete msg.payload.Battery it is giving errors on the next payload. whatever i do it keeps on giving error messages, also on the payloads it should receive like msg.payload.humidity
the temp is fixd on 25 degrees celcius and will not accept the payload example of one of my devices