zigbee-herdsman-converters 14.0.406 → 14.0.410

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2522,8 +2522,8 @@ const converters = {
2522
2522
  return {battpercentage: value};
2523
2523
  case tuya.dataPoints.neoAOMelody: // 0x21 [5] Melody
2524
2524
  return {melody: value};
2525
- case tuya.dataPoints.neoAOVolume: // 0x5 [0]/[1]/[2] Volume 0-max, 2-low
2526
- return {volume: {2: 'low', 1: 'medium', 0: 'high'}[value]};
2525
+ case tuya.dataPoints.neoAOVolume: // 0x5 [0]/[1]/[2] Volume 0-low, 2-max
2526
+ return {volume: {0: 'low', 1: 'medium', 2: 'high'}[value]};
2527
2527
  default: // Unknown code
2528
2528
  meta.logger.warn(`Unhandled DP #${dp}: ${JSON.stringify(msg.data)}`);
2529
2529
  }
@@ -3211,6 +3211,10 @@ const converters = {
3211
3211
  result[postfixWithEndpointName('pi_heating_demand', msg, model)] =
3212
3212
  precisionRound(msg.data['pIHeatingDemand'], 0);
3213
3213
  }
3214
+ if (msg.data.hasOwnProperty('danfossWindowOpenFeatureEnable')) {
3215
+ result[postfixWithEndpointName('window_open_feature', msg, model)] =
3216
+ (msg.data['danfossWindowOpenFeatureEnable'] === 1);
3217
+ }
3214
3218
  if (msg.data.hasOwnProperty('danfossWindowOpenInternal')) {
3215
3219
  result[postfixWithEndpointName('window_open_internal', msg, model)] =
3216
3220
  constants.danfossWindowOpen.hasOwnProperty(msg.data['danfossWindowOpenInternal']) ?
@@ -5164,8 +5168,16 @@ const converters = {
5164
5168
  aqara_opple: {
5165
5169
  cluster: 'aqaraOpple',
5166
5170
  type: ['attributeReport', 'readResponse'],
5167
- options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
5168
- exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual')],
5171
+ options: (definition) => {
5172
+ const result = [];
5173
+ if (definition.exposes.find((e) => e.name === 'temperature')) {
5174
+ result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
5175
+ }
5176
+ if (definition.exposes.find((e) => e.name === 'illuminance')) {
5177
+ result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
5178
+ }
5179
+ return result;
5180
+ },
5169
5181
  convert: (model, msg, publish, options, meta) => {
5170
5182
  const payload = {};
5171
5183
  if (msg.data.hasOwnProperty('247')) {
@@ -2417,12 +2417,6 @@ const converters = {
2417
2417
  await entity.read('genAnalogOutput', [0x0055]);
2418
2418
  },
2419
2419
  },
2420
- xiaomi_curtain_acn002_status: {
2421
- key: ['motor_state'],
2422
- convertGet: async (entity, key, meta) => {
2423
- await entity.read('genMultistateOutput', [0x0055]);
2424
- },
2425
- },
2426
2420
  ledvance_commands: {
2427
2421
  /* deprectated osram_*/
2428
2422
  key: ['set_transition', 'remember_state', 'osram_set_transition', 'osram_remember_state'],
@@ -2752,6 +2746,16 @@ const converters = {
2752
2746
  await entity.read('hvacThermostat', ['danfossTriggerTime'], manufacturerOptions.danfoss);
2753
2747
  },
2754
2748
  },
2749
+ danfoss_window_open_feature: {
2750
+ key: ['window_open_feature'],
2751
+ convertSet: async (entity, key, value, meta) => {
2752
+ await entity.write('hvacThermostat', {'danfossWindowOpenFeatureEnable': value}, manufacturerOptions.danfoss);
2753
+ return {readAfterWriteTime: 200, state: {'window_open_feature': value}};
2754
+ },
2755
+ convertGet: async (entity, key, meta) => {
2756
+ await entity.read('hvacThermostat', ['danfossWindowOpenFeatureEnable'], manufacturerOptions.danfoss);
2757
+ },
2758
+ },
2755
2759
  danfoss_window_open_internal: {
2756
2760
  key: ['window_open_internal'],
2757
2761
  convertGet: async (entity, key, meta) => {
@@ -22,7 +22,8 @@ module.exports = [
22
22
  tz.danfoss_window_open_internal, tz.danfoss_window_open_external, tz.danfoss_load_estimate,
23
23
  tz.danfoss_viewing_direction, tz.danfoss_external_measured_room_sensor, tz.danfoss_radiator_covered,
24
24
  tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean,
25
- tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode],
25
+ tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode,
26
+ tz.danfoss_window_open_feature],
26
27
  exposes: [e.battery(), e.keypad_lockout(), e.programming_operation_mode(),
27
28
  exposes.binary('mounted_mode_active', ea.STATE_GET, true, false)
28
29
  .withDescription('Is the unit in mounting mode. This is set to `false` for mounted (already on ' +
@@ -53,6 +54,8 @@ module.exports = [
53
54
  exposes.binary('radiator_covered', ea.ALL, true, false)
54
55
  .withDescription('Set if the TRV should solely rely on external_measured_room_sensor or operate in offset mode. ' +
55
56
  '`false` = Auto Offset Mode or `true` = Room Sensor Mode'),
57
+ exposes.binary('window_open_feature', ea.ALL, true, false)
58
+ .withDescription('Whether or not the window open feature is enabled'),
56
59
  exposes.numeric('window_open_internal', ea.STATE_GET).withValueMin(0).withValueMax(4)
57
60
  .withDescription('0=Quarantine, 1=Windows are closed, 2=Hold - Windows are maybe about to open, ' +
58
61
  '3=Open window detected, 4=In window open state from external but detected closed locally'),
@@ -114,6 +117,7 @@ module.exports = [
114
117
  }], options);
115
118
 
116
119
  await endpoint.read('hvacThermostat', [
120
+ 'danfossWindowOpenFeatureEnable',
117
121
  'danfossWindowOpenExternal',
118
122
  'danfossDayOfWeek',
119
123
  'danfossTriggerTime',
@@ -62,6 +62,12 @@ const gledoptoExtend = {
62
62
  }),
63
63
  };
64
64
 
65
+ const configureReadModelID = async (device) => {
66
+ // https://github.com/Koenkk/zigbee-herdsman-converters/issues/3016#issuecomment-1027726604
67
+ const endpoint = device.endpoints[0];
68
+ await endpoint.read('genBasic', ['modelId']);
69
+ };
70
+
65
71
  module.exports = [
66
72
  {
67
73
  fingerprint: [
@@ -116,7 +122,11 @@ module.exports = [
116
122
  vendor: 'Gledopto',
117
123
  ota: ota.zigbeeOTA,
118
124
  description: 'Zigbee LED Controller WW/CW (pro)',
119
- extend: gledoptoExtend.light_onoff_brightness_colortemp(),
125
+ extend: gledoptoExtend.light_onoff_brightness_colortemp({noConfigure: true}),
126
+ configure: async (device, coordinatorEndpoint, logger) => {
127
+ await extend.light_onoff_brightness_colortemp().configure(device, coordinatorEndpoint, logger);
128
+ await configureReadModelID(device);
129
+ },
120
130
  },
121
131
  {
122
132
  fingerprint: [
@@ -179,7 +189,11 @@ module.exports = [
179
189
  vendor: 'Gledopto',
180
190
  ota: ota.zigbeeOTA,
181
191
  description: 'Zigbee LED Controller RGBW (pro)',
182
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
192
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({noConfigure: true}),
193
+ configure: async (device, coordinatorEndpoint, logger) => {
194
+ await extend.light_onoff_brightness_colortemp_color().configure(device, coordinatorEndpoint, logger);
195
+ await configureReadModelID(device);
196
+ },
183
197
  },
184
198
  {
185
199
  fingerprint: [
@@ -237,7 +251,11 @@ module.exports = [
237
251
  vendor: 'Gledopto',
238
252
  ota: ota.zigbeeOTA,
239
253
  description: 'Zigbee LED Controller RGB (pro)',
240
- extend: gledoptoExtend.light_onoff_brightness_color(),
254
+ extend: gledoptoExtend.light_onoff_brightness_color({noConfigure: true}),
255
+ configure: async (device, coordinatorEndpoint, logger) => {
256
+ await extend.light_onoff_brightness_color().configure(device, coordinatorEndpoint, logger);
257
+ await configureReadModelID(device);
258
+ },
241
259
  },
242
260
  {
243
261
  zigbeeModel: ['GL-C-008P'],
@@ -245,8 +263,12 @@ module.exports = [
245
263
  vendor: 'Gledopto',
246
264
  ota: ota.zigbeeOTA,
247
265
  description: 'Zigbee LED Controller RGB+CCT (pro)',
248
- extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
266
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495], noConfigure: true}),
249
267
  meta: {disableDefaultResponse: true},
268
+ configure: async (device, coordinatorEndpoint, logger) => {
269
+ await extend.light_onoff_brightness_colortemp_color().configure(device, coordinatorEndpoint, logger);
270
+ await configureReadModelID(device);
271
+ },
250
272
  },
251
273
  {
252
274
  zigbeeModel: ['GL-C-009'],
@@ -267,7 +289,11 @@ module.exports = [
267
289
  vendor: 'Gledopto',
268
290
  ota: ota.zigbeeOTA,
269
291
  description: 'Zigbee LED Controller W (pro)',
270
- extend: gledoptoExtend.light_onoff_brightness(),
292
+ extend: gledoptoExtend.light_onoff_brightness({noConfigure: true}),
293
+ configure: async (device, coordinatorEndpoint, logger) => {
294
+ await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
295
+ await configureReadModelID(device);
296
+ },
271
297
  },
272
298
  {
273
299
  zigbeeModel: ['GL-C-009S'],
@@ -6,6 +6,7 @@ const extend = require('../lib/extend');
6
6
  const e = exposes.presets;
7
7
  const ea = exposes.access;
8
8
  const ota = require('../lib/ota');
9
+ const utils = require('../lib/utils');
9
10
 
10
11
  const readInitialBatteryState = async (type, data, device) => {
11
12
  if (['deviceAnnounce'].includes(type)) {
@@ -20,7 +21,9 @@ const fzLocal = {
20
21
  cluster: 'genOnOff',
21
22
  type: 'commandOff',
22
23
  convert: (model, msg, publish, options, meta) => {
23
- return {action: 'off'};
24
+ const payload = {action: utils.postfixWithEndpointName('off', msg, model)};
25
+ utils.addActionGroup(payload, msg, model);
26
+ return payload;
24
27
  },
25
28
  },
26
29
  };
@@ -29,7 +29,7 @@ module.exports = [
29
29
  description: 'Smart power strip',
30
30
  extend: extend.switch(),
31
31
  configure: async (device, coordinatorEndpoint, logger) => {
32
- const endpoint = device.getEndpoint(11);
32
+ const endpoint = device.getEndpoint(11) || device.getEndpoint(1);
33
33
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
34
34
  await reporting.onOff(endpoint);
35
35
  },
@@ -88,7 +88,16 @@ module.exports = [
88
88
  toZigbee: extend.light_onoff_brightness_colortemp_color().toZigbee.concat([tz.tint_scene]),
89
89
  },
90
90
  {
91
- zigbeeModel: ['ZBT-Remote-ALL-RGBW'],
91
+ fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_mntza0sw'}],
92
+ model: '404062',
93
+ vendor: 'Müller Licht',
94
+ description: 'Kea RGB+CCT',
95
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
96
+ toZigbee: extend.light_onoff_brightness_colortemp_color().toZigbee.concat([tz.tint_scene]),
97
+ },
98
+ {
99
+ fingerprint: [{manufacturerName: '_TZ3000_bdbb0fon'}],
100
+ zigbeeModel: ['ZBT-Remote-ALL-RGBW', 'TS1001'],
92
101
  model: 'MLI-404011',
93
102
  description: 'Tint remote control',
94
103
  vendor: 'Müller Licht',
package/devices/orvibo.js CHANGED
@@ -292,4 +292,182 @@ module.exports = [
292
292
  },
293
293
  exposes: [e.cover_position(), e.battery()],
294
294
  },
295
+ {
296
+ zigbeeModel: ['2ae011fb6d0542f58705d6861064eb5f'],
297
+ model: 'T40W1Z',
298
+ vendor: 'ORVIBO',
299
+ description: 'MixSwitch 1 gang',
300
+ extend: extend.switch(),
301
+ exposes: [e.switch()],
302
+
303
+ configure: async (device, coordinatorEndpoint, logger) => {
304
+ const endpoint = device.getEndpoint(1);
305
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
306
+ await reporting.onOff(endpoint);
307
+ },
308
+ },
309
+ {
310
+ zigbeeModel: ['2e13af8e17434961be98f055d68c2166'],
311
+ model: 'T40W2Z',
312
+ vendor: 'ORVIBO',
313
+ description: 'MixSwitch 2 gangs',
314
+ extend: extend.switch(),
315
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
316
+ endpoint: (device) => {
317
+ return {'left': 1, 'right': 2};
318
+ },
319
+ meta: {multiEndpoint: true},
320
+ configure: async (device, coordinatorEndpoint, logger) => {
321
+ const endpoint1 = device.getEndpoint(1);
322
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
323
+ await reporting.onOff(endpoint1);
324
+ const endpoint2 = device.getEndpoint(2);
325
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
326
+ await reporting.onOff(endpoint2);
327
+ },
328
+ },
329
+ {
330
+ zigbeeModel: ['e8d667cb184b4a2880dd886c23d00976'],
331
+ model: 'T40W3Z',
332
+ vendor: 'ORVIBO',
333
+ description: 'MixSwitch 3 gangs',
334
+ extend: extend.switch(),
335
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
336
+ endpoint: (device) => {
337
+ return {'left': 1, 'center': 2, 'right': 3};
338
+ },
339
+ meta: {multiEndpoint: true},
340
+ configure: async (device, coordinatorEndpoint, logger) => {
341
+ const endpoint1 = device.getEndpoint(1);
342
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
343
+ await reporting.onOff(endpoint1);
344
+ const endpoint2 = device.getEndpoint(2);
345
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
346
+ await reporting.onOff(endpoint2);
347
+ const endpoint3 = device.getEndpoint(3);
348
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
349
+ await reporting.onOff(endpoint3);
350
+ },
351
+ },
352
+ {
353
+ zigbeeModel: ['20513b10079f4cc68cffb8b0dc6d3277'],
354
+ model: 'T40W4Z',
355
+ vendor: 'ORVIBO',
356
+ description: 'MixSwitch 4 gangs',
357
+ extend: extend.switch(),
358
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
359
+ e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5'), e.switch().withEndpoint('l6')],
360
+ endpoint: (device) => {
361
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5, 'l6': 6};
362
+ },
363
+ meta: {multiEndpoint: true},
364
+ configure: async (device, coordinatorEndpoint, logger) => {
365
+ const endpoint1 = device.getEndpoint(1);
366
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
367
+ await reporting.onOff(endpoint1);
368
+ const endpoint2 = device.getEndpoint(2);
369
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
370
+ await reporting.onOff(endpoint2);
371
+ const endpoint3 = device.getEndpoint(3);
372
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
373
+ await reporting.onOff(endpoint3);
374
+ const endpoint4 = device.getEndpoint(4);
375
+ await reporting.bind(endpoint4, coordinatorEndpoint, ['genOnOff']);
376
+ await reporting.onOff(endpoint4);
377
+ const endpoint5 = device.getEndpoint(5);
378
+ await reporting.bind(endpoint5, coordinatorEndpoint, ['genOnOff']);
379
+ await reporting.onOff(endpoint5);
380
+ const endpoint6 = device.getEndpoint(6);
381
+ await reporting.bind(endpoint6, coordinatorEndpoint, ['genOnOff']);
382
+ await reporting.onOff(endpoint6);
383
+ },
384
+ },
385
+ {
386
+ zigbeeModel: ['bcb949e87e8c4ea6bc2803052dd8fbf5'],
387
+ model: 'T40S6Z',
388
+ vendor: 'ORVIBO',
389
+ description: 'MixSwitch 6 gangs',
390
+ fromZigbee: [fz.orvibo_raw_2],
391
+ toZigbee: [],
392
+ exposes: [e.action(['button_1_click', 'button_2_click', 'button_3_click', 'button_4_click', 'button_5_click', 'button_6_click'])],
393
+ },
394
+ {
395
+ zigbeeModel: ['ba8120ad03f744ecb6a973672369e80d'],
396
+ model: 'T41W1Z',
397
+ vendor: 'ORVIBO',
398
+ description: 'MixSwitch 1 gang (without neutral wire)',
399
+ extend: extend.switch(),
400
+ exposes: [e.switch()],
401
+ configure: async (device, coordinatorEndpoint, logger) => {
402
+ const endpoint = device.getEndpoint(1);
403
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
404
+ await reporting.onOff(endpoint);
405
+ },
406
+ },
407
+ {
408
+ zigbeeModel: ['7c8f476a0f764cd4b994bc73d07c906d'],
409
+ model: 'T41W2Z',
410
+ vendor: 'ORVIBO',
411
+ description: 'MixSwitch 2 gang (without neutral wire)',
412
+ extend: extend.switch(),
413
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
414
+ endpoint: (device) => {
415
+ return {'left': 1, 'right': 2};
416
+ },
417
+ meta: {multiEndpoint: true},
418
+ configure: async (device, coordinatorEndpoint, logger) => {
419
+ const endpoint1 = device.getEndpoint(1);
420
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
421
+ await reporting.onOff(endpoint1);
422
+ const endpoint2 = device.getEndpoint(2);
423
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
424
+ await reporting.onOff(endpoint2);
425
+ },
426
+ },
427
+ {
428
+ zigbeeModel: ['cb7ce9fe2cb147e69c5ea700b39b3d5b'],
429
+ model: 'DM10ZW',
430
+ vendor: 'ORVIBO',
431
+ description: '0-10v dimmer',
432
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 371]}),
433
+ },
434
+ {
435
+ zigbeeModel: ['1a20628504bf48c88ed698fe96b7867c'],
436
+ model: 'DTZ09039',
437
+ vendor: 'ORVIBO',
438
+ description: 'Downlight (Q series)',
439
+ extend: extend.light_onoff_brightness(),
440
+ },
441
+ {
442
+ zigbeeModel: ['bbfed49c738948b989911f9f9f73d759'],
443
+ model: 'R30W3Z',
444
+ vendor: 'ORVIBO',
445
+ description: 'In-wall switch 3 gang',
446
+ extend: extend.switch(),
447
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
448
+ endpoint: (device) => {
449
+ return {'left': 1, 'center': 2, 'right': 3};
450
+ },
451
+ meta: {multiEndpoint: true},
452
+ configure: async (device, coordinatorEndpoint, logger) => {
453
+ const endpoint1 = device.getEndpoint(1);
454
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
455
+ await reporting.onOff(endpoint1);
456
+ const endpoint2 = device.getEndpoint(2);
457
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
458
+ await reporting.onOff(endpoint2);
459
+ const endpoint3 = device.getEndpoint(3);
460
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
461
+ await reporting.onOff(endpoint3);
462
+ },
463
+ },
464
+ {
465
+ zigbeeModel: ['0e93fa9c36bb417a90ad5d8a184b683a'],
466
+ model: 'SM20',
467
+ vendor: 'ORVIBO',
468
+ description: 'Door or window contact switch',
469
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
470
+ toZigbee: [],
471
+ exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery()],
472
+ },
295
473
  ];
@@ -1613,7 +1613,7 @@ module.exports = [
1613
1613
  ota: ota.zigbeeOTA,
1614
1614
  },
1615
1615
  {
1616
- zigbeeModel: ['4080248U9'],
1616
+ zigbeeModel: ['4080248U9', '915005987201'],
1617
1617
  model: '4080248U9',
1618
1618
  vendor: 'Philips',
1619
1619
  description: 'Hue White and color ambiance Signe floor light',
@@ -45,4 +45,11 @@ module.exports = [
45
45
  description: 'LED bulb GU10 350 lumen, dimmable, color, white 2700-6500K',
46
46
  extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
47
47
  },
48
+ {
49
+ zigbeeModel: ['ZBT-DIMLight-GU100800'],
50
+ model: 'HAL400',
51
+ vendor: 'Schwaiger',
52
+ description: 'LED Schwaiger HAL400 GU10 dimmable, warm white',
53
+ extend: extend.light_onoff_brightness(),
54
+ },
48
55
  ];
@@ -60,13 +60,20 @@ module.exports = [
60
60
  model: 'E11-G13',
61
61
  vendor: 'Sengled',
62
62
  description: 'Element classic (A19)',
63
- extend: extend.light_onoff_brightness({noConfigure: true}),
64
- ota: ota.zigbeeOTA,
63
+ fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.metering]),
64
+ toZigbee: extend.light_onoff_brightness().toZigbee,
65
65
  configure: async (device, coordinatorEndpoint, logger) => {
66
66
  await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
67
67
  device.powerSource = 'Mains (single phase)';
68
68
  device.save();
69
+
70
+ const endpoint = device.getEndpoint(1);
71
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
72
+ await reporting.readMeteringMultiplierDivisor(endpoint);
73
+ await reporting.currentSummDelivered(endpoint);
74
+ await reporting.instantaneousDemand(endpoint);
69
75
  },
76
+ exposes: [e.power(), e.energy(), e.light_brightness()],
70
77
  },
71
78
  {
72
79
  zigbeeModel: ['E11-G23', 'E11-G33'],
@@ -341,4 +341,25 @@ module.exports = [
341
341
  }]);
342
342
  },
343
343
  },
344
+ {
345
+ zigbeeModel: ['DLM-300Z'],
346
+ model: 'DLM-300Z',
347
+ vendor: 'ShinaSystem',
348
+ description: 'Sihas door lock',
349
+ fromZigbee: [fz.lock, fz.battery, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response],
350
+ toZigbee: [tz.lock, tz.pincode_lock],
351
+ meta: {pinCodeCount: 4},
352
+ configure: async (device, coordinatorEndpoint, logger) => {
353
+ const endpoint = device.getEndpoint(1);
354
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
355
+ await reporting.lockState(endpoint, {min: 0, max: 3600, change: 0});
356
+ await reporting.batteryPercentageRemaining(endpoint, {min: 600, max: 21600, change: 1});
357
+ await reporting.doorState(endpoint);
358
+ },
359
+ exposes: [e.battery(), e.lock(), exposes.enum('door_state', ea.STATE, ['open', 'closed']).withDescription('Door status'),
360
+ exposes.composite('pin_code', 'pin_code')
361
+ .withFeature(exposes.numeric('user', ea.SET).withDescription('User ID can only number 1'))
362
+ .withFeature(exposes.numeric('pin_code', ea.SET).withDescription('Pincode to set, set pincode(4 digit) to null to clear')),
363
+ ],
364
+ },
344
365
  ];
package/devices/sinope.js CHANGED
@@ -331,4 +331,36 @@ module.exports = [
331
331
  },
332
332
  exposes: [e.water_leak(), e.battery_low(), e.temperature(), e.battery()],
333
333
  },
334
+ {
335
+ zigbeeModel: ['VA4200WZ'],
336
+ model: 'VA4200WZ',
337
+ vendor: 'Sinopé',
338
+ description: 'Zigbee smart water valve (3/4")',
339
+ fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery],
340
+ toZigbee: [tz.cover_via_brightness],
341
+ configure: async (device, coordinatorEndpoint) => {
342
+ const endpoint = device.getEndpoint(1);
343
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
344
+ await reporting.batteryPercentageRemaining(endpoint);
345
+ await reporting.onOff(endpoint);
346
+ await reporting.brightness(endpoint); // valve position
347
+ },
348
+ exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
349
+ },
350
+ {
351
+ zigbeeModel: ['VA4201WZ'],
352
+ model: 'VA4201WZ',
353
+ vendor: 'Sinopé',
354
+ description: 'Zigbee smart water valve (1")',
355
+ fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery],
356
+ toZigbee: [tz.cover_via_brightness],
357
+ configure: async (device, coordinatorEndpoint) => {
358
+ const endpoint = device.getEndpoint(1);
359
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
360
+ await reporting.batteryPercentageRemaining(endpoint);
361
+ await reporting.onOff(endpoint);
362
+ await reporting.brightness(endpoint); // valve position
363
+ },
364
+ exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
365
+ },
334
366
  ];
