zigbee-herdsman-converters 14.0.514 → 14.0.517

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.
@@ -4359,7 +4359,8 @@ const converters = {
4359
4359
  // DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
4360
4360
  case tuya.dataPoints.tuyaSabCO2:
4361
4361
  if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
4362
- if (value === 0xaaab) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
4362
+ // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
4363
+ if (value === 0xaaac || value === 0xaaab) return;
4363
4364
  return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4364
4365
  } else if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
4365
4366
  return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd') / 100};
@@ -5927,6 +5928,29 @@ const converters = {
5927
5928
  return result;
5928
5929
  },
5929
5930
  },
5931
+ xiaomi_curtain_hagl04_status: {
5932
+ cluster: 'genMultistateOutput',
5933
+ type: ['attributeReport'],
5934
+ convert: (model, msg, publish, options, meta) => {
5935
+ let running = false;
5936
+ const data = msg.data;
5937
+ const lookup = {
5938
+ 0: 'closing',
5939
+ 1: 'opening',
5940
+ 2: 'stop',
5941
+ };
5942
+ if (data && data.hasOwnProperty('presentValue')) {
5943
+ const value = data['presentValue'];
5944
+ if (value < 2) {
5945
+ running = true;
5946
+ }
5947
+ return {
5948
+ motor_state: lookup[value],
5949
+ running: running,
5950
+ };
5951
+ }
5952
+ },
5953
+ },
5930
5954
  xiaomi_curtain_acn002_status: {
5931
5955
  cluster: 'genMultistateOutput',
5932
5956
  type: ['attributeReport'],
package/devices/ecodim.js CHANGED
@@ -126,4 +126,11 @@ module.exports = [
126
126
  description: 'Zigbee LED filament light dimmable E27, globe G125, flame 2200K',
127
127
  extend: extend.light_onoff_brightness(),
128
128
  },
129
+ {
130
+ fingerprint: [{modelID: 'CCT Light', manufacturerName: 'ZigBee/CCT', manufacturerID: 4137}],
131
+ model: 'ED-10041',
132
+ vendor: 'EcoDim',
133
+ description: 'Zigbee LED filament light dimmable E27, edison ST64, flame 2200K',
134
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
135
+ },
129
136
  ];
package/devices/heiman.js CHANGED
@@ -453,6 +453,15 @@ module.exports = [
453
453
  toZigbee: [],
454
454
  exposes: [e.gas(), e.battery_low(), e.tamper()],
455
455
  },
456
+ {
457
+ zigbeeModel: ['SGPHM-I1'],
458
+ model: 'SGPHM-I1',
459
+ vendor: 'HEIMAN',
460
+ description: 'Propane gas sensor',
461
+ fromZigbee: [fz.ias_gas_alarm_1],
462
+ toZigbee: [],
463
+ exposes: [e.gas(), e.battery_low(), e.tamper()],
464
+ },
456
465
  {
457
466
  fingerprint: [{modelID: 'Vibration-N', manufacturerName: 'HEIMAN'}],
458
467
  model: 'HS1VS-N',
package/devices/moes.js CHANGED
@@ -118,7 +118,7 @@ module.exports = [
118
118
  onEvent: tuya.onEventSetLocalTime,
119
119
  },
120
120
  {
121
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_amp6tsvy'}],
121
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_amp6tsvy'}, {modelID: 'TS0601', manufacturerName: '_TZE200_tviaymwx'}],
122
122
  model: 'ZTS-EU_1gang',
123
123
  vendor: 'Moes',
124
124
  description: 'Wall touch light switch (1 gang)',
@@ -4,6 +4,16 @@ const extend = require('../lib/extend');
4
4
  const e = exposes.presets;
5
5
 
6
6
  module.exports = [
7
+ {
8
+ zigbeeModel: ['501.34'],
9
+ model: '501.34',
10
+ vendor: 'Paulmann',
11
+ description: 'Smart switch 4 buttons white',
12
+ fromZigbee: [fz.command_on, fz.command_off, fz.battery],
13
+ toZigbee: [],
14
+ exposes: [e.battery(), e.action(['on_1', 'off_1', 'on_2', 'off_2'])],
15
+ meta: {multiEndpoint: true},
16
+ },
7
17
  {
8
18
  zigbeeModel: ['H036-0007'],
9
19
  model: '929.66',
@@ -465,7 +465,7 @@ module.exports = [
465
465
  ota: ota.zigbeeOTA,
466
466
  },
467
467
  {
468
- zigbeeModel: ['LCT026', '7602031P7', '7602031U7'],
468
+ zigbeeModel: ['LCT026', '7602031P7', '7602031U7', '7602031N6'],
469
469
  model: '7602031P7',
470
470
  vendor: 'Philips',
471
471
  description: 'Hue Go with Bluetooth',
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['RDM-35104001'],
6
+ model: '35104001',
7
+ vendor: 'Rademacher',
8
+ description: 'addZ white + colour',
9
+ extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 555]}),
10
+ },
11
+ ];
package/devices/robb.js CHANGED
@@ -7,6 +7,27 @@ const e = exposes.presets;
7
7
  const ea = exposes.access;
