How to control Z-Wave devices from another HA instance in Node-Red

Hi there,

today I finally managed to install my Z-Wave empowered roller shutter with the fuse only blowing two times :nerd_face: Now that I hooked up the device to my Home Assistant system, I like to control the device within some Node-Red flows. However, I have a little exceptional setup which is as follows:

  • Home Assistant Blue (HAB): This is where my Node-Red Add-On is being installed
  • Rasp Pi 4: This is where the roller shutter is connected to (using the “Z-Wave JS to MQTT” - Gateway)

I managed to install the "node-red-contrib-zwave-js" palette, but when trying to configure the “Z-Wave JS Controller” node, I´m prompted to select a serial port. But as the Z-Wave controller Stick is connected to the Pi4, and not the HAB, there is no proper choice for me to select. Is there any other way to control my devices in Node-Red?

As you are using “Z-Wave JS to MQTT” - Gateway I assume you could simply use the node-red MQTT nodes to read/write values in the broker.

Have you checked the broker to see what values are present?

If you dont already have it, download MQTT Explorer to have a look see that you can A. connect to the MQTT broker and B. help you understand what topics are avaiable.

First, thanks again @Steve-Mcl for your instant answer! So I downloaded the tool but it wouldn´t let me connect to the system. What did I configure wrong here?

Why are you choosing ws (websocket) and port 1883? 1883 is default MQTT/TCP. Set protocol to MQTT.

Also, what broker are you running on PI & what is the version of the broker?

Alright, on the host system (Pi4) I use the "Z-Wave JS to MQTT" Community Add-on to manage/ configure the Zwave devices. Through the "Z-Wave JS" integration running on both HA instances, I get access to the entities of my Zwave devices on the client system (HAB). Is there actually a broker involved and if so wouldn´t that be the "Z-Wave JS to MQTT" Add-on?

I don't use it but I do use zigbee2mqtt and I believe this is very similar to this in that it is a gateway between 2 protocols (z-wave and mqtt)

You probably still need a broker installed. And you probably already do have.

The point of asking what broker you have installed & what version that broker is, is because if it is mosquito version 2 or higher you need to adjust the config so that computers on the network can actually connect. Since mosquito version 2 they have defaulted security to only permit localhost connections. Other words if you are using mosquito V2 you will need to modify the mosquito conf in order to be able to access the broker from other machines i.e. your node red installation

Ok, I didn´t had a broker installed because I actually thought I wouldn´t need to, as the "Z-Wave JS" integration makes the entities already available to the "HAB" instance. Anyway, now I installed Mosquitto and even got connected the MQTT Explorer showing all kinds if information so I guess I can pretty much connect to the MQTT server. Now the version of the broker is 6.0.1 - What exactly do I have to change in configuration now?

What broker did you install? latest mosquitto is V2.0.x
the changes I mentioned are specific to mosquitto V2

And lastly, if you can browse the topics from another computer on the network, there is nothing to change (you already have access)

It really is 6.0.1 ...

I have no idea what that is. The latest version of mosquitto is V2.0.11

Never mind @Steve-Mcl , this probably is the Home Assistant internal version of the Mosquitto Add-On. So now that I finally managed to set up the "mqtt in" node (at least it says "connected") actually comes the interesting part :slight_smile:

Thanks much for your help again!

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