I am a first time user trying to get an Openhab system running. After downloading the latest version and getting it running in a Windows 7 64 bit computer I attempted to add a serial binding to play with controlling an arduino.
From the PaperUI I went to add ons and then found the Serial binding and clicked install.
(Side note here the serial and Network binding indicated installing forever, I had to refresh the browser to get it to show installed)
Anyways, after the serial binding indicates installed I went to the Configuration screen then Bindings but the serial binding doesn’t show up.
I followed the first time use tutorial and was able to get the network binding to install and show on this screen.
Serial binding is a openHab 1 binding so you need to configure it manually. The good news is that there is not much to it since it does not even require a serial.cfg file. Create a file such as sensor.items in conf/items/ and then add:
String MySensor {serial="/dev/{port}@9600}
Next create your rule for MySensor, one of mine that deals with ASCI data is:
rule "Septic_Level_Sensor"
when
Item Septic_Level_Sensor received update
then
val Number reading = Septic_Level_Sensor.state
val double distance = (51 - (reading * 0.393701))
if (distance >0 && distance <51) {
postUpdate(Septic_Level, distance)
if (distance > 28) {
if (Septic_Level_High.state == OFF) {
sendCommand(Septic_Level_High, ON)
}
} else if (Septic_Level_High.state == ON) {
postUpdate(Septic_Level_High, OFF)
}
}
end