[solved] Accessing Home Assistant elements from Node-Red

Hello,
I’m trying to understand how people are using Node-Red to catch HA events and manipulate home assistant elements. I have a Aeotec installed on the Raspberry Pi that’s running Hassio. I’d like to use Node-Red to turn on, for example, a z-wave dimmer. I have the dimmer working on the HA interface, but want to utilize the integration options and programming structure of Node-RED to manipulate the dimmer. I also want to catch when someone manually turns the dimmer on.

I see this Node-RED plugin. Is this what other people are using to interface with their HA from Node-RED, or is there other options that make sense?

  1. How do I actually address the dimmer properties, if I want to turn it on/off or change brightness, using this node?

  2. How do I catch when the dimmer is manually turned on?

1 Like

You install Node-Red somewhere on your network. Does not have to be on the same device as HA. After Node-Red is installed, you can use the Palette Manager to install the home-assistant nodes. That’s pretty much it. It’s all pretty self explanatory after that.

Once you install the nodes, you will see a call service node. Read the instructions on it.

Again, install the nodes, and use the event state node to see the change.

Without installing the nodes first, nothing will make sense.

There are 2 ways to connect with your Home Automation devices

  1. Connecting Node-Red directly with the device (a lot of the devices have respective nodes available)
  • this is the most direct/effective way if you want to execute all your automation in HA
  • HA can still monitor your devices in parallel
  • not all devices are supported by Node-Red yet and you might wanna use option 2 as well
  • you can find a lot of nodes here
  1. Connecting Node-Red with Home Assistant (as @flamingm0e mentioned)
  • you need to install the Home-Assistant Nodes in Node-Red
  • you need to use the HA nodes to control / automate your deviced
  • HA is taking a little overhead on your automation but often it is not noticable

I have moved all my automation to Node-Red using option 1 and everything works flawless. However, I operate my HA in a headless mode and do not fancy UI’s. The Node-Red UI is very basic and if you want something nice like Lovelace, than you have to monitor your devices in HA

Thank you. Absolutely right!

@xx_Nexus_xx, are you using the OpenZwave node in NodeRED for Option #1?

I’m curious if I can use OpenZwave node in NodeRED, while at the same time have Home Assistant using the z-wave component? Can two processes access /dev/ttyACM0? I assume you have to pick one or the other, not both?

I’m using MQTT to communicate with ZWave, however there is a node which I want to try sometime (alternatively this one).

Technically you can have to processes accessing /dev/ttyACM0 but I would not recommend it