8
8
 
9
9
  module.exports = [
10
+ {
11
+ zigbeeModel: ['ROB_200-050-0'],
12
+ model: 'ROB_200-050-0',
13
+ vendor: 'ROBB',
14
+ description: '4 port switch with 2 usb ports (no metering)',
15
+ extend: extend.switch(),
16
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
17
+ e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
18
+ endpoint: (device) => {
19
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
20
+ },
21
+ meta: {multiEndpoint: true},
22
+ whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9023A(EU)'}],
23
+ configure: async (device, coordinatorEndpoint, logger) => {
24
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
25
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
26
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
27
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
28
+ await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
29
+ },
30
+ },
10
31
  {
11
32
  zigbeeModel: ['ROB_200-006-0'],
12
33
  model: 'ROB_200-006-0',
@@ -6,6 +6,26 @@ const extend = require('../lib/extend');
6
6
  const e = exposes.presets;
7
7
 
8
8
  module.exports = [
9
+ {
10
+ zigbeeModel: ['SR-ZG9023A-EU'],
11
+ model: 'SR-ZG9023A-EU',
12
+ vendor: 'Sunricher',
13
+ description: '4 ports switch with 2 usb ports (no metering)',
14
+ extend: extend.switch(),
15
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
16
+ e.switch().withEndpoint('l3'), e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
17
+ endpoint: (device) => {
18
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
19
+ },
20
+ meta: {multiEndpoint: true},
21
+ configure: async (device, coordinatorEndpoint, logger) => {
22
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
23
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
24
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
25
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
26
+ await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
27
+ },
28
+ },
9
29
  {
10
30
  zigbeeModel: ['ON/OFF(2CH)'],
11
31
  model: 'UP-SA-9127D',
package/devices/tuya.js CHANGED
@@ -13,7 +13,8 @@ const utils = require('../lib/utils');
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
15
  '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
16
- '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw'];
16
+ '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit',
17
+ '_TZ3000_cjrngdr3', '_TZ3000_zloso4jk'];
17
18
 
18
19
  const tzLocal = {
19
20
  TS0504B_color: {
@@ -592,7 +593,8 @@ module.exports = [
592
593
  },
593
594
  },
594
595
  {
595
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aqnazj70'}, {modelID: 'TS0601', manufacturerName: 'TZE200_k6jhsr0q'}],
596
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aqnazj70'}, {modelID: 'TS0601', manufacturerName: '_TZE200_k6jhsr0q'},
597
+ {modelID: 'TS0601', manufacturerName: '_TZE200_di3tfv5b'}],
596
598
  model: 'TS0601_switch_4_gang',
597
599
  vendor: 'TuYa',
598
600
  description: '4 gang switch',
@@ -628,7 +630,8 @@ module.exports = [
628
630
  },
629
631
  },
630
632
  {
631
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_kyfqmmyl'}],
633
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_kyfqmmyl'},
634
+ {modelID: 'TS0601', manufacturerName: '_TZE200_2hf7x9n3'}],
632
635
  model: 'TS0601_switch_3_gang',
633
636
  vendor: 'TuYa',
634
637
  description: '3 gang switch',
@@ -713,6 +716,8 @@ module.exports = [
713
716
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_pgq2qvyv'},
714
717
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_nvaik6gk'},
715
718
  {modelID: 'TS0502B', manufacturerName: '_TZ3000_armwcncd'},
719
+ {modelID: 'TS0502B', manufacturerName: '_TZ3210_2p6wbry3'},
720
+ {modelID: 'TS0502B', manufacturerName: '_TZ3210_qamcypen'},
716
721
  ],
717
722
  model: 'TS0502B',
718
723
  vendor: 'TuYa',
@@ -948,6 +953,8 @@ module.exports = [
948
953
  },
949
954
  meta: {multiEndpoint: true},
950
955
  configure: async (device, coordinatorEndpoint, logger) => {
956
+ const ep1 = device.getEndpoint(1);
957
+ await ep1.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
951
958
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
952
959
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
953
960
  },
@@ -1382,6 +1389,7 @@ module.exports = [
1382
1389
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1383
1390
  configure: async (device, coordinatorEndpoint, logger) => {
1384
1391
  const endpoint = device.getEndpoint(1);
1392
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
1385
1393
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
1386
1394
  await reporting.rmsVoltage(endpoint, {change: 5});
1387
1395
  await reporting.rmsCurrent(endpoint, {change: 50});
@@ -1418,15 +1426,11 @@ module.exports = [
1418
1426
  .withDescription('Plug LED indicator mode'), e.child_lock()],
1419
1427
  },
1420
1428
  {
1421
- fingerprint: [
1422
- {modelID: 'TS011F', manufacturerName: '_TZ3000_gjnozsaz', applicationVersion: 74},
1423
- {modelID: 'TS011F', manufacturerName: '_TZ3000_cehuw1lw', applicationVersion: 74},
1424
- ]
1425
- .concat(...TS011Fplugs.map((manufacturerName) => {
1426
- return [69, 68, 65, 64].map((applicationVersion) => {
1427
- return {modelID: 'TS011F', manufacturerName, applicationVersion};
1428
- });
1429
- })),
1429
+ fingerprint: [].concat(...TS011Fplugs.map((manufacturerName) => {
1430
+ return [69, 68, 65, 64].map((applicationVersion) => {
1431
+ return {modelID: 'TS011F', manufacturerName, applicationVersion};
1432
+ });
1433
+ })),
1430
1434
  model: 'TS011F_plug_3',
1431
1435
  description: 'Smart plug (with power monitoring by polling)',
1432
1436
  vendor: 'TuYa',
package/devices/ubisys.js CHANGED
@@ -16,10 +16,11 @@ module.exports = [
16
16
  e.action([
17
17
  'toggle', 'on', 'off', 'recall_*',
18
18
  'brightness_move_up', 'brightness_move_down', 'brightness_stop',
19
- ])],
19
+ ]),
20
+ e.power_on_behavior()],
20
21
  fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
21
- fz.command_stop],
22
- toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup],
22
+ fz.command_stop, fz.power_on_behavior],
23
+ toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup, tz.power_on_behavior],
23
24
  endpoint: (device) => {
24
25
  return {'l1': 1, 's1': 2, 'meter': 3};
25
26
  },
