This article describes how the TB gateway collects data and sends it to the cloud platform. Because there are many protocols supported by TB gateway, this article only takes BACnet protocol, which is the most common in building automation, as an example to explain, and other protocol configurations are similar. BACnet, short for Building Automation and Control networks, namely building automation and control networks. General building automation equipment is divided into two parts from the function: one part deals with the control function of the equipment; The other section deals exclusively with the data communication functions of the device. BACnet aims to establish a unified data communication standard so that devices can interoperate.
Due to space constraints, the details of the agreement will not be detailed here. The following explains how to configure the protocol, so that our gateway can normally collect the data on the network device through the bacnent protocol.
1. Open /etc/thingsboard-gateway/config/tb_gateway.yaml to enable the Bacnent Connector and comment out the default mqqt, as shown in the following figure
2. Open /etc/thingsboard-gateway/config/tb_gateway/bacnet.json and perform the following configurations
Enter the TB gateway information in the general section
In the “devices” section, fill in the related information of devices in the bacnet network, where our device has a “temperature” attribute with a value of 20, we will collect the data and send it to the cloud.
3. Restart the gateway service for the changes to take effect:
systemctl restart thingsboard-gateway.service
Now we can open the cloud server web page to verify whether the data has been successfully collected:
You can see that the gateway has successfully added our device, and the temperature data of the device has been collected.