zigbee-herdsman-converters 14.0.600 → 14.0.603

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.
@@ -395,8 +395,7 @@ const converters = {
395
395
  illuminance: {
396
396
  cluster: 'msIlluminanceMeasurement',
397
397
  type: ['attributeReport', 'readResponse'],
398
- options: [exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'),
399
- exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual')],
398
+ options: [exposes.options.calibration('illuminance', 'percentual'), exposes.options.calibration('illuminance_lux', 'percentual')],
400
399
  convert: (model, msg, publish, options, meta) => {
401
400
  // DEPRECATED: only return lux here (change illuminance_lux -> illuminance)
402
401
  const illuminance = msg.data['measuredValue'];
@@ -5557,13 +5556,13 @@ const converters = {
5557
5556
  result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
5558
5557
  }
5559
5558
  if (definition.exposes.find((e) => e.name === 'device_temperature')) {
5560
- result.push(exposes.options.precision('device_temperature'), exposes.options.calibration('device_temperature'));
5559
+ result.push(exposes.options.calibration('device_temperature'));
5561
5560
  }
5562
5561
  if (definition.exposes.find((e) => e.name === 'illuminance')) {
5563
- result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
5562
+ result.push(exposes.options.calibration('illuminance', 'percentual'));
5564
5563
  }
5565
5564
  if (definition.exposes.find((e) => e.name === 'illuminance_lux')) {
5566
- result.push(exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual'));
5565
+ result.push(exposes.options.calibration('illuminance_lux', 'percentual'));
5567
5566
  }
5568
5567
  return result;
5569
5568
  },
@@ -5581,7 +5580,7 @@ const converters = {
5581
5580
  result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
5582
5581
  }
5583
5582
  if (definition.exposes.find((e) => e.name === 'device_temperature')) {
5584
- result.push(exposes.options.precision('device_temperature'), exposes.options.calibration('device_temperature'));
5583
+ result.push(exposes.options.calibration('device_temperature'));
5585
5584
  }
5586
5585
  return result;
5587
5586
  },
@@ -5603,10 +5602,10 @@ const converters = {
5603
5602
  result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
5604
5603
  }
5605
5604
  if (definition.exposes.find((e) => e.name === 'device_temperature')) {
5606
- result.push(exposes.options.precision('device_temperature'), exposes.options.calibration('device_temperature'));
5605
+ result.push(exposes.options.calibration('device_temperature'));
5607
5606
  }
5608
5607
  if (definition.exposes.find((e) => e.name === 'illuminance')) {
5609
- result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
5608
+ result.push(exposes.options.calibration('illuminance', 'percentual'));
5610
5609
  }
5611
5610
  return result;
5612
5611
  },
@@ -5686,8 +5685,7 @@ const converters = {
5686
5685
  RTCGQ11LM_illuminance: {
5687
5686
  cluster: 'msIlluminanceMeasurement',
5688
5687
  type: ['attributeReport', 'readResponse'],
5689
- options: [exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'),
5690
- exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual')],
5688
+ options: [exposes.options.calibration('illuminance', 'percentual'), exposes.options.calibration('illuminance_lux', 'percentual')],
5691
5689
  convert: (model, msg, publish, options, meta) => {
5692
5690
  // also trigger movement, because there is no illuminance without movement
5693
5691
  // https://github.com/Koenkk/zigbee-herdsman-converters/issues/1925
@@ -5707,7 +5705,7 @@ const converters = {
5707
5705
  cluster: 'aqaraOpple',
5708
5706
  type: ['attributeReport', 'readResponse'],
5709
5707
  options: [exposes.options.occupancy_timeout_2(), exposes.options.no_occupancy_since_true(),
5710
- exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual')],
5708
+ exposes.options.calibration('illuminance', 'percentual')],
5711
5709
  convert: (model, msg, publish, options, meta) => {
5712
5710
  if (msg.data.hasOwnProperty('illuminance')) {
5713
5711
  // The occupancy sensor only sends a message when motion detected.
@@ -1674,7 +1674,7 @@ const converters = {
1674
1674
  manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
1675
1675
  reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
1676
1676
  });
1677
- return {state: {state_left: value.toUpperCase()}, readAfterWriteTime: 250};
1677
+ return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
1678
1678
  } else if (postfix === 'right') {
1679
1679
  channel = 2.0;
1680
1680
  await entity.command('genLevelCtrl', 'moveToLevelWithOnOff', {level: oldstate, transtime: channel});
@@ -1683,21 +1683,21 @@ const converters = {
1683
1683
  manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
1684
1684
  reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
1685
1685
  });
1686
- return {state: {state_right: value.toUpperCase()}, readAfterWriteTime: 250};
1686
+ return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
1687
1687
  } else if (postfix === 'bottom_right') {
1688
1688
  await entity.write('genPowerCfg', (state === 'on') ? payloadOnBottomRight : payloadOffBottomRight,
1689
1689
  {
1690
1690
  manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
1691
1691
  reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
1692
1692
  });
1693
- return {state: {state_bottom_right: value.toUpperCase()}, readAfterWriteTime: 250};
1693
+ return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
1694
1694
  } else if (postfix === 'bottom_left') {
1695
1695
  await entity.write('genPowerCfg', (state === 'on') ? payloadOnBottomLeft : payloadOffBottomLeft,
1696
1696
  {
1697
1697
  manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
1698
1698
  reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
1699
1699
  });
1700
- return {state: {state_bottom_left: value.toUpperCase()}, readAfterWriteTime: 250};
1700
+ return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
1701
1701
  }
1702
1702
  return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
1703
1703
  },
@@ -2669,7 +2669,7 @@ const converters = {
2669
2669
  },
2670
2670
  },
2671
2671
  aqara_density: {
2672
- key: ['gas_density', 'smoke_density'],
2672
+ key: ['gas_density', 'smoke_density', 'smoke_density_dbm'],
2673
2673
  convertGet: async (entity, key, meta) => {
2674
2674
  await entity.read('aqaraOpple', [0x013b], manufacturerOptions.xiaomi);
2675
2675
  },
@@ -2677,8 +2677,8 @@ const converters = {
2677
2677
  JTBZ01AQA_gas_sensitivity: {
2678
2678
  key: ['gas_sensitivity'],
2679
2679
  convertSet: async (entity, key, value, meta) => {
2680
- value = value.toLowerCase();
2681
- const lookup = {'15%lel': 1, '10%lel': 2};
2680
+ value = value.toUpperCase();
2681
+ const lookup = {'15%LEL': 1, '10%LEL': 2};
2682
2682
  await entity.write('aqaraOpple', {0x010c: {value: lookup[value], type: 0x20}}, manufacturerOptions.xiaomi);
2683
2683
  return {state: {gas_sensitivity: value}};
2684
2684
  },
@@ -2692,19 +2692,24 @@ const converters = {
2692
2692
  await entity.write('aqaraOpple', {0x0127: {value: true, type: 0x10}}, manufacturerOptions.xiaomi);
2693
2693
  },
2694
2694
  },
2695
- aqara_mute_buzzer: {
2696
- key: ['mute_buzzer'],
2695
+ aqara_buzzer: {
2696
+ key: ['buzzer'],
2697
2697
  convertSet: async (entity, key, value, meta) => {
2698
- let attribute = 0x013f;
2699
- if (['JY-GZ-01AQ'].includes(meta.mapped.model)) attribute = 0x013e;
2700
- await entity.write('aqaraOpple', {[`${attribute}`]: {value: 15360, type: 0x23}}, manufacturerOptions.xiaomi);
2701
- await entity.write('aqaraOpple', {0x0126: {value: 1, type: 0x20}}, manufacturerOptions.xiaomi);
2698
+ const attribute = ['JY-GZ-01AQ'].includes(meta.mapped.model) ? 0x013e : 0x013f;
2699
+ value = (value.toLowerCase() === 'alarm') ? 15361 : 15360;
2700
+ await entity.write('aqaraOpple', {[`${attribute}`]: {value: [`${value}`], type: 0x23}}, manufacturerOptions.xiaomi);
2701
+ value = (value === 15361) ? 0 : 1;
2702
+ await entity.write('aqaraOpple', {0x0126: {value: [`${value}`], type: 0x20}}, manufacturerOptions.xiaomi);
2702
2703
  },
2703
2704
  },
2704
- aqara_mute: {
2705
- key: ['mute'],
2705
+ aqara_buzzer_manual: {
2706
+ key: ['buzzer_manual_alarm', 'buzzer_manual_mute'],
2706
2707
  convertGet: async (entity, key, meta) => {
2707
- await entity.read('aqaraOpple', [0x0126], manufacturerOptions.xiaomi);
2708
+ if (key === 'buzzer_manual_mute') {
2709
+ await entity.read('aqaraOpple', [0x0126], manufacturerOptions.xiaomi);
2710
+ } else if (key === 'buzzer_manual_alarm') {
2711
+ await entity.read('aqaraOpple', [0x013d], manufacturerOptions.xiaomi);
2712
+ }
2708
2713
  },
2709
2714
  },
2710
2715
  JYGZ01AQ_heartbeat_indicator: {
package/devices/adeo.js CHANGED
@@ -80,6 +80,13 @@ module.exports = [
80
80
  description: 'ENKI LEXMAN RGBTW GU10 Bulb',
81
81
  extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
82
82
  },
83
+ {
84
+ zigbeeModel: ['ZBEK-10'],
85
+ model: 'IC-CDZFB2AC004HA-MZN',
86
+ vendor: 'ADEO',
87
+ description: 'ENKI LEXMAN E14 LED white',
88
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
89
+ },
83
90
  {
84
91
  zigbeeModel: ['ZBEK-12'],
85
92
  model: 'IA-CDZFB2AA007NA-MZN-01',
@@ -482,6 +482,14 @@ module.exports = [
482
482
  description: 'Zigbee 12W E26/E27 Bulb RGB+CCT (pro)',
483
483
  extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
484
484
  },
485
+ {
486
+ zigbeeModel: ['GL-D-002P'],
487
+ model: 'GL-D-002P',
488
+ vendor: 'Gledopto',
489
+ ota: ota.zigbeeOTA,
490
+ description: 'Zigbee 6W Downlight RGB+CCT (pro CRI>90)',
491
+ extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
492
+ },
485
493
  {
486
494
  zigbeeModel: ['GL-D-003Z'],
487
495
  model: 'GL-D-003Z',
@@ -202,7 +202,7 @@ module.exports = [
202
202
  description: 'Power socket with power consumption monitoring',
203
203
  fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement],
204
204
  toZigbee: [tz.on_off, tz.legrand_settingAlwaysEnableLed, tz.legrand_identify],
205
- exposes: [e.switch(), e.action(['identify']), e.power(), e.voltage(), e.current()],
205
+ exposes: [e.switch(), e.action(['identify']), e.power()],
206
206
  configure: async (device, coordinatorEndpoint, logger) => {
207
207
  const endpoint = device.getEndpoint(1);
208
208
  await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
package/devices/nue_3a.js CHANGED
@@ -235,7 +235,7 @@ module.exports = [
235
235
  exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right')],
236
236
  meta: {multiEndpoint: true},
237
237
  endpoint: (device) => {
238
- return {left: 12, right: 11};
238
+ return {left: 11, right: 12};
239
239
  },
240
240
  },
241
241
  {
@@ -255,8 +255,8 @@ module.exports = [
255
255
  model: 'CCT5010-0001',
256
256
  vendor: 'Schneider Electric',
257
257
  description: 'Micro module dimmer',
258
- fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
259
- toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
258
+ fromZigbee: [...extend.light_onoff_brightness().fromZigbee, fz.wiser_lighting_ballast_configuration],
259
+ toZigbee: [...extend.light_onoff_brightness().toZigbee, tz.ballast_config, tz.wiser_dimmer_mode],
260
260
  exposes: [e.light_brightness().withLevelConfig(),
261
261
  exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
262
262
  .withDescription('Specifies the minimum light output of the ballast'),
@@ -52,7 +52,7 @@ module.exports = [
52
52
  },
53
53
  exposes: [e.battery(), e.battery_voltage(),
54
54
  exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
55
- exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
55
+ exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(100).withDescription('People count')],
56
56
  },
57
57
  {
58
58
  zigbeeModel: ['USM-300Z'],
@@ -390,4 +390,45 @@ module.exports = [
390
390
  .withFeature(exposes.numeric('pin_code', ea.SET).withDescription('Pincode to set, set pincode(4 digit) to null to clear')),
391
391
  ],
392
392
  },
393
+ {
394
+ zigbeeModel: ['DMS-300Z'],
395
+ model: 'DMS-300ZB',
396
+ vendor: 'ShinaSystem',
397
+ ota: ota.zigbeeOTA,
398
+ description: 'SiHAS dual motion sensor',
399
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
400
+ fromZigbee: [fz.battery, fz.occupancy, fz.occupancy_timeout],
401
+ toZigbee: [tz.occupancy_timeout],
402
+ configure: async (device, coordinatorEndpoint, logger) => {
403
+ const endpoint = device.getEndpoint(1);
404
+ const binds = ['genPowerCfg', 'msOccupancySensing'];
405
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
406
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
407
+ await reporting.occupancy(endpoint, {min: 1, max: 600, change: 1});
408
+ await endpoint.read('msOccupancySensing', ['pirOToUDelay']);
409
+ },
410
+ exposes: [e.battery(), e.battery_voltage(), e.occupancy(),
411
+ exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(65535)],
412
+ },
413
+ {
414
+ zigbeeModel: ['ISM300Z3'],
415
+ model: 'ISM300Z3',
416
+ vendor: 'ShinaSystem',
417
+ ota: ota.zigbeeOTA,
418
+ description: 'SiHAS IOT smart inner switch 3 gang',
419
+ extend: extend.switch(),
420
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3')],
421
+ endpoint: (device) => {
422
+ return {l1: 1, l2: 2, l3: 3};
423
+ },
424
+ meta: {multiEndpoint: true},
425
+ configure: async (device, coordinatorEndpoint, logger) => {
426
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
427
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
428
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
429
+ await reporting.onOff(device.getEndpoint(1));
430
+ await reporting.onOff(device.getEndpoint(2));
431
+ await reporting.onOff(device.getEndpoint(3));
432
+ },
433
+ },
393
434
  ];
package/devices/tuya.js CHANGED
@@ -271,6 +271,13 @@ const tzLocal = {
271
271
  };
272
272
 
273
273
  const fzLocal = {
274
+ metering_skip_duplicate: {
275
+ ...fz.metering,
276
+ convert: (model, msg, publish, options, meta) => {
277
+ if (utils.hasAlreadyProcessedMessage(msg)) return;
278
+ return fz.metering.convert(model, msg, publish, options, meta);
279
+ },
280
+ },
274
281
  scenes_recall_scene_65029: {
275
282
  cluster: '65029',
276
283
  type: ['raw', 'attributeReport'],
@@ -752,6 +759,7 @@ module.exports = [
752
759
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_1mtktxdk'},
753
760
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_remypqqm'},
754
761
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_kohbva1f'},
762
+ {modelID: 'TS0505B', manufacturerName: '_TZ3000_luit1t00'},
755
763
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_wslkvrau'},
756
764
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_0rn9qhnu'},
757
765
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_ejctepku'},
@@ -812,7 +820,8 @@ module.exports = [
812
820
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_bfvybixd'},
813
821
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_i2i0bsnv'},
814
822
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_elzv6aia'},
815
- {modelID: 'TS0504B', manufacturerName: '_TZ3210_1elppmba'}],
823
+ {modelID: 'TS0504B', manufacturerName: '_TZ3210_1elppmba'},
824
+ {modelID: 'TS0504B', manufacturerName: '_TZ3210_onejz0gt'}],
816
825
  model: 'TS0504B',
817
826
  vendor: 'TuYa',
818
827
  description: 'Zigbee RGBW light',
@@ -1225,6 +1234,7 @@ module.exports = [
1225
1234
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_nvaik6gk'},
1226
1235
  {modelID: 'TS0502B', manufacturerName: '_TZ3000_armwcncd'},
1227
1236
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_2p6wbry3'},
1237
+ {modelID: 'TS0502B', manufacturerName: '_TZB210_nfzrlz29'},
1228
1238
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_qamcypen'},
1229
1239
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_zdrhqmo0'},
1230
1240
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_2cjfbpy0'},
@@ -1928,8 +1938,8 @@ module.exports = [
1928
1938
  {vendor: 'BlitzWolf', model: 'BW-SHP15'}, {vendor: 'Nous', model: 'A1Z'}, {vendor: 'BlitzWolf', model: 'BW-SHP13'},
1929
1939
  {vendor: 'MatSee Plus', model: 'PJ-ZSW01'}],
1930
1940
  ota: ota.zigbeeOTA,
1931
- fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
1932
- fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1941
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
1942
+ fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1933
1943
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1934
1944
  configure: async (device, coordinatorEndpoint, logger) => {
1935
1945
  const endpoint = device.getEndpoint(1);
@@ -1982,8 +1992,8 @@ module.exports = [
1982
1992
  whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
1983
1993
  {vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}],
1984
1994
  ota: ota.zigbeeOTA,
1985
- fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
1986
- fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1995
+ fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
1996
+ fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1987
1997
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1988
1998
  configure: async (device, coordinatorEndpoint, logger) => {
1989
1999
  const endpoint = device.getEndpoint(1);
@@ -2175,6 +2185,8 @@ module.exports = [
2175
2185
  },
2176
2186
  meta: {multiEndpoint: true},
2177
2187
  configure: async (device, coordinatorEndpoint, logger) => {
2188
+ await device.getEndpoint(1).read('genBasic',
2189
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
2178
2190
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
2179
2191
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2180
2192
  device.powerSource = 'Mains (single phase)';
@@ -2968,7 +2980,7 @@ module.exports = [
2968
2980
  fromZigbee: [fz.ZG204ZL_lms],
2969
2981
  toZigbee: [tz.ZG204ZL_lms],
2970
2982
  exposes: [
2971
- e.occupancy(), e.illuminance(), e.battery(),
2983
+ e.occupancy(), e.illuminance().withUnit('lx'), e.battery(),
2972
2984
  exposes.enum('sensitivity', ea.ALL, ['low', 'medium', 'high'])
2973
2985
  .withDescription('PIR sensor sensitivity (refresh and update only while active)'),
2974
2986
  exposes.enum('keep_time', ea.ALL, ['10', '30', '60', '120'])
package/devices/woox.js CHANGED
@@ -106,6 +106,10 @@ module.exports = [
106
106
  onEvent: tuya.onEventSetTime,
107
107
  exposes: [e.switch(), e.battery()],
108
108
  meta: {disableDefaultResponse: true},
109
+ configure: async (device, coordinatorEndpoint, logger) => {
110
+ const endpoint = device.getEndpoint(1);
111
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
112
+ },
109
113
  },
110
114
  {
111
115
  fingerprint: [{modelID: 'TS0505A', manufacturerName: '_TZ3000_keabpigv'}],
package/devices/xiaomi.js CHANGED
@@ -48,7 +48,7 @@ module.exports = [
48
48
  fromZigbee: [fz.ias_water_leak_alarm_1, fz.aqara_opple, fz.battery],
49
49
  toZigbee: [],
50
50
  exposes: [e.water_leak(), e.battery(), e.battery_low(), e.battery_voltage(), e.device_temperature(), e.power_outage_count(false)],
51
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
51
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
52
52
  configure: async (device, coordinatorEndpoint, logger) => {
53
53
  const endpoint = device.getEndpoint(1);
54
54
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
@@ -62,7 +62,7 @@ module.exports = [
62
62
  description: 'Aqara E1 door & window contact sensor',
63
63
  fromZigbee: [fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
64
64
  toZigbee: [],
65
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
65
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
66
66
  exposes: [e.contact(), e.battery(), e.battery_low(), e.battery_voltage()],
67
67
  configure: async (device, coordinatorEndpoint, logger) => {
68
68
  const endpoint = device.getEndpoint(1);
@@ -78,7 +78,7 @@ module.exports = [
78
78
  description: 'Aqara P1 door & window contact sensor',
79
79
  fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
80
80
  toZigbee: [],
81
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
81
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
82
82
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
83
83
  },
84
84
  {
@@ -198,7 +198,7 @@ module.exports = [
198
198
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4040GL'}, {vendor: 'Xiaomi', model: 'YTC4006CN'},
199
199
  {vendor: 'Xiaomi', model: 'YTC4017CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
200
200
  description: 'MiJia wireless switch',
201
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
201
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
202
202
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_WXKG01LM_action, fz.legacy.WXKG01LM_click],
203
203
  exposes: [e.battery(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release', 'many']), e.battery_voltage(),
204
204
  e.power_outage_count(false)],
@@ -209,7 +209,7 @@ module.exports = [
209
209
  model: 'WXKG11LM',
210
210
  vendor: 'Xiaomi',
211
211
  description: 'Aqara wireless switch',
212
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
212
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
213
213
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release']),
214
214
  e.device_temperature(), e.power_outage_count()],
215
215
  fromZigbee: [fz.xiaomi_multistate_action, fz.xiaomi_WXKG11LM_action, fz.xiaomi_basic,
@@ -221,7 +221,7 @@ module.exports = [
221
221
  model: 'WXKG12LM',
222
222
  vendor: 'Xiaomi',
223
223
  description: 'Aqara wireless switch (with gyroscope)',
224
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
224
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
225
225
  exposes: [e.battery(), e.action(['single', 'double', 'hold', 'release', 'shake']), e.battery_voltage()],
226
226
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_multistate_action, fz.legacy.WXKG12LM_action_click_multistate],
227
227
  toZigbee: [],
@@ -231,7 +231,7 @@ module.exports = [
231
231
  model: 'WXKG03LM_rev1',
232
232
  vendor: 'Xiaomi',
233
233
  description: 'Aqara single key wireless wall switch (2016 model)',
234
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
234
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
235
235
  exposes: [e.battery(), e.action(['single']), e.battery_voltage()],
236
236
  fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG03LM_click],
237
237
  toZigbee: [],
@@ -242,7 +242,7 @@ module.exports = [
242
242
  model: 'WXKG03LM_rev2',
243
243
  vendor: 'Xiaomi',
244
244
  description: 'Aqara single key wireless wall switch (2018 model)',
245
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
245
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
246
246
  exposes: [e.battery(), e.action(['single', 'double', 'hold']), e.battery_voltage()],
247
247
  fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
248
248
  fz.legacy.WXKG03LM_click, fz.legacy.xiaomi_action_click_multistate],
@@ -260,7 +260,7 @@ module.exports = [
260
260
  e.action(['single', 'double', 'hold']),
261
261
  e.battery_voltage()],
262
262
  onEvent: preventReset,
263
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
263
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
264
264
  configure: async (device, coordinatorEndpoint, logger) => {
265
265
  try {
266
266
  const endpoint = device.endpoints[1];
@@ -275,7 +275,7 @@ module.exports = [
275
275
  model: 'WXKG02LM_rev1',
276
276
  vendor: 'Xiaomi',
277
277
  description: 'Aqara double key wireless wall switch (2016 model)',
278
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
278
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
279
279
  exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both']), e.battery_voltage(), e.power_outage_count(false)],
280
280
  fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG02LM_click],
281
281
  toZigbee: [],
@@ -286,7 +286,7 @@ module.exports = [
286
286
  model: 'WXKG02LM_rev2',
287
287
  vendor: 'Xiaomi',
288
288
  description: 'Aqara double key wireless wall switch (2018 model)',
289
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
289
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
290
290
  exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'double_both',
291
291
  'hold_left', 'hold_right', 'hold_both']), e.battery_voltage()],
292
292
  fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
@@ -603,7 +603,7 @@ module.exports = [
603
603
  model: 'WXKG07LM',
604
604
  vendor: 'Xiaomi',
605
605
  description: 'Aqara D1 double key wireless wall switch',
606
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
606
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
607
607
  fromZigbee: [fz.xiaomi_basic, fz.legacy.xiaomi_on_off_action, fz.legacy.xiaomi_multistate_action],
608
608
  toZigbee: [],
609
609
  endpoint: (device) => {
@@ -885,7 +885,7 @@ module.exports = [
885
885
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4042GL'}, {vendor: 'Xiaomi', model: 'YTC4007CN'},
886
886
  {vendor: 'Xiaomi', model: 'YTC4018CN'}],
887
887
  description: 'MiJia temperature & humidity sensor',
888
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
888
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
889
889
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity],
890
890
  toZigbee: [],
891
891
  exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
@@ -895,7 +895,7 @@ module.exports = [
895
895
  model: 'WSDCGQ11LM',
896
896
  vendor: 'Xiaomi',
897
897
  description: 'Aqara temperature, humidity and pressure sensor',
898
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
898
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
899
899
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity, fz.pressure],
900
900
  toZigbee: [],
901
901
  exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
@@ -913,7 +913,7 @@ module.exports = [
913
913
  toZigbee: [],
914
914
  exposes: [e.temperature(), e.humidity(), e.pressure(), e.device_temperature(), e.battery(), e.battery_voltage(),
915
915
  e.power_outage_count(false)],
916
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
916
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
917
917
  configure: async (device, coordinatorEndpoint, logger) => {
918
918
  const endpoint = device.getEndpoint(1);
919
919
  const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
@@ -929,7 +929,7 @@ module.exports = [
929
929
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4041GL'}, {vendor: 'Xiaomi', model: 'YTC4004CN'},
930
930
  {vendor: 'Xiaomi', model: 'YTC4016CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
931
931
  description: 'MiJia human body movement sensor',
932
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
932
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
933
933
  fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout],
934
934
  toZigbee: [],
935
935
  exposes: [e.battery(), e.occupancy(), e.battery_voltage(), e.power_outage_count(false)],
@@ -939,7 +939,7 @@ module.exports = [
939
939
  model: 'RTCGQ11LM',
940
940
  vendor: 'Xiaomi',
941
941
  description: 'Aqara human body movement and illuminance sensor',
942
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
942
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
943
943
  fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance],
944
944
  toZigbee: [],
945
945
  exposes: [e.battery(), e.occupancy(), e.device_temperature(), e.battery_voltage(), e.illuminance_lux().withProperty('illuminance'),
@@ -957,7 +957,7 @@ module.exports = [
957
957
  exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
958
958
  .withDescription('Time interval for detecting actions'),
959
959
  e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
960
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
960
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
961
961
  configure: async (device, coordinatorEndpoint, logger) => {
962
962
  const endpoint = device.getEndpoint(1);
963
963
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
@@ -976,7 +976,7 @@ module.exports = [
976
976
  exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
977
977
  .withDescription('Time interval for detecting actions'),
978
978
  e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
979
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
979
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
980
980
  configure: async (device, coordinatorEndpoint, logger) => {
981
981
  const endpoint = device.getEndpoint(1);
982
982
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
@@ -1004,7 +1004,7 @@ module.exports = [
1004
1004
  'blue LED will blink once when motion is detected. ' +
1005
1005
  'Press pairing button right before changing this otherwise it will fail.'),
1006
1006
  e.device_temperature(), e.battery(), e.battery_voltage()],
1007
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1007
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1008
1008
  configure: async (device, coordinatorEndpoint, logger) => {
1009
1009
  const endpoint = device.getEndpoint(1);
1010
1010
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
@@ -1026,7 +1026,7 @@ module.exports = [
1026
1026
  exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
1027
1027
  .withDescription('Time interval for detecting actions'),
1028
1028
  e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
1029
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1029
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1030
1030
  configure: async (device, coordinatorEndpoint, logger) => {
1031
1031
  const endpoint = device.getEndpoint(1);
1032
1032
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
@@ -1070,7 +1070,7 @@ module.exports = [
1070
1070
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4039GL'}, {vendor: 'Xiaomi', model: 'YTC4005CN'},
1071
1071
  {vendor: 'Xiaomi', model: 'YTC4015CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
1072
1072
  description: 'MiJia door & window contact sensor',
1073
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1073
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1074
1074
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
1075
1075
  toZigbee: [],
1076
1076
  exposes: [e.battery(), e.contact(), e.battery_voltage(), e.power_outage_count(false)],
@@ -1080,7 +1080,7 @@ module.exports = [
1080
1080
  model: 'MCCGQ11LM',
1081
1081
  vendor: 'Xiaomi',
1082
1082
  description: 'Aqara door & window contact sensor',
1083
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1083
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1084
1084
  fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
1085
1085
  toZigbee: [],
1086
1086
  exposes: [e.battery(), e.contact(), e.device_temperature(), e.battery_voltage(), e.power_outage_count(false)],
@@ -1094,7 +1094,7 @@ module.exports = [
1094
1094
  model: 'SJCGQ11LM',
1095
1095
  vendor: 'Xiaomi',
1096
1096
  description: 'Aqara water leak sensor',
1097
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1097
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1098
1098
  fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
1099
1099
  toZigbee: [],
1100
1100
  exposes: [e.battery(), e.water_leak(), e.battery_low(), e.battery_voltage(), e.device_temperature(), e.power_outage_count(false)],
@@ -1104,7 +1104,7 @@ module.exports = [
1104
1104
  model: 'SJCGQ12LM',
1105
1105
  vendor: 'Xiaomi',
1106
1106
  description: 'Aqara T1 water leak sensor',
1107
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1107
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1108
1108
  fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
1109
1109
  toZigbee: [],
1110
1110
  exposes: [e.battery(), e.water_leak(), e.battery_low(), e.tamper(), e.battery_voltage()],
@@ -1115,7 +1115,7 @@ module.exports = [
1115
1115
  model: 'MFKZQ01LM',
1116
1116
  vendor: 'Xiaomi',
1117
1117
  description: 'Mi/Aqara smart home cube',
1118
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1118
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1119
1119
  fromZigbee: [fz.xiaomi_basic, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog],
1120
1120
  exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'), e.device_temperature(), e.power_outage_count(false),
1121
1121
  e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'), e.cube_side('side'),
@@ -1276,7 +1276,7 @@ module.exports = [
1276
1276
  description: 'MiJia Honeywell smoke detector',
1277
1277
  vendor: 'Xiaomi',
1278
1278
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4020RT'}],
1279
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1279
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1280
1280
  fromZigbee: [fz.xiaomi_basic, fz.JTYJGD01LMBW_smoke],
1281
1281
  toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
1282
1282
  exposes: [
@@ -1305,8 +1305,8 @@ module.exports = [
1305
1305
  vendor: 'Xiaomi',
1306
1306
  description: 'Aqara smart natural gas detector',
1307
1307
  fromZigbee: [fz.aqara_opple],
1308
- toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.JTBZ01AQA_gas_sensitivity, tz.aqara_selftest, tz.aqara_mute_buzzer,
1309
- tz.aqara_mute, tz.aqara_linkage_alarm, tz.JTBZ01AQA_state, tz.aqara_power_outage_count],
1308
+ toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.JTBZ01AQA_gas_sensitivity, tz.aqara_selftest, tz.aqara_buzzer,
1309
+ tz.aqara_buzzer_manual, tz.aqara_linkage_alarm, tz.JTBZ01AQA_state, tz.aqara_power_outage_count],
1310
1310
  exposes: [e.gas().withAccess(ea.STATE_GET),
1311
1311
  exposes.numeric('gas_density', ea.STATE_GET).withUnit('%LEL').withDescription('Value of gas concentration'),
1312
1312
  exposes.enum('gas_sensitivity', ea.ALL, ['10%LEL', '15%LEL']).withDescription('Gas concentration value at which ' +
@@ -1314,11 +1314,16 @@ module.exports = [
1314
1314
  exposes.enum('selftest', ea.SET, ['']).withDescription('Starts the self-test process (checking the indicator ' +
1315
1315
  'light and buzzer work properly)'),
1316
1316
  exposes.binary('test', ea.STATE, true, false).withDescription('Self-test in progress'),
1317
- exposes.enum('mute_buzzer', ea.SET, ['']).withDescription('Mute the buzzer for 10 minutes (buzzer cannot be ' +
1318
- 'pre-muted, because this function only works when the alarm is triggered)'),
1319
- exposes.binary('mute', ea.STATE_GET, true, false).withDescription('Buzzer muted'),
1320
- exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a gas leak ' +
1321
- 'is detected, other detectors with this option enabled will also sound the alarm buzzer'),
1317
+ exposes.enum('buzzer', ea.SET, ['mute', 'alarm']).withDescription('The buzzer can be muted and alarmed manually. ' +
1318
+ 'During a gas alarm, the buzzer can be manually muted for 10 minutes ("mute"), but cannot be unmuted manually ' +
1319
+ 'before this timeout expires. The buzzer cannot be pre-muted, as this function only works during a gas alarm. ' +
1320
+ 'During the absence of a gas alarm, the buzzer can be manually alarmed ("alarm") and disalarmed ("mute")'),
1321
+ exposes.binary('buzzer_manual_alarm', ea.STATE_GET, true, false).withDescription('Buzzer alarmed (manually)'),
1322
+ exposes.binary('buzzer_manual_mute', ea.STATE_GET, true, false).withDescription('Buzzer muted (manually)'),
1323
+ exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a gas ' +
1324
+ 'alarm has occurred, then "linkage_alarm_state"=true, and when the gas alarm has ended or the buzzer has ' +
1325
+ 'been manually muted, then "linkage_alarm_state"=false'),
1326
+ exposes.binary('linkage_alarm_state', ea.STATE, true, false).withDescription('"linkage_alarm" is triggered'),
1322
1327
  exposes.binary('state', ea.STATE_GET, 'preparation', 'work').withDescription('"Preparation" or "work" ' +
1323
1328
  '(measurement of the gas concentration value and triggering of an alarm are only performed in the "work" state)'),
1324
1329
  e.power_outage_count().withAccess(ea.STATE_GET)],
@@ -1326,6 +1331,7 @@ module.exports = [
1326
1331
  const endpoint = device.getEndpoint(1);
1327
1332
  await endpoint.read('aqaraOpple', [0x013a], {manufacturerCode: 0x115f});
1328
1333
  await endpoint.read('aqaraOpple', [0x013b], {manufacturerCode: 0x115f});
1334
+ await endpoint.read('aqaraOpple', [0x013d], {manufacturerCode: 0x115f});
1329
1335
  await endpoint.read('aqaraOpple', [0x0126], {manufacturerCode: 0x115f});
1330
1336
  await endpoint.read('aqaraOpple', [0x0139], {manufacturerCode: 0x115f});
1331
1337
  await endpoint.read('aqaraOpple', [0x010c], {manufacturerCode: 0x115f});
@@ -1340,29 +1346,35 @@ module.exports = [
1340
1346
  vendor: 'Xiaomi',
1341
1347
  description: 'Aqara smart smoke detector',
1342
1348
  fromZigbee: [fz.aqara_opple, fz.battery],
1343
- toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.aqara_selftest, tz.aqara_mute_buzzer, tz.aqara_mute,
1349
+ toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.aqara_selftest, tz.aqara_buzzer, tz.aqara_buzzer_manual,
1344
1350
  tz.JYGZ01AQ_heartbeat_indicator, tz.aqara_linkage_alarm],
1345
1351
  exposes: [e.smoke().withAccess(ea.STATE_GET),
1346
1352
  exposes.numeric('smoke_density', ea.STATE_GET).withDescription('Value of smoke concentration'),
1347
- exposes.numeric('smoke_density_dbm', ea.STATE).withUnit('dB/m').withDescription('Value of smoke concentration in dB/m'),
1353
+ exposes.numeric('smoke_density_dbm', ea.STATE_GET).withUnit('dB/m').withDescription('Value of smoke concentration in dB/m'),
1348
1354
  exposes.enum('selftest', ea.SET, ['']).withDescription('Starts the self-test process (checking the indicator ' +
1349
1355
  'light and buzzer work properly)'),
1350
1356
  exposes.binary('test', ea.STATE, true, false).withDescription('Self-test in progress'),
1351
- exposes.enum('mute_buzzer', ea.SET, ['']).withDescription('Mute the buzzer for 80 seconds (buzzer cannot be ' +
1352
- 'pre-muted, because this function only works when the alarm is triggered)'),
1353
- exposes.binary('mute', ea.STATE_GET, true, false).withDescription('Buzzer muted'),
1357
+ exposes.enum('buzzer', ea.SET, ['mute', 'alarm']).withDescription('The buzzer can be muted and alarmed manually. ' +
1358
+ 'During a smoke alarm, the buzzer can be manually muted for 80 seconds ("mute") and unmuted ("alarm"). ' +
1359
+ 'The buzzer cannot be pre-muted, as this function only works during a smoke alarm. ' +
1360
+ 'During the absence of a smoke alarm, the buzzer can be manually alarmed ("alarm") and disalarmed ("mute")'),
1361
+ exposes.binary('buzzer_manual_alarm', ea.STATE_GET, true, false).withDescription('Buzzer alarmed (manually)'),
1362
+ exposes.binary('buzzer_manual_mute', ea.STATE_GET, true, false).withDescription('Buzzer muted (manually)'),
1354
1363
  exposes.binary('heartbeat_indicator', ea.ALL, true, false).withDescription('When this option is enabled then in ' +
1355
1364
  'the normal monitoring state, the green indicator light flashes every 60 seconds'),
1356
1365
  exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a smoke ' +
1357
- 'is detected, other detectors with this option enabled will also sound the alarm buzzer'),
1366
+ 'alarm has occurred, then "linkage_alarm_state"=true, and when the smoke alarm has ended or the buzzer has ' +
1367
+ 'been manually muted, then "linkage_alarm_state"=false'),
1368
+ exposes.binary('linkage_alarm_state', ea.STATE, true, false).withDescription('"linkage_alarm" is triggered'),
1358
1369
  e.battery(), e.battery_voltage(), e.power_outage_count(false)],
1359
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1370
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1360
1371
  configure: async (device, coordinatorEndpoint, logger) => {
1361
1372
  const endpoint = device.getEndpoint(1);
1362
1373
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
1363
1374
  await endpoint.read('aqaraOpple', [0x013a], {manufacturerCode: 0x115f});
1364
1375
  await endpoint.read('aqaraOpple', [0x013b], {manufacturerCode: 0x115f});
1365
1376
  await endpoint.read('aqaraOpple', [0x013c], {manufacturerCode: 0x115f});
1377
+ await endpoint.read('aqaraOpple', [0x013d], {manufacturerCode: 0x115f});
1366
1378
  await endpoint.read('aqaraOpple', [0x0126], {manufacturerCode: 0x115f});
1367
1379
  await endpoint.read('aqaraOpple', [0x014b], {manufacturerCode: 0x115f});
1368
1380
  },
@@ -1382,7 +1394,7 @@ module.exports = [
1382
1394
  model: 'DJT11LM',
1383
1395
  vendor: 'Xiaomi',
1384
1396
  description: 'Aqara vibration sensor',
1385
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1397
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1386
1398
  fromZigbee: [fz.xiaomi_basic, fz.DJT11LM_vibration],
1387
1399
  toZigbee: [tz.DJT11LM_vibration_sensitivity],
1388
1400
  exposes: [
@@ -1608,7 +1620,7 @@ module.exports = [
1608
1620
  ]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
1609
1621
  .withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
1610
1622
  toZigbee: [tz.aqara_opple_operation_mode],
1611
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1623
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1612
1624
  configure: async (device, coordinatorEndpoint, logger) => {
1613
1625
  const endpoint = device.getEndpoint(1);
1614
1626
  await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
@@ -1630,7 +1642,7 @@ module.exports = [
1630
1642
  ]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
1631
1643
  .withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
1632
1644
  toZigbee: [tz.aqara_opple_operation_mode],
1633
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1645
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1634
1646
  configure: async (device, coordinatorEndpoint, logger) => {
1635
1647
  const endpoint = device.getEndpoint(1);
1636
1648
  await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
@@ -1657,7 +1669,7 @@ module.exports = [
1657
1669
  .withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)'),
1658
1670
  e.power_outage_count(false)],
1659
1671
  toZigbee: [tz.aqara_opple_operation_mode],
1660
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1672
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1661
1673
  configure: async (device, coordinatorEndpoint, logger) => {
1662
1674
  const endpoint = device.getEndpoint(1);
1663
1675
  await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
@@ -1674,7 +1686,7 @@ module.exports = [
1674
1686
  description: 'MiJia light intensity sensor',
1675
1687
  fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
1676
1688
  toZigbee: [],
1677
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1689
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1678
1690
  configure: async (device, coordinatorEndpoint, logger) => {
1679
1691
  const endpoint = device.getEndpoint(1);
1680
1692
  await reporting.bind(endpoint, coordinatorEndpoint, ['msIlluminanceMeasurement']);
@@ -1831,7 +1843,7 @@ module.exports = [
1831
1843
  description: 'Aqara wireless remote switch H1 (double rocker)',
1832
1844
  fromZigbee: [fz.battery, fz.xiaomi_multistate_action, fz.aqara_opple, fz.command_toggle],
1833
1845
  toZigbee: [tz.xiaomi_switch_click_mode, tz.aqara_opple_operation_mode],
1834
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}, multiEndpoint: true},
1846
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}, multiEndpoint: true},
1835
1847
  exposes: [
1836
1848
  e.battery(), e.battery_voltage(), e.action([
1837
1849
  'single_left', 'single_right', 'single_both',
@@ -1920,7 +1932,7 @@ module.exports = [
1920
1932
  description: 'Aqara TVOC air quality monitor',
1921
1933
  fromZigbee: [fz.xiaomi_tvoc, fz.battery, fz.temperature, fz.humidity, fz.aqara_opple],
1922
1934
  toZigbee: [],
1923
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
1935
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1924
1936
  exposes: [e.temperature(), e.humidity(), e.voc(), e.device_temperature(), e.battery(), e.battery_voltage()],
1925
1937
  configure: async (device, coordinatorEndpoint, logger) => {
1926
1938
  const endpoint = device.getEndpoint(1);
@@ -1999,7 +2011,7 @@ module.exports = [
1999
2011
  model: 'WXKG13LM',
2000
2012
  vendor: 'Xiaomi',
2001
2013
  description: 'Aqara T1 wireless mini switch',
2002
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2014
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2003
2015
  fromZigbee: [fz.battery, fz.aqara_opple_multistate, fz.aqara_opple],
2004
2016
  toZigbee: [],
2005
2017
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quintuple', 'hold', 'release', 'many'])],
@@ -2015,7 +2027,7 @@ module.exports = [
2015
2027
  description: 'Aqara T1 light intensity sensor',
2016
2028
  fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
2017
2029
  toZigbee: [tz.GZCGQ11LM_detection_period],
2018
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2030
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2019
2031
  exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux(),
2020
2032
  exposes.numeric('detection_period', exposes.access.ALL).withValueMin(1).withValueMax(59).withUnit('s')
2021
2033
  .withDescription('Time interval in seconds to report after light changes')],
@@ -2054,7 +2066,7 @@ module.exports = [
2054
2066
  description: 'Aqara T1 door & window contact sensor',
2055
2067
  fromZigbee: [fz.xiaomi_contact, fz.aqara_opple],
2056
2068
  toZigbee: [],
2057
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2069
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2058
2070
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
2059
2071
  },
2060
2072
  {
@@ -2078,7 +2090,7 @@ module.exports = [
2078
2090
  model: 'ZNXNKG02LM',
2079
2091
  vendor: 'Xiaomi',
2080
2092
  description: 'Aqara knob H1 (wireless)',
2081
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2093
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2082
2094
  exposes: [e.battery(), e.battery_voltage(),
2083
2095
  e.action(['single', 'double', 'hold', 'release', 'start_rotating', 'rotation', 'stop_rotating']),
2084
2096
  exposes.enum('operation_mode', ea.ALL, ['event', 'command']).withDescription('Button mode'),
@@ -2101,7 +2113,7 @@ module.exports = [
2101
2113
  model: 'WXKG16LM',
2102
2114
  vendor: 'Xiaomi',
2103
2115
  description: 'Aqara wireless remote switch E1 (single rocker)',
2104
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2116
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2105
2117
  fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
2106
2118
  toZigbee: [tz.xiaomi_switch_click_mode],
2107
2119
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
@@ -2117,7 +2129,7 @@ module.exports = [
2117
2129
  model: 'WXKG17LM',
2118
2130
  vendor: 'Xiaomi',
2119
2131
  description: 'Aqara E1 double key wireless switch',
2120
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2132
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2121
2133
  exposes: [e.battery(), e.battery_voltage(),
2122
2134
  e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'hold_left', 'hold_right']),
2123
2135
  // eslint-disable-next-line max-len
@@ -2145,7 +2157,7 @@ module.exports = [
2145
2157
  'multi: supports more events like double and hold'),
2146
2158
  exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
2147
2159
  .withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
2148
- meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
2160
+ meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
2149
2161
  configure: async (device, coordinatorEndpoint, logger) => {
2150
2162
  const endpoint1 = device.getEndpoint(1);
2151
2163
  await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
package/devices/yale.js CHANGED
@@ -4,7 +4,7 @@ const tz = require('../converters/toZigbee');
4
4
  const reporting = require('../lib/reporting');
5
5
  const e = exposes.presets;
6
6
 
7
- const lockExtend = (meta) => {
7
+ const lockExtend = (meta, lockStateOptions=null, binds=['closuresDoorLock', 'genPowerCfg']) => {
8
8
  return {
9
9
  fromZigbee: [fz.lock, fz.battery, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response,
10
10
  fz.lock_user_status_response],
@@ -13,8 +13,8 @@ const lockExtend = (meta) => {
13
13
  exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
14
14
  configure: async (device, coordinatorEndpoint, logger) => {
15
15
  const endpoint = device.getEndpoint(1);
16
- await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
17
- await reporting.lockState(endpoint);
16
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
17
+ await reporting.lockState(endpoint, lockStateOptions);
18
18
  await reporting.batteryPercentageRemaining(endpoint);
19
19
  },
20
20
  };
@@ -129,7 +129,7 @@ module.exports = [
129
129
  model: 'YDF40',
130
130
  vendor: 'Yale',
131
131
  description: 'Real living lock / Intelligent biometric digital lock',
132
- extend: lockExtend(),
132
+ extend: lockExtend({}, {max: 900}, ['closuresDoorLock']),
133
133
  },
134
134
  {
135
135
  zigbeeModel: ['06ffff2027'],
package/lib/utils.js CHANGED
@@ -166,8 +166,8 @@ function batteryVoltageToPercentage(voltage, option) {
166
166
  percentage = 0;
167
167
  }
168
168
  percentage = Math.round(percentage);
169
- } else if (option === '3V_2850_3200') {
170
- percentage = toPercentage(voltage, 2850, 3200);
169
+ } else if (option === '3V_2850_3000') {
170
+ percentage = toPercentage(voltage, 2850, 3000);
171
171
  } else if (option === '4LR6AA1_5v') {
172
172
  percentage = toPercentage(voltage, 3000, 4200);
173
173
  } else if (option === '3V_add 1V') {
package/lib/xiaomi.js CHANGED
@@ -392,7 +392,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
392
392
  break;
393
393
  case '163':
394
394
  if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
395
- payload.mute = value === 1;
395
+ payload.buzzer_manual_mute = value === 1;
396
396
  }
397
397
  break;
398
398
  case '164':
@@ -437,7 +437,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
437
437
  break;
438
438
  case '294':
439
439
  if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
440
- payload.mute = value === 1;
440
+ payload.buzzer_manual_mute = value === 1;
441
441
  }
442
442
  break;
443
443
  case '295':
@@ -471,6 +471,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
471
471
  payload.heartbeat_indicator = value === 1;
472
472
  }
473
473
  break;
474
+ case '317':
475
+ if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
476
+ payload.buzzer_manual_alarm = value === 1;
477
+ }
478
+ break;
474
479
  case '322':
475
480
  if (['RTCZCGQ11LM'].includes(model.model)) {
476
481
  payload.presence = {0: false, 1: true, 255: null}[value];
@@ -497,6 +502,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
497
502
  payload.linkage_alarm = value === 1;
498
503
  }
499
504
  break;
505
+ case '332':
506
+ if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
507
+ payload.linkage_alarm_state = value === 1;
508
+ }
509
+ break;
500
510
  case '338':
501
511
  if (['RTCGQ14LM'].includes(model.model)) {
502
512
  payload.trigger_indicator = value === 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.600",
3
+ "version": "14.0.603",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [