Can't add serial binding

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.

Any suggestions please.


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"
  Item Septic_Level_Sensor received update
  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)

If your sending binary data you want to use BASE64. So sensor.items would look something like:

String Softener_Salt_Level_Sensor {serial="/dev/ttyPort1@9600,BASE64"}

Your rule may look something like:

rule "Softener_Salt_Sensor"
  Item Softener_Salt_Level_Sensor received update
  val to64 = DatatypeConverter::parseBase64Binary(Softener_Salt_Level_Sensor.state.toString)
  val ByteBuffer bb = ByteBuffer::wrap(to64)
  if (bb.array.size >= 2) {
    val double distance = (19 - (bb.getShort * 0.393701))
    logInfo("Softener", "Softener: " + distance)
    if (distance >0 && distance <19) {
      postUpdate(Softener_Salt_Level, distance)
      if (distance < 4 && Softener_Salt_Low.state == OFF) {
        sendCommand(Softener_Salt_Low, ON)
      } else if (Softener_Salt_Low.state == ON) {
        postUpdate(Softener_Salt_Low, OFF)