root@raspberrypi:/dev# java -version
openjdk version "11.0.10" 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)
openHAB version: 3.0.2, running in Docker
Issue of the topic:
I’m running Openhab 3.0.2 inside a Docker container. I’m able to access the console of the Openhab installation. I’m able to read out /dev/ttyUSB0, but the Serial binding notify that the port /dev/ttyUSB0 is not known. What do I have to do, to access the Serial interface in Openhab?
Thank you franks for your fast reply.
The leading space in front of /dev/ttyUSB0 doesn’t do anything
And the device is defined, because I can read the serial communication via cat /dev/ttypUSB0
How can I check if the device is readable from user running openhab?
My openhab instance is running inside a Docker container. And I’m able to start command line inside openhab docker container. And I can read all data there as well. But not possible to attach this signal into Openhab things definition.
From inside the container? See my edited answer before.
As you, it seems, already have. Open a shell inside the running container and do the cat /dev/ttyUSB0 from there. As you can see, I mapped the outside device (/dev/ttyUSB0) to the standard serial port #1 (/dev/ttyS0). But this should not make a difference.
I solved this issue by not using the serial binding in openHAB. I use the following library which receives/sends the serial port data. In my case the port /dev/ttyUSB0 on raspi4 is not available in openHAB. I send commands from openHAB over MQTT to the MQTT-IO library which then sends/receives data over serial port: