Zwavejsmqtt problems

i am running zwavejs2mqtt and every so often the serial port for zwave will drop out and i will lose the ability to control my devices. i just have to go in and reset it. is there something to prevent this from happening. it is just a pain to have to reset this a couple of times a weeks. It has become a real pain

What device/hardware/OS?

How you fix when occur/specifically how you reset?

What device using for Zwave?

@tmjpugh I have a Aeotec Z-Stick Gen5 Z-Wave Hub Z-Wave Plus. What happens basically is the configurations in ZWaveJS2MQTT get reset so I have to log in and redo them. Basically my Serial Port option is lost so I set it to /dev/ttyACM0 and then under Home Assistant I turn on WS Server and hit Save at the bottom. It works for awhile but soon it gets forgotten and I have to reset it again. I mainly use light switches or plug switches but and a few water sensors and a door/window sensor.

How is the device connected to the host? Have you tried a different USB port?

Is this docker? do you have folder mounted to system?
Is this occuring after a reboot or just randomly?

If zwavejs is losing settings I would look at that first since that is seperate from USB
If its a RasPi could it be some issue with SDCard not storing data?

1 Like

There’s a lot of different things that can go wrong here but like the other posters have commented we need a bit more info on the install type (VM? Homeassistant OS on RPI? Docker?) to troubleshoot as they all handle USB mapping different. Take a look at this recent post on a similar issue - the poster there was using Proxmox, which is Home Assistant on a VM. I posted some ideas for fixes on that thread.

Also, the simplest solution of trying a different USB could fix it too as pointed out above - best to start with simple fixes and work your way up to more complex issues. One thing about switching USB ports though is you should specify the path to the stick by its /dev/serial/by-id path (this is assuming you are using the adddon version of zwavejs2mqtt). The /dev/ttyACM0 path is a symlink that can move around on you if you move the device to different slots, especially if you have other USB devices. If you use the /dev/serial/by-id path it will find the stick by its ID no matter what USB port it is in or moved to.

1 Like

Exactly where I was heading with that. I’m wondering if its a USB hub, bad port, or bad cable - they’re easy to at least rule out But yeah when you do that you either need to deal with moving the serial port or use the by-id mapping.

So this is a Docker install using Unraid. I will take a look here soon and see if I can start troubleshooting with the USB. I only seem to have trouble when I switched recently switched to Zwavejsmqtt. Prior I was using the depracated zwave and had no issues with the USB.

I have a docker install on Ubuntu and just unplugged the zstick with the container running, and then plugged it back in simulating a momentary USB loss. I tried this multiple times and the zwavejs2mqtt docker container came back up automatically no matter how I set the restart policy in docker - even if it was none.

This shouldn’t happen just because of a USB disconnect.

Something else seems to be going on here - you will likely need to enable “log to file” for both the zwavejs2mqtt and zwave-js modules, wait for the disconnect/lost setting issue to surface, and then review what is in the logs when it happens.

Instructions to change log settings are here - https://zwave-js.github.io/zwavejs2mqtt/#/troubleshooting/bug_report?id=export-logs

Logs will be saved in the persistent storage folder under store/.

Also if you don’t mind sharing your docker run command/compose maybe there is an issue there?

I also use a local folder to persist the data versus a volume, so not sure if that makes a difference.

1 Like