Skip to content

BACnet Optional Environment Variables

There are a number of optional environment variables used in the docker-compose.yml to configure the BACnet device service. There are some differences in variables between IP and MSTP modes, please take note of these.

BACnet/IP Environment Variables

You can configure options for running the BACnet/IP Device Service under environment in the device-bacnet-ip entry of your docker-compose file. The following table describes the available environment variables for use with BACnet/IP:

Parameter Type Required Description Example Value
BACNET_INSTANCE_ID Uint32 No BACnet device instance ID

Default: 0
0
BACNET_OBJECT_NAME String No BACnet device name

Default: IOTech Edge XRT BACnet Device Service Component
IOTech Edge XRT BACnet Device Service Component
BACNET_VENDOR_NAME String No BACnet device vendor name

Default: IOTech
IOTech
BACNET_VENDOR_ID Uint16 No BACnet device vendor identifier

Default: 1313
1313
BACNET_LOCATION String No BACnet device location

Default: UK
UK
BACNET_DESCRIPTION String No BACnet device description

Default: IOTech Edge XRT BACnet Device Service Component
IOTech Edge XRT BACnet Device Service Component
BACNET_MODEL_NAME String No BACnet device model name

Default: IOTech Edge XRT BACnet
IOTech Edge XRT BACnet
BACNET_APPLICATION_SOFTWARE String No BACnet device application software version

Default: 1.2
2.0
BACNET_NETWORK_INTERFACE String No The interface name to use.

This overrides the default interface determined by the Device Service, Primary interface determined by the device service if not set
"eth1"
BACNET_PORT Uint16 No The port on which BACnet communication occurs

Default: 47808
47809
BACNET_APDU_TIMEOUT Uint32 No The timeout on a confirmed request in milliseconds

Default: 3000
2000
BACNET_APDU_RETRIES Uint8 No The maximum number of retries of a confirmed request

Default: 3
2
BACNET_MULTI_BATCH_SIZE Uint8 No Controls the maximum size of multiple reads and writes

Default: 3
20
BACNET_MULTI_READ Bool No Enable multiple property reads.

Default: "true"
"true"
BACNET_MULTI_WRITE Bool No Enable multiple property writes.

Default: "true"
"true"
BACNET_CANCEL_STALE_COV Bool No Any COV notifications received that are not expected will be responded to with a cancellation request.

Default: "true"
"true"
BACNET_BBMD_ADDRESS String No The IP address for BBMD "172.0.1.17"
BACNET_BBMD_PORT Uint16 No The port number for BBMD

Default: 47808
47808
BACNET_BBMD_TIME_TO_LIVE Uint16 No The time in seconds for which registration is active in the BBMD Foreign-Device-Table

The Device Service automatically re-registers before the specified time elapses

Default: 65535
60000

BACnet/MSTP Environment Variables

You can configure options for running the BACnet/MSTP Device Service under environment in the device-bacnet-mstp entry of your docker-compose file. The following table describes the available environment variables for use with BACnet/MSTP:

Name Type Required Description Example Value
BACNET_INSTANCE_ID Uint32 No BACnet device instance ID

Default: 0
0
BACNET_OBJECT_NAME String No BACnet device name

Default: IOTech Edge XRT BACnet Device Service Component
IOTech Edge XRT BACnet Device Service Component
BACNET_VENDOR_NAME String No BACnet device vendor name

Default: IOTech
IOTech
BACNET_VENDOR_ID Uint16 No BACnet device vendor identifier

Default: 1313
1313
BACNET_LOCATION String No BACnet device location

Default: UK
UK
BACNET_DESCRIPTION String No BACnet device description

Default: IOTech Edge XRT BACnet Device Service Component
IOTech Edge XRT BACnet Device Service Component
BACNET_MODEL_NAME String No BACnet device model name

Default: IOTech Edge XRT BACnet
IOTech Edge XRT BACnet
BACNET_APPLICATION_SOFTWARE String No BACnet device application software version