@@ -103,6 +103,36 @@ module.exports = [
103
103
  reportableChange: 1}]);
104
104
  },
105
105
  },
106
+ {
107
+ zigbeeModel: ['SORB'],
108
+ model: 'SORB',
109
+ vendor: 'Stelpro',
110
+ description: 'ORLÉANS fan heater',
111
+ fromZigbee: [fz.stelpro_thermostat, fz.hvac_user_interface],
112
+ toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint,
113
+ tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state],
114
+ exposes: [e.local_temperature(), e.keypad_lockout(),
115
+ exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
116
+ .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
117
+ configure: async (device, coordinatorEndpoint, logger) => {
118
+ const endpoint = device.getEndpoint(25);
119
+ const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg', 'msTemperatureMeasurement'];
120
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
121
+
122
+ // Those exact parameters (min/max/change) are required for reporting to work with Stelpro SORB
123
+ await reporting.thermostatTemperature(endpoint);
124
+ await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
125
+ await reporting.thermostatSystemMode(endpoint);
126
+ await reporting.thermostatPIHeatingDemand(endpoint);
127
+ await reporting.thermostatKeypadLockMode(endpoint);
128
+ // cluster 0x0201 attribute 0x401c
129
+ await endpoint.configureReporting('hvacThermostat', [{
130
+ attribute: 'StelproSystemMode',
131
+ minimumReportInterval: constants.repInterval.MINUTE,
132
+ maximumReportInterval: constants.repInterval.HOUR,
133
+ reportableChange: 1}]);
134
+ },
135
+ },
106
136
  {
107
137
  zigbeeModel: ['SMT402AD'],
108
138
  model: 'SMT402AD',
@@ -103,7 +103,7 @@ module.exports = [
103
103
  },
104
104
  },
