[co7io] BACnet v2 binding for openHAB 2.x

Is the v3 BACnet binding being developed further to support openHAB 3.2.0 - or does it already support the current stable release of openHAB?

Binding is being maintained and moved forward - step by a step. Changes are recorder publicly:

Binaries are not being published/advertised as I had no time to make proper documentation updates on priorities and their handling I developed last September. Anyone is free to build the binding from sources, bacnet part is fairly stable.

From upcoming changes - I began some preparations to cover BACnet schedules within openHAB UI, so things will move ahead in its own time.

Cheers,
Ɓukasz

Thanks Ɓukasz, I’ll do some research then have a crack at building the latest 3.1

Is the things / items textual configuration any different from the org.connectorio.addons.feature.bacnet-3.0.0-20210402.kar version for interacting with present values of Analog, Binary & Multistate objects? (I have them working well with the 3.0.0 version)

Recent changes I made in 3.0.x (master branch at this moment) and which I will be porting against 3.1.x will introduce additional channels at the object level. These will allow to fetch all object properties and map them on openHAB end. Thing/bridge structure shall remain the same network < ip / mstp < device < object.

Note, I do a force push on version branches so you might need to do a force pull in your checkout. This is due to fact that API baseline I am stick with is OH 3.0, not 3.1/3.2 or 3.3. If you encounter compile errors or other issues please open a github issue. Recent updates pulled out or “connectorio” specific dependencies in order to compile all bindings against publicly available dependencies.

I don’t have a working things/items. You can look at above example - with some luck and adjustments you shall be able to transform it into things file.

I use custom XML definitions which are part of above repository. It separates items from links so I can retain the same item files across different installations and field devices. With additional profiles (also published above) I am able to align small differences across installations ie. inject/normalize units received from things. Then I do not need to use “state description” just to format a number received from a specific thing in one of installations.

Anyhow, working on push for 3.1 which will update all bindings and BACnet to same state as 3.0.x.

Hi Ɓukasz, is there any basic instructions available on how to build the openhab 3.1.x kar file from your Github source?
I’ve spun up a Debian VM but not sure where to start


You need to install Java 11 and Maven. Both should come from packages available for debian. Then you do git clone of addons repository and run inside its folder mvn clean install.
If you have troubles down the path or you are getting lost let me know, process is more or less straight if you know what you doing, might be a bit difficult for first timers.

Figured out I needed to be using Maven. Had to rename 3.0.0-SNAPSHOT to 3.1.0-SNAPSHOT in some of the pom.xml files (did a fork with those changes).
Now the build is stuck at:
[INFO] ConnectorIO - Addons - Managed - Widget ............ FAILURE [ 3.570 s]

Error details:
[ERROR] Failed to execute goal on project org.connectorio.addons.managed.widget: Could not resolve dependencies for project org.connectorio.addons:org.connectorio.addons.managed.widget:bundle:3.0.0-SNAPSHOT: The following artifacts could not be resolved: org.opensmarthouse.core.bundles:org.opensmarthouse.core.ui:jar:0.9.3-SNAPSHOT, org.opensmarthouse.core.bundles:org.opensmarthouse.core.thing:jar:0.9.3-SNAPSHOT, org.opensmarthouse.core.bundles:org.opensmarthouse.core.config.xml:jar:0.9.3-SNAPSHOT: Could not find artifact org.opensmarthouse.core.bundles:org.opensmarthouse.core.ui:jar:0.9.3-SNAPSHOT in openhab-snapshot (JFrog) → [Help 1]

Looks like the opensmarthouse.version of 0.9.3-SNAPSHOT is causing an issue


Fair finding - wrt 3.1 you need to do git checkout 3.1.x, changing versions alone will not help you. The managed widget module is one which did rely on some specifics found in opensmarthouse (a fork of OH). Since it is not contributing anything to BaCnet binding you can safely comment it out in bundles/pom.xml. Its line 58 atm: connectorio-addons/pom.xml at master · ConnectorIO/connectorio-addons · GitHub

The build got to 56 of 64 then the following error:

[ERROR] Failed to execute goal on project org.connectorio.addons.feature.managed: Could not resolve dependencies for project org.connectorio.addons:org.connectorio.addons.feature.managed:pom:3.1.0-SNAPSHOT: Could not find artifact org.connectorio.addons:org.connectorio.addons.managed.widget:jar:3.1.0-SNAPSHOT in openhab-snapshot (JFrog) → [Help 1]

It had at that stage already produced a 5.1M org.connectorio.addons.feature.bacnet-3.1.0-SNAPSHOT.kar file so looks like I’m good to start testing.

Thanks for your help

Managed kar/feature pulls in module you commented out hence failure there as you don’t have a built one. Please mind that you might need also org.connectorio.addons.feature as it brings some code shared across all bindings.

For managed widget I think I will be able to streamline it based on OH 3.3 apis at some stage.

All working good so far.

Seemed to require the org.connectorio.addons.feature binding to be installed first then the org.connectorio.addons.feature.bacnet binding. Did it the other way round originally and it wasn’t working. Removed kar’s, deleted tmp & cache directories then added kar’s in feature → bacnet order and bacnet objects came online instantly.

1 Like

Congratulations, hope it will cover all you need, if not feel free to put github issue.

I might be doing some changes to bacnet discovery (to make it work better with larger networks) and a “all in one” kars to have one shot install for OH.

Hi Ɓukasz,
Is the OH V3.4 supported by the binding?
The co7.io provides bacnet-3.0.0-20210402 that had problems with latest version.
Is the connectorio
If it is available then could you instruct or provide a link?

I’ve sent you link for 3.3.0 via mail, please test.

Hello, I used your source code, the bacnet did not start on OH3.2.0. I commented out all the items that are not needed. Do you have a working bacnet3.2.0. Made on debian.

Git repository have several branches, you need to look at 3.3.x: GitHub - ConnectorIO/connectorio-addons at 3.3.x

Used many branches, all stops at step 17.
[ERROR] Please refer to /home/hm/connectorio/bundles/org.connectorio.addons.binding.plc4x.amsads/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
If you comment out everything, the last steps do not go through, ITests - BACnet.

do mvn clean install -Dmaven.test.skip.exec=true to compile, but not execute tests. With this extra option you have better chances to go. Eventually you can do mvn clean install -pl :org.connectorio.addons.kar.bacnet -am, just to build bacnet kar and its dependencies.

If you can please copy me test failure result, I will check if there is something I can do with it.

Cheers,
Ɓukasz

Run this command “mvn clean install -pl :org.connectorio.addons.kar.bacnet -am”. The process has been completed. Also only works on version OHv3.0.2. Does not work on all subsequent versions(

I made a sync (force push) to other branches, please check!