I would love some help in trying to set up ZWavejs2mqtt in Home Assistant. Right now Im using stock Zwave integration on Hassos on a Raspberry Pi. I have an Aeotec’s Z-Stick Gen5+ and 20 units connected.
I was not able to add a repository in the add-on store (https://github.com/zwave-js/zwavejs2mqtt). And looking at the docs (https://zwave-js.github.io/zwavejs2mqtt/#/) it only suggests installing a docker container but Im not sure if that is even possible with Hassos!? Not really intrigued by the idea to run a docker container on a different computer and using some sort of bridge to let it connect to the USB port on my Raspberry. Its possible to run the Z-Stick on the computer running the container but that smells complexity with the system spanning more than one computer.
I don’t really run HassOS but I’m pretty sure you can run other docker containers on it.
FYI, HassOS already has docker running on it because that’s how the supervisor works - it runs in Docker and creates all of the stuff to run HA in several docker containers behind the scenes.
I’m sure someone can tell you how to run outside containers in HASSOS.
Is it correct that when you use ZWavejs2mqtt, there is no component (maybe now called “integration”?) that needs to be installed - it just interacts through mqtt as if your zwave devices were generic “mqtt devices”?
I believe so. There is no integration for Home Assistant as of yet. MQTT is the interface between Z-wave and Home Assistant. My guess is that you need to install an MQTT integration alongside ZWavejs2mqtt but I have not yet managed to install ZWavejs2mqtt as a docker container.
Thanks finity! I have installed Portainer and when I run it the dashboard says 11 containers. But when I click on it (primary) or the Container menu to the left no containers show up. Maybe a side not but it seems weird.
How do I create a container in Portainer from the docker run script or the docker-compose file from here: https://zwave-js.github.io/zwavejs2mqtt/#/getting-started/quick-start?
Which version of HA do you run? HASSOS, HA Container, etc?
TBH, I’ve never created a container from within Portainer itself but I’ve heard it’s not too hard (I guess I really need to figure that out one day since many people have asked about it). So if you run HASSOS I can’t help you much.
I only ever use the command-line and execute the “docker run” command from there. So if you run HA Container or HA Supervised I can give you the docker run command I use to run it.
container: /usr/src/app/store
volume: zwavejs2mqtt - local (the volume created first)
Restart policy: during testing I kept it to Never, when I went live I changed the running container properties to Always
Runtime & Resources:
Add device to map /dev/ttyACM0 from the host to the same path in the container. (Your settings might differ based on mapping by serial or a different hardware, I have a Z-Wave Gen5 stick from Aeotec)
Thanks! I will try this. One question, creating the volume, did you choose NFS or CIFS or none? I created a folder from inside Home Assistant terminal that has the path /root/zwavejs2mqtt. Would that path work? Did I need to create the folder?
I’m running HassOS.
Volumes are for Docker usage, I just left the default settings. If you want the container to see and access the root filesystem it needs too much permissions I think. By default volumes are created under /var/lib/docker/volumes/
So I managed to install Portainer and the zwavejs2mqtt container. I can connect to the gateway-UI on address http://192.168.1.251:8091/.
Followed the instructions here: https://zwave-js.github.io/zwavejs2mqtt/#/usage/setup on setting up zwave, MQTT and the gateway. I had to create a new user called mqtt and enable auth for mqtt in the gateway-UI and type in the username and password.
I can now see a list of devices in the gateway-UI and some have brand names. I can also see the status updates on the devices in the debug log.
Looking at the log from MQTT from the Supervisor I can see when the connection is made:
[INFO] found mqtt on Home Assistant
1609973860: New client connected from 172.30.32.1 as ZWAVE_GATEWAY-zwavejs2mqtt (p2, c1, k60, u’mqtt’).
But there is no enteties/devices in HA and I see no messages other than the connection above. What am I missing?