105
105
  {
106
- zigbeeModel: ['ON/OFF', 'ZIGBEE-SWITCH'],
106
+ zigbeeModel: ['ON/OFF -M', 'ON/OFF', 'ZIGBEE-SWITCH'],
107
107
  model: 'ZG9101SAC-HP-Switch',
108
108
  vendor: 'Sunricher',
109
109
  description: 'Zigbee AC in wall switch',
package/devices/tplink.js CHANGED
@@ -23,4 +23,20 @@ module.exports = [
23
23
  device.save();
24
24
  },
25
25
  },
26
+ {
27
+ zigbeeModel: ['CS100'],
28
+ model: 'CS100',
29
+ vendor: 'TP-Link',
30
+ description: 'Contact sensor',
31
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery],
32
+ toZigbee: [],
33
+ exposes: [e.contact(), e.battery_low(), e.battery()],
34
+ configure: async (device, coordinatorEndpoint, logger) => {
35
+ const endpoint = device.getEndpoint(1);
36
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
37
+ await reporting.batteryPercentageRemaining(endpoint);
38
+ device.powerSource = 'Battery';
39
+ device.save();
40
+ },
41
+ },
26
42
  ];
package/devices/tuya.js CHANGED
@@ -12,7 +12,7 @@ const utils = require('../lib/utils');
12
12
 
