Learn AXON

Be sure bacnet ext is enabled. If it isn’t you need to enable it in Settings


Creating with axon function

You can create bacnet connector using axon function.

If you have to create a lot of connector you can use function with bacnetDeviceDiscovery() inside.

bacnetDeviceDiscovery

bacnetDeviceDiscovery(broadcastAddress, low, high, networkNumber: 65535, discoveryTimeout: 0.0022222222222222222h, localAddress: 0.0.0.0, queryDevProps: true)

Discover BACnet devices and returns a grid with them.

Parameters:

  • broadcastAddress: IP broadcast address formated as a string ip:port,

  • if port is missing then default 47808 is used

  • low: lower limit of the interval of device IDs that should respond

  • high: higher limit of the interval of device IDs that should respond

  • networkNumber: network number of devices that should respond,

  • default value is 0xFFFF for broadcast

  • discoveryTimeout: timeout specified in number with time measure unit

  • default value is 8sec

  • localAddress: local IP address formated as a string ip:port,

  • if port is missing then default 47808 is used
    default value is "0.0.0.0"

  • queryDevProps: if the discovery should read device properties like "deviceName", "modelName", "vendorName"

  • default value is true

Example:

bacnetDeviceDiscovery("255.255.255.255", 0, 4194303)
bacnetDeviceDiscovery("255.255.255.255", 0, 4194303, 0xFFFF, 20sec)
bacnetDeviceDiscovery("255.255.255.255:47810", 0, 4194303, 0xFFFF, 10sec, "192.168.1.42:47811")



createBacnetConnectors.axon
() => do
    devices: bacnetDeviceDiscovery("10.0.0.255",0,4194303)
    devices.each(dev => do
      uri: "bacnet://" + dev["host"] + "/" + dev["deviceId"]
      if (dev["dNet"]!=null) uri = uri + "?dnet=" + dev["dNet"] + "&dadr=" + dev["dAdr"]
      uri = uri.parseUri
     
      changes: {"uri": uri,
        "disMacro": "\$bacnetDevice",
        "bacnetDevice": dev["bacnetDeviceName"],
        "deviceId": dev["deviceId"],
        "bacnetConn",
//	tuning parameter to set when Skyspark will check cov subscribtion (default 5 min)
//		"bacnetCovTimeout": 15min}
      diff(null, changes,{add}).commit
    end)
end


Creating with Connectors app

To create bacnet connector you can use Connectors app also.

Connector should have dis, uri, conn (marker) and bacnetConn (marker).

To connect directly to bacnet ip device uri should contains host and deviceId like below:

To connect through bacnet router to another bacnet network uri should contains device network id (dnet) and device mac address (dadr) like below:

  • No labels