@@ -57,10 +58,11 @@ module.exports = [
57
58
  e.action([
58
59
  'toggle', 'on', 'off', 'recall_*',
59
60
  'brightness_move_up', 'brightness_move_down', 'brightness_stop',
60
- ])],
61
+ ]),
62
+ e.power_on_behavior()],
61
63
  fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
62
- fz.command_stop],
63
- toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup],
64
+ fz.command_stop, fz.power_on_behavior],
65
+ toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup, tz.power_on_behavior],
64
66
  endpoint: (device) => {
65
67
  return {'l1': 1, 's1': 2, 'meter': 4};
66
68
  },
@@ -99,10 +101,11 @@ module.exports = [
99
101
  e.power().withAccess(ea.STATE_GET).withEndpoint('meter').withProperty('power'),
100
102
  e.action(['toggle_s1', 'toggle_s2', 'on_s1', 'on_s2', 'off_s1', 'off_s2', 'recall_*_s1', 'recal_*_s2', 'brightness_move_up_s1',
101
103
  'brightness_move_up_s2', 'brightness_move_down_s1', 'brightness_move_down_s2', 'brightness_stop_s1',
102
- 'brightness_stop_s2'])],
104
+ 'brightness_stop_s2']),
105
+ e.power_on_behavior().withEndpoint('l1'), e.power_on_behavior().withEndpoint('l2')],
103
106
  fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
104
- fz.command_stop],
105
- toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup],
107
+ fz.command_stop, fz.power_on_behavior],
108
+ toZigbee: [tz.on_off, tz.metering_power, tz.ubisys_device_setup, tz.power_on_behavior],
106
109
  endpoint: (device) => {
107
110
  return {'l1': 1, 'l2': 2, 's1': 3, 's2': 4, 'meter': 5};
108
111
  },