13
13
  const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
14
14
  '_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
15
- '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg'];
15
+ '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_2xlvlnez'];
16
16
 
17
17
  const tzLocal = {
18
18
  TS0504B_color: {
@@ -109,7 +109,8 @@ module.exports = [
109
109
  },
110
110
  {
111
111
  fingerprint: [{modelID: 'TS0001', manufacturerName: '_TZ3000_hktqahrq'}, {manufacturerName: '_TZ3000_hktqahrq'},
112
- {manufacturerName: '_TZ3000_q6a3tepg'}, {modelID: 'TS000F', manufacturerName: '_TZ3000_m9af2l6g'}],
112
+ {manufacturerName: '_TZ3000_q6a3tepg'}, {modelID: 'TS000F', manufacturerName: '_TZ3000_m9af2l6g'},
113
+ {modelID: 'TS0001', manufacturerName: '_TZ3000_npzfdcof'}],
113
114
  model: 'WHD02',
114
115
  vendor: 'TuYa',
115
116
  description: 'Wall switch module',
@@ -1119,7 +1120,9 @@ module.exports = [
1119
1120
  acVoltageMultiplier: 1, acVoltageDivisor: 1, acCurrentMultiplier: 1, acCurrentDivisor: 1000, acPowerMultiplier: 1,
1120
1121
  acPowerDivisor: 1,
1121
1122
  });
1122
- await reporting.currentSummDelivered(endpoint);
1123
+ try {
1124
+ await reporting.currentSummDelivered(endpoint);
1125
+ } catch (error) {/* fails for some https://github.com/Koenkk/zigbee2mqtt/issues/11179 */}
1123
1126
  },
