当前位置:网站首页>This article understands the process from RS485 sensor to IoT gateway to cloud platform
This article understands the process from RS485 sensor to IoT gateway to cloud platform
2022-08-03 10:03:00 【Barium Rhenium Technology IoT Gateway】
一、概述
There is a need for equipment support at the industrial siteRS485通信,Various collections are possiblePLC、流量计、温湿度、液位等.应用特别广泛,Try to do it in a simpler way here,Let everyone understand the entire data collection process,For more details, please read the relevant manual.
钡铼技术:Focus on industrial IoT gateways,It can collect the vast majority of data standard instruments in the world、PLC、Building equipment, etc,Its selection here is itsBL110Multifunctional protocol IoT gateway.
ThingsPanel:开源物联网平台,免费、快速部署
二、实现功能
A、采集
数值类型:温度、湿度
Switch type:Power outage alarm status、烟感状态
B、控制
开关类型:水泵开关、风机启停
Controls the numeric type:Inverter frequency、Greenhouse shutter opening and closing
三、方案概述
用Modbus slaveSimulate various sensors,Barium Rhenium Industrial GatewayBL110通过Modbus RTU采集、Control various instruments/设备,并通过4G、Internet access via Ethernet,MQTTThe protocol is connected to the open source IoT cloud platformThingsPanel.如下图:
Sensor data point parameters
四、设置Modbus slave(模拟传感器)
电脑安装Modbus slave,并根据前面“Sensor data point parameters”,设置Modbus slave,Simulate various types of sensors.如下图:
Connection:选择"SerialPort"
Serial Settings:根据实际选择
Mode:选择“RTU”(这里采集的RS485设备,是标准Modbus RTU协议)
串口参数
注意:Modbus slave(模拟传感器)串口参数 need and industrial smart gatewayBL110The serial port parameters are the same
这里设置如下:
五、工业网关BL110配置参数
1、接线
①接电源(支持宽电压:9-36v)
②WANThe port network cable is connected to the local area network(可自动分配ip,Other network environment reference manuals)
③RS485接COM2,A接A,B接B
2、登录配置软件
打开配置软件→点击“设备搜索”→双击“IP地址”→输入密码,默认123456
注意:Device power on approx30sIt can be searched aroundip
3、设置串口参数
双击COM2,设置串口参数
注意:Here the serial port parameters and the previous settingsModbus slave(模拟传感器)参数一致
模式选择:采集
设备品牌:Modbus设备型号:Modbus_RTU
串口参数
4、Set the sensor address
5、Add device data point parameters
添加“温度”Take data points as an example:
添加其他数据,并保存
And so on for other data points,然后点“写入配置”,然后重新进入
保存后,设备会自动重启,Log back into the configuration software
注意:Device power on approx30sIt can be searched aroundip
6、View gateway and sensor communication
点击型号,查看基本信息.See the image below to the right“COM2”,The barium rhenium gateway is andModbus slave(模拟传感器)通信上,“绿色”on behalf of communications.
7、Industrial gateways view sensor data
点击“监视”,即可查看到,工业网关BL110The current value of the sensor is collected.如下图,has been collected.跟Modbus slave的一致.
If no data is collected,Please check whether the relevant parameters are set incorrectly and whether the current network environment is normal.
8、Connect to the open source IoT cloud platformThingsPanel
对接ThingsPanel平台是通过MQTT协议,设置如下:
前面“写入配置”后,点击型号,可以看到“MQTT Client”和“COM2”Online status has turned green,即BL110The gateway is connected to the cloud platform and the sensor is in communication.
9、BL110Smart Gateway Subscription、发布信息格式---KingPigeon模板
发布
{
"sensorDatas": [
{
"flag": "GPS",
"lat": "0.000000",
"lng": "0.000000"
},
{
"flag": "signal_strength",
"value": 0
},
{
"flag": "temperature",
"value": 30
},
{
"flag": "humidity",
"value": 68
},
{
"flag": "powerfailure",
"switcher": 1
},
{
"flag": "smoke",
"switcher": 0
},
{
"flag": "waterpump",
"switcher": 1
},
{
"flag": "fan",
"switcher": 0
},
{
"flag": "frequency",
"value": 33
},
{
"flag": "rollershutter",
"value": 55
}
],
"gateway_indentify": "BeiLai",
"time": "1658216760",
"addTime": "2022-07-19 07:46:00",
"seq": "0.4405.0.0"
}
订阅
A、开关类型.用“switcher”,值
1表示开,true
0表示关.false
{
"sensorDatas": [
{
"switcher": 0,
"flag": "waterpump"
}
],
"down": "down"
}
BNumeric type type.用“value”,值
注意:这个数值,需要加双引号
{
"sensorDatas": [
{
"value": "998",
"flag": "frequency"
}
],
"down": "down"
}
六、用EMQX的客户端订阅、发布消息
1、Set up the connection to the open source cloud platformThingsPanel的MQTT参数
前面已经设置:工业智能网关BL110Set up the connected open source cloud platformThingsPanel(ip、端口、订阅主题、发布主题)
则EMQXThe client is also set as follows:
2、订阅主题:
Subscribe to IoT GatewayBL110data collected from the sensor
3、发布主题:
Turn on the water pump
边栏推荐
- 几款永久免费内网穿透,好用且简单_内网穿透平台
- mysql 事务原理详解
- 集成学习、boosting、bagging、Adaboost、GBDT、随机森林
- For heavy two-dimensional arrays in PHP
- MySQL_关于JSON数据的查询
- MySQL中tinytext、text、mediumtext和longtext等各个类型详解[通俗易懂]
- 2022最新整理软件测试常见面试题附答案
- Does setting the following sysctl settings require a system reboot?
- rpm文件解包提取 cpio
- js函数防抖和函数节流及其使用场景。
猜你喜欢
随机推荐
Can't get data for duplicate urls using Scrapy framework, dont_filter=True
使用 Scrapy 框架对重复的 url 无法获取数据,dont_filter=True
集成学习、boosting、bagging、Adaboost、GBDT、随机森林
4G采集ModbusTCP转JSON接MQTT云平台
Promise 2: Key Questions
超详细的Asp.net使用SSL双向认证,一篇就够了
按位取反怎么运算_按位取反运算
分辨率_分辨率越高越好?手机屏幕分辨率多少才合适?现在终于搞清楚了[通俗易懂]
System io statistics
【学习笔记之菜Dog学C】通讯录
流水线设计的方法和作用「建议收藏」
2022T电梯修理考试题及答案
array of function pointers
Apple Silicon配置二进制环境(二)
力扣递归训练
什么是IDE?新手用哪个IDE比较好?
DOM0、DOM2、DOM3 事件
播放量暴涨2000w+,单日狂揽24w粉,内卷的搞笑赛道还有机会
MySQL binlog的这种时间怎么处理呢??
Mysql OCP 75题