未验证 提交 36e4179f 编写于 作者: 麦壳饼's avatar 麦壳饼 提交者: GitHub

Update mqtt.md

上级 e635f643
......@@ -10,12 +10,25 @@ sidebar_position: 1
设备分直连设备和网关设备, 发送数据方式也有所不同。 telemetry 为 遥测, attributes表示属性,客户端上传的属性在服务器端永远为 ClientSide , 即客户端侧属性。 不推荐在服务端修改。
### 连接直连设备或者网关
通过 mqtt客户端连接mqtt服务器,用户名填写 token, 密码可以为空。
### 直连设备发送遥测数据
```
devices/me/telemetry
devices/me/attributes
```
MQTT的负载为如下格式
```json
{
"stringvalue":"here is strvalue",
"intvalue":234
}
```
### 网关设备发送遥测数据
```
......@@ -162,4 +175,4 @@ curl -X 'POST' \
-H 'Content-Type: application/json' \
-d '"{参数, 可以是json}"'
```
\ No newline at end of file
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册