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?
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.
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).
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.