Serial gateway issues - Ubuntu 16
-
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.
-
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?
-
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.
-
@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?
Suggested Topics
-
Boxes and Enclosures
Enclosures / 3D Printing • 29 Mar 2014, 21:02 • PITP2 31 Aug 2014, 19:27 -
openHAB 2.2 binding
OpenHAB • 18 Jul 2017, 12:49 • TimO 23 Dec 2020, 14:32 -
voltage sensor via esp and mqtt
OpenHAB • 7 Nov 2020, 09:49 • muhammed 7 Nov 2020, 09:49 -
OH3 Serial Gateway Problem
OpenHAB • 15 Feb 2022, 09:48 • seppi9 22 Feb 2022, 13:44 -
OH3 - MySensors Binding
OpenHAB • 17 Dec 2020, 16:35 • Peter Loeffler 3 Dec 2023, 09:37 -
openHAB 4 MySensors Binding
OpenHAB • 1 Aug 2023, 22:19 • ben999 7 Feb 2024, 14:25