So I have a Raspberry Pi 2 (Raspbian) connected to an arduino serial gateway. Everything looks setup correctly to control a relay but I get no change in relay state and watching the serial monitor nothing gets sent when I toggle the switch.
Starting Starts and stops the openHAB Home Automation Bus...
setting owner openhab:openhab recursively for /var/lib/openhab
setting permissions and owner openhab:openhab recursively for /var/log/openhab
setting permissions and owner openhab:openhab recursively for /etc/openhab/configurations
setting permissions and owner openhab:openhab for /usr/share/openhab/webapps/static
setting permissions and owner openhab:openhab for /etc/openhab/jetty/etc/keystore
setting permissions and owner openhab:openhab for /etc/openhab/configurations/users.cfg
Started Starts and stops the openHAB Home Automation Bus.
[.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.2).
[INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
[INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
[INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'home.items'
[INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
[INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
[INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyAMA0
[c.internal.ModelRepositoryImpl] - Loading model 'home.rules'
Starting Starts and stops the openHAB Home Automation Bus...
- switch1 state updated to ON
- Executing rule 'Switch1 Rule'
[INFO ] [runtime.busevents :22 ] - switch1 received command ON
Function: switchOperation >> 2;1;1;1;2;1
[DEBUG] [b.serial.internal.SerialDevice:282 ] - Writing '2;1;1;0;2;1
' to serial port /dev/ttyAMA0
Yet I watch the serial port through a session of screen and I see nothing happen:
sudo screen /dev/ttyAMA0 115200
I also see nothing on the other arduino (with the relay) that is connected on my laptop through a usb-serial adapter.
As a note using this setup I can watch the relay and the gateway talk, I can see the information coming to the raspberry pi, I just cant see openhab write anything.
groups openhab
openhab : openhab dialout
ls -la | grep ttyAMA0
lrwxrwxrwx 1 root root 7 Mar 31 01:29 serial0 -> ttyAMA0
crw-rw---- 1 root dialout 204, 64 Apr 3 16:58 ttyAMA0
Openhab seems to fail at writing to the port, any ideas?