Tutorial: Locating your serial port for the Z-Wave binding, and fixing group permissions

I’ve seen some questions on how to find your serial port for the Z-Wave binding. Here’s a simple way to do it.

  1. Plug in your Z-Wave stick, then type dmesg. You should see something near the end like this: ttyACM0: USB ACM device"
  2. Your serial port is /dev/ plus the first part of that line, e.g., /dev/ttyACM0 (Exact capitalization matters.)

If you’re not using openHABian (for example, if you installed OpenHAB yourself on Ubuntu Server), you probably need to add your OpenHAB user to the dialout group so you can actually use the device. In my case, the user was named openhab, but you can verify it by doing this:

ps aux | grep openhab.runtime

Assuming OpenHAB is actually running, one of the lines of output will be huge. Go back to the beginning of that line, right before all of the numbers, and whatever is there is your OpenHAB user.

Finally, you need to run this (replacing openhab with your OpenHAB user if it’s different for some reason):

sudo usermod -a -G dialout openhab

Reboot for good measure, and you should be up and running.

5 Likes

Thanks for posting this. I suspect I’ll be looking back to it in the future.

1 Like

Don’t you also have to add it to -Dgnu.io.rxtx.SerialPorts (or am I confusing it with the Tellstick binding now)? If so, it might be good mentioning here as well…

Changing the thread category to tutorials may highlight it’s usefulness too

1 Like

Hmm, I might not be the right person to answer that. I didn’t encounter that with the Aeotec Gen5 on Ubuntu Server, at least.

Good call, done!

Typically not, though you may have to in some environments. See https://docs.openhab.org/installation/linux.html#privileges-for-common-peripherals

I don’t think many running on a standard install have to use that step for Zwave.

1 Like