1124
1127
  options: [exposes.options.measurement_poll_interval()],
1125
1128
  // This device doesn't support reporting correctly.
package/devices/xiaomi.js CHANGED
@@ -1174,8 +1174,8 @@ module.exports = [
1174
1174
  exposes.enum('mute_buzzer', ea.SET, ['Mute']).withDescription('Mute the buzzer for 10 minutes (buzzer cannot be ' +
1175
1175
  'pre-muted, because this function only works when the alarm is triggered)'),
1176
1176
  exposes.binary('mute', ea.STATE_GET, true, false).withDescription('Buzzer muted'),
1177
- exposes.switch().withState('linkage_alarm', true, 'After being turned on, one of the devices triggers the ' +
1178
- 'natural gas leakage alarm, and other devices with linkage turned on', ea.ALL, true, false),
1177
+ exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a gas leak ' +
1178
+ 'is detected, other detectors with this option enabled will also sound the alarm buzzer'),
1179
1179
  exposes.binary('state', ea.STATE_GET, 'preparation', 'work').withDescription('"Preparation" or "work" ' +
1180
1180
  '(measurement of the gas concentration value and triggering of an alarm are only performed in the "work" state)'),
1181
1181
  exposes.numeric('power_outage_count', ea.STATE_GET).withDescription('Number of power outages (since last pairing)')],
