Event-triggered flow to switch on/off rf-plug

Absolute newbie in terms of nodered and hass needs a little help...^^

I managed to turn on/off almost with 2 nodes:

  1. inject node with msg.payload like "#123456"
  2. mqtt-out node with topic "cmnd/tasmota/rfbridge/RfCode"

Now i need to exchange inject node with...? I guess, event node, but i don`t know how ...

Thanx in advance!
Klaus

Welcome to the forum Klaus.

You haven't told us how you want to trigger it. User input, some other device? ...

sry, sure. By motion sensor.

How does that motion sensor talk ? mqtt ? rfbridge ? zigbee ?

zigbee - zigbee2mwtt - mqtt. Integration in hass is fine

If you add an MQTT in node and set the topic to match what the PIR is using, then attach this to a debug node you will be able to see the messages that come in when the PIR is activated.

Once you know that you can progress furthur - Share here what you see in the debug output.

thank you so far. Gonna have a try... ^^

Keep in mind that most people on this forum don't use home assistant (they let node-red do everything instead). With a mqtt node connecting to the broker directly and listening on the zigbee2mqtt topic will work (I use it myself in the same manner).

1 Like

Yup, me too.

Please don't forget my knowledge with Node-Red. It does not exist or hardly exists. HOW? Which node do you use for PIR? And where can i adjust the payload?

Found a solution by trying...^^

Starting with event state node. Changed nothing but choosing PIR entity, "If state = on", state type string

My solution between that and mqtt-out node is change node. (exactly i was looking for). Can set my msg.payload there. Of course 2 of them, on/off.

Thank you anyway.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.