[SOLVED] Controller Number changes on Z-Stick on reboot

  • Platform information: raspberry pi 2 latest raspbian
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:2,4
  • Issue of the topic: please be detailed explaining your issue

When I reboot the Pi the z-stick controller number changes (or it might be due to trying to do off-line pairing, as I found the problem when I removed it to pair with a new Zooz switch). Thing discovery finds the ‘new’ stick (there’s only one of them) and I can change all items to match to new things but this is not a sustainable procedure.

For instance I have two z-stick things now, the old one is zwave:serial_zstick:1f16f561:serial_sof, but if I tell PaperUI to discover things it will find it but with a different controller number.

Port is /dev/ttyAMC0 like it always was. That doesn’t seem to change. As I said I can change all the items to the new controller number and it will all work again.

So I guess I don’t understand the underlying mechanism for assignment of the controller number and why it changes.

Most likely it is this. When you unplug the USB dongle the zwave binding keeps its lock on the /dev/ttyUSBX file. So when you plug it back in the old file is locked and it has to create a new one. Always make sure to stop OH before removing the dongle from the computer and start it back up after you plug it back in. Or you can usually do the include without unplugging the dongle in the first place.

Also note that when you accept/create the new Controller Thing, you can change that controller number to what ever you want it to be. So if you delete the old one, then accept the new one and give it the same ID (I use “controller” instead of the randomly generated number) then all your Things will come back with the same ID and you don’t have to change anything.

When you create a new Thing for the controller, the binding will generate a random ID for the controller which is used to uniquely identify that controller (the binding supports multiple controllers) and is used to uniquely identify those Things that are on that controller.

1 Like

Perfect. Thank you Rich! I’m back in business.I didn’t realize I could paste in the old controller number. That is good trick to remember.

Now I can go back to trying to pair the Zooz. Devices in grounded utility boxes don’t have much range. It might get better once I have a few more devices.