I’m trying to create my own 433MHz receiver with a Arduino mini connected to the serial port of my Openhabian RPi3.
I have installed the RCSwitch sketch on the Arduino and changed it so it only sends the code received.
also I have configured Openhabian to enable the serial port and installed the serial binding.
So far so good.
When I set up the serial item as a string item like:
String keyfobs "Håndsender s" { serial="/dev/ttyS0" }
I get entery’s in the eventlog like:
2018-08-21 00:13:51.288 [vent.ItemStateChangedEvent] - keyfobs changed from 3982408^M to 3982404
But if I change the item to a switch like:
Switch keyfob "Håndsender 1" { serial="/dev/ttyS0,OFF(3982404\r),ON(3982402\r)" }
The item only change state on first received transmission, the following changes nothing no matter what code is being transmitted.
I have also tried to use regex like:
Switch keyfob "Håndsender 1" { serial="/dev/ttyS0,REGEX(s/3982402/ON),REGEX(s/3982404/OFF)" }
Still no dice.
I have tried to change the termination charecter sent by the Arduino. linefeed(newline), carriage return or both, no difference.
Am I doing something wrong or did I hit a bug in the serial binding?
I’m using Openhab 2.3.0 release btw.