Skip to content

BACnet discovery

Discovery refers to the process of finding all of the devices on a BACnet network, and then the objects which are available on each device. The basic BACnet primative for discovery is the Who-Is service; this uses broadcast traffic to request devices within a range of the device ID space advertise themselves with an I-Am message.

While the bare BACnet HPL provides support for directly sending Who-is messages, most of the time you'll want to use scan jobs. Scan jobs encapsulate the idea of looking for devices and creating a list of the results. They support a few different mechanisms for enumerating devices, depending on the kind of network you're on.

Discovery Jobs

NF encapsulates discovery in "jobs." A job is a longer-running task that enumerates devices and objects on the network, and populates the list of results. The results might be automatically imported into the points database, but don't have to be. Different job type use different techniques to find interesting devices:

  • device jobs use Who-Is broadcast requests to find devices.
  • object jobs start with a previously discovered device and download its object list. This can take a long time for slow devices with small MTUs and lots of objects.
  • network jobs use a port scan to find devices if broadcast traffic isn't working well.

Device Discovery using Who-Is

The most basic kind of discovery sends a Who-Is message and accumulates the resulting list of I-Am replies. The simplest way to request a full scan of a BACnet network is using a "Device" scan job:

$ curl -X POST /api/v1/bacnet/scan -d '{
  "device": {
     "targets": [{"lowLimit": 0, "highLimit": 16777216}]
   }

This type of job will first perform a Who-Is with the provided range; it will then perform a set of more detailed search of subranges depending on which devices are discovered to make sure no devices are missed due to collisions.

Once the job completes, you can retrieve a list of results using the Job ID you initially received. You need to pass the full argument in order to retrieve the full results set; this can be very long for some BACnet devices.

$ curl /api/v1/bacnet/scan?ids=10&full=1

Each job result contains an objectResult and deviceResult list, which contains the discovered objects and lists. It also includes fields like the objectCount dict which contains how many of each object type were discovered. Within each results section, the scannedProps contains the BACnet properties which were read during the scan, and the errorProps contains the properties which were read but returned an error. The keys of these dicts are BACnet property identifiers.

Using the management console

When using the management console, device discovery jobs are creating using the "Create" button.

Job creation in the management console

Many advanced options are available; the default values will perform a global Who-Is style discovery.

  • Download object lists from: If "No Devices" is selected, only run device discovery. If "New Devices" is discovered, create object scan jobs for any devices which haven't been previously scanned. If "All Devices" are selected, create scan jobs for all discovered devices.

  • Automatically import results: object scans with this option will be imported into the point database, updating any previous objects.

  • Automatically enable polling: any discovered object with a Present-Value property will have data collection at the default rate (5 minutes) enabled.

  • Object Types to Scan: NF will download object details for different types of objects found on the devices. The default list contains the standard object types with a present-value property; however any valid object type may be entered; for instance, structured-view objects to find additional metadata, or file objects.

  • Device targets: Optionally, multiple ranges of device IDs can be selected. When this set, these ranges will be requested during the Who-Is discovery sequence.

  • Network targets: Optionally, a network subnet may be targeted. When this mode is used, Who-Is discovery is not used and instead NF performs a unicast-only scan of the target range. This works well for discovering BACnet/IP devices on a different subnet, without needing to configure a BBMD.

Once the discovery job is created, the Discovery page provides tools for filtering based on status, and for easily re-running failed jobs.

Automated Discovery

1.3.0

Two BACnet configuration options, set in the "Advanced" tab of the BACnet configuration page allow NF to track changes to the network.

The first, the Rescan devices when a new database-revision is detected will track the Database-Revision property of device objects. This property is required by the BACnet specification and is supposed to be updated when the object list has a change. When NF observes a new Database Revision, it will create a new Object Scan for that device, which causes the database to be updated.

The second option, Automatic Device Discovery Frequency controls if NF should periodically create a global device discovery job. The job will have the following options:

  • Job Type: Device Discovery
  • Only newly discovered devices are scanned
  • Missing objects have trending disabled

Next Steps

  1. Run a discovery job from the management console.
  2. Import objects and look at them in the browser.