@@ -32,6 +32,8 @@ module.exports = [
32
32
  extend: extend.switch(),
33
33
  meta: {multiEndpoint: true},
34
34
  configure: async (device, coordinatorEndpoint, logger) => {
35
+ await device.getEndpoint(1).read('genBasic',
36
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
35
37
  for (const ID of [1, 2, 3, 4, 5]) {
36
38
  await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ['genOnOff']);
37
39
  }
package/devices/xiaomi.js CHANGED
@@ -48,22 +48,23 @@ module.exports = [
48
48
  fromZigbee: [fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
49
49
  toZigbee: [],
50
50
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
51
- exposes: [e.contact(), e.battery(), e.battery_low(), e.battery_voltage(), e.tamper()],
51
+ exposes: [e.contact(), e.battery(), e.battery_low(), e.battery_voltage()],
52
+ configure: async (device, coordinatorEndpoint, logger) => {
53
+ const endpoint = device.getEndpoint(1);
54
+ await endpoint.read('genPowerCfg', ['batteryVoltage']);
55
+ },
56
+ // OTA request: "fieldControl":0, "manufacturerCode":4447, "imageType":10635
57
+ ota: ota.zigbeeOTA,
52
58
  },
53
59
  {
54
60
  zigbeeModel: ['lumi.magnet.ac01'],
55
61
  model: 'MCCGQ13LM',
56
62
  vendor: 'Xiaomi',
57
63
  description: 'Aqara P1 door & window contact sensor',
58
- fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
64
+ fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
59
65
  toZigbee: [],
60
66
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
61
67
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
62
- configure: async (device, coordinatorEndpoint, logger) => {
63
- const endpoint = device.getEndpoint(1);
64
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
65
- await reporting.batteryVoltage(endpoint);
66
- },
67
68
  },
68
69
  {
69
70
  zigbeeModel: ['lumi.dimmer.rcbac1'],
@@ -641,6 +642,7 @@ module.exports = [
641
642
  'left_single', 'left_double', 'center_single', 'center_double', 'right_single', 'right_double',
642
643
  'single_left_center', 'double_left_center', 'single_left_right', 'double_left_right',
643
644
  'single_center_right', 'double_center_right', 'single_all', 'double_all']),
645
+ e.power_outage_count(),
644
646
  ],
645
647
  onEvent: preventReset,
646
648
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -1329,7 +1331,7 @@ module.exports = [
1329
1331
  model: 'ZNCLDJ12LM',
1330
1332
  vendor: 'Xiaomi',
1331
1333
  description: 'Aqara B1 curtain motor',
1332
- fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.battery, fz.xiaomi_curtain_position_tilt],
1334
+ fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt, fz.xiaomi_curtain_hagl04_status],
1333
1335
  toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
1334
1336
  onEvent: async (type, data, device) => {
1335
1337
  // The position (genAnalogOutput.presentValue) reported via an attribute contains an invaid value
@@ -1340,12 +1342,9 @@ module.exports = [
1340
1342
  },
1341
1343
  exposes: [e.cover_position().setAccess('state', ea.ALL), e.battery(),
1342
1344
  exposes.binary('running', ea.STATE, true, false)
1343
- .withDescription('Whether the motor is moving or not')],
1344
- configure: async (device, coordinatorEndpoint, logger) => {
1345
- const endpoint = device.endpoints[0];
1346
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
1347
- await reporting.batteryPercentageRemaining(endpoint);
1348
- },
1345
+ .withDescription('Whether the motor is moving or not'),
1346
+ exposes.enum('motor_state', ea.STATE, ['closing', 'opening', 'stop'])
1347
+ .withDescription('The current state of the motor.'), e.power_outage_count()],
1349
1348
  ota: ota.zigbeeOTA,
1350
1349
  },
1351
1350
  {
@@ -1581,6 +1580,7 @@ module.exports = [
1581
1580
  device.type = 'Router';
1582
1581
  device.save();
1583
1582
  },
1583
+ ota: ota.zigbeeOTA,
1584
1584
  },
