[SOLVED] OH3: zwave binding Z-Wave Serial Controller Aeotec Z-Stick Gen5 remains offline

It seems a hardware issue with the pi (in my case with a pi4). I had the same issue and found another workaround; just connect a simple USB-hub to your pi and plugin the Z-wave stick into the hub.

It is not a pi and it‘s not a HW issue. The stick is recognized by OS and working in OH2.

Have you ever tried to you use /dev/ttyACM0 directly?
I don’t understand why you configure a symbolic link to that character device.

Even if the thread has been marked as solved I want to write my experience with a similar problem. The z-wave binding cannot connect to the serial port and (of course) therefore the information from binding does not help to track down the problem (while 2.5.9 works well with the same environment).
I’m finally not sure if the “problem” is Java11 or a change in OH3 (have tried M2 and M3) I (s)traced the problem down to a permission denied while writing /var/lock/LCK…ttyUSB-ZStick-5G.
On my synology NAS (using OH native and not in a docker) /var/lock is only root-writeable which lead to permission denied and finally in a more or less silent error.
For now, while I’m not finally migrated to OH3, I have changed the permission, ignoring to think about any security aspects :wink:
Not sure if this here is the same problem, but it matches the description and therefore maybe helps somebody else.

1 Like

I am facing the same problem with the stick. I run OH 3 on an opensuse leap 15.2 PC for test. The stick becomes initialised and than goes offline. The stick works well with OH2
Regards Wolf

Blockquote

I waited for the general release today and have the same problem described on this thread.

Use the workaround I described or open a new thread. Eventually you have more luck than me and someone is able or willing to help.

@HaKuNa is there anything I need to change in terms of the serial port in openHAB or do I literally just install and configure ser2net and the Z-Wave controller will just start working while pointing to /dev/ttyACM0?

no, see port config here

Thanks @HaKuNa. I may give this a shot. In the meantime I have a lead on the issue. If I run openHAB manually as root, the Z-Stick works. So this is definitely some sort of permissions issue even though the openhab user account should have access via the uucp group:

crw-rw---- 1 root uucp 166, 0 Dec 22 11:48 /dev/ttyACM0

uucp:x:14:openhab

I’ll let you know if I figure this out.

Getting closer. I ran the openHAB start.sh manually as the openhab user which brought me to the openHAB console and it spit out this error repeatedly:

openhab> check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
FAILED TO OPEN: No such file or directory

1 Like

Ok @HaKuNa and @chris I think I figured out what’s wrong. It appears that openHAB 3.0 requires access to /var/lock. On ArchLinux, this is symlinked to /run/lock, which has permissions set to 755 root root so the openhab user cannot access. /run/lock is considered a temp directory and is configured via /usr/lib/tmpfiles.d/legacy.conf, which Systemd uses to create /run/lock in volatile memory at system boot with those permissions. To override these permissions, I was able to copy legacy.conf to /etc/tmpfiles.d and adjust the permissions to 775 root uucp. After rebooting my system, /run/lock now allows the uucp group and the openhab user to access the Z-Stick and my Wave controller shows online. When I look in /run/lock, I now see a LCK…ttyACM0 file for /dev/ttyACM0, the serial port for my Z-Stick.

That said, I still consider this a workaround as I had to override a system default and this was working fine under openHAB 2.5. I’m wondering if there was a regression that now requires openHAB 3.0 to write to /var/lock when it didn’t before.

4 Likes

This is all handled in the nrjavaserial bundle. OH3 uses a newer version and I seem to recall some changes to fix some issues with locking on some variants of linux.

I can confirm that this works. Pi4 and aeotec z-stick. Simple USB hub does the trick

1 Like

it‘s not pi related

well that might be the case Remo. I do not know.

What i`m saying is the combination of OH3 + PI4 + aeotec z-stick does not work out of the box, but does work with a USB hub.

Hi, same here, Opensuse 15.2, I just upgrade from OH 2.5 to 3.0 and my Aeotec Stick doesn’t go online anymore… Everything was working fine before upgrade. I tried with and without the tty symbolic link without any success. Any idea to point me in the good direction are welcome.

If you really have the same issue as described in the 1st post, you have three options. If not, open a new thread as this one here is marked as solved.

Option 1) Use the marked solution (I know it’s a workaround)

Option 2) use this workaround (I have not yet tried it)

Option 3) Wait and hope someone will fix it permanently.

1 Like

Same problem with official docker image openhab/openhab:milestone-alpine. Docker running on Arch Linux host. It worked with OpenHab 2.5.

EDIT: in milestone-alpine x86_64 the java crashed when opening the Z-Wave bridge for configuration. In milestone-debian X86_64, the configuration page opens, however, the log shows No SerialPortIdentifier found for: /dev/ttyACM0. Interestingly, the same setup of /dev/ttyUSB0 for Ebus 3.0.10 (unofficial binding be csowada) works well.


In docker-compose.yml:

    devices:
      - "/dev/zwave-stick:/dev/ttyACM0" # See /etc/udev.d/rules/ for static naming
      - "/dev/ebus-coupler:/dev/ttyUSB0"
    environment:
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0 -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"

Within the docker container, I can see that /dev/ttyACM0 is owned by root:uucp with r/w perms and that openhab is member of uucp group.
Unfortunatelly, applying chmod o+rwx -R /var/lock did not help.

I also have a local user and group openhab on Arch Linux host with the same uid and gid as the one used within the container - but no change.

[arch] # cat /etc/group | grep uucp:
uucp:x:14:openhab

[arch] # ls -la /dev/*{ACM,wave}*
crw-rw---- 1 root uucp 166, 0 Jan  1 17:40 /dev/ttyACM0
lrwxrwxrwx 1 root root      7 Jan  1 17:40 /dev/zwave-stick -> ttyACM0

[arch] # ls -la /run/lock
total 0
drwxrwxr-x  5 root uucp   100 Jan  1 17:40 .
drwxr-xr-x 27 root root   820 Jan  1 18:10 ..
drwx------  2 root root    40 Jan  1 17:40 lvm
drwxrwx---  6 root pkcs11 120 Jan  1 17:40 opencryptoki
drwxrwxr-x  2 root uucp    40 Jan  1 17:40 subsys

Thank you, I will probably open a new thread. I was wondering if I will change my Z stick as I discover that is Gen2 that is not supported anymore by Aeotec.