New binding for BSB-LAN device

Tags: #<Tag:0x00007f7454ba7848>

Hi all,

I recently implemented a binding to retrieve data from my BSB-LAN device via the JSON API provided by the device.
Initially I just wanted to get in touch with binding development in openHAB and have a simple and flexible way of retrieving data.
That’s why I started coding with the result of a new binding that can be used to communicate with the BSB-LAN device. The binding is now running for several days in my system in a first version. As I didn’t notice major issues I decided to share the outcome.

So If someone stumbles across this post and wants to give the binding a try I would appreciate your feedback. Due to my limited spare time I will not be able to respond at present.

Documentation can be found here.

The current version is based on a 2.5.0 snapshot and available here. Copying the jar to the “addons” directory should be all that has to be done - of course apart from configuring the binding :slight_smile:

Note: Retrieving parameter 8982 is currently not possible (see https://github.com/fredlcore/bsb_lan/issues/40)

regards Peter

1 Like

Will definetly try this the next couple of days. :+1:

I did a very quick setup as I am short on time, but: amazing, works right out of the box, thanks for that :+1:

Will do some more tests during the next days.

Finally I had some more time to test in detail: reading and setting parameters for my heating system from Brötje works without any problems.
Great Job!
Are there any plans to add this binding to the official repo?

Nice to hear and many thanks for your feedback and testing.

Haven’t yet thought of contributing it back to the official repository. In case of doing so it might be worth contacting the owner of the BSB repo regarding his plans of the JSON API, just to be sure there are no breaking changes planned in the near future which would require reworking the communication with the device when using newer firmware versions.

But basically - why not :slight_smile:

Have an nice evening!

That definitely makes sense as this is a pretty new feature for the BSB LAN adapter.

This would be really great, thx again for your hard work.

I try to use your binding.
Unfortunately, I don’t get the binding to work.
I loaded the .jar into the “addons” folder and configured the things, items and sitemap like your specification here. But I don’t get an issue. The items have no values.


Maybe there is some additional Config? Or an required add-on?
If I make a http query with the browser i receive the data (also the parameter 8982).
Any help and tips are very welcome.
Thank you for your work

Hi,

as far as I know there shouldn’t be anything else to do - at least I hadn’t to do other Things :slight_smile:
Some things you might want to check:

  • Could it be the same issue as here
    Have you done the configuration via files or via paper ui?
  • I am currently running on a 2.5 snapshot (2.5.0~S1630-1)
    Which version do you use?
  • What status do the bridge and parameter things show in paper-ui?
    You should be able to see it via URLs similar to
    http://[ip]/paperui/index.html#/configuration/things/view/bsblan:bridge:heating
    http://[ip]/paperui/index.html#/configuration/things/view/bsblan:parameter:heating:p8730
    Here is how it looks in my system:
    image
  • You could also check the openhab logfile. Maybe you can see something there. Possibly you have to increase the log level like documented here

regards Peter

I have done the configuration via files.
My openHAB version is: 2.4.0 Stable
And now here was the problem: In PaperUI i saw no BSB-LAN Bridge Thing.
In the log-file i saw (after a restart):

2019-10-09 22:31:58.012 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/share/MD0_DATA/.qpkg/OpenHab/addons/org.openhab.binding.bsblan-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.bsblan [215]
  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

After downloading the gson.jar to the addons Folder nothing happens.
So i installed the dependency manually on the karaf console:

bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar

And now it works.
Thank you very much.

p.s. I am pretty new to openHAB and I do not know exactly what I did. Maybe someone can enlighten me?

Thanks, nice to hear.