Hello, I am new to Home Assistant. I have it installed as a Docker Container on a Synology DiskStation, and am trying to connect a Zooz ZST10 zwave stick. I have successfully got HA up and running, but am running into trouble getting Zwave set up.
When I try to add the Z-Wave JS Integration, it ask for a URL. Iām not sure what to put here - Iāve tried the default (ws://localhost:3000) as well as (ws://192.168.1.10:3000) which is the address of my Synology, and in both cases I get an error message āFailed to Connectā. Iāve done some searches for this error message but none of the suggestions were able to get me past this error message.
Has anybody encountered this and been able to resolve it? Thank you for any pointers!
I think (?) that /dev/ttyACM0 is correct for my system - I unplugged/plugged my Zwave stick and āttyACM0ā disappeared/reappeared from the /dev/ folder on my Synology.
I also confirmed that the ZST10 is a supported stick, per HAās documentation (forum wonāt let me add more than 2 linksā¦)
Thank you for the pointers! I was able to install zwave2jsmqtt in the Docker App on my Synology NAS, and I got it up and running and can access it through the web interface at port 8091, and was able to follow all the configuration steps at ZwaveJS2Mqtt. In the zwave2jsmqtt setup interface, I turned off MQTT and ON websocket (port 3000) as you indicated.
Iām able to see my Zwave stick reported in the Control Panel of zwave2jsmqtt
In HA, when I try to add the Integration āZ-Wave JSā, it prompts me for a URL. For any of these settings, I get an error āFailed to Connectā
ws://localhost:3000
ws://192.168.1.10:3000 (this is the address of my Synology NAS)
ws://a0d7b954-zwavejs2mqtt:3000
Any thoughts on what I might be doing wrong? Thanks again for the help
If I am now connecting the Z-Wave stick to āzwave2jsmqttā instead of āhomeassistantā, do I need to remove the āādevice=/dev/ttyACM0ā for homeassistant so that both containers arenāt trying to talk to the Z-Wave stick? If so, where can I change this setting? Or is it correct as-is? Thanks again
Did you expose port 3000 on the host in your Docker configuration?
do I need to remove the āādevice=/dev/ttyACM0ā for homeassistant so that both containers arenāt trying to talk to the Z-Wave stick
With the legacy z-wave integration removed, nothing inside the homeassistant container will try to use the stick, so itās fine as-is. You can remove it though (I would). When I use containers, I try to restrict them to the least amount of access to resources as possible.
Thank you! Iām new to a lot of this. I (think) I was able to open up port 3000 in the Synology Docker app for the zwave2jsmqtt container, and now when I try to add the Integration Z-Wave JS in the HA web interface, it prompts me for the URL, and if I enter ws://localhost:3000 it looks like it works and I can connect/add the integration. Thanks again.
You can remove it though (I would). When I use containers, I try to restrict them to the least amount of access to resources as possible.
Thanks - any thoughts on where I need to go to remove āādevice=/dev/ttyACM0ā from the homeassistant container? I just added that flag (following the instructions) when I installed the container from the command line, and now in the Synology Docker app I donāt see any place to adjust that setting. I looked through the config files in the homeassistant folder and donāt see the setting listed there either.
The only way to remove it is when you re-create the container. The container was probably created implicitly with the docker run command. You would need to delete it and re-run it. How have you been upgrading Home Assistant?
Ah, okay, thank you so much. Iāll delete the container and re-run the command from the terminal, this time without āādevice=/dev/ttyACM0ā included
I havenāt upgraded HA yet, just getting started. It looks like there are some instructions on updating HA on a Synology NAS at Alternative - Home Assistant ?
Those instructions should be fine. The question was more to determine how you manage the containers, as that would determine how you would remove the device argument. If you were using docker-compose (which I recommend), for example, the instructions would be slightly different (the end result being the same).
Running into the same problem here. I expose both 8091 (works fine) and 3000. I can reach zwavejsmqtt fine from the browser on 8091, but not connecting on 3000 from HA.
Iām using the standard docker-compose file from zwavejsmqtt and my z-wave stick is recognized fine.
version: ā3.7ā
services:
zwavejs2mqtt:
container_name: zwavejs2mqtt
image: zwavejs/zwavejs2mqtt:latest
restart: always
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=mysupersecretkey
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want logs time and dates to match your timezone instead of UTC
# Available at List of tz database time zones - Wikipedia #- TZ=America/New_York
networks:
- zwave
devices:
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick. #- ā/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10 700_Z-Wave_Stick_0001-if00-port0:/dev/zwaveā
- /dev/ttyUSB0
volumes:
- zwave-config:/usr/src/app/store
ports:
- ā8091:8091ā # port for web interface
- ā3000:3000ā # port for Z-Wave JS websocket server
networks:
zwave:
volumes:
zwave-config:
name: zwave-config
In zwavejs ui setting menu there is home assistant section.
Did you enable websocket?
Yes
Also, you can disable mqttt
Also done
Since it is docker what up are you using? Host ip or container IP?
I need to read up on docker networking.
I can see the zwavejs webinterface from anywhere on my network and I see the HA interface from anywhere on my network, so I would expect HA could see zwavejs. But maybe HA is not seeing zwavejs. Iāll add both the same docker-compose file on the same network.
Finally sorted this one out (altough not 100% sure why)
Iām running both HA and zwavejs2mqtt from the same Docker Compose file (see below)
Iām exposing port 8123, 8091 and 3000 from the containers. I can reach HA and zwavejs2mqtt UI from my browser from anywhere on the network
HA zwave-js integration can NOT reach zwavejs2mqtt on localhost:3000 or 0.0.0.0:3000 or <HOST_IP>:3000. But CAN reach zwavejs2mqtt at zwavejs2mqtt:3000 (zwavejs2mqtt is the name of the zwavejs2mqtt container)
I have done a good amount of dockerizationin the past, but a bit rusty. It still doesnāt make sense why I can reach the UI ports from anywhere on the network, but not inbetween containers.
This is my compose file:
version: '3.7'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- ~/home_assistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
networks:
- zwave
ports:
- '8123:8123' # port for web interface
zwavejs2mqtt:
container_name: zwavejs2mqtt
image: zwavejs/zwavejs2mqtt:latest
restart: always
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=mysupersecretkey
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want logs time and dates to match your timezone instead of UTC
# Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#- TZ=America/New_York
networks:
- zwave
#network_mode: host
devices:
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
#- '/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10 700_Z-Wave_Stick_0001-if00-port0:/dev/zwave'
- /dev/ttyUSB0
volumes:
- zwave-config:/usr/src/app/store
ports:
- '8091:8091' # port for web interface
- '3000:3000' # port for Z-Wave JS websocket server
networks:
zwave:
volumes:
zwave-config:
name: zwave-config
Exposing the port means the port is available on the host network, which is why you can connect from anywhere.
HA zwave-js integration can NOT reach zwavejs2mqtt on localhost:3000 or 0.0.0.0:3000
Since HA is in its own container, localhost refers to the services running locally, in the container. zwavejs2mqtt is in a different container, thus not available via localhost in the HA container. 0.0.0.0 will never work, it is not a route-able IP address. Itās a wildcard address that basically means āall IPs on this hostā, so itās not something you can connect to.
or <HOST_IP>:3000
Not sure about this one, maybe it only works if the container that is mapped to that port is running with host networking.
But CAN reach zwavejs2mqtt at zwavejs2mqtt:3000 (zwavejs2mqtt is the name of the zwavejs2mqtt container)
Youāve created a docker user-defined bridge network (named zwave) and assigned both HA and z2m containers to that network. Youāve also given the containers names. As a result, docker assigns their IP addresses to their names and they can be resolved via local DNS. The homeassistant container can then access the z2m container by DNS name zwavejs2mqtt.
Since youāre using docker compose, it already creates a user-defined network for your entire app (this particular docker-compose.yaml file). That means you can remove the zwave network entirely and the containers can continue to communicate via container names instead of IP addresses. With only two containers itās not necessary to have that extra network. If you added additional containers to the same app and wanted to isolate them (which is always a good idea), then the network becomes useful.
Also, I would advise against exposing port 3000, unless you have a reason to talk to the zwave-js websocket server outside of HA. Anyone with access to your hostās network could talk to the server, and it does not provide any kind of authentication or authorization. While realistically your risk of anyone accessing it is probably near zero, itās still a good practice to reduce exposure of services.