1585
1585
  {
1586
1586
  zigbeeModel: ['lumi.switch.n0acn2'],
@@ -1909,15 +1909,10 @@ module.exports = [
1909
1909
  model: 'MCCGQ12LM',
1910
1910
  vendor: 'Xiaomi',
1911
1911
  description: 'Aqara T1 door & window contact sensor',
1912
- fromZigbee: [fz.xiaomi_contact, fz.battery],
1912
+ fromZigbee: [fz.xiaomi_contact, fz.aqara_opple],
1913
1913
  toZigbee: [],
1914
1914
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
1915
1915
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
1916
- configure: async (device, coordinatorEndpoint, logger) => {
1917
- const endpoint = device.getEndpoint(1);
1918
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
1919
- await reporting.batteryVoltage(endpoint);
1920
- },
1921
1916
  },
1922
1917
  {
1923
1918
  zigbeeModel: ['lumi.plug.sacn02'],
package/lib/xiaomi.js CHANGED
@@ -154,7 +154,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
154
154
  break;
155
155
  case '2':
156
156
  if (['JT-BZ-01AQ/A'].includes(model.model)) {
157
- payload.power_outage_count = value;
157
+ payload.power_outage_count = value - 1;
158
158
  }
159
159
  break;
160
160
  case '3':
@@ -168,22 +168,26 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
168
168
  payload.mode_switch = {4: 'anti_flicker_mode', 1: 'quick_mode'}[value];
169
169
  break;
170
170
  case '5':
171
- if (['Mains (single phase)', 'DC Source'].includes(meta.device.powerSource)) {
172
- payload.power_outage_count = value;
171
+ if (['Mains (single phase)', 'DC Source'].includes(meta.device.powerSource) || ['ZNCLDJ12LM'].includes(model.model)) {
172
+ payload.power_outage_count = value - 1;
173
173
  }
174
174
  break;
175
175
  case '10':
176
176
  payload.switch_type = {1: 'toggle', 2: 'momentary'}[value];
177
177
  break;
178
178
  case '11':
179
- if (!['JT-BZ-01AQ/A'].includes(model.model)) {
179
+ if (['JT-BZ-01AQ/A', 'QBKG25LM'].includes(model.model)) {
180
+ // We don't know what the value means for these devices.
181
+ // https://github.com/Koenkk/zigbee2mqtt/issues/12451
182
+ } else {
180
183
  payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
181
184
  // DEPRECATED: remove illuminance_lux here.
182
185
  payload.illuminance_lux = calibrateAndPrecisionRoundOptions(value, options, 'illuminance_lux');
183
186
  }
184
187
  break;
185
188
  case '100':
186
- if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM', 'LLKZMK11LM', 'QBKG12LM', 'QBKG03LM'].includes(model.model)) {
189
+ if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM', 'LLKZMK11LM', 'QBKG12LM', 'QBKG03LM', 'QBKG25LM']
190
+ .includes(model.model)) {
187
191
  let mapping;
188
192
  switch (model.model) {
189
193
  case 'QBCZ15LM':
@@ -212,7 +216,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
212
216
  } else if (['RTCGQ11LM'].includes(model.model)) {
213
217
  // It contains the occupancy, but in z2m we use a custom timer to do it, so we ignore it
214
218
  // payload.occupancy = value === 1;
215
- } else if (['MCCGQ11LM'].includes(model.model)) {
219
+ } else if (['MCCGQ11LM', 'MCCGQ14LM'].includes(model.model)) {
216
220
  payload.contact = value === 0;
217
221
  } else if (['SJCGQ11LM'].includes(model.model)) {
218
222
  // Ignore the message. It seems not reliable. See discussion here https://github.com/Koenkk/zigbee2mqtt/issues/12018
@@ -251,7 +255,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
251
255
  if (humidity >= 0 && humidity <= 100) {
252
256
  payload.humidity = calibrateAndPrecisionRoundOptions(humidity, options, 'humidity');
253
257
  }
254
- } else if (['ZNJLBL01LM'].includes(model.model)) {
258
+ } else if (['ZNJLBL01LM', 'ZNCLDJ12LM'].includes(model.model)) {
255
259
  payload.battery = value;
256
260
  } else if (['RTCZCGQ11LM'].includes(model.model)) {
257
261
  payload.presence = {0: false, 1: true, 255: null}[value];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.514",
3
+ "version": "14.0.517",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -38,7 +38,7 @@
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^2.2.0",
41
- "zigbee-herdsman": "^0.14.28"
41
+ "zigbee-herdsman": "^0.14.30"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",