Z-Wave - USB Device node issues

I’m adding Z-Wave to my oH system and I can see two issues:

  1. When I first tried to connect, I couldn’t and the device node (/dev/ttyUSB0) lacked the permissions for me to connect to it. Okay, that’s fixable with sudo chmod and the right permissions, but I know when I reboot, it’ll need that again - and with each reboot.

  2. When the system boots, there’s no guarantee my Z-Stick will get the same node name again if I start adding other devices. Now it’s /dev/ttyUSB0, but next time it could be /dev/ttyUSB1.

While I haven’t really dealt with udev much, I can see that can be used to solve both these problems with rules for udev. I’m sure I’m not the first person to deal with this situation. How are these issues normally handled?

As you did not give all details about your OS setup nor on the hardware of the zwave stick the following setup might require some modifications.

Assumed you use a Pi with latest buster create a udev file in /etc/udev/rules.d.
E.g. name the file: 70-aeotect.rules

Content of the file then will be:

# Aeotect - zwave stick rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave0"

idVendor, idProduct might be different. To use the correct information plugin your zwave stick and have a look to the output of the command

sudo dmesg

This command will show the related ids.

What exact permissions does the device have ? What group does the device belong to ?
In my setup the user openhab needs to be member of the group dialout as the device already has group read/write/execute permissions. No need to adapt the devices permissions. In case it is required it can be added to the udev rule.

The udev rule will create a symlink zwave0 which then can be used to access the device.

Oops. Yes, quite clumsy of me. I was just dealing with another system and my brain was stuck on it - something with only one setup, so I forgot to specify on this.

I’m using Openhabian on a Pi.

Thanks. Easy enough to add! It is Aeotec, so that shouldn’t be hard to match.

Okay, I’ll make sure it’s a member of the dialout group. Better than adapting permissions.

Thank you!

1 Like