Z-wave missing completely random after restart of HA

I have been searching for a while to find more information about my z-wave problem.
Nothing i can find to solve my problem, so here it goes.

I have Hassio running on a nuc in docker on Debian.
I have a Aeotec Z-Stick Gen5 and 6 neo coolcam door window sensors and one neo coolcam motion sensor.
It ran fine for almost 5 months but now I run in to this problem that my Z-wave does not work anymore after a restart of HA.
This happens randomly 9 out of 10 times.
This is very frustrating because I hardly dare to change the config file after which a restart is necessary.

If the problem occurs than the z-wave network is not started after the restart, and if I press to manually start the network. It won’t start.

The only way I know of to get it working again is to revert to a previous made snapshot.
But of course that deletes all the changes I made to the system files.

So I will have to do it all over again and pray that after the next restart my z-wave will start and function properly.

I also tried saving the z-wave config before a restart, but that does not make a difference.
This has been going on for 6 weeks now.
I hope that someone can help me solve this issue because this is starting to get very annoying.

How are you restarting ?
Make sure the system is fully started before shutting down, make sure it’s fully down (no flashing lights on z stick) or you’ve used the proper restart.
The z wave config is rebuilt on a start up (this is a recent, circa 6 month, change) so what you have done probably had no effect, there are some work arrounds but you’ll have to do some careful searches and a lot of reading.

I restart using the side bar, settings/server/.
Most of the time I check my config first. And after the check I press the restart button at the bottom, next to the stop button.

I thought this is the proper way to restart HA.

That sounds fine.
I once hit restart (cos I’d forgotten to add a required binary sensor) during the previous restart.
Which screwed up a lot of my nodes, I left it a couple of weeks and ‘some’ came back. But I basically had to reset and rebuild my network.

I’ve experienced more or less the same and now understand why this has occurred. Frequent restarts. I intend to rebuild my network of ~ 10 nodes.

I will build an automation that sends a persistent notification when the zwave network is ready (that’s an event) and I will wait with the next restart for that.

I doubt if that is the sollution to the problem. I checked my z-wave before the last restart and is was loaded and ready. Still after the restart my z-wave was corrupt.

For me it looks like you have a hardware problem. Cause sometimes your installation works, we can assume, that your software works.

Here a checklist suggestion for easy tests:

  • Do you have a proper place for your Aeotec Z-Stick Gen5 ( I had problems till I installed the stick in the middle off a room, under the ceiling. I use a 2 meter USB-extensiion cable) ?
  • I don’t know the nuc - system, but if possible, change the USB-Port
  • If you use an USB-cable, replace the cable.

good luck :wink:

I have had this hardware setup since I started with the nuc. It rann fine for a couple of months.

But I wil try some changes and see if it helps.

Did you disable ModemManager in your Ubuntu host system? This did fix random Z-wave issues on HA restarts for me.

Your situation sounds very similar to mine, so I think it might help you. Disabling ModemManager is described in the docs.

Roelof, this sounds like it could indeed also be my problem.
I did not disabled the modem manager.

There are a few options for this.
Disable it with

sudo systemctl disable ModemManager

Or remove it with.

sudo apt-get purge modemmanager-dev

Or remove it with all the dependencies

sudo apt-get purge --auto-remove modemmanager-dev

I’ll first try disabling it.
Tomorrow I will try a restart, I don’t have much time right now and I don’t want to risk any problem right now.

After removing ModemManager I only had one time where the Z-wave network would not start properly. It has been running stable for at least 6 months now. Some other hints:

  1. Put your Z-wave stick in the yellow (charging) USB port of your NUC. This one is by default configured for more stable output (no power saving).
  2. Always check if the Aeotec stick shows status ‘Ready’ before you restart HA. Usually it takes a couple of minutes after HA is up. Sometimes when you’re doing a lot of editing in configuration.yaml that requires restarts, think twice before hitting that button.

Thanks for the tips.
But if I woud want to use another usb port,(because now its in another one) do I have to change the port in a config file?
Or is this automatically recognized.

In BIOS you can configure the power settings for your USB ports. But to be honest, I would only fiddle with that if disabling modem manager doesn’t help (enough).

Roelof, i have gotten me an zigbee2mqtt stick.
But if u put it in an usb port, it does not show up in hassio on my nuc. Can this have something to do with turning off modem manager?

I dont understand why its not working.
If i pull the zwave stick, it also removes from hassio. When i plug it back in, it shows up again.

But even if i use that port for the zigbee stick, then it does not show up.

Any ideas?

I don’t think disabling modemmanager is related to your issue of the stick not showing up in Home Assistant. I also had a zigbee2mqtt stick and it showed up just fine. Sorry, no clue why it doesn’t show up…