Specify Bacnet network number per item

Is there a way to specify the Bacnet network number in the item string?

I have a device with a device number 10100 and the Bacnet network number 10100, when I set up items for it they fail to read the property values - seems like I need to specify the Bacnet network number in the item string.

I can create items connected to other devices on the same IP network that have Bacnet network address 0 without any issues.

NB. I tried using device discovery but it errors after finding about a dozen devices, doesn’t get to find the one I’m interested in so can’t just create an item without specifying the IP address:port.

Output about the device from BDT search tool:
Device 0010100: RoofPlant at on net 10100 with MAC 00:…

Hey @chillr,
You can set network number in item configuration by passing extra networkNumber=10100. Devices with network 0 works out of the box because that’s default network expected by binding.

With regards to discovery - you can extend discovery timeout by setting discoveryTimeout=60000 (values in milliseconds -> 60 seconds) in services/bacnet.cfg.

Let me know if above works.


Thanks @splatch

Just tried and still no luck, got the following in the logs - I had deleted the cache & tmp folders before restarting openHAB.

12:28:04.056 [WARN ] [acnet.internal.queue.ReadPropertyTask] - Could not set read property Property[10100.ANALOG_INPUT.3]
org.code_house.bacnet4j.wrapper.api.BacNetClientException: Could not get property value

Is a specific order of the item configuration elements required? Here is the item config that gave the above result:

Number Chw_t "CHW Outlet Temp [%.1f °C]" <temperature> {bacnet="device=10100,networkNumber=10100,type=analogInput,id=3,address="}

Got it working using device discovery, details below that may be of use to others:


#Refresh interval in milliseconds (optional, defaults to 60000ms)


Number Chw_t "CHW Outlet Temp [%.1f °C]" <temperature> {bacnet="networkNumber=10100,device=10100,type=analogInput,id=3"}

Some devices are causing errors during the discovery process but this did not stop things working for the device I was interested in - FYI:

13:32:29.588 [WARN ] [cnet4j.service.unconfirmed.IAmRequest] - Error in device 1339 while discovering extended device information from 10208 at Address [networkNumber=50002, macAddress=[8]]
com.serotonin.bacnet4j.exception.BACnetTimeoutException: null

Hey @chillr, glad you got it working!
With regard to errors - version of library which is currently used is well… not certified yet. Actual error you spotted on comes from network layer. Sometimes UDP packets used with BACnet/IP get lost in transition. I’m not sure if we can do anything at openhab level with it, maybe we could improve situation with different or tweaked BACnet implementation.

Let me know if you spot any more troubles. For now I wish you luck, looking forward to see all your dozen devices working with openhab!