forked from theengs/decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SBS1_json.h
40 lines (39 loc) · 1.55 KB
/
SBS1_json.h
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
const char* _SBS1_json = "{\"brand\":\"SwitchBot\",\"model\":\"Bot\",\"model_id\":\"X1\",\"tag\":\"0e02\",\"condition\":[\"uuid\",\"index\",0,\"0d00\",\"|\",\"uuid\",\"index\",0,\"fd3d\",\"&\",\"servicedata\",\">=\",6,\"index\",0,\"48\"],\"properties\":{\"mode\":{\"decoder\":[\"bit_static_value\",\"servicedata\",2,3,\"onestate\",\"on/off\"]},\"state\":{\"decoder\":[\"bit_static_value\",\"servicedata\",2,2,\"on\",\"off\"]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false],\"post_proc\":[\"&\",127]}}}";
/*R""""(
{
"brand":"SwitchBot",
"model":"Bot",
"model_id":"X1",
"tag":"0e02",
"condition":["uuid", "index", 0, "0d00", "|", "uuid", "index", 0, "fd3d", "&", "servicedata", ">=", 6, "index", 0, "48"],
"properties":{
"mode":{
"decoder":["bit_static_value", "servicedata", 2, 3, "onestate", "on/off"]
},
"state":{
"decoder":["bit_static_value", "servicedata", 2, 2, "on", "off"]
},
"batt":{
"decoder":["value_from_hex_data", "servicedata", 4, 2, false, false],
"post_proc":["&", 127]
}
}
})"""";*/
const char* _SBS1_json_props = "{\"properties\":{\"mode\":{\"unit\":\"string\",\"name\":\"mode\"},\"state\":{\"unit\":\"string\",\"name\":\"state\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"}}}";
/*R""""(
{
"properties":{
"mode":{
"unit":"string",
"name":"mode"
},
"state":{
"unit":"string",
"name":"state"
},
"batt":{
"unit":"%",
"name":"battery"
}
}
})"""";*/