-
Notifications
You must be signed in to change notification settings - Fork 43
/
CGG1_json.h
125 lines (120 loc) · 6.62 KB
/
CGG1_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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#include "common_props.h"
const char* _CGG1_json_STOCK = "{\"brand\":\"ClearGrass/Qingping\",\"model\":\"Round TH\",\"model_id\":\"CGG1\",\"tag\":\"01\",\"condition\":[\"servicedata\",\"=\",34,\"index\",2,\"07\",\"|\",\"servicedata\",\"=\",34,\"index\",2,\"16\",\"&\",\"uuid\",\"index\",0,\"fdcd\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",20,4,true],\"post_proc\":[\"/\",10]},\"hum\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",24,4,true],\"post_proc\":[\"/\",10]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",32,2,false]},\"mac\":{\"decoder\":[\"revmac_from_hex_data\",\"servicedata\",4]}}}";
/* R""""(
{
"brand":"ClearGrass/Qingping",
"model":"Round TH",
"model_id":"CGG1",
"tag":"01",
"condition":["servicedata", "=", 34, "index", 2, "07", "|", "servicedata", "=", 34, "index", 2, "16", "&", "uuid", "index", 0, "fdcd"],
"properties":{
"tempc":{
"decoder":["value_from_hex_data", "servicedata", 20, 4, true],
"post_proc":["/", 10]
},
"hum":{
"decoder":["value_from_hex_data", "servicedata", 24, 4, true],
"post_proc":["/", 10]
},
"batt":{
"decoder":["value_from_hex_data", "servicedata", 32, 2, false]
},
"mac":{
"decoder":["revmac_from_hex_data", "servicedata", 4]
}
}
})"""";*/
// ATC1441
const char* _CGG1_json_ATC1441 = "{\"brand\":\"ClearGrass/Qingping\",\"model\":\"Round TH\",\"model_id\":\"CGG1_ATC1441\",\"tag\":\"0102\",\"condition\":[\"servicedata\",\"=\",26,\"&\",\"uuid\",\"index\",0,\"181a\",\"&\",\"name\",\"index\",0,\"CGG\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",12,4,false],\"post_proc\":[\"/\",10]},\"hum\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",16,2,false]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",18,2,false]},\"volt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",20,4,false],\"post_proc\":[\"/\",1000]},\"mac\":{\"decoder\":[\"mac_from_hex_data\",\"servicedata\",0]}}}";
/* R""""(
{
"brand":"ClearGrass/Qingping",
"model":"Round TH",
"model_id":"CGG1_ATC1441",
"tag":"0102",
"condition":["servicedata", "=", 26, "&", "uuid", "index", 0, "181a", "&", "name", "index", 0, "CGG"],
"properties":{
"tempc":{
"decoder":["value_from_hex_data", "servicedata", 12, 4, false],
"post_proc":["/", 10]
},
"hum":{
"decoder":["value_from_hex_data", "servicedata", 16, 2, false]
},
"batt":{
"decoder":["value_from_hex_data", "servicedata", 18, 2, false]
},
"volt":{
"decoder":["value_from_hex_data", "servicedata", 20, 4, false],
"post_proc":["/", 1000]
},
"mac":{
"decoder":["mac_from_hex_data", "servicedata", 0]
}
}
})"""";*/
// PVVX
const char* _CGG1_json_PVVX = "{\"brand\":\"ClearGrass/Qingping\",\"model\":\"Round TH\",\"model_id\":\"CGG1_PVVX\",\"tag\":\"0102\",\"condition\":[\"servicedata\",\"=\",30,\"&\",\"uuid\",\"index\",0,\"181a\",\"&\",\"name\",\"index\",0,\"CGG\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",12,4,true],\"post_proc\":[\"/\",100]},\"hum\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",16,4,true],\"post_proc\":[\"/\",100]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",24,2,false]},\"volt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",20,4,true],\"post_proc\":[\"/\",1000]},\"mac\":{\"decoder\":[\"revmac_from_hex_data\",\"servicedata\",0]}}}";
/* R""""(
{
"brand":"ClearGrass/Qingping",
"model":"Round TH",
"model_id":"CGG1_PVVX",
"tag":"0102",
"condition":["servicedata", "=", 30, "&", "uuid", "index", 0, "181a", "&", "name", "index", 0, "CGG"],
"properties":{
"tempc":{
"decoder":["value_from_hex_data", "servicedata", 12, 4, true],
"post_proc":["/", 100]
},
"hum":{
"decoder":["value_from_hex_data", "servicedata", 16, 4, true],
"post_proc":["/", 100]
},
"batt":{
"decoder":["value_from_hex_data", "servicedata", 24, 2, false]
},
"volt":{
"decoder":["value_from_hex_data", "servicedata", 20, 4, true],
"post_proc":["/", 1000]
},
"mac":{
"decoder":["revmac_from_hex_data", "servicedata", 0]
}
}
})"""";*/
const char* _CGG1_json_STOCK_2 = "{\"brand\":\"ClearGrass/Qingping\",\"model\":\"Round TH\",\"model_id\":\"CGG1\",\"tag\":\"0102\",\"condition\":[\"servicedata\",\"=\",30,\"|\",\"servicedata\",\"=\",32,\"|\",\"servicedata\",\"=\",36,\"&\",\"name\",\"index\",0,\"Qingping Temp & RH\",\"|\",\"name\",\"index\",0,\"ClearGrass Temp & RH\",\"&\",\"uuid\",\"index\",0,\"fe95\"],\"properties\":{\"tempc\":{\"condition\":[\"servicedata\",\">=\",32,\"&\",\"servicedata\",23,\"!\",\"6\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",28,4,true],\"post_proc\":[\"/\",10]},\"hum\":{\"condition\":[\"servicedata\",\"=\",36,\"&\",\"servicedata\",23,\"!\",\"6\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",32,4,true],\"post_proc\":[\"/\",10]},\"_hum\":{\"condition\":[\"servicedata\",\"=\",32,\"&\",\"servicedata\",23,\"6\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",28,4,true],\"post_proc\":[\"/\",10]},\"batt\":{\"condition\":[\"servicedata\",\"=\",30],\"decoder\":[\"value_from_hex_data\",\"servicedata\",28,2,false]},\"mac\":{\"decoder\":[\"revmac_from_hex_data\",\"servicedata\",10]}}}";
/*
R""""(
{
"brand":"ClearGrass/Qingping",
"model":"Round TH",
"model_id":"CGG1",
"tag":"0102",
"condition":["servicedata", "=", 30, "|", "servicedata", "=", 32, "|", "servicedata", "=", 36, "&", "name", "index", 0, "Qingping Temp & RH", "|", "name", "index", 0, "ClearGrass Temp & RH", "&","uuid", "index", 0, "fe95"],
"properties":{
"tempc":{
"condition":["servicedata", ">=", 32, "&", "servicedata", 23, "!", "6"],
"decoder":["value_from_hex_data", "servicedata", 28, 4, true],
"post_proc":["/", 10]
},
"hum":{
"condition":["servicedata", "=", 36, "&", "servicedata", 23, "!", "6"],
"decoder":["value_from_hex_data", "servicedata", 32, 4, true],
"post_proc":["/", 10]
},
"_hum":{
"condition":["servicedata", "=", 32, "&", "servicedata", 23, "6"],
"decoder":["value_from_hex_data", "servicedata", 28, 4, true],
"post_proc":["/", 10]
},
"batt":{
"condition":["servicedata", "=", 30],
"decoder":["value_from_hex_data", "servicedata", 28, 2, false]
},
"mac":{
"decoder":["revmac_from_hex_data", "servicedata", 10]
}
}
})"""";*/
const char* _CGG1_json_props = _common_BVTH_props;