加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
readme.txt 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
xiaodingding 提交于 2022-07-13 08:29 . http encode will ok
/http
//http://localhost:8201/api/v1/device/deviceData/add
{
"deviceId":1,
"deviceSn":"1",
"devicePwd":"1",
"time":"2022-07-12 01:02:03",
"property":{
"temperature":23.2,
"humidity":20
},
"event":{
"hight":"当前温度值",
"addr":"kunming"
}
}
/device/{deviceId}/report
{
"deviceId": "123",
"messageId":123,
"time":"20220712 01:02:03",
"property":{
"tempure":23.2,
}
"event":{
"hight":"当前温度值",
"addr":"",
}
}
/device/{deviceId}/read
{
"deviceId":"123",
"messageId": "",
"properties":["sn","model"] //要读取到属性列表
}
/device/{deviceId}/read/reply
{
"deviceId":"123",
"messageId": "",
"properties":{"sn":"13","model":"456"} //要读取到属性列表
}
/device/{deviceId}/write
{
"time":"20220712 01:02:03", //毫秒时间戳
"messageId":"消息ID",
"deviceId":"设备ID",
"properties":{"color":"red"} //要设置的属性
}
/device/{deviceId}/funtion
{
"time":"20220712 01:02:03", //毫秒时间戳
"messageId":"消息ID",
"deviceId":"设备ID",
"do":{"do_1":0} //要设置的属性
}
curl -d '{"name":"john","pass":"123","deviceId":1,"DeviceSn":"123"}' "http://localhost:8201/api/v1/device/deviceData/add/"
curl -d "deviceId=1&DeviceSn=123" "http://localhost:8201/api/v1/device/deviceData/add/"
curl -d '{"name":"1"}' "http://localhost:8201/api/v1/device/deviceLabel/add"
curl -d "name=john" "http://127.0.0.1:8201/api/v1/demo/demo"
curl -d '{"name":"john","pass":"123"}' "http://127.0.0.1:8201/api/v1/demo/demo"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化