Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. OpenHAB
  4. Serial gateway issues - Ubuntu 16

Serial gateway issues - Ubuntu 16

Scheduled Pinned Locked Moved OpenHAB
4 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DbagioniD Offline
    DbagioniD Offline
    Dbagioni
    wrote on last edited by
    #1

    Greetings All.
    I have hit a wall here. I am setting up openhab2 on my Ubuntu box. Im running Ubuntu 16.04 LTS, with Openhab 2 stable release installed.

    I can get every other thing configured and running smoothly EXCEPT for this serial gateway.

    My gateway is an Arduino Uno, flashed with the lastest stable MySensors library and serial gateway sketch. When its connected to the box via USB it comes up as /dev/ttyAMC0, and Im able to see it running via serial monitors. But when I go into openhab to add it the gateway still shows up as offline. I've already added openhab to 'dialout' and 'tty' groups and made the java exceptions changes and enabled the serial transport via karaf console as noted in the installation instructions.

    The only thing the logs are producing is a generic "unable to connect to serial port tty/ACM0 message.

    Im at a total loss here as Im a hardware guy, not really a software guy.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TimO
      Hero Member
      wrote on last edited by
      #2

      Please post (copy and paste) the exact error message from karaf console.

      Is the Uno registered by Linux? dmesg, lsusb. Please check the spelling: is it ACM0 or AMC0?

      1 Reply Last reply
      0
      • DbagioniD Offline
        DbagioniD Offline
        Dbagioni
        wrote on last edited by Yveaux
        #3

        Ok I have made some progress. I have a gateway showing up as online and it is discovering nodes...but after a while it all goes 'offline' and Im stuck rebooting the entire box.

        The UNO is registering with Ubuntu, it shows up as /dev/ttyACM0 (Arduino/Genuino Uno).

        The initial error message (I lost the copy of it) basically said it was "unable to open the serial port /dev/ttyACM0"

        What I did to get the gateway to come online.

        I added the following item in Openhab2.
        String UnoGateway { serial="/dev/ttyACM0@115200" }

        Then I added the following to the /etc/defaults/openhab2 file.

        #########################
        ## JAVA OPTIONS
        ## Additional options for the JAVA_OPTS environment variable.
        ## These will be appended to the execution of the openHAB Java runtime in front of a$
        ##
        ## A couple of independent examples:
        ##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
        ##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/$
        ##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=E$
        
        EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"
        

        I also added that line to the karaf runtime file.

        But I have no idea now why it keeps going offline.

        T 1 Reply Last reply
        0
        • DbagioniD Dbagioni

          Ok I have made some progress. I have a gateway showing up as online and it is discovering nodes...but after a while it all goes 'offline' and Im stuck rebooting the entire box.

          The UNO is registering with Ubuntu, it shows up as /dev/ttyACM0 (Arduino/Genuino Uno).

          The initial error message (I lost the copy of it) basically said it was "unable to open the serial port /dev/ttyACM0"

          What I did to get the gateway to come online.

          I added the following item in Openhab2.
          String UnoGateway { serial="/dev/ttyACM0@115200" }

          Then I added the following to the /etc/defaults/openhab2 file.

          #########################
          ## JAVA OPTIONS
          ## Additional options for the JAVA_OPTS environment variable.
          ## These will be appended to the execution of the openHAB Java runtime in front of a$
          ##
          ## A couple of independent examples:
          ##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
          ##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/$
          ##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=E$
          
          EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"
          

          I also added that line to the karaf runtime file.

          But I have no idea now why it keeps going offline.

          T Offline
          T Offline
          TimO
          Hero Member
          wrote on last edited by
          #4

          @dbagioni Is there an error message in the log to the time the gateway changes its state to offline?

          Have you considered using the binding for OH2 and MySensors?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          29

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular