-
1. 前奏_体验mqtt
-
1.1. 移动物联网云平台oneNET
- 1.1.1 基于OneNET搭建物联网服务器
- 1.1.2 PLC和手机APP实现物联网功能_ModobusTcp
-
1.1. 移动物联网云平台oneNET
-
2. EMQ基础
- 2.1 EMQ及调试工具下载安装
- 2.2 规则引擎(收发数据处理逻辑)
- 3. 活字格
规则引擎(收发数据处理逻辑)
- 2022-04-14 15:17:23
- 微图
- 1732
- 最后编辑:微图 于 2023-07-30 19:03:45
- 分享链接
数据流
规则测试:
响应动作
查看链接可以有哪些参数
SELECT * FROM "$events/client_connected"
输出响应
{ "username": "u_emqx", "timestamp": 1649920466373, "sockname": "0.0.0.0:1883", "proto_ver": 5, "proto_name": "MQTT", "peername": "127.0.0.1:52918", "node": "[email protected]", "mountpoint": "undefined", "metadata": { "rule_id": "test_rule409ec778" }, "keepalive": 60, "is_bridge": false, "expiry_interval": 3600, "event": "client.connected", "connected_at": 1649920466373, "clientid": "c_emqx", "clean_start": true }
设备上下线响应
连接mysql数据库,新增/更新数据库
收到消息写库
备注:
发现我这开源版没连数据库的资源选项,只有webservice和mqtt之类的
SELECT payload, substr(payload, 4, 5) as dnum, substr(payload, 9, 9) as code FROM "cja" WHERE (substr(payload, 9, 9) = '1' or substr(payload, 9, 9) = '2' or substr(payload, 9, 9) = '8') and substr(payload, 0, 2) = 'ff'
发表评论