Skip to content

BACnet Device Service

The BACnet Device Services integrate the BACnet protocol with Edge Xpert.

Key Features

The BACnet Device Service acts as a BACnet client. There are two BACnet Device Services:

Both versions support the reading and writing data values on a BACnet device. For further information, refer to the official ASHRAE SSPC 135 website.

BACnet ReadPropertyMultiple and WritePropertyMultiple

The BACnet protocol traditionally has the option for reading and writing multiple properties in the same command. Previous versions of the Edge Xpert BACnet device service implemented this as a distinct option in device provisioning. This has now been incorporated into the device service and occurs automatically. This can be disabled with the DisableMultiRead and DisableMultiWrite environment variables. Additionally, the maximum number of reads and writes within a command can now be specified with the MultiReadBatch environment variable.

Supported Data Types

When the device receives a request, it returns a value with a BACnet type. The following table lists the BACnet data types and their equivalent EdgeXpert data types for individual BACnet property elements:


If the device returns a type that is not supported, the Device Service logs an appropriate error and the request fails.

BACnet Type EdgeXpert Type Read/Write Ability
Boolean Bool RW
Enumerated Uint32 RW
Unsigned Int Uint64 RW
Signed Int Int32 RW
Real Float32 RW
Double Float64 RW
Character String String RW
Date String R
Time String R
Octet String Binary R
Bit String Binary R
BACnetObjectIdentifier String R
Null N/A RW


Edge Xpert does not support the Null data type but users are still able to read or write null values to and from the device. See below for more details

BACnet Array types can be read but will only be returned in the Edge Xpert String type where each element is comma-separated. The following BACnet types are supported for the array:

  • Boolean
  • Enumerated
  • Unsigned Int
  • Signed Int
  • Real
  • Double
  • Character String
  • Null

BACnet Device Profile

The device profile defines what resources are available on a particular device. Ensure that the following profile attributes are defined in the device profile:

Attribute Description Supported Values
type The object type Object type values are specified in an enum. However, the following object types can be specified as strings:
  • analogInput
  • analogOutput
  • analogValue
  • binaryInput
  • binaryOutput
  • binaryValue
  • device
instance The object instance to be read Uint32 value
property The property of the object instance The following properties can be specified as strings:
  • presentValue
  • objectName
Other properties can be set using their corresponding enum
index The index of the array. Only required for an individual element of a BACnet Array to specify the index. The array index is a Uint32 decimal value


Object types and their corresponding enums are specified in the BACnet stack bacenum.h file.

BACnet Protocol Properties

The available BACnet protocol properties are described in the following table:

Protocol Property Description Valid Values
DeviceInstance Specifies the network ID of the BACnet device instance Unsigned Integer. For example, 1234

BACnet Priority Levels

When performing a put request on a BACnet device resource, an additional option can be added to the URL query parameter, Priority, which indicates the priority level (1 to 16) that the value will be written as. Only a select few Object types and properties support these priority levels in BACnet.

An example is provided which demonstrates its usage on the Present Value property of the Analog Output Object. In this example, priority level 2 will be set as the value 33.0.

curl -g --request PUT 'http://localhost:59882/api/v2/device/name/bacnet-ip-sim/analog_output_0-present-value?options={"Priority":2}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "analog_output_0-present-value": 33.0

These priority levels can also be set to null. In the following example, priority level 1 will be set to null. This will mean that when the Present Value property is read, the returned reading will skip priority level 1 as its null and return the value from level 2 which was set as 33.0.

curl -g --request PUT 'http://localhost:59882/api/v2/device/name/bacnet-ip-sim/analog_output_0-present-value?options={"Priority":1}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "analog_output_0-present-value": null

Using the BACnet Device Service

An example of setting up and using devices with the Edge Xpert BACnet Device Service can be found at BACnet/IP Example and BACnet/MSTP Example.

Back to top