Cannot find the port for z-wave controller


I setup a docker based on CentOS and have openhab-online-2.0.0.b4 in it (The dockerfile is similar to It’s running and I can add binding Astro binding and Z wave binding and add things for Astro. But when I try to add my Zeon Labs Aeotec z wave stick, Gen 5, I saw the error “port /dev/ttyACM0” doesn’t exist (see blow)

07:11:44.565 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ‘zwave:serial_zstick:7dbcfbf2’ has been added.
07:11:44.596 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7dbcfbf2’ changed from UNINITIALIZED to INITIALIZING
07:11:44.610 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0’
07:11:44.611 [INFO ] [smarthome.event.ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:7dbcfbf2’ has been updated.
07:11:44.611 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7dbcfbf2’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
07:11:44.614 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7dbcfbf2’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist

I log in to the docker image, to verify that the file /dev/ttyACM0 exist

$ ls -l /dev/ttyACM0
crw-rw---- 1 root uucp2 166, 0 Oct 17 20:35 /dev/ttyACM0

And user openhab is in the group uucp2 too.

Also on the host system, I verify that /dev/ttyACM0 also exists

$ ls -l /dev/ttyACM0
crw-rw---- 1 root uucp 166, 0 Oct 18 07:21 /dev/ttyACM0

The user starts docker image is in the group uucp

The way I start the image is

docker run
–name openhab
-v /etc/localtime:/etc/localtime:ro
-v /etc/timezone:/etc/timezone:ro
-v $volumeDirectory/conf:/openhab/conf
-v $volumeDirectory/userdata:/openhab/userdata
-P openhab

Right now I have no idea why it still cannot find the port. If I get the docker image from, it seems to work. Can anybody help me to diagnose?

It’s permission issue, though I have added openhab to group uucp2. When I run openhab as root (by removing creating user and setting user from dockerfile and rebuilt), z-wave controller becomes online.

I don’t really know docker but i had to add this to /etc/default/openhab as java argument:

I don’t find the file /etc/default/openhabin the docker image. I don’t even installed it from the package manager. I download the zip file and unzip it.

But I tried to:

  1. add that option to runtime/karaf/bin/karaf
    as option to start karaf executable
    or 2, the environment variable EXTRA_JAVA_OPTS, which becomes options to start karaf executable

There’s no luck.

have you tried adding the user openhab to the dialout group?

Ah. No. But why does it need to be in dialout? The group of /dev/ttyACM0 is uucp2.

Sorry. I double check. Yes. openhab is already in dialout group and it doesn’t work.