<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OpenHAB 2.4 Serial Gateway problem]]></title><description><![CDATA[<p dir="auto">I have a hard time getting the Serial GW working with OpenHAB in a docker container.<br />
I have a discussion running over at OpenHAB but they can't help me further maybe someone here has some experince in installing a serial GW. Here is the URL of the discussion and here is the main problem:<br />
<a href="https://community.openhab.org/t/dev-ttyusb0-no-such-port-again/85021/20" rel="nofollow ugc">https://community.openhab.org/t/dev-ttyusb0-no-such-port-again/85021/20</a></p>
<p dir="auto">I use the binding MySensors. The instillation went well and I could add the Port Settings in the PaperUI.</p>
<p dir="auto">However I get this error:</p>
<blockquote>
<pre><code>06:13:46.071 [DEBUG] [ocol.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB0 [baudRate:115200]
06:13:46.072 [ERROR] [ocol.serial.MySensorsSerialConnection] - No such port: /dev/ttyUSB0
</code></pre>
<p dir="auto">gnu.io.NoSuchPortException: null<br />
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273) ~[260:com.neuronrobotics.nrjavaserial:3.15.0.OH2]<br />
at org.openhab.binding.mysensors.internal.protocol.serial.MySensorsSerialConnection.establishConnection(MySensorsSerialConnection.java:51) [275:org.openhab.binding.mysensors:2.4.0.201812040738]<br />
at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection.connect(MySensorsAbstractConnection.java:148) [275:org.openhab.binding.mysensors:2.4.0.201812040738]<br />
at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection.run(MySensorsAbstractConnection.java:127) [275:org.openhab.binding.mysensors:2.4.0.201812040738]<br />
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]<br />
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]<br />
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]<br />
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]<br />
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]<br />
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]<br />
at java.lang.Thread.run(Thread.java:748) [?:?]</p>
</blockquote>
<p dir="auto">OpenHab is running in a docker container with those additional arguments:</p>
<blockquote>
<p dir="auto">EXTRA_JAVA_OPTS = -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0</p>
</blockquote>
<p dir="auto">devices:</p>
<blockquote>
<p dir="auto">/dev/USB0:/dev/USB0</p>
</blockquote>
<p dir="auto">So /dev/ttyUSB0 is for sure the right port.<br />
I can read the data with</p>
<blockquote>
<p dir="auto">cat /dev/ttyUSB0</p>
</blockquote>
<p dir="auto">On the linux server and when I go to the docker with:</p>
<blockquote>
<p dir="auto">docker exec -it openhab /bin/bash</p>
</blockquote>
<p dir="auto">I can also read the serial port by using the same command:</p>
<blockquote>
<p dir="auto">cat /dev/ttyUSB0</p>
</blockquote>
<p dir="auto">I also added:</p>
<blockquote>
<p dir="auto">adduser openhab dialout<br />
adduser openhab tty</p>
</blockquote>
<p dir="auto">but somehow each time I restart the docker I need to add the</p>
<blockquote>
<p dir="auto">adduser openhab tty</p>
</blockquote>
<p dir="auto">command again....</p>
<p dir="auto">when I enter this command:</p>
<blockquote>
<p dir="auto">docker logs openhab</p>
</blockquote>
<p dir="auto">I get a long list with this error:</p>
<blockquote>
<p dir="auto">java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver</p>
</blockquote>
<p dir="auto">And here is the log when OpenHAB is booting up:</p>
<pre><code>06:37:25.990 [DEBUG] [org.openhab.binding.mysensors        ] - BundleEvent STOPPED - org.openhab.binding.mysensors
06:37:25.992 [DEBUG] [org.openhab.binding.mysensors        ] - BundleEvent STARTING - org.openhab.binding.mysensors
06:37:25.993 [DEBUG] [org.openhab.binding.mysensors        ] - BundleEvent STARTED - org.openhab.binding.mysensors
06:37:25.999 [DEBUG] [org.openhab.binding.mysensors        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=507, service.bundleid=275, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=339} - org.openhab.binding.mysensors
06:37:26.054 [DEBUG] [ensors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
06:37:26.054 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:616dc2bb' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
06:37:26.055 [DEBUG] [sensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
06:37:26.056 [DEBUG] [sensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: []
06:37:26.057 [DEBUG] [ocol.serial.MySensorsSerialConnection] - Enabling connection watchdog
06:37:26.066 [DEBUG] [ocol.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB0 [baudRate:115200]
06:37:26.066 [DEBUG] [org.openhab.binding.mysensors        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=508, service.bundleid=275, service.scope=singleton} - org.openhab.binding.mysensors
06:37:26.066 [ERROR] [ocol.serial.MySensorsSerialConnection] - No such port: /dev/ttyUSB0
</code></pre>
<p dir="auto">What else can I do what might be the problem?</p>
]]></description><link>https://forum.mysensors.org/topic/10745/openhab-2-4-serial-gateway-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 06:17:13 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/10745.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Nov 2019 14:14:47 GMT</pubDate><ttl>60</ttl></channel></rss>