@@ -1272,9 +1272,9 @@ module.exports = [
1272
1272
  vendor: 'Xiaomi',
1273
1273
  fromZigbee: [fz.xiaomi_curtain_acn002_position, fz.xiaomi_curtain_acn002_status, fz.cover_position_tilt, fz.ignore_basic_report,
1274
1274
  fz.aqara_opple],
1275
- toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_acn002_status],
1275
+ toZigbee: [tz.xiaomi_curtain_position_state],
1276
1276
  exposes: [e.cover_position().setAccess('state', ea.ALL), e.battery(),
1277
- exposes.enum('motor_state', ea.STATE_GET, ['declining', 'rising', 'pause', 'blocked'])
1277
+ exposes.enum('motor_state', ea.STATE, ['declining', 'rising', 'pause', 'blocked'])
1278
1278
  .withDescription('The current state of the motor.'),
1279
1279
  exposes.binary('running', ea.STATE, true, false)
1280
1280
  .withDescription('Whether the motor is moving or not.')],
@@ -1289,7 +1289,7 @@ module.exports = [
1289
1289
  model: 'LLKZMK11LM',
1290
1290
  vendor: 'Xiaomi',
1291
1291
  description: 'Aqara wireless relay controller',
1292
- fromZigbee: [fz.xiaomi_switch_basic, fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off],
1292
+ fromZigbee: [fz.xiaomi_switch_basic, fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off, fz.aqara_opple],
1293
1293
  meta: {multiEndpoint: true},
1294
1294
  toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power],
