[SOLVED] Z-Wave - Have to Reboot openHAB after removing Aeon Z-Stick and re-inserting

Whenever I remove my Z-Stick to add a new device and re-insert into my Raspberry Pi, I seem to have to reboot (sudo reboot) each time in order to get it to work again.

Is there a better way I should do this, perhaps a setting that will remount the stick automatically upon reinsertion?

Thanks for the tip!

if you bundle:list | grep ZWave you should see the number of the zwave binding; then bundle:restart [number] will start it up again

1 Like

Got it!

Thank you very much Dan.

To fully explain the problem, only one program on your computer is allowed to have read/write access to the USB device at a time. When the Zwave binding starts up it gets a lock on the device and holds onto it while the binding continues to run.

When you unplug the USB controller, the Zwave binding remains running and retains the lock on the device file.

When you plug the USB controller back in, it has to create a new device file because the Zwave binding’s lock on the old file. So if your controller used to be on /dev/ttyUSB0 then it will come back on /dev/ttyUSB1 and the binding will not be able to find it.

1 Like

Thanks for the technical explanation Rich. That clears everything up for me.

I still seem to struggle with this.

I always end up having to still issue sudo reboot to restore the Zwave Z-stick.

I’ve done the following, but unless it takes more than a couple of minutes, it is not working:

  1. log into console - ssh -p 8101 openhab@localhost
  2. bundle:list | grep ZWave
  3. bundle:restart ###

Any tips for me ?

Stop the Zwave binding or all of openHAB BEFORE you unplug the USB controller.

Then unplug it and do your task.

Then plug it back into the computer.

Only THEN should you restart the Zwave binding or restart openHAB.

Why in the first place are you removing your stick?

Just hit the inclusion button in HABmin, no need to remove the stick. BTW, this is the only way to do it if you want to include secure devices.

The device one wants to include may be hardwired and too far from the controller to successfully include. I saw mention on another thread that the device needs to be within 5-10 ft (1-2 M), though that may be primarily a constraint on secure inclusion which needs to keep the controller plugged in and OH running anyway.

It certainly is a lot easier to take the controller to the device, press a button on the controller, press the button on the device, and wait for the lights to stop flashing than it is to carry a laptop or tablet, put the controller into inclusion mode, watch for the rapidly disappearing notification in Habmin that you are in fact in inclusion mode (don’t blink!), press the button on the device and keep your fingers crossed. Oops, I dropped the tablet while reaching into the enclosed space where the device resides and broke the screen. Now I’ve got a broken tablet and I missed the window to do the inclusion and have to do it all over again (true story).

In some cases, doing the inclusion through Habmin is a real pain.

The device doesn’t need to be that close if you use high power inclusion which is the default, and the recommended value by ZWave. In this case, normally 10m to 20m is the range you should expect from most ZWave devices (depending on the environment of course).

This makes it a bit easier…

Indeed! Thanks for posting!

I guess I was only jealous because my controller does not have a button :rofl:


Mine doesn’t anymore either. BUT it supports Zigbee too so I can start to play with that technology now. Fair trade. But that is the reason why I broke my tablet trying to pair the home power monitor to the new controller. Wish I had thought of Scott’s trick to use Google Assistant. I could have had a JuiceSSH session up tailing my zwave log and just asked Google to go into pair mode and pressed the device button without too much trouble.

1 Like