Closed markus-fischbacher closed 2 years ago
Hi you must alway pass a "topic" property along with the payload. One of your thermostat node doesn't emit a topic, so you should put a msg.topic = "something.." into each "ToBoolean" function.
Hi, thanks for your answer. I do not completely understand the topic stuff. From Thermostat point of view I can not control the payload in my NodeRed flows. It's a object I'm getting.
{"CurrentHeatingCoolingState":0,"TargetHeatingCoolingState":3,"CurrentTemperature":21.3,"TargetTemperature":23,"TemperatureDisplayUnits":0,"CurrentRelativeHumidity":39}
The ToBoolean OnMessage is looking like this:
msg.payload = msg.payload.CurrentHeatingCoolingState == 1 ? true : false;
return msg;
I could leave away the ternary operator. It was just a way to check, if the evaluation has a bug.
Does you suggestion mean, that i should write it that way?
msg.payload.result = msg.payload.CurrentHeatingCoolingState == 1 ? true : false;
return msg;
result is the default topic's name for your boolean node. At least I tried that and it didn't work anyways. Getting the same message Received invalid topic
Am I on a way where I can get it working or am I completely wrong?
Hi please read the README page on github. It explains all about the topics.
Just write on the ToBoolean of the first thermostat:
msg.payload = msg.payload.CurrentHeatingCoolingState == 1 ? true : false; msg.topic = "thermostat1"; return msg;
and on the ToBoolean of the second thermostat:
msg.payload = msg.payload.CurrentHeatingCoolingState == 1 ? true : false; msg.topic = "thermostat2"; return msg;
etc... etc...
Ahhh, thank you! It works now :)
Hi there,
I'm getting always the message "Received invalid topic" when inserting 5 boolean into OR logic. I've no idea what I'm doing wrong.
NodeRed: 2.1.4 Logic-Ultimate: 1.0.39
Any help is appreciated.
Kind regards, Markus