5/2022
Converted from using deprecated zwave handler in Home Assistant to zwave2mqtt.
Then converted to zwavejs2mqtt and using that now
WARNING
After installing, when you go to the
Guide here: https://flemmingss.com/how-to-set-up-zwavejs2mqtt-on-a-raspberry-pi-and-integrate-it-with-home-assistant/
cd ~
mkdir zwavejs2mqtt
cd zwavejs2mqtt
curl -fsSL https://raw.githubusercontent.com/zwave-js/zwavejs2mqtt/master/docker/docker-compose.yml -o docker-compose.yml
Edit compose file
sudo nano docker-compose.yml
I changed TZ (time zone,) and port from 3000 to 3001. I have conflict with 3000
My file contents:
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 https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=America/Los_Angeles
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/ttyACM1:/dev/zwave'
- '/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM1'
# - '/dev/ttyACM1:/dev/zwave'
volumes:
- zwave-config:/usr/src/app/store
ports:
- '8092:8091' # port for web interface
- '3001:3001' # port for Z-Wave JS websocket server
networks:
zwave:
volumes:
zwave-config:
# name: zwave-config
To figure out port
ls -l /dev
Long answer, find. In alphabetical order of last column. My zwave is ttyACM0 and zigbee is ttyUSB0
crw-rw---- 1 root dialout 166, 0 May 30 16:41 ttyACM0
crw-rw---- 1 root dialout 204, 64 May 30 16:41 ttyAMA0
crw------- 1 root root 5, 3 May 30 16:41 ttyprintk
crw-rw---- 1 root dialout 188, 0 May 30 16:41 ttyUSB0
To install, run from zwavejs2mqtt directory
docker-compose up -d
On a browser, to go
http://ip addr of docker pi:8091/
http://ip addr of docker pi:8092/
It will bring up zwave2mqtt webpage
Go to settings,
zwave make sure serial port has correct setting to find zwave usb stick, I used /dev/ttyACM1
Turn logging on
mqtt. Enter you mqtt broker info. I set prefix to zwavemqtt so any messages to from this program need that to start
gateway:
Type ValueID topics
Payload Type Just value for normal use Entire zwave object to figure out how things works
Turn on send zwave events
Turn on Hass discovery to see how things work
pc software tool install
https://aeotec.freshdesk.com/support/solutions/articles/6000226205
For those of you trying to remove a node using zensys tool here are the steps required:
Highlight the node you believe has failed from the top left frame’s node list/table
Toggle the “Quene Overrided” checkbox for this selected node (a check should appear)
Send a NOP (i.e. no operation) command by selecting the exclamation mark from the tools menu
Check to see if the node is failed by selecting the “is node failed” icon from the tools menu. If it has failed, you should see a message stating it has failed in the lower right frame (i.e. log actions tab)
Select the “remove failed” icon from the tools menu
Note: If uncertain which icon from the tools menu corresponds to a particular action, hoover your mouse over each to receive a “tool tip” message specifying the corresponding action.
I think I finally found a way to also delete nodes that are not marked as dead by the controller. I also used the Zensys tool, but instead of using the “Remove Failed” function I used the “Replace Failed” function. (to the left of the remove function)
Simply click on the node you like to remove, start the function and put any Z-Wave device in inclusion mode. (I used a switch I don’t use at the moment) After a few seconds the progressbar disappears and the node is put to the end of the list. Now the node is replaced with my switch and I can simply put the controller and the switch into remove mode and the node is gone!
I tried this with 3 nodes that I had for a long time on my controller and it worked on all of them.
To install from command line in docker, run this:
docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 -e TZ=America/Los_Angeles --mount source=zwave2mqtt,target=/usr/src/app/store robertslando/zwave2mqtt:latest
To install with docker compose, create docker-compose.yml file with the following content:
version: "3.0"
services:
zwave2mqtt:
container_name: zwave2mqtt
image: robertslando/zwave2mqtt:latest
restart: always
tty: true
stop_signal: SIGINT
networks:
- zwave
devices:
- "/dev/ttyACM0:/dev/ttyACM0"
volumes:
- ./store:/usr/src/app/store
ports:
- "8091:8091"
networks:
zwave:
Run this to install
sudo docker-compose up -d
-e TZ=America/Los_Angeles to set time zone for LA America/Los_Angeles
I also changed port from 3000 to 3001 because Grafina uses 3000
change to
- '/dev/serial/by-id/usb-0658_0200-if00'
https://github.com/OpenZWave/Zwave2Mqtt#wrench-usage
https://selfhostedhome.com/migrating-to-zwave2mqtt-for-home-assistant/
Change /dev/ttyACM0
When I added a zigbee stick, my stick address changed to /dev/ttyACM1
I used Portainer to duplicate the zwave2mqtt container, and changed /dev/ttyACM0 to /dev/ttyACM1 in two places, and then started the new container. Portainer deleted the original container, and then started the new one and it all worked