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

Using the Z-Stick Gen 5 with my RPi. When trying to add new z-wave devices, what is the proper sequence to successfully get devices added? Do I have to unplug my Z-Stick Gen 5, press the “Action” button and take it to each device? Once at each device I enabled "Inclusion"mode on the device? Once finished, plug the Z-Stick Gen 5 back into my RPi and then go to “Things” and do a z-wave search? Thanks

Yes, exactly as you described.

Openhab does not have a ‘hot swap’ feature for USB devices, so the only extra step would be ‘restart the server’ after plugging the controller back in.

And by ‘Things’, you meant ‘Inbox’.

Thanks @psych… You’re right, I meant Inbox :slight_smile:

Just so I’m clear, after returning the Z-Stick to the RPi and plugging it in, I should power off the RPi and then power it back up?

I would SSH into the pi and type sudo reboot, unplugging the pi during execution may have undesirable effects,

I think using the proper reboot command closes programs more gracefully IMHO.

1 Like

Thanks, I’ll give this a try and report back.

I’ll explain… When you remove the Z-Stick, OH does not release the port (which it should! tut tut OH), so plugging the stick back in will have no effect because a) OH thinks its already connected, and b) the port is still in use by OH so inserting the stick gives it a different address.

This is also the reason you cannot simply restart the openhab service, because you will have to update the port address again in the binding config. Then when you restart the pi, the stick will revert to its original address and the binding wont find it again. All very annoying, I know.

1 Like

Thanks for the info. Okay, both devices showed up in the Inbox. Odd thing, it recognized both devices as smart plugs when one of them is a motion sensor.

So if you want to avoid having a different /dev/tty device when plugging the stick back in you can set a udev rule up to always load the same /dev everytime.

I use /dev/zwave as example on the z-stick thing:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave", GROUP="dialout"

Still doesn’t actually solve the problem. OH will never look for another stick as long at doesn’t detect the disconnection of stick in the first place.

Always restart the Pi.

1 Like

So apparently my Z-Stick has changed ports. How can I find which port it’s using now and update the config?

Quite common, at least with the latest build.

I had the same issue last week.

Inbox Shows Wrong Thing

That’s my post on the same problem.

1 Like

Before I had to move raspian to a USB stick (bad SD card purchase), I didn’t have any issues with removing and adding the usb stick; the only issue was that it would change the /dev/tty.

Fun fact running a raspberry pi this way makes it so that if you do not shut down when you remove the z-stick, the system freaks out as it seems to unload all usb devices. Some day I will hopefully have time to put things back on the SD card.

1 Like

SSH into the pi and issue the following command

ls /dev/ttyA*

My guess it will be 1 instead of 0; rebooting will revert back to 0.

1 Like

You can Include devices without removing the Z-Stick. The Z-Wave Scan function puts the Z-Wave Stick into Inclusion mode for 30 seconds. You can access this through HABmin, or PaperUI.

PaperUI - If you go to your Inbox, Click the antenna looking Scan Icon on the upper right. This will present a menu of Bindings. Select ZWave, this should put the Stick into Inclusion mode. Then activate your new device within 30 seconds and you should be good to go. It has to be in range of the network.

Instructions for HABmin

Z-Wave Inclusion Info - “To include a device in OpenHAB, you need to start the discovery process for Z-Wave. This will put the controller into inclusion mode for 30 seconds, and you then you then need to put the device into inclusion mode.”


Here’s what I got…

[22:16:05] openhabian@openHABianPi:~$ ls /dev/ttyA*
/dev/ttyACM0 /dev/ttyAMA0

It shouldn’t have, did you restart the Pi?

You probably have ttyUSB0, try ttyUSB1.

In fact, clicking the dropdown in the ZW binding will probably list the correct port.

1 Like

I never knew that!

I always thought it was strange that the controller properties had an option to exclude from the controller, but not include. Now I know why.

It’s not the most obvious feature, so don’t feel too bad. I can report that I just used this network inclusion the other day, so it works.

1 Like

Something is definitely amiss. As I have been learning OH2 I had the Z-Stick, Aeotech MultiSensor and a Smart Plug working to turn on a light when motion is detected. Now when I walk in front of the MultiSensor, nothing happens. It’s like the rule never fires off.

I would have to see the following things in order to offer any sort of assistance:

  • items file.
  • rules file.
  • log of the time period you are referring to.

Without that we are all guessing.

1 Like