So I’m a beginner so I hope this belongs here. Also I hope this is enough info but not to much.
Hardware:
Raspberry pi 2 Ubuntu
Mysensors Arduino with relay nodeid 2 sensor id 1, Mysensors serial gateway
Software:
Ubuntu 15.10, Openhab 1.8
Mysensors 1.5
So I’ve been getting things going and have gotten stuck. I just want to have Openhab control and get data from the mysensors serial gateway.
My first question: Is currently with my setup what I want to do possible?
Running under the assumption that it is, my second question:
I watch the log when I start openhab from a seperate terminal, tail -f /var/log/syslog, I edited this to show only what I think is relevent which I realize may be a mistake, so let me know.
Serial binding has been started.
Loading model 'home.rules'
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyAMA0
[DEBUG] [b.serial.internal.SerialDevice:136 ] - Serial port '/dev/ttyAMA0' has been found.
[DEBUG] [.b.m.internal.MySensorsBinding:96 ] - activate
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyAMA0: File exists. It is mine
�#�_/ttyAMA0 testRead() Lock file failed
[ERROR] [.o.b.m.internal.gateway.Serial:70 ] - Unable to find Serial port '/dev/ttyAMA0'
[INFO ] [.service.AbstractActiveService:169 ] - MySensors Refresh Service has been started
[ERROR] [.service.AbstractActiveService:175 ] - Error while executing background thread MySensors Refresh Service
java.lang.NullPointerException: null
org.openhab.binding.mysensors.internal.gateway.Serial.write(Serial.java:82) ~[na:na]
org.openhab.binding.mysensors.internal.MySensorsBinding.execute(MySensorsBinding.java:178) ~[na:na]
org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) ~[na:na]
org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) ~[na:na]
Is this a problem?
Because then when I push a switch everything seems to work except that the relay state never changes (also watching on the serial monitor from my laptop where nodeid 2 is being powered)
Executing rule 'testswitch Switch Rule'
[INFO ] [runtime.busevents :22 ] - testswitch received command ON
Function: switchOperation >> 2;1;1;1;2;1
[DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Arduino sends to Openhab'
[DEBUG] [b.serial.internal.SerialDevice:282 ] - Writing '2;1;1;0;2;1
Mar 20 19:34:39 homecontrol openhab.sh[26773]: ' to serial port /dev/ttyAMA0
[INFO ] [runtime.busevents :22 ] - Arduino received command 2;1;1;0;2;1
[DEBUG] [o.o.i.r.i.b.GeneralBroadcaster:46 ] - broadcaster 'org.openhab.io.rest.internal.broadcaster.GeneralBroadcaster$1@1883158' is empty
[DEBUG] [.r.i.resources.SitemapResource:146 ] - Received HTTP GET request at 'sitemaps/home/0004' for media type 'null'.
So everything looks correct, and what I mean is all the things like the serial port, what the Arduino commands should be.
Also here is what happens if I hit the reset button on the gateway
Received message '0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.
' on serial port /dev/ttyAMA0
[DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Arduino sends to Openhab'
[INFO ] [runtime.busevents :26 ] - Arduino state updated to 0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.
Could someone nudge me in the direction of what I need to do next?
Sean