The BACnet connector is a way to read and write some basic objects and properties in BACnet IP device.
Use general configuration to enable this connector.
We will describe the connector configuration below.
Please note: If you are new to IoT Gateway, use the “Basic” configuration mode. If you are familiar with configuring IoT Gateway, you can use the “Advanced” configuration mode.
Connector configuration
Connector configuration is a UI form that contains information on how to connect to the BACnet device, how to
process the data and other service features. Let’s take a comprehensive look at all the available settings.
We will go through each option in detail to ensure that we thoroughly understand their functions and implications.
By doing so, we can make well-informed decisions about which settings will best suit our needs and preferences.
Section “General”
This configuration section contains general connector settings, such as:
Name - connector name used for logs and saving to persistent devices;
Logs configuration:
Enable remote logging - enables remote logging for the connector;
Logging level - logging level for local and remote logs: INFO, DEBUG, WARNING, ERROR, CRITICAL, NONE;
Send data only on change - sends data only if it has changed since the last check, otherwise – data will be sent after every check;
Report strategy - strategy for sending data to ThingsBoard:
Report period - period for sending data to ThingsBoard in milliseconds;
Type - type of the report strategy:
On report period - sends data to ThingsBoard after the report period;
On value change - sends data to ThingsBoard when the value changes;
On value change and report period - sends data to ThingsBoard when the value changes or after the report period;
On received - sends data to ThingsBoard after receiving data from the device (default strategy).
Additional information about the report strategy can be found here.
The settings are the same for both the basic and advanced configurations.
Section “Application”
Configuration in this section is used to configure the gateway in the BACnet network.
This configuration section contains an array of BACnet devices that can be connected to the connector and send data.
Any BACnet device not included in this array will be rejected by the connector.
Configuration in this subsection provides settings for processing data from BACnet device as timeseries and
attributes on the platform instance.
To add new time series or attribute key, follow these steps:
Click “pencil” icon of the “Attributes” section to add new attribute key;
Click “Add attribute” in the opened window;
Enter the key name, select “Object ID” and “Property ID” from the dropdown list. Click “Apply”;
Now click on the “pencil” icon of the “Time series” section to add new time series key;
Click “Add time series” in the opened window;
Enter the key name, select “Object ID” and “Property ID” from the dropdown list. Click “Apply”.
Click “pencil” icon of the “Attributes” section to add new attribute key;
Click “Add attribute” in the opened window;
Enter the key name, select “Object ID” and “Property ID” from the dropdown list. Click “Apply”;
Now click on the “pencil” icon of the “Time series” section to add new time series key;
Click “Add time series” in the opened window;
Enter the key name, select “Object ID” and “Property ID” from the dropdown list. Click “Apply”.
For each time series or attribute, you can enable specific report strategy. This strategy defines how often the
data will be sent to the ThingsBoard server. The following strategies are available:
On report period - sends data to ThingsBoard after the report period;
On value change - sends data to ThingsBoard when the value changes;
On value change and report period - sends data to ThingsBoard when the value changes or after the report period;
On received - sends data to ThingsBoard after receiving data from the device (default strategy).
Additional information about the report strategy can be found here.
This converter is designed for binary payloads, and interprets binary data to retrieve attributes and
time series, using specific byte positions for data extraction.
Parameter
Description
timeseries
This subsection contains parameters of the device data, that will be interpreted as timeseries for the device.
… key
Name for timeseries in the platform.
… objectType
Object type in the BACnet device.
… objectId
Object id in the BACnet device.
… propertyId
Property id in the BACnet device.
attributes
This subsection contains parameters of the device data, that will be interpreted as attributes for the device.
ThingsBoard allows the provisioning of device attributes and fetches some of them from the device application.
You can treat this as a remote configuration for devices, enabling them to request shared attributes from
ThingsBoard. See user guide for more details.
Additionally, every telemetry and attribute parameter comes with a built-in SET RPC method out of the box, eliminating the need for
manual configuration. To use them, make sure you set all the required parameters (for the BACnet Connector,
these include: objectType, objectId, propertyId, and value – only if RPC method name is “set”).
See the guide.
(Examples) Device name expression and device profile expression
Let’s review more examples of device name expression and device profile expression fields.
These fields allow for the dynamic construction of a formatted device name/profile using values extracted from a JSON object.
You can specify variables to access the relevant fields in the JSON.
You can use the following variables to extract specific device information:
objectName - extracts the device’s object name (e.g., “Main Controller”);
vendorId - extracts the device’s vendor ID, typically a numeric identifier representing the manufacturer (e.g., “1234”);
objectId - extracts the device’s unique object identifier (e.g., “999”);
address - extracts the device’s network address (e.g., “192.168.1.1”).
Examples:
“Device ${objectName}” If the objectName variable exists and contains “objectName”: “Main Controller”,
the device on platform will have the following name: Device Main Controller;
“Vendor: ${vendorId}” If the vendorId variable exists and contains “vendorId”: 1234, the device on platform
will have the following name: Vendor: 1234;
“Device ID: ${objectId} at ${address}” If the objectId variable exists and contains “vendorId”: 999 and
address variable exists and contains “address”: “192.168.1.1”, the device on platform will have the following
name: Device ID: 999 at 192.168.1.1.
(Examples) Alternative responses addresses
Let’s review more examples of alternative responses addresses.
This field allows you to specify an alternative address for responses from the device.
It is useful when the gateway and BACnet device are located in different networks.
For example, if gateway running via the docker container and the BACnet device is located in the local network under
192.168.1.200:45606, you can specify the IP address of the BACnet device in the alternative responses addresses field.
1
"altResponsesAddresses":["192.168.1.200"]
This is important because bacpypes provide APDU to the gateway without port number, so the connector can’t determine if
it is an allowed device. In this case, the connector will use the alternative address to determine that it is an allowed
device.
Object identifiers
The BACnet connector Object identifiers consist of two parts separated by a colon (“:”) symbol:
the name of object and the number of this object on the device.
Tested and supported objects:
BACnet object id
ThingsBoard object id
Binary input
binaryInput
Binary output
binaryOutput
Binary value
binaryValue
Analog Input
analogInput
Analog output
analogOutput
Analog value
analogValue
Objects in testing:
accumulatorObject
averagingObject
calendarObject
commandObject
fileObject
lifeSafetyPointObject
lifeSafetyZoneObject
loopObject
multiStateInputObject
multiStateOutputObject
multiStateValueObject
notificationClassObject
programObject
pulseConverterObject
scheduleObject
structuredViewObject
trendLogObject
Property identifiers
Property identifiers depend on type of the BACnet object, provided in camelCase, e.g.
presentValueobjectNameobjectDescription
etc.
Next steps
Explore guides related to main ThingsBoard features: