Hoping someone can assist me, I am trying to create a tool to autoamte BACnet device drivers addition (I have many to add) and was hoping to automate the process using the scripting. I am unsure if the BACnet device driver supports the system.device.addDevice() method? If it is, is there any documentation on the headers (dictionary keys) for the device parameters?
Unfortunately... this drivers awkward configuration dependency on a "Local Device" means it's not really supported in the scripting functions right now.
Ok, that's not quite right. It's not documented because it's a bit difficult due to the local device. You basically need to know a priori the ID of that local device setting from the internal DB, presumably by querying or viewing the internal DB.
But if you do know it, you can add the devices like normal:
As mentioned by Kevin view the internal DB to get your "LOCALBACNETDEVICESETTINGSID" from another device. For those who haven't before navigate to (http(s)://gateway:8088/web/status/sys.internaldb?6) and use
SELECT * FROM BacnetIpRemoteDeviceSettings
as your query. Any pre-existing devices will show, use the integer under "LOCALBACNETDEVICESETTINGSID".
REMOTEADDRESS is the hostname
REMOTEDEVICENUMBER is the BACnet ID
Hopefully this helps other, took my absolutely ages to get this right .
Thanks everyone for your help it's really appreciated!