1295
1295
  endpoint: (device) => {
@@ -1299,7 +1299,7 @@ module.exports = [
1299
1299
  e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
1300
1300
  exposes.binary('interlock', ea.STATE_SET, true, false)
1301
1301
  .withDescription('Enabling prevents both relais being on at the same time')],
1302
- // TEMP DISABLED: https://github.com/Koenkk/zigbee2mqtt/issues/7112 ota: ota.zigbeeOTA,
1302
+ ota: ota.zigbeeOTA,
1303
1303
  },
1304
1304
  {
1305
1305
  zigbeeModel: ['lumi.lock.acn02'],
@@ -1597,7 +1597,8 @@ module.exports = [
1597
1597
  e.battery(), e.battery_voltage(), e.action([
1598
1598
  'single_left', 'single_right', 'single_both',
1599
1599
  'double_left', 'double_right', 'double_both',
1600
- 'triple_left', 'triple_right', 'triple_both']),
1600
+ 'triple_left', 'triple_right', 'triple_both',
1601
+ 'hold_left', 'hold_right', 'hold_both']),
1601
1602
  exposes.enum('click_mode', ea.ALL, ['fast', 'multi'])
1602
1603
  .withDescription('Click mode, fast: only supports single click which will be send immediately after clicking.' +
1603
1604
  'multi: supports more events like double and hold'),