Default: 1.2
2.0
BACNET_SERIAL_INTERFACE String No The path to RS-485 connection on the host. The example provided is the path for bacnet-sim "/tmp/virtualport"
BACNET_APDU_TIMEOUT Uint32 No Timeout on a confirmed request in milliseconds.

Default: 60000
10000
BACNET_APDU_RETRIES Uint8 No Maximum number of retries of a confirmed request.

Default: 3
2
BACNET_MULTI_BATCH_SIZE Uint8 No Controls the maximum size of multiple reads and writes

Default: 20
25
BACNET_MULTI_READ Bool No Enable multiple property reads.

Default: "true"
"true"
BACNET_MULTI_WRITE Bool No Enable multiple property writes.

Default: "true"
"true"
BACNET_CANCEL_STALE_COV Bool No Any COV notifications received that are not expected will be responded to with a cancellation request.

Default: "true"
"true"

Variables for BACnet Discovery

The following environment variables are used for BACnet device discovery:

Setting Description Default Value
DEVICE_DISCOVERY_ENABLED Controls whether the discovery process should run 'FALSE'
DEVICE_DISCOVERY_INTERVAL If enabled, how often the process should be triggered '30s'
XRTCONTROL_DISCOVERY_DURATION Controls the length of time to wait between Who-Is broadcasts '3000ms'
BACNET_DISCOVERY_DURATION Controls the length of time to wait between Who-Is broadcasts in milliseconds. 3000ms
BACNET_DISCOVERY_RETRIES Controls how many extra Who-Is broadcasts are made during a discovery call.

1
XRTCONTROL_DISCOVERY_TIMEOUT Controls the length of time to wait for the discovery finish. Increase the timeout if the device amount is too large to discover. '30s'
BACNET_DEFAULT_DISCOVERY_MODE Determines the range of properties that will be discovered on a device when generating a profile.

The three options are:
  • All - Will attempt PROP_ALL requests which receive all properties of an object. Upon failure of that call, it will try to read the property list of each object instance and query each property. Upon failure of that, it will attempt to read the standard and optional properties of each object instance on the device according to the BACnet specification of that particular object.
  • Mandatory - Will only query the mandatory properties of each object instance on the device according to the BACnet specification of that particular object.
  • PresentValue - Will only query present value
Default: All

All
XRTCONTROL_DISCOVERY_IDENTIFIER Identifier of default provision watcher. This value should be one of the device's protocol properties. If the identifier is empty (or commented out), then the device service will not create the default provision watcher
XRTCONTROL_DISCOVERY_DEVICENAMETEMPLATE Used to customize the device name Not set, the device name becomes '{{ObjectName}}:{{DeviceInstance}}'
XRTCONTROL_DISCOVERY_DEVICEADMINSTATE The device adminState applied by the default provision watcher 'UNLOCKED'
XRTCONTROL_DISCOVERY_DEVICELABELS The device labels applied by the default provision watcher Not set
XRTCONTROL_DISCOVERY_DEVICEDESCRIPTION The device description applied by the default provision watcher Not set
XRTCONTROL_DISCOVERY_PROFILENAMETEMPLATE Used to customize the device profile name Not set
XRTCONTROL_DISCOVERY_PROFILELABELS Used to customize the device profile labels Not set
XRTCONTROL_DISCOVERY_PROFILEDESCRIPTION Used to customize the device profile description Not set
BACNET_DISCOVERY_PROPERTIES Used to filter for only the properties specified when generating a BACnet device profile.
For example: [75, 36, 28, 81, 85, 103, 117, 87]
Property types are specified in an enumeration: bacenum.h file
Not set
BACNET_DISCOVERY_OBJECTS Used to filter for only the object types specified when generating a BACnet device profile.
For example: [8, 0, 1, 2, 3, 4, 5, 13, 14, 19]
Object type values are specified in an enumeration: bacenum.h file
Not set