Hi All. Long time ISY guy here. I’m used to if, then, else and I am not a programmer. I’m trying to under stand node red by mimicking my current ISY programs. I got stuck on the my first one! I’m trying to force a thermostat (Honeywell T6 Zwave) setpoint.
Here is what program I’m trying to mimic:
IF heat setpoint is greater than 70
THEN set heat setpoint to 70
To mimic this program in Node-RED, you can use the following steps:
Drag and drop an if node and a function node onto the canvas.
Connect the output of the if node to the input of the function node.
Double-click on the if node to edit its properties. In the Property dropdown, select heat setpoint from the list of available properties. In the Value field, enter 70 and select > from the Operator dropdown.
Double-click on the function node to edit its properties. In the Function field, enter the following code:
msg.payload = 70; return msg;
This code will set the msg.payload to 70, which will be used to set the heat setpoint to 70.
Save and deploy your Node-RED flow. When the heat setpoint is greater than 70, the if node will trigger the function node, which will set the heat setpoint to 70.
In Node-RED, an “if node” is a type of node that allows you to specify a condition, and based on whether the condition is met or not, the node will route the incoming message to one of two outputs.
This is useful for creating conditional branches in your flow, where different actions can be taken depending on the value of a property or other condition. The “if node” is often used in combination with other nodes, such as a function node, to perform some action based on the condition.
As examples of these category of nodes: A ‘trigger state’, ‘event state’, ‘poll state’ node(s) all have the facility to ascribe a ‘if’ or logic condition.
An “event state” refers to the state of a particular event or condition. For example, in the case of the “if node” type of node mentioned in the previously, the event state would be whether the condition specified in the node is met or not.
If the condition is met, the event state would be “true”, and if the condition is not met, the event state would be “false”. The event state determines which output of the “if node” the incoming message is routed to. In this way, the event state can be used to control the flow of messages in a Node-RED flow.
My guess is that yours is slightly different because you appear to be using “Energy Save Heating” and “Energy Save Cooling”. My thermostat doesn’t have those options, just the first two you have (with values 87 and 88). A way to tinker/debug is to manually change a value on the thermostat unit, then see what values have changed on this screen… Good luck!