I'm new to Node-RED and first post on this forum. Very impressed with NR so far.
I am trying to get the output of a PIR to activate a number of lights. The PIR powers on (and off) a Sonoff. The lights are each connected to their own Sonoffs. The Sonoffs are Tasmota powered and MQTT pub/sub works fine. I have set manual buttons in NR using the mqtt nodes to turn the lights on and off - these work.
What I have been trying without success is to get one mqtt sub node (PIR detects motion) to activate the correct mqtt pub node (turns on security light).
How best to wire these up?
I have tried wired nodes:
"mqtt in" - "change (msg.payload = ON)" - "mqtt out"