system.device.addDevice for BACnet driver

We have finally sorted out our bacnet network issues and are able to initialize devices. What we are seeing however is this:

Expected: connect to 6 top level devices and then be able to browse all sub-devices
Actual: we have to connect to each individual sub device in order to browser its tags

First question is are we doing something wrong, should we be able to browse all child devices by connecting to a server type parent device?

2nd question is, in case we cannot do as expected, it would be very helpful to have the system.device.addDevice function to bacnet for the OPC connection since we have to build hundreds of connections.

Local device count would still be just 6 so I think that can be done manually.

Thanks,

Nick

No, that’s not really how BACnet works. The “top level” device acts as a router, not as an aggregator that exposes devices on the other network as objects in its model.

We have a ticket for this but I don’t know if it’s going to happen any time soon. Since you already have the Local Devices configured (or are willing to) it might be possible to get this function to work if you dig in the internal DB for the ID of each the local devices and then include it as one of the settings in the dictionary passed to addDevice (key=LocalBacnetDeviceSettingsId). Have not tried this, don’t know if it will actually work.

1 Like

@Kevin.Herron

I took a known working BACnet device and deleted it then re-added it with known parameters using this script. It worked other than it did not take the description. Is there a specific key I need to use to get the description to populate?

props = {
	"LOCALBACNETDEVICESETTINGSID": 6,
	"REMOTEADDRESS": "192.168.xxx.xxx",
	"REMOTEPORT": 47811,
	"REMOTEDEVICENUMBER": 50011,
	"DESCRIPTION": "DELTA_VFD_E_11" 
}

system.device.addDevice(
	deviceType = "com.inductiveautomation.BacnetIpDeviceType",
	deviceName = "HVLS_A1",
	deviceProps = props
)

Sorry, it doesn’t look like that’s possible right now, regardless of the device type being added.

I’ll open up an issue though to get this implemented. Description is technically part of the “parent” record, so when it does get added it would be an additional method param, not part of the prop dictionary.