Docker | Cannot use local device | /sys/class/tty/ttyUSB0

I’m migration OpenHAB 2.5.x from local installation to Docker …

I use this command to call OH2.5

docker run -d -e USER_ID=9001 -e GROUP_ID=9001 -e CRYPTO_POLICY=unlimited --restart=always --net=host -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /opt/openhab/conf:/openhab/conf -v /opt/openhab/userdata:/openhab/userdata -v /opt/openhab/addons:/openhab/addons --device="/dev/ttyUSB0" --name openhab openhab/openhab:2.5.11

I can also see the device /dev/ttyUSB0 withing the Docker container.

pi@pi4:~ $ docker exec -it openhab /bin/bash
root@pi4:/openhab# ls -la /dev/ttyUSB0 
crw-rw---- 1 root dialout 188, 0 Jan 17 15:00 /dev/ttyUSB0

Unfortunately I become each time this error message…

2021-01-17 15:07:39.929 [WARN ] [sysfs.internal.SysfsUsbSerialScanner] - Could not find the device path for /sys/class/tty/ttyACM0 in the sysfs: /sys/class/tty/ttyACM0
2021-01-17 15:07:39.936 [WARN ] [sysfs.internal.SysfsUsbSerialScanner] - Could not find the device path for /sys/class/tty/ttyUSB0 in the sysfs: /sys/class/tty/ttyUSB0

I have already searched and didn’t found a solution. Any ideas?

btw. ttyAMCM0 war not activated by me. It’s another device which is connected to another Docker container without any issues.

Check if this thread helps: Continuous repeating Warnings /sys/class/tty/ttyUSB0
As far as I understand it is a warning which is annoying but the functions are working.

I only have linked /dev/ttyUSB0 to the container. Why I get warnings for ttyACM0, too?

Regarding the other thread. I’ve already read this, but found no solution for my case. Maybe Docker is a little bit different?

As information. I’ve used now /div/ttyUSB0 with success for smartmeter.
Unfortunately the log will furthermore flooded with the message above. :frowning: