I was running OpenHAB 3.4.4 in a docker on my ASUSTor NAS. After the last upgrade of the ASUSTor host system, my smartmeter reader is not working any more despite it was running for many years without any problem. I get the following error mesage:
COMMUNICATION_ERROR
No provider for port /dev/ttyUSB0 found (This is the serialport where I mapped the smartmeter usb device from the hostsystem to).
I checked the forum and found a few similiar issues. But none of the described solutions are working (mainly changing ownership and access rights). I also updated the container to openhab 4.0.3 without success.
If I logon to the docker console and try to read the ttyUSB0 port with cat I get a reading. I have also another USBserial device which is mapped to another container and works fine after the upgrade.
It is relevant to know what your docker command is. In order to access host interface container must be launched in provileged mode or mounted with /dev directories. Can you share command you used?
Upper versions of linux tend to migrate to different locking mechanisms which might contribute to issues as well.
You may need to verify group ids and ownership of ttyUSB0 on host. In principle once you get into container it should show some meaningful group id when you do la -l /dev/tty*. It could be that update of NAS operating system rolled out some new security defaults and flushed tweaks you did earlier.
You see both devices because provileged flag. You can ommit it if you map device manually.
Core issue of problem is - openhab process within docker container have insufficient permissions to open serial port. Other container might run as root, thus have fewer constraints. Did your do some specific tweaks earlier to your NAS?
You have been right, it was an access issue. For whatever reason the access has been limited to group root. So I added a new usergroup with the openhab user and it works.