OpenHAB 2.4 Serial Gateway problem

  • I have a hard time getting the Serial GW working with OpenHAB in a docker container.
    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:

    I use the binding MySensors. The instillation went well and I could add the Port Settings in the PaperUI.

    However I get this error:

    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
    at ~[260:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
    at org.openhab.binding.mysensors.internal.protocol.serial.MySensorsSerialConnection.establishConnection( [275:org.openhab.binding.mysensors:]
    at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection.connect( [275:org.openhab.binding.mysensors:]
    at [275:org.openhab.binding.mysensors:]
    at java.util.concurrent.Executors$ [?:?]
    at java.util.concurrent.FutureTask.runAndReset( [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
    at java.util.concurrent.ThreadPoolExecutor$ [?:?]
    at [?:?]

    OpenHab is running in a docker container with those additional arguments:




    So /dev/ttyUSB0 is for sure the right port.
    I can read the data with

    cat /dev/ttyUSB0

    On the linux server and when I go to the docker with:

    docker exec -it openhab /bin/bash

    I can also read the serial port by using the same command:

    cat /dev/ttyUSB0

    I also added:

    adduser openhab dialout
    adduser openhab tty

    but somehow each time I restart the docker I need to add the

    adduser openhab tty

    command again....

    when I enter this command:

    docker logs openhab

    I get a long list with this error:

    java.lang.NoClassDefFoundError: Could not initialize class thrown while loading

    And here is the log when OpenHAB is booting up:

    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.bundleid=275, service.scope=bundle,,} - 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.bundleid=275, service.scope=singleton} - org.openhab.binding.mysensors
    06:37:26.066 [ERROR] [ocol.serial.MySensorsSerialConnection] - No such port: /dev/ttyUSB0

    What else can I do what might be the problem?

Log in to reply

Suggested Topics

  • 22
  • 1
  • 135
  • 19
  • 3
  • 7