1+ {
2+   "schema" : " devcap1.schema.json" 
3+   "manufacturername" : " SONOFF" 
4+   "modelid" : " S60ZBTPF" 
5+   "vendor" : " Sonoff" 
6+   "product" : " Zigbee smart plug" 
7+   "sleeper" : false ,
8+   "status" : " Gold" 
9+   "subdevices" : [
10+     {
11+       "type" : " $TYPE_SMART_PLUG" 
12+       "restapi" : " /lights" 
13+       "uuid" : [
14+         " $address.ext" 
15+         " 0x01" 
16+       ],
17+       "items" : [
18+         {
19+           "name" : " attr/id" 
20+         },
21+         {
22+           "name" : " attr/lastannounced" 
23+         },
24+         {
25+           "name" : " attr/lastseen" 
26+         },
27+         {
28+           "name" : " attr/manufacturername" 
29+         },
30+         {
31+           "name" : " attr/modelid" 
32+         },
33+         {
34+           "name" : " attr/name" 
35+         },
36+         {
37+           "name" : " attr/swversion" 
38+         },
39+         {
40+           "name" : " attr/type" 
41+         },
42+         {
43+           "name" : " attr/uniqueid" 
44+         },
45+         {
46+           "name" : " config/on/startup" 
47+         },
48+         {
49+           "name" : " state/alert" 
50+         },
51+         {
52+           "name" : " state/on" 
53+           "refresh.interval" : 360 
54+         },
55+         {
56+           "name" : " state/reachable" 
57+         }
58+       ]
59+     },
60+     {
61+       "type" : " $TYPE_CONSUMPTION_SENSOR" 
62+       "restapi" : " /sensors" 
63+       "uuid" : [
64+         " $address.ext" 
65+         " 0x01" 
66+         " 0x0702" 
67+       ],
68+       "items" : [
69+         {
70+           "name" : " attr/id" 
71+         },
72+         {
73+           "name" : " attr/lastannounced" 
74+         },
75+         {
76+           "name" : " attr/lastseen" 
77+         },
78+         {
79+           "name" : " attr/manufacturername" 
80+         },
81+         {
82+           "name" : " attr/modelid" 
83+         },
84+         {
85+           "name" : " attr/name" 
86+         },
87+         {
88+           "name" : " attr/swversion" 
89+         },
90+         {
91+           "name" : " attr/type" 
92+         },
93+         {
94+           "name" : " attr/uniqueid" 
95+         },
96+         {
97+           "name" : " config/on" 
98+         },
99+         {
100+           "name" : " config/reachable" 
101+         },
102+         {
103+           "name" : " state/consumption" 
104+           "refresh.interval" : 360 ,
105+           "read" : {
106+             "fn" : " zcl:attr" 
107+             "ep" : 1 ,
108+             "cl" : " 0x0702" 
109+             "at" : " 0x0000" 
110+           },
111+           "parse" : {
112+             "fn" : " zcl:attr" 
113+             "ep" : 1 ,
114+             "cl" : " 0x0702" 
115+             "at" : " 0x0000" 
116+             "eval" : " Item.val = Attr.val" 
117+           },
118+           "default" : 0 
119+         },
120+         {
121+           "name" : " state/lastupdated" 
122+         }
123+       ]
124+     },
125+     {
126+       "type" : " $TYPE_POWER_SENSOR" 
127+       "restapi" : " /sensors" 
128+       "uuid" : [
129+         " $address.ext" 
130+         " 0x01" 
131+         " 0x0B04" 
132+       ],
133+       "items" : [
134+         {
135+           "name" : " attr/id" 
136+         },
137+         {
138+           "name" : " attr/lastannounced" 
139+         },
140+         {
141+           "name" : " attr/lastseen" 
142+         },
143+         {
144+           "name" : " attr/manufacturername" 
145+         },
146+         {
147+           "name" : " attr/modelid" 
148+         },
149+         {
150+           "name" : " attr/name" 
151+         },
152+         {
153+           "name" : " attr/swversion" 
154+         },
155+         {
156+           "name" : " attr/type" 
157+         },
158+         {
159+           "name" : " attr/uniqueid" 
160+         },
161+         {
162+           "name" : " config/on" 
163+         },
164+         {
165+           "name" : " config/reachable" 
166+         },
167+         {
168+           "name" : " state/current" 
169+           "parse" : {
170+             "fn" : " zcl:attr" 
171+             "ep" : 1 ,
172+             "cl" : " 0x0B04" 
173+             "at" : " 0x0508" 
174+             "eval" : " if (Attr.val != 65535) { Item.val = Attr.val * 10; }" 
175+           },
176+           "default" : 0 ,
177+           "read" : {
178+             "fn" : " zcl:attr" 
179+             "ep" : 1 ,
180+             "cl" : " 0x0B04" 
181+             "at" : " 0x0508" 
182+           },
183+           "refresh.interval" : 360 
184+         },
185+         {
186+           "name" : " state/lastupdated" 
187+         },
188+         {
189+           "name" : " state/power" 
190+           "parse" : {
191+             "fn" : " zcl:attr" 
192+             "ep" : 1 ,
193+             "cl" : " 0x0B04" 
194+             "at" : " 0x050B" 
195+             "eval" : " if (Attr.val != -32768) { Item.val = Math.round(Attr.val / R.item('state/power_divisor').val) }" 
196+           },
197+           "default" : 0 ,
198+           "read" : {
199+             "fn" : " zcl:attr" 
200+             "ep" : 1 ,
201+             "cl" : " 0x0B04" 
202+             "at" : " 0x050B" 
203+           },
204+           "refresh.interval" : 360 
205+         },
206+         {
207+           "name" : " state/power_divisor" 
208+           "parse" : {
209+             "fn" : " zcl:attr" 
210+             "ep" : 1 ,
211+             "cl" : " 0x0B04" 
212+             "at" : " 0x0605" 
213+             "eval" : " if (Attr.val != 65535) { Item.val = Attr.val; R.item('state/power').val = Math.round(R.item('state/power').val / R.item('state/power_divisor').val) }" 
214+           },
215+           "default" : 1 ,
216+           "read" : {
217+             "fn" : " zcl:attr" 
218+             "ep" : 1 ,
219+             "cl" : " 0x0B04" 
220+             "at" : " 0x0605" 
221+           },
222+           "refresh.interval" : 360 
223+         },
224+         {
225+           "name" : " state/voltage" 
226+           "parse" : {
227+             "fn" : " zcl:attr" 
228+             "ep" : 1 ,
229+             "cl" : " 0x0B04" 
230+             "at" : " 0x0505" 
231+             "eval" : " if (Attr.val != 65535) { Item.val = Math.round(Attr.val / 100) }" 
232+           },
233+           "default" : 0 ,
234+           "read" : {
235+             "fn" : " zcl:attr" 
236+             "ep" : 1 ,
237+             "cl" : " 0x0B04" 
238+             "at" : " 0x0505" 
239+           },
240+           "refresh.interval" : 360 
241+         }
242+       ]
243+     }
244+   ],
245+   "bindings" : [
246+     {
247+       "bind" : " unicast" 
248+       "src.ep" : 1 ,
249+       "cl" : " 0x0006" 
250+       "report" : [
251+         {
252+           "at" : " 0x0000" 
253+           "dt" : " 0x10" 
254+           "min" : 1 ,
255+           "max" : 300 
256+         }
257+       ]
258+     },
259+     {
260+       "bind" : " unicast" 
261+       "src.ep" : 1 ,
262+       "cl" : " 0x0702" 
263+       "report" : [
264+         {
265+           "at" : " 0x0000" 
266+           "dt" : " 0x25" 
267+           "min" : 1 ,
268+           "max" : 300 ,
269+           "change" : " 0x000000000000000000000001" 
270+         }
271+       ]
272+     },
273+     {
274+       "bind" : " unicast" 
275+       "src.ep" : 1 ,
276+       "cl" : " 0x0B04" 
277+       "report" : [
278+         {
279+           "at" : " 0x0505" 
280+           "dt" : " 0x21" 
281+           "min" : 1 ,
282+           "max" : 300 ,
283+           "change" : " 0x0000000A" 
284+         },
285+         {
286+           "at" : " 0x0508" 
287+           "dt" : " 0x21" 
288+           "min" : 1 ,
289+           "max" : 300 ,
290+           "change" : " 0x00000064" 
291+         },
292+         {
293+           "at" : " 0x050B" 
294+           "dt" : " 0x29" 
295+           "min" : 1 ,
296+           "max" : 300 ,
297+           "change" : " 0x00000001" 
298+         },
299+         {
300+           "at" : " 0x0605" 
301+           "dt" : " 0x21" 
302+           "min" : 1 ,
303+           "max" : 300 ,
304+           "change" : " 0x00000001" 
305+         }
306+       ]
307+     }
308+   ]
309+ }
0 commit comments