[SOLVED] Do I have to unplug my Z-Stick Gen 5 to include new devices?

Yes you can. I have done it a couple of times myself.

Please note, however, that it is strongly recommended to have the device you are trying to include in very close proximity of the Zwave controller (USB stick), so that you are sure to have a direct link between the two and not going through the mesh, when doing inclusion.

For some devices it is convenient to bring them to the PC/PI hosting the controller, for others not so much (e.g. in-wall relays/dimmers, etc.). This is why I find the Aetotec stick a very nice product, since it has battery and can in fact be moved to the device for inclusion - if needed.

To add to this, you can set zwave into debug (log:set DEBUG org.openhab.binding.zwave), and grep for the node in a tail of openhab.log. Just remember to set zwave back to WARN when you’re done. This can be used real-time or for historical data (the -n option for tail), and will provide a lot more detailed info for troubleshooting the device.

tail -F -n5000 /var/log/openhab2/openhab.log | grep "NODE 2:"

You may want to double check the configuration parameters for the device (best done through Habmin). There is a setting which disables motion detection. Do you have any associations setup?

And…

I respectfully disagree… why do you strongly recommend this? For older devices that only support low power inclusion, and to utilize the Security CC, being in close proximity to the controller would be required. For all other cases, it is best to do the opposite, and perform inclusion with the device and controller in their final locations. This is especially true for mains powered devices, so the routes are set properly.

1 Like

Returned home from work and the motion sensor fired off the rule and the light turned on. What in the world? I went to bed last night and it wasn’t working. I’m glad it’s working but curious as to what fixed it.

The device wakes up multiple times and finished the initialization. Remember when I wanted you to force it to wake up?

Yep, that must be it. Thanks for all the help. Now off to my next opportunity in the Bindings forum.

Hmm… I am sure this has been stated in several manuals I have read, but looking closer at it now, this may have been for “older devices” as you point out. I see there is something called “network wide inclusion” that is supported by newer devices (I presume) and also by the OH2 binding, so I realize my statement may have been misleading - at best. Thanks for pointing this out!

1 Like

This is not necessary. Just a restart of the Z-Wave binding will do the job. So just SSH into the Karaf console and enter

bundle:restart org.openhab.binding.zwave

I have even automated this in my setup. When I did not get an update from the Z-Wave controller within the last 15 minutes, the binding will restart automatically.

That is smart! How did you do that?

All my Z-Wave items are in a group. Whenever the group receives an update a rule posts the timestamp of the last update to a DateTime item. All 15 minutes a cron rule checks if the state of the DateTime item is older than 15 minutes. If is is older than 15 minutes I restart the Z-Wave binding via the Exec binding where I call a batch script on the computer which logs on to Karaf console and executes the line

bundle:restart org.openhab.binding.zwave

Thanks for the explanation!

Maybe a little beyond the capabilities of most users here.

A more robust solution would to have the binding itself monitor the status of it’s adapter, and release and re-engage the port accordingly.

I’m not using the PI, but I don’t think that matters. OpenHAB reports Exceptions when I remove my z-stick. It clearly knows when the stick is removed.

It would be nice if OpenHAB would support hot-plugging the stick, since that’s one of the primary use-cases when including new devices.

I’d simply recommend not to remove the stick - there shouldn’t be a need to remove it I think.

Blaming OH is not entirely fair.

It’s the makers of the binding that don’t have the hot swap feature.

But for the record, I agree with you, you should be able to unplug the stick and re-insert it without causing problems.

Apologies. It wasn’t my intention to blame anyone. Just wishful thinking.

The binding is not designed to do this - it’s not simple as it would require reinitialising the binding completely. There may in future be features to allow taking things offline for maintenance and this might allow this.

However, as I said earlier, there should not be a need to do this and if you use any secure devices, it is absolutely not possible to include them with the stick removed from the computer.