[co7io] BACnet v2 binding for openHAB 2.x

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!

The “Binding - BACnet” step now has the following error.

[ERROR] Failed to execute goal on project org.connectorio.addons.binding.bacnet: Could not resolve dependencies for project org.connectorio.addons:org.connectorio.addons.binding.bacnet:bundle:3.3.0-SNAPSHOT: The the following artifacts could not be resolved: org.code-house.bacnet4j:api:jar:1.3.0-SNAPSHOT, org.code-house.bacnet4j:ip:jar:1.3.0-SNAPSHOT, org.code-house.bacnet4j :mstp:jar:1.3.0-SNAPSHOT: org.code-house.bacnet4j:api:jar:1.3.0-SNAPSHOT was not found in JFrog during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of openhab-snapshot has elapsed or updates are forced → [Help 1]

Change this line:
connectorio-addons/pom.xml at 3.3.x · ConnectorIO/connectorio-addons · GitHub, and set bacnet4j.wrapper to 1.3.0-alpha1 and plc4x-extras to 0.8.0. I made some changes in there, but they should not be critical for build.

Without latest wrapper you will miss support to have all objects at device level, but that’s not relevant for testing with 3.3 for now.

Made changes, the assembly was complete. Nothing has changed, older version 3.0.2 does not work( Testing on v3.0.2, v3.0.4, v3.1.0, my personal v3.2.0.

Do you see any error during installation or while startup of binding?

In the binding manager, the bacnet binding is visible. When you click on install, the installation freezes.

Try installing it via shell - do features:install co7io-binding-bacnet.

Thank you Lukasz!
Works on version 3.2.0. If there are problems, I will write.

Hello, after one month of using bacnet binding, I found out the following… Not without problems. I connected about 50 things, after which the SNMP protocol stopped working, the protocols working through the ethernet tcp/ip also began to work unstable. If you reduce the number of things, other protocols start to work more stable.

This is the input voltage when no more than 15 things are connected to the bacnet. SNMP

This graph is when about 50 things are connected. SNMP voltage monitoring protocol.

I suspect the bacnet is overloading the network, high refresh rate. Although I set 1000ms and higher everywhere, changing the polling time, I did not notice the difference. The processor and memory are normal for loading. Tested on different hardware.

Its likely a case, because binding sends few readout requests for each poll cycle for each object. I been lately adjusting this part and also doing some aggregation of polling (reading up to 3 objects at each cycle to avoid segmentation), but its still not ported to 3.3.x.
You can set logging to DEBUG for org.connectorio.addons.binding.bacnet.internal.handler.object.task.ReadObjectTask and see in detail if your polling settings are accepted. I found out that UI did not present them properly so they were possible to specify only via text configuration (also awaiting port).

Tell me how to set up debug mode? And also is there an instruction for a text configuration or at least one example? The one at the beginning of the article does not fit. I’m testing on version 3.2.0.
I noticed that a thing can be created separately, each or in one thing, any number of channels, but only as a presentValue.

The debug mode can be enabled using openhab shell (ssh -p 8101 openhab@127.0.0.1 or openhab-cli console default password AFAIR is habopen). After logging in into shell you just type log:set DEBUG org.connectorio.addons.binding.bacnet.internal.handler.object.task.ReadObjectTask. It should have immediate effect and result in multiple entries appended to your openhab log file.

The text file config is indeed out of date, however you can take yaml output you see in “config” tab displayed in UI and transform it into xtext file. I do not have any working example of it.