I want to try out node red and I want to understand a few things. My questions is not about a special hassio addon, I just want to know it in general.
So how does home assistant send all the events to node red? Can the node red engine run on a different machine?
How does node red send the actions to home assistant? The resulting actions are called msg.payload? Is this done thru the web api of HA with REST?
I have seen different node-red integrations for HA. The one with -websocket in the name does the communication via websockets? How do the other node-red integrations do communication with HA?
Are these node-red integrations implemented as custom components?
node-RED and HA don’t communicate ‘natively’ unless you want to spend a lot of time creating your own rest / websockets commands manually.
I may be wrong, but I think this ‘integration’ is the only one that’s actively maintained (and it is, very actively maintained).
As it says, node-RED and HA communication is done by websockets and rest, they can therefore live on separate hosts. Authentication is provided by a long-lived access token which you create in HA and configure in nodered (instructions in the installation docs for node-red-contrib-home-assistant-websocket).
There is also an HA custom component as which works with node-red-contrib-home-assistant-websocket. Most functionality works without it, but it gives you the ability to create, populate and directly change sensor nodes and switches in HA.