I'm trying to control a Air zone AC controller from my BMS system (JACE 8000 Niagara 4).
This is my setup:
Air Zone Controller connected to a PI5 (Running Home Assist)
Zigbee (Sonoff dongle).
HA is running Node Red.
RUT955 Modem (Acting as my MQTT Broker)
Niagara running control logic and graphics.
I currently have MQTT data being sent and received to and from the JACE8000 & PI5 (node red).
HA gives me a option via the "Trigger: state" to take data from the device and send it via MQTT to my BMS system. For example i can see if the AC unit is on or off.
Below is the "Trigger: state" block taking information from the switch and sending it to the JACE.
Not sure if I understand the functions of the different components in your design, so I might be wrong below...
Use a MQTT in node to listen what is coming out of the JACE. You'd have to configure the topic accordingly, I guess the documentation will tell you that. Out of that MQTT in node, you should get an on/off status.
You plug a switch node on the output. Testing on/off will give you two outputs.
Then, on each output, add an action node (from the same palette of the trigger). In there select the switch you want to act on, and call turn_on or turn_off depending on the action you want to do.
On the flow that you shared, I don't know exactly what the function node does... I suspect it can/should be replaced by a change node.
In node red, usually, the function node is the sledgehammer you take out when nothing else is sufficient.