New binding for home made hardware

The pom.xml did not had the entry for diyonxbee as below and now it builds the binding as shown below.

bundles/binding/pom.xml file snippet:

org.openhab.binding.diyonxbee org.openhab.binding.lgtv org.openhab.binding.bluetooth org.openhab.binding.knx org.openhab.binding.knx.test org.openhab.binding.serial org.openhab.binding.onewire org.openhab.binding.wol

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]


[INFO] openHAB Tinkerforge Binding … SUCCESS [0.507s]
[INFO] openHAB TinkerForge Action … SUCCESS [0.196s]
[INFO] openHAB Harmony Client IO … SUCCESS [1.285s]
[INFO] openHAB HarmonyHub Action … SUCCESS [0.152s]
[INFO] openHAB Archetypes … SUCCESS [0.084s]
[INFO] openHAB Action Archetype … SUCCESS [1.455s]
[INFO] openHAB Binding Archetype … SUCCESS [0.061s]
[INFO] openHAB AutoUpdate Binding … SUCCESS [0.108s]
[INFO] openHAB DiyOnXBee Binding … SUCCESS [0.219s]
[INFO] openHAB Lgtv Binding … SUCCESS [0.129s]
[INFO] openHAB Bluetooth Binding … SUCCESS [0.196s]
[INFO] openHAB Serial Transport … SUCCESS [0.143s]

yes, the microcontrollers send sensor updates as key=value pairs (the key is always a item). additionally, it gets command as key=value pairs (where the value is the new state the item should be set to). when processing a command is done, the microcontroller sends the key=value it received as an update (just like with a sensor value) so openhab ‘knows’ that the command was received and understood.

is there anything I can help about that?

I had the below error on fedora 22.
####java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver

Found solution that I had to install http://rpm.pbone.net/index.php3/stat/4/idpl/29570469/dir/fedora_22/com/rxtx-2.2-0.10.20100211.fc22.i686.rpm.html

Changed library path at start.sh file as below.

-Djava.library.path=/usr/lib64/rxtx

Now, binding started to work properly and I could see at END DEVICE the key=value pair as shown in the attached screenshot and below is the console output of ./start.sh

kpatil  ⋯  distribution  target  runtime  sudo ./start.sh

Launching the openHAB runtime…
osgi> 2015-12-14 12:07:34.832 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.0).
2015-12-14 12:07:35.822 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2015-12-14 12:07:36.063 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2015-12-14 12:07:38.202 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2015-12-14 12:07:45.460 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model ‘demo.sitemap’
2015-12-14 12:07:45.727 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model ‘demo.script’
2015-12-14 12:07:45.840 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model ‘demo.items’
2015-12-14 12:07:46.452 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
2015-12-14 12:07:50.911 [INFO ] [.b.d.internal.DiyOnXBeeBinding] - opening XBee communication on ‘/dev/ttyUSB0’
Stable Library

Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
log4j:WARN No appenders could be found for logger (com.rapplogic.xbee.api.InputStreamThread).
log4j:WARN No appenders could be found for logger (com.rapplogic.xbee.api.InputStreamThread).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN Please initialize the log4j system properly.

Thanks for the support, we will get back for if we need any clarification.

We are happy with the binding. Please share your TODO list so that we can start contribution from our end. In the mean time if there is any new thing comes up from our end will upstream it first.

Our new developer is setting the IDE for development with OH1. He will post here the issues for clarification.

Actually, the next thing on my list is to write an arduino library to make sensor/actor development easier and less error-prone.
The code you find in my github page works for me since several months now - the next changes might come if I find problems with my next sensors/actors I’ll build.

Besides from that, I’ll need to check OH2 in future and port my bundle to that.

@ Kiran_patil
Hi I am unable to see the code " http://code.google.com/r/diaoulael-xbee/source/browse " in this link.please send me the code

Hello, the reason may be it is archived by google.

Sorry, I don’t from where to get it now.

Guys please Help me.I have following doubts.

  1. where you have executed the code,in eclipse ide? or other
    if eclipse ide
    2.How to interact eclipse and arduino and openHab and xbee.
    Totally confused. I am very very new to openHab guys please help me.
    after searching lot ,I got this link. I am very happy that you guys are already done,what I want to do,I am very curious how you people are done.Please give me any documentation step by step .

Hi saching,
sorry I didn’t notice your questions erlier. Sad to say I don’t really understand your questions. Could you please re-phrase them?

@juergen_richtsfeld would you care to push it upstream so that contributions can be done easily to upstream. People need not struggle to use.

It seems the project moved to github

Sir, I mean https://github.com/juri8/openhab/tree/diyxbee

ah, now I understand. This was my actual intent of this thread, checking if there is any public interest…

Since I there is actually a real request for that ( :slight_smile:) I’ll do the pull request soon.

You might also be interested in my arduino client library for that binding, but it’s sill very early in development - I even didn’t test the code yet.

Thanks you Sir.

Sir, any updates on Upstreaming the binding.

Hello,
I have not been able to find a binding for Xbee devices, so I start doing one myself with the limited java skill I have.

So far it works only with a TOSRO2T device attached to the Xbee, but I am planning for a more generic binding.
Id anyone has interest, please have a look at the work I did so far :

Hello Sir,

We are interested in it. We will test and provide feedback.

Thanks.

hi,
I managed to get my DiyOnXBee binding merged to master. I’m using it for more
than a year now. If you are willing to try it I’ll be glad to get some
feedback.

best,
jürgen

Hello @juergen_richtsfeld,

Is it merged on OH2 master branch ?

Does it support auto discovery of OH2 ?

Thanks.