package/devices/yale.js CHANGED
@@ -124,4 +124,11 @@ module.exports = [
124
124
  description: 'Real living lock / Intelligent biometric digital lock',
125
125
  extend: lockExtend(),
126
126
  },
127
+ {
128
+ zigbeeModel: ['06ffff2027'],
129
+ model: 'YMF40A RL',
130
+ vendor: 'Yale',
131
+ description: 'Real living lock / Intelligent biometric digital lock',
132
+ extend: lockExtend({battery: {dontDividePercentage: true}}),
133
+ },
127
134
  ];
package/index.js CHANGED
@@ -62,7 +62,7 @@ function addDefinition(definition) {
62
62
  const {extend, ...definitionWithoutExtend} = definition;
63
63
  if (extend) {
64
64
  if (extend.hasOwnProperty('configure') && definition.hasOwnProperty('configure')) {
65
- console.log(`'${definition.model}' has configure in extend and device, this is not allowed`);
65
+ assert.fail(`'${definition.model}' has configure in extend and device, this is not allowed`);
66
66
  }
67
67
 
68
68
  definition = {
@@ -89,7 +89,8 @@ function addDefinition(definition) {
89
89
  const optionKeys = definition.options.map((o) => o.name);
90
90
  for (const converter of [...definition.toZigbee, ...definition.fromZigbee]) {
91
91
  if (converter.options) {
92
- for (const option of converter.options) {
92
+ const options = typeof converter.options === 'function' ? converter.options(definition) : converter.options;
93
+ for (const option of options) {
93
94
  if (!optionKeys.includes(option.name)) {
94
95
  definition.options.push(option);
95
96
  optionKeys.push(option.name);
package/lib/exposes.js CHANGED
@@ -589,6 +589,8 @@ module.exports = {
589
589
  tamper: () => new Binary('tamper', access.STATE, true, false).withDescription('Indicates whether the device is tampered'),
590
590
  temperature: () => new Numeric('temperature', access.STATE).withUnit('°C').withDescription('Measured temperature value'),
591
591
  test: () => new Binary('test', access.STATE, true, false).withDescription('Indicates whether the device is being tested'),
592
+ valve_position: () => new Numeric('position', access.ALL).withValueMin(0).withValueMax(100).withDescription('Position of the valve'),
593
+ valve_switch: () => new Binary('state', access.ALL, 'OPEN', 'CLOSE').withDescription('Valve state if open or closed'),
592
594
  valve_state: () => new Binary('valve_state', access.STATE, 'OPEN', 'CLOSED').withDescription('Valve state if open or closed'),
593
595
  valve_detection: () => new Switch().withState('valve_detection', true).setAccess('state', access.STATE_SET),
594
596
  vibration: () => new Binary('vibration', access.STATE, true, false).withDescription('Indicates whether the device detected vibration'),
package/lib/extend.js CHANGED
@@ -58,12 +58,14 @@ const extend = {
58
58
  tz.light_brightness_step, tz.level_config, tz.power_on_behavior, tz.light_hue_saturation_move,
59
59
  tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
60
60
 
61
- return {
62
- exposes, fromZigbee, toZigbee,
63
- configure: async (device, coordinatorEndpoint, logger) => {
61
+ const result = {exposes, fromZigbee, toZigbee};
62
+ if (!options.noConfigure) {
63
+ result.configure = async (device, coordinatorEndpoint, logger) => {
64
64
  await light.configure(device, coordinatorEndpoint, logger, false);
65
- },
66
- };
65
+ };
66
+ }
67
+
68
+ return result;
67
69
  },
68
70
  light_onoff_brightness_colortemp_color: (options={}) => {
69
71
  options = {disableEffect: false, supportsHS: false, disableColorTempStartup: false, preferHS: false, ...options};
package/lib/reporting.js CHANGED
@@ -71,6 +71,10 @@ module.exports = {
71
71
  const p = payload('lockState', 0, repInterval.HOUR, 0, overrides);
72
72
  await endpoint.configureReporting('closuresDoorLock', p);
73
73
  },
74
+ doorState: async (endpoint, overrides) => {
75
+ const p = payload('doorState', 0, repInterval.HOUR, 0, overrides);
76
+ await endpoint.configureReporting('closuresDoorLock', p);
77
+ },
74
78
  brightness: async (endpoint, overrides) => {
75
79
  const p = payload('currentLevel', 0, repInterval.HOUR, 1, overrides);
76
80
  await endpoint.configureReporting('genLevelCtrl', p);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.406",
3
+ "version": "14.0.410",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.406",
3
+ "version": "14.0.410",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [