-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathadeo.ts
389 lines (384 loc) · 15.2 KB
/
adeo.ts
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
import {Definition, Fz, Tz} from '../lib/types';
import * as exposes from '../lib/exposes';
import fz from '../converters/fromZigbee';
import * as reporting from '../lib/reporting';
import extend from '../lib/extend';
import tz from '../converters/toZigbee';
const e = exposes.presets;
const ea = exposes.access;
const fzLocal = {
LDSENK08: {
cluster: 'ssIasZone',
type: 'commandStatusChangeNotification',
convert: (model, msg, publish, options, meta) => {
const zoneStatus = msg.data.zonestatus;
return {
contact: !((zoneStatus & 1) > 0),
vibration: (zoneStatus & 1<<1) > 0,
tamper: (zoneStatus & 1<<2) > 0,
battery_low: (zoneStatus & 1<<3) > 0,
};
},
} satisfies Fz.Converter,
};
const tzLocal = {
LDSENK08_sensitivity: {
key: ['sensitivity'],
convertSet: async (entity, key, value, meta) => {
await entity.write('ssIasZone', {0x0013: {value, type: 0x20}});
return {state: {sensitivity: value}};
},
} satisfies Tz.Converter,
};
const definitions: Definition[] = [
{
zigbeeModel: ['LDSENK08'],
model: 'LDSENK08',
vendor: 'ADEO',
description: 'ENKI LEXMAN wireless smart door window sensor with vibration',
fromZigbee: [fzLocal.LDSENK08, fz.battery],
toZigbee: [tzLocal.LDSENK08_sensitivity],
exposes: [e.battery_low(), e.contact(), e.vibration(), e.tamper(), e.battery(),
e.numeric('sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(4).withDescription('Sensitivity of the motion sensor')],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await reporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['LDSENK09'],
model: 'LDSENK09',
vendor: 'ADEO',
description: 'Security system key fob',
fromZigbee: [fz.command_arm, fz.command_panic],
toZigbee: [],
exposes: [e.action(['panic', 'disarm', 'arm_partial_zones', 'arm_all_zones'])],
onEvent: async (type, data, device) => {
// Since arm command has a response zigbee-herdsman doesn't send a default response.
// This causes the remote to repeat the arm command, so send a default response here.
if (data.type === 'commandArm' && data.cluster === 'ssIasAce') {
await data.endpoint.defaultResponse(0, 0, 1281, data.meta.zclTransactionSequenceNumber);
}
},
},
{
zigbeeModel: ['ZBEK-1'],
model: 'IA-CDZOTAAA007MA-MAN',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 7.2 to 60W LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-2'],
model: 'IG-CDZOTAAG014RA-MAN',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 14W to 100W LED RGBW v2',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-3'],
model: 'IP-CDZOTAAP005JA-MAN',
vendor: 'ADEO',
description: 'ENKI LEXMAN E14 LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-4'],
model: 'IM-CDZDGAAA0005KA_MAN',
vendor: 'ADEO',
description: 'ENKI LEXMAN RGBTW GU10 Bulb',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-5'],
model: 'IST-CDZFB2AS007NA-MZN-01',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-7'],
model: 'IST-CDZFB2AS007NA-MZN-02',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED Edison white filament 806 lumen',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-8'],
model: 'IG-CDZFB2G009RA-MZN-02',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white filament 1055 lumen',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-9'],
model: 'IA-CDZFB2AA007NA-MZN-02',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-6'],
model: 'IG-CDZB2AG009RA-MZN-01',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 Led white bulb',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-10'],
model: 'IC-CDZFB2AC004HA-MZN',
vendor: 'ADEO',
description: 'ENKI LEXMAN E14 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-11'],
model: 'IM-CDZDGAAG005KA-MZN',
vendor: 'ADEO',
description: 'ENKI LEXMAN GU-10 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-12'],
model: 'IA-CDZFB2AA007NA-MZN-01',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-13'],
model: 'IG-CDZFB2AG010RA-MNZ',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-14'],
model: 'IC-CDZFB2AC005HA-MZN',
vendor: 'ADEO',
description: 'ENKI LEXMAN E14 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
},
{
zigbeeModel: ['ZBEK-22'],
model: 'BD05C-FL-21-G-ENK',
vendor: 'ADEO',
description: 'ENKI LEXMAN RGBCCT lamp',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-27'],
model: '84845506',
vendor: 'ADEO',
description: 'ENKI LEXMAN Gdansk',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-29'],
model: '84845509',
vendor: 'ADEO',
description: 'ENKI LEXMAN Gdansk LED panel',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-28'],
model: 'PEZ1-042-1020-C1D1',
vendor: 'ADEO',
description: 'ENKI LEXMAN Gdansk',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['ZBEK-34'],
model: '84870058',
vendor: 'ADEO',
description: 'ENKI LEXMAN Extraflat 225 ',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['LDSENK01F'],
model: 'LDSENK01F',
vendor: 'ADEO',
description: '10A EU smart plug',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['LXEK-5', 'ZBEK-26'],
model: 'HR-C99C-Z-C045',
vendor: 'ADEO',
description: 'RGB CTT LEXMAN ENKI remote control',
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_step, fz.command_stop, fz.command_step_color_temperature,
fz.command_step_hue, fz.command_step_saturation, fz.color_stop_raw, fz.scenes_recall_scene_65024, fz.ignore_genOta],
toZigbee: [],
exposes: [e.battery(), e.action(['on', 'off', 'scene_1', 'scene_2', 'scene_3', 'scene_4', 'color_saturation_step_up',
'color_saturation_step_down', 'color_stop', 'color_hue_step_up', 'color_hue_step_down',
'color_temperature_step_up', 'color_temperature_step_down', 'brightness_step_up', 'brightness_step_down', 'brightness_stop'])],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
const binds = ['genBasic', 'genOnOff', 'genPowerCfg', 'lightingColorCtrl', 'genLevelCtrl'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['LXEK-1'],
model: '9CZA-A806ST-Q1A',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color(),
},
{
zigbeeModel: ['LXEK-3'],
model: '9CZA-P470T-A1A',
vendor: 'ADEO',
description: 'ENKI LEXMAN E14 LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['LXEK-4'],
model: '9CZA-M350ST-Q1A',
vendor: 'ADEO',
description: 'ENKI LEXMAN GU-10 LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color(),
},
{
zigbeeModel: ['LXEK-2'],
model: '9CZA-G1521-Q1A',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 14W to 100W LED RGBW',
extend: extend.light_onoff_brightness_colortemp_color(),
},
{
zigbeeModel: ['LDSENK07'],
model: 'LDSENK07',
vendor: 'ADEO',
description: 'ENKI LEXMAN wireless smart outdoor siren',
fromZigbee: [fz.battery, fz.ias_siren],
toZigbee: [tz.warning],
exposes: [e.warning(), e.battery(), e.battery_low(), e.tamper()],
configure: async (device, coordinatorEndpoint, logger) => {
device.defaultSendRequestWhen = 'immediate';
device.save();
await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
},
},
{
zigbeeModel: ['LXEK-7'],
model: '9CZA-A806ST-Q1Z',
vendor: 'ADEO',
description: 'ENKI LEXMAN E27 LED white',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
},
{
zigbeeModel: ['LDSENK02F'],
model: 'LDSENK02F',
description: '10A/16A EU smart plug',
vendor: 'ADEO',
extend: extend.switch({exposes: [e.power(), e.energy()], fromZigbee: [fz.electrical_measurement, fz.metering]}),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.onOff(endpoint);
await reporting.activePower(endpoint);
await reporting.currentSummDelivered(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
},
},
{
zigbeeModel: ['LDSENK10'],
model: 'LDSENK10',
vendor: 'ADEO',
description: 'ENKI LEXMAN motion sensor',
fromZigbee: [fz.ias_occupancy_alarm_1],
toZigbee: [],
exposes: [e.occupancy(), e.battery_low(), e.tamper()],
},
{
zigbeeModel: ['LDSENK02S'],
model: 'LDSENK02S',
vendor: 'ADEO',
description: 'ENKI LEXMAN 16A EU smart plug',
extend: extend.switch({exposes: [e.power(), e.energy()], fromZigbee: [fz.electrical_measurement, fz.metering]}),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.onOff(endpoint);
await reporting.activePower(endpoint);
await reporting.currentSummDelivered(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
},
},
{
zigbeeModel: ['SIN-4-1-20_LEX'],
model: 'SIN-4-1-20_LEX',
vendor: 'ADEO',
description: 'ENKI LEXMAN 3680W single output relay',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const ep = device.getEndpoint(1);
await reporting.bind(ep, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(ep);
},
endpoint: (device) => {
return {default: 1};
},
},
{
zigbeeModel: ['SIN-4-RS-20_LEX'],
model: 'SIN-4-RS-20_LEX',
vendor: 'ADEO',
description: 'Roller shutter controller (Leroy Merlin version)',
fromZigbee: [fz.cover_position_tilt],
toZigbee: [tz.cover_state, tz.cover_position_tilt],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
await reporting.currentPositionLiftPercentage(endpoint);
await reporting.currentPositionTiltPercentage(endpoint);
},
exposes: [e.cover_position()],
},
{
zigbeeModel: ['SIN-4-1-22_LEX'],
model: 'SIN-4-1-22_LEX',
vendor: 'ADEO',
description: 'ENKI LEXMAN Access Control',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const ep = device.getEndpoint(1);
await reporting.bind(ep, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(ep);
},
},
{
zigbeeModel: ['SIN-4-FP-21_EQU'],
model: 'SIN-4-FP-21_EQU',
vendor: 'ADEO',
description: 'Equation pilot wire heating module',
fromZigbee: [fz.on_off, fz.metering, fz.nodon_fil_pilote_mode],
toZigbee: [tz.on_off, tz.nodon_fil_pilote_mode],
exposes: [
e.switch(),
e.power(),
e.energy(),
e.enum('mode', ea.ALL, ['comfort', 'eco', 'anti-freeze', 'stop', 'comfort_-1', 'comfort_-2']),
],
configure: async (device, coordinatorEndpoint, logger) => {
const ep = device.getEndpoint(1);
await reporting.bind(ep, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff', 'seMetering', 'manuSpecificNodOnFilPilote']);
await reporting.onOff(ep, {min: 1, max: 3600, change: 0});
await reporting.readMeteringMultiplierDivisor(ep);
await reporting.instantaneousDemand(ep);
await reporting.currentSummDelivered(ep);
const p = reporting.payload('mode', 0, 120, 0, {min: 1, max: 3600, change: 0});
await ep.configureReporting('manuSpecificNodOnFilPilote', p);
},
},
];
export default definitions;
module.exports = definitions;