本篇测评由优秀测评者“JerryZhen”提供。
本文将介绍TB网关如何采集数据,并送往云平台。由于TB网关支持的协议众多,本文仅仅以楼宇自动化中最常见的BACnet协议为例进行讲解,其他协议配置大同小异。BACnet,Building Automation and Control networks的简称,即楼宇自动化与控制网络。一般楼宇自控设备从功能上讲分为两部分:一部分专门处理设备的控制功能;另一部分专门处理设备的数据通信功能。而BACnet就是要建立一种统一的数据通信标准,使得设备可以互操作。
限于篇幅,协议细节这里不再赘述。下面讲解如何配置协议,使得我们网关能够正常通过bacnent协议采集到网络中设备上的数据。
1. 准备打开/etc/thingsboard-gateway/config/tb_gateway.yaml,使能Bacnent Connector,注释掉默认的mqqt, 如下图
2. 配置打开/etc/thingsboard-gateway/config/tb_gateway/bacnet.json,做如下配置
在"general"部分填写TB网关信息
在"devices"部分填写bacnet网络中设备的相关信息, 在这里我们设备有个"temperature"属性,该属性值为20,我们会采集该数据送往云端。
3. 重启网关服务,使得改动生效:
systemctl restart thingsboard-gateway.service
现在我们可以到打开云服务器网页验证下数据是否已经成功采集:
可以看到网关已经成功添加了我们的设备,并且采集到了设备的temperature数据。
相关文章









