[co7io] BACnet v2 binding for openHAB 2.x

Thanks for your quick answer! Hope to see the updated version soon, happy to test for you :+1:

I am on 2.5.11-1, me platform is a pi 3b+.
I purchased a backmove wfif controller, It came with no documentation. My assumption is that it will broadcast it’s IP address. Will your snapshot discover it?

Are you sure it is manufactured by Beckhoff?

Broadcast can be disabled on device/controller hence discovery might not work all the time. By default it is enabled hence you should be able to detect it.

I’m sorry, it is bravo controls

Sorry, I thought it is other topic on two other integrations we made. I will look for catalog card of this device to see if its standard bacnet equipment. From picture looks like it is. :slight_smile:

// Edit: yup, its gonna work.
Double check if device is reachable over your network using ping.
Make sure it is same logical bacnet network (binding by default uses network with 0 identifier).

Thank you @Lukasz

Hi,

I have used 1.x BACnet binding for long time and have liked it a lot.
Now I found this and it looks very promising!

Let me know if any help in testing is needed. I’m going to OH3 and would like to see this binding ready for it soon.

Continuing the discussion from [co7io] BACnet v2 binding for openHAB 2.x:

@splatch I’ve been using openhab v1 and v2. From previous years I know there is an update of openhab at end of the year. Yesterday I started v3. I was using bacnet add-onn 1.9.0

I would like to test BACnet OH3. I’ve working BACnet controller in my house, with real value’s

FYI, 3.0.0-alpha-1 version of binding have been published. Please test. I will update download links later (go to connectorio.com/shop).

Hello,
i copied the file to /usr/share/openhab/addons.
then installed via the webUI, installation seems to go well, no log entry. then added the IP Bridge. this resulted in:
Thing ‘co7io-bacnet:ipv4:BACnet_IPBridge’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
I have a fresh image of openhabian/OH3 on a raspi3
are there more log’s i can look into?

If that happens its a code issue to be fixed by me. I gonna have a look on it. I know that Beckhoff integration have issues so there will be another followup alpha release.

Hello,
I have been using the BACnet binding since version 1.x and I would also like to thank you very much that it is now updated in the new version 3.

I have now taken it as an opportunity to migrate my OH to the new version, and thus test everything before I switch the large switch from 2.5 to 3.0.

I would like to share the last tests with the Openhab Binding (3.0.0 alpha) here and possibly hope for help.

I have around 120 active BACnet objects, all of which after a lot of effort I have integrated and linked to items.
after a long time (approx. 2-3 hours) the communication was abruptly interrupted and cannot be restarted either with a restart or with good persuasion

By chance I now have Wireshark running and found that as soon as I save an item link again (without changing) exactly this one item will be polled again

I still try to find the log from when the communication breaks off and I am ready to post it here too.

Many Thanks
Pedro

No need for that, I updated biding to not rely on channel links since this functionality is basically broken in OH3. Handlers get notified only when link is created, after restart there is no call that link is in place and binding did not start polling.
BACnet binding is not the only one victim of core bug, but to provide a way to migrate we have to abandon this feature of framework.

Amony other update I have is very initial support for quantities (writing/reading) so far without discovery of engineering units set by object itself.

Very good
I am ready to test the binding.

Maybe the use of “Subscriebe COV” would also be a possibility. I think this is not easy to implement

The last few days I have been testing the BACnet binding 3.0.0 SNAPSHOT

I was able to test AV, AO, AI, MV, MO, MI, all of which I could write and read.

unfortunately reading does not work with binary, I can write BV or BO but none of the binary objects can be read.

Wireshark shows that the binary objects are being read, but the PresentValue is not displayed correctly, the display always shows 0 / OFF, in OH

It is kind of planned, but given rather low commercial interest in binding I do not expect this investment to happen any time soon. I am aware that polling is an problem for lighting controls or bigger installations.

I found an issue with handling of contact items. They are supported while reading data but were not supported while writing the data. Today’s binding update addresses this gap.

With regard to raw traffic - binding reacts on Binary values and also sends back Binary values. Can you check if your object reports binary state or something else (maybe Polarity)?

I don’t understand the approach.

if I include a binary object in OH, regardless of the polarity, it has to display “1” or “0” however, it always shows “0” regardless of the polarity.

BACnet defines Presentvalue as “BACNET APPLICATION TAG ENAMURATED” for binary objects

maybe it will help you further if I give you a Wireshark recording.
I sending you via private message

Hey @Pedro72, I wasn’t aware that binary objects gets second kind of values reported. I found it just while writing my earlier answer. If that’s the case in your installation it is no surprise it doesn’t work. Handling of Polarity objects is not there.

@splatch tried the new binding on OH3 and getting this error when reading any object on slave IP device (I can read fine form the parent device) :

2021-05-17 20:28:09.711 [WARN ] [al.handler.property.ReadPropertyTask] - Could not read property Property[61001.ANALOG_INPUT.1] value. Client reported an error
org.code_house.bacnet4j.wrapper.api.BacNetClientException: Could not get property value
	at org.code_house.bacnet4j.wrapper.api.BacNetClientBase.getPropertyValue(BacNetClientBase.java:104) ~[bundleFile:?]
	at org.connectorio.addons.binding.bacnet.internal.handler.property.ReadPropertyTask.lambda$run$0(ReadPropertyTask.java:73) ~[bundleFile:?]
	at java.util.Optional.map(Optional.java:265) ~[?:?]
	at org.connectorio.addons.binding.bacnet.internal.handler.property.ReadPropertyTask.run(ReadPropertyTask.java:73) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: com.serotonin.bacnet4j.exception.BACnetTimeoutException
	at com.serotonin.bacnet4j.transport.ServiceFutureImpl.result(ServiceFutureImpl.java:75) ~[bundleFile:?]
	at com.serotonin.bacnet4j.transport.ServiceFutureImpl.get(ServiceFutureImpl.java:64) ~[bundleFile:?]
	at org.code_house.bacnet4j.wrapper.api.BacNetClientBase.getPropertyValue(BacNetClientBase.java:100) ~[bundleFile:?]
	... 9 more
Caused by: com.serotonin.bacnet4j.exception.BACnetTimeoutException
	at com.serotonin.bacnet4j.transport.DefaultTransport.lambda$expire$1(DefaultTransport.java:957) ~[?:?]
	at com.serotonin.bacnet4j.transport.UnackedMessageContext.useConsumer(UnackedMessageContext.java:162) ~[?:?]
	at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:957) ~[?:?]
	at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:525) ~[?:?]

Hey Pierre,

This is probably issue with wrong addressing of message which doesn’t get answered by any node. This is somewhat hard to test for me cause I don’t have “proxy” devices.
I would need to check with other installation where such relation exists. Did it ever work with 2.x version of binding?

Best,
Ɓukasz