Openhab 3.0 - no access to z-wave usb-stick

Dear all!

After upgrade to OH 3.1.0 (was 2.5) I have no access to z-wave stick. Before upgrade it was working out-of-the-box.

I don’t understand if I do something wrong or the snap has some issues.

demison@rpi4-openhab:~$ snap version
snap    2.51.3
snapd   2.51.3
series  16
kernel  5.3.0-1040-raspi2
demison@rpi4-openhab:~$ snap list openhab
Name     Version  Rev   Tracking       Publisher  Notes
openhab  3.1.0    1124  latest/stable  openhab    -
demison@rpi4-openhab:~$ ll /dev/ttyA*
crw-rw-rw- 1 root dialout 166,  0 Aug 15 10:00 /dev/ttyACM0
crw-rw-rw- 1 root dialout 204, 64 Aug 15 10:00 /dev/ttyAMA0
demison@rpi4-openhab:~$ snap connections openhab
Interface       Plug                    Slot                   Notes
gpio            openhab:gpio            -                      -
home            openhab:home            -                      -
i2c             openhab:i2c             -                      -
mount-observe   openhab:mount-observe   :mount-observe         -
network         openhab:network         :network               -
network-bind    openhab:network-bind    :network-bind          -
raw-usb         openhab:raw-usb         :raw-usb               -
serial-port     openhab:serial-port     :aeotecz-stickgen5zw0  manual
spi             openhab:spi             -                      -
system-observe  openhab:system-observe  :system-observe        -

I see that OH tries to locate the stick. I thing, there’s an error in apparmor profile.

demison@rpi4-openhab:~$ dmesg
[416482.496273] audit: type=1400 audit(1629038061.686:78194): apparmor="DENIED" operation="open" profile="snap.openhab.openhab" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/idVendor" pid=19058 comm="OH-usb-serial-d" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

I’ve tried to correct it, but the Thing is still offline.

In Karaf logs I see only one WARN that’s repeated 15 seconds:
17:36:37.407 [WARN ] [xsysfs.internal.SysfsUsbSerialScanner] - Could not extract USB device information for serial port org.openhab.core.config.discovery.usbserial.linuxsysfs.internal.SysfsUsbSerialScanner$SerialPortInfo@2bfbe54c: /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/idVendor

I have “Z-Wave Binding” installed.
If I create Thing “Z-Wave Serial Controller”, it’s always in OFFLINE status.

Best regards,
Dmitry

Thanks for reporting it. I believe this is a bug in the raw-usb interface specification and have opened https://github.com/snapcore/snapd/pull/10624 with a proposed fix. Once it lands, you will be able to refresh snapd from edge channel to get it right away.

The change has landed in master. If you refresh snapd from edge (snap refresh --edge snapd) you should get the snap with a fix. It’d be great if you could verify that it that the problem is gone.

Hi Maciej!

Thanks for your help! The new trouble is that both of my two Raspberry Pi 4 with Ubuntu Core are suddenly not responding. They even does not request IP from my DHCP Server. I’ll try to connect them to screen to see what is wrong.
I hope this is not related to the update Ubuntu Core received…

I’ll verify the problem and write here!

That was a Rainbow freeze. At one time on both RPi4 with Ubuntu Core on 17th Aug after pi-kernel snap update. I’ve made clean new version of Ubuntu Core sd-card and copied system-boot from it to “freezed” versions. It started like a charm!

But the main problem is here! I have no access to my z-wave usb-stick. :frowning:

In everyday use I have MacMini. I’ve installed Ubuntu 20.04 Desktop in Parallels. Then I’ve installed Openhab snap, connected stick to Parallels… And… Nothing… My be the problem is in Openhab Snap???

is that a standard Ubuntu Core or something you built yourself with an adjusted gadget snap ?

there was Changes in pi/pi-kernel DTB handling recently, custom gadgets need to be re-based for this …

I use standard Ubuntu Core installed with Raspberry Imager.