I am quite new to HA. Please help me: I have made an automation (yaml) for my Sonos speaker with Philips Hue Tap Dial (ZigBee). It was a tremendous work and now it is just perfect. But as a last step I need telnet connection to my pio receiver (so it works together with Sonos); which I found out: is bets accomplished with Node-Red. It is also perfect, it was very easy to accomplish, but I need an action from HA to start specific Node-Red flows.
What would you recommend: text helper (can Node-Red read it?), to change some fake entity what Node-red can see? ā¦ what would be the best way? Thank you for your help.
Is this action something you will do from the Home Assistant User interface (like a switch)? Or, is it an event that is triggered by another automation? Or is there an existing entity_id in Home Assistant you want to start the flow (see: Events: state | node-red-contrib-home-assistant-websocket)?
There are several ways to accomplish this. If you need to pass data to the Node-RED flow, you can fire an event from the Home Assistant automation and use the events: all
node in Node-RED to listen for that event. Alternatively, you can use the button node in Node-RED and trigger it from the Home Assistant automation using the button.press
action. Keep in mind that the button method does not allow you to pass data to the Node-RED flow.
Wow, both seems to be good! Thank you!!!
1, āfire an eventā in HA. You mean āManually Fire eventā action? What Event type is the best for that? So I can pass the Event data? Seems to be perfect.
2,āButton āPressāā action? I can not find any Node Red targetā¦ Do I need some add on?
This action would be in the Yaml code for the (phisical) Philips Hue Switch controlling my home audio system.
You can name the event anything you like, such as pio_receiver_activate.
As for the āButton āPressāā action, you first need to create a button in Node-RED using the button node and deploy the flow. The button node requires you to have the Node-RED Companion custom component installed in Home Assistant.
Dear Kermit, Thank you!!!
The second version is fantastic, works like a charm ā¦ I think I will use this (I gess it is more direct connection; so it is maybe more reliable). Have a nice day!