Z-stick persistence problem

I have an Aeotec Gen 5 Z-stick plugged into a rPI 3 USB port running openHAB 2.2. I guess I have a two-part question:

  1. Is there a protocol for removing and re-attaching the Z-stick (this process has to be done to add new devices to the Z-stick)? Is there an eject device process similar to windows? If I just pull it out and re-plug it in, the rPi seems to forget ever knowing the Z-stick. The Z-stick shows up WITH A DIFFERENT “zwave.serial_zstick:” value than the previous definition and openHab forces me to re-add the Thing as well as create a new set of Things for all previously defined Z-wave devices associated with the stick. This also results in the previously defined entries for the Z-wave devices remaining in the config, but marked as “offline” (unless I delete them).
  2. The same thing happens when I shutdown the rPi add re-boot it - total amnesia regarding Z-wave attaches.

Can someone help, please?

You would need to restart the binding. Generally, I would not recommend removing the stick.

No it doesn’t - you should include devices with the stick plugged in, and the binding running.

There are ways to stop it changing port names - do a search for udev rules.

That doesn’t work, the stick just happily cycles through its color scheme as it always does.
from the Aeotec manual:
Both Inclusion-Mode and Removal-Mode require Z-Stick to be unplugged from the USB connector of the host…

Inclusion-Mode: Adding/Including Z-Wave Devices into the Z-Wave Network.

  1. To initiate Inclusion-Mode, unplug Z-Stick from the USB connector and then tap the Action Button. (The blue LED will blink slowly.)

  2. To include a new Z-Wave device into the network, simply go to the device with Z-Stick and press the button on the device you wish to include. (The blue LED on Z-Stick will blink fast during a network neighbour discovery and stay solid for 2 seconds to indicate successful inclusion of the device into the network.)

  3. The blue LED will then return to blinking slowly, indicating readiness for further device inclusions. Repeat step 2 for each device you wish to include.

  4. Tap Z-Stick’s Action Button to turn it off or it will automatically exit the removal mode after 30 seconds of inactivity.

When you plug it back in openhab reads the new stuff and allows you to add them as Things (to the “new” Zstick ;^( ). As this is just experimentation mode, there is only one old thing to add back, but as the network grows it’s going to get mighty old… I think if openhab could recognize the zstick as an old friend, all would be fine, but it doesn’t.

The manual is wrong then, or is referring to alternative methods, but it for sure works fine to leave it plugged in and I would recommend doing this.

Well, like I said, with it plugged into the rPi, it will NOT go into include mode. You can press the button as much as you want, but it doesn’t go into the include mode (blinking blue light). It just cycles thru the red, orange and blue lights, all the time, when it’s plugged into the USB socket. The manual has no alternative method for include/exclude. Aeotec seems pretty proud of this feature in their Gen 5 docs, so maybe it is unique to Gen 5? Is that what you are using to do what you say? I’m stuck. Perhaps Aeotec has an answer…

No - this is 100% correct. When the stick is plugged in to the USB, pressing the button won’t do anything.

You need to press the button in the software instead :wink: PaperUI and HABmin both have options for searching for devices.

Every ZWave USB stick can be controlled from the USB for inclusion and exclusion. I have 5 Aeotec sticks - they all work fine.

So the paper UI “manual add” button forces the zstick into inclusion mode?

Or is it the Search? I thought Search only looked at what was stored in the zstick’s memory?

Doing a scan will put the stick into inclusion mode - without this it would be impossible to include many devices into the network.

From the docs -:

Once the binding is authorized, and an adapter is added, it automatically reads all devices that are included into the network. This is read directly from the Z-Wave controller and new things are added to the Inbox. When the discovery process is started, the binding will put the controller into inclusion mode for a defined period of time to allow new devices to be discovered and added to the network. Device discovery occurs in two phases - first the device is added to the inbox as an Unknown Device to provide the user immediate feedback that the device has been discovered. Once the device type is known, the inbox entry is updated with the actual device name and manufacturer.

Chris - Thanks for your patience. I think I understand this particular problem now. I expect there will be more (sigh).