-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathreadme.txt
74 lines (60 loc) · 1.63 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/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"