zigbee-herdsman-converters 14.0.449 → 14.0.452

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.
@@ -674,7 +674,9 @@ const converters = {
674
674
  type: ['attributeReport', 'readResponse'],
675
675
  convert: (model, msg, publish, options, meta) => {
676
676
  const result = converters.metering.convert(model, msg, publish, options, meta);
677
- result.power /= 1000;
677
+ if (result.hasOwnProperty('power')) {
678
+ result.power /= 1000;
679
+ }
678
680
  return result;
679
681
  },
680
682
  },
@@ -4176,15 +4178,24 @@ const converters = {
4176
4178
  return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
4177
4179
  case tuya.dataPoints.tuyaSabHumidity:
4178
4180
  return {humidity: calibrateAndPrecisionRoundOptions(value / 10, options, 'humidity')};
4181
+ // DP22: Smart Air Box: Formaldehyd, Smart Air Housekeeper: co2
4182
+ case tuya.dataPoints.tuyaSabFormaldehyd:
4183
+ if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
4184
+ return {co2: calibrateAndPrecisionRoundOptions(value, options, 'co2')};
4185
+ } else {
4186
+ return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
4187
+ }
4188
+ // DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
4179
4189
  case tuya.dataPoints.tuyaSabCO2:
4180
- return {co2: calibrateAndPrecisionRoundOptions(value, options, 'co2')};
4190
+ if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
4191
+ return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4192
+ } else {
4193
+ return {co2: calibrateAndPrecisionRoundOptions(value, options, 'co2')};
4194
+ }
4181
4195
  case tuya.dataPoints.tuyaSabVOC:
4182
4196
  return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc')};
4183
- case tuya.dataPoints.tuyaSabFormaldehyd:
4184
- // Not sure which unit this is, supposedly mg/m³, but the value seems way too high.
4197
+ case tuya.dataPoints.tuyaSahkCH2O:
4185
4198
  return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
4186
- case tuya.dataPoints.tuyaSahkMP25:
4187
- return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4188
4199
  default:
4189
4200
  meta.logger.warn(`zigbee-herdsman-converters:TuyaSmartAirBox: Unrecognized DP #${
4190
4201
  dp} with data ${JSON.stringify(dpValue)}`);
@@ -4437,8 +4448,9 @@ const converters = {
4437
4448
  const dpValue = tuya.firstDpValue(msg, meta, 'tuya_thermostat');
4438
4449
  const dp = dpValue.dp;
4439
4450
  const value = tuya.getDataValue(dpValue);
4440
-
4441
4451
  switch (dp) {
4452
+ case tuya.dataPoints.windowOpen:
4453
+ return {window_open: value};
4442
4454
  case tuya.dataPoints.windowDetection:
4443
4455
  return {
4444
4456
  window_detection: value[0] ? 'ON' : 'OFF',
@@ -2116,7 +2116,7 @@ const converters = {
2116
2116
  'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
2117
2117
  'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM'].includes(meta.mapped.model)) {
2118
2118
  await entity.write('aqaraOpple', {0x0201: {value: value ? 1 : 0, type: 0x10}}, manufacturerOptions.xiaomi);
2119
- } else if (['ZNCZ02LM', 'QBCZ11LM'].includes(meta.mapped.model)) {
2119
+ } else if (['ZNCZ02LM', 'QBCZ11LM', 'LLKZMK11LM'].includes(meta.mapped.model)) {
2120
2120
  const payload = value ?
2121
2121
  [[0xaa, 0x80, 0x05, 0xd1, 0x47, 0x07, 0x01, 0x10, 0x01], [0xaa, 0x80, 0x03, 0xd3, 0x07, 0x08, 0x01]] :
2122
2122
  [[0xaa, 0x80, 0x05, 0xd1, 0x47, 0x09, 0x01, 0x10, 0x00], [0xaa, 0x80, 0x03, 0xd3, 0x07, 0x0a, 0x01]];
@@ -185,4 +185,14 @@ module.exports = [
185
185
  description: 'Zigbee 3.0 LED-controller 1x 8A',
186
186
  extend: extend.light_onoff_brightness(),
187
187
  },
188
+ {
189
+ zigbeeModel: ['ZGRC-TEUR-001'],
190
+ model: '511.544',
191
+ vendor: 'Iluminize',
192
+ description: 'Zigbee 3.0 wall dimmer RGBW 4 zone',
193
+ fromZigbee: [fz.command_move_to_color, fz.command_move_hue, fz.command_on, fz.command_off, fz.command_move],
194
+ toZigbee: [],
195
+ exposes: [e.action(['recall_*', 'on', 'off', 'color_move', 'color_temperature_move',
196
+ 'hue_move', 'brightness_step_down', 'brightness_step_up', 'brightness_move_down', 'brightness_move_up', 'brightness_stop'])],
197
+ },
188
198
  ];
package/devices/innr.js CHANGED
@@ -95,6 +95,14 @@ module.exports = [
95
95
  extend: extend.light_onoff_brightness(),
96
96
  meta: {turnsOffAtBrightness1: true},
97
97
  },
98
+ {
99
+ zigbeeModel: ['RB 266'],
100
+ model: 'RB 266',
101
+ vendor: 'Innr',
102
+ description: 'E27 bulb',
103
+ extend: extend.light_onoff_brightness(),
104
+ meta: {turnsOffAtBrightness1: true},
105
+ },
98
106
  {
99
107
  zigbeeModel: ['RF 265'],
100
108
  model: 'RF 265',
@@ -55,6 +55,22 @@ module.exports = [
55
55
  extend: extend.ledvance.light_onoff_brightness_colortemp_color(),
56
56
  ota: ota.ledvance,
57
57
  },
58
+ {
59
+ zigbeeModel: ['PAR16S RGBW'],
60
+ model: 'AC33906',
61
+ vendor: 'LEDVANCE',
62
+ description: 'SMART+ spot GU10 multicolor RGBW',
63
+ extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
64
+ ota: ota.ledvance,
65
+ },
66
+ {
67
+ zigbeeModel: ['PAR16S TW'],
68
+ model: 'AC33905',
69
+ vendor: 'LEDVANCE',
70
+ description: 'SMART+ spot GU10 tunable white',
71
+ extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
72
+ ota: ota.ledvance,
73
+ },
58
74
  {
59
75
  zigbeeModel: ['B40 TW Z3'],
60
76
  model: '4058075208414',
@@ -63,6 +79,14 @@ module.exports = [
63
79
  extend: extend.ledvance.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
64
80
  ota: ota.ledvance,
65
81
  },
82
+ {
83
+ zigbeeModel: ['P40S TW'],
84
+ model: 'AC33903',
85
+ vendor: 'LEDVANCE',
86
+ description: 'SMART+ classic P 40 E14 tunable white',
87
+ extend: extend.ledvance.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
88
+ ota: ota.ledvance,
89
+ },
66
90
  {
67
91
  zigbeeModel: ['FLEX RGBW Z3'],
68
92
  model: '4058075208339',
package/devices/lixee.js CHANGED
@@ -509,6 +509,14 @@ function getCurrentConfig(device, options, logger=console) {
509
509
  break;
510
510
  }
511
511
 
512
+ // Filter exposed attributes with user whitelist
513
+ if (options && options.hasOwnProperty('tic_command_whitelist')) {
514
+ const tic_commands_str = options['tic_command_whitelist'].toUpperCase();
515
+ if (tic_commands_str !== 'ALL') {
516
+ const tic_commands = tic_commands_str.split(',').map((a) => a.trim());
517
+ myExpose = myExpose.filter((a) => tic_commands.includes(a.exposes.name));
518
+ }
519
+ }
512
520
 
513
521
  return myExpose;
514
522
  }
@@ -547,6 +555,7 @@ const definition = {
547
555
  .withDescription(`Overrides the automatic current tarif. This option will exclude unnecesary attributes. Open a issue to support more of them. Default: auto`),
548
556
  exposes.options.precision(`kWh`),
549
557
  exposes.numeric(`measurement_poll_chunk`, ea.SET).withValueMin(1).withDescription(`During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requieres Z2M restart. Default: 1`),
558
+ exposes.text(`tic_command_whitelist`, ea.SET).withDescription(`List of TIC commands to be exposed (separated by comma). Reconfigure device after change. Default: all`),
550
559
  ],
551
560
  configure: async (device, coordinatorEndpoint, logger, options) => {
552
561
  const endpoint = device.getEndpoint(1);
@@ -558,7 +567,11 @@ const definition = {
558
567
  clustersDef._0xFF66, /* liXeePrivate */
559
568
  ]);
560
569
 
561
- await endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null});
570
+ await endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null})
571
+ .catch((e) => {
572
+ // https://github.com/Koenkk/zigbee2mqtt/issues/11674
573
+ logger.warn(`Failed to read zigbee attributes: ${e}`);
574
+ });
562
575
 
563
576
  const configReportings = [];
564
577
  const suscribeNew = getCurrentConfig(device, options, logger).filter((e) => e.reportable);
@@ -599,7 +612,11 @@ const definition = {
599
612
  onEvent: async (type, data, device, options) => {
600
613
  const endpoint = device.getEndpoint(1);
601
614
  if (type === 'start') {
602
- endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null});
615
+ endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null})
616
+ .catch((e) => {
617
+ // https://github.com/Koenkk/zigbee2mqtt/issues/11674
618
+ console.warn(`Failed to read zigbee attributes: ${e}`);
619
+ });
603
620
  } else if (type === 'stop') {
604
621
  clearInterval(globalStore.getValue(device, 'interval'));
605
622
  globalStore.clearValue(device, 'interval');
@@ -621,7 +638,11 @@ const definition = {
621
638
  // Split array by chunks
622
639
  for (i = 0, j = targ.length; i < j; i += measurement_poll_chunk) {
623
640
  await endpoint
624
- .read(cluster, targ.slice(i, i + measurement_poll_chunk), {manufacturerCode: null});
641
+ .read(cluster, targ.slice(i, i + measurement_poll_chunk), {manufacturerCode: null})
642
+ .catch((e) => {
643
+ // https://github.com/Koenkk/zigbee2mqtt/issues/11674
644
+ console.warn(`Failed to read zigbee attributes: ${e}`);
645
+ });
625
646
  }
626
647
  }
627
648
  }
@@ -759,6 +759,15 @@ module.exports = [
759
759
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
760
760
  ota: ota.zigbeeOTA,
761
761
  },
762
+ {
763
+ zigbeeModel: ['LTA012'],
764
+ model: '929002335105',
765
+ vendor: 'Philips',
766
+ description: 'Hue white ambiance E26 1600lm with Bluetooth',
767
+ ota: ota.zigbeeOTA,
768
+ meta: {turnsOffAtBrightness1: true},
769
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
770
+ },
762
771
  {
763
772
  zigbeeModel: ['LTA008'],
764
773
  model: '9290022267A',
@@ -2435,6 +2444,15 @@ module.exports = [
2435
2444
  extend: hueExtend.light_onoff_brightness_colortemp(),
2436
2445
  ota: ota.zigbeeOTA,
2437
2446
  },
2447
+ {
2448
+ zigbeeModel: ['929003047101'],
2449
+ model: '929003047101',
2450
+ vendor: 'Philips',
2451
+ description: 'Hue White ambiance Milliskin (round)',
2452
+ meta: {turnsOffAtBrightness1: true},
2453
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2454
+ ota: ota.zigbeeOTA,
2455
+ },
2438
2456
  {
2439
2457
  zigbeeModel: ['5047131P9', '5047131P6'],
2440
2458
  model: '5047131P9',
@@ -2508,7 +2526,7 @@ module.exports = [
2508
2526
  ota: ota.zigbeeOTA,
2509
2527
  },
2510
2528
  {
2511
- zigbeeModel: ['5309331P6', '5309330P6', '929003046301_03'],
2529
+ zigbeeModel: ['5309331P6', '5309330P6', '929003046301_03', '929003046301_02'],
2512
2530
  model: '5309331P6',
2513
2531
  vendor: 'Philips',
2514
2532
  description: 'Hue White ambiance Runner triple spotlight',
@@ -2776,7 +2794,7 @@ module.exports = [
2776
2794
  ota: ota.zigbeeOTA,
2777
2795
  },
2778
2796
  {
2779
- zigbeeModel: ['915005997501'],
2797
+ zigbeeModel: ['915005997501', '915005997401'],
2780
2798
  model: '915005997501',
2781
2799
  vendor: 'Philips',
2782
2800
  description: 'Hue Bluetooth white & color ambiance ceiling lamp Infuse large',
@@ -2810,4 +2828,13 @@ module.exports = [
2810
2828
  extend: hueExtend.light_onoff_brightness(),
2811
2829
  ota: ota.zigbeeOTA,
2812
2830
  },
2831
+ {
2832
+ zigbeeModel: ['LTO005', '929002980901'],
2833
+ model: '929002980901',
2834
+ vendor: 'Philips',
2835
+ description: 'Hue white ambiance G40 E26 filament globe with Bluetooth',
2836
+ meta: {turnsOffAtBrightness1: true},
2837
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [222, 454]}),
2838
+ ota: ota.zigbeeOTA,
2839
+ },
2813
2840
  ];
@@ -20,9 +20,10 @@ module.exports = [
20
20
  model: '3RSS008Z',
21
21
  vendor: 'Third Reality',
22
22
  description: 'RealitySwitch Plus',
23
- fromZigbee: [fz.on_off],
23
+ fromZigbee: [fz.on_off, fz.battery],
24
24
  toZigbee: [tz.on_off, tz.ignore_transition],
25
- exposes: [e.switch()],
25
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
26
+ exposes: [e.switch(), e.battery(), e.battery_voltage()],
26
27
  },
27
28
  {
28
29
  zigbeeModel: ['3RSS007Z'],
package/devices/tuya.js CHANGED
@@ -143,7 +143,8 @@ module.exports = [
143
143
  description: 'Smart air house keeper',
144
144
  fromZigbee: [fz.tuya_air_quality],
145
145
  toZigbee: [],
146
- exposes: [e.temperature(), e.humidity(), e.co2(), e.voc(), e.formaldehyd(), e.pm25()],
146
+ exposes: [e.temperature(), e.humidity(), e.co2(), e.voc(), e.formaldehyd().withUnit('ppm'),
147
+ e.pm25().withValueMin(0).withValueMax(999).withValueStep(1)],
147
148
  },
148
149
  {
149
150
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_7bztmfm1'}],
@@ -228,6 +229,7 @@ module.exports = [
228
229
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_kohbva1f'},
229
230
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_wslkvrau'},
230
231
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_0rn9qhnu'},
232
+ {modelID: 'TS0505B', manufacturerName: '_TZ3210_ejctepku'},
231
233
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_bicjqpg4'},
232
234
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_jmiuubkz'},
233
235
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_cmaky9gq'},
@@ -235,7 +237,8 @@ module.exports = [
235
237
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_k1pe6ibm'},
236
238
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_bfwvfyx1'},
237
239
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_leyz4rju'},
238
- {modelID: 'TS0505B', manufacturerName: '_TZ3210_jd3z4yig'}],
240
+ {modelID: 'TS0505B', manufacturerName: '_TZ3210_jd3z4yig'},
241
+ {modelID: 'TS0505B', manufacturerName: '_TZ3210_dgdjiw1c'}],
239
242
  model: 'TS0505B',
240
243
  vendor: 'TuYa',
241
244
  description: 'Zigbee RGB+CCT light',
@@ -882,6 +885,27 @@ module.exports = [
882
885
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
883
886
  },
884
887
  },
888
+ {
889
+ fingerprint: [{modelID: 'TS0002', manufacturerName: '_TZ3000_fisb3ajo'}],
890
+ model: 'TS0002_switch_module_2',
891
+ vendor: 'TuYa',
892
+ description: '2 gang switch module',
893
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior]),
894
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior]),
895
+ exposes: [
896
+ e.switch().withEndpoint('l1'),
897
+ e.switch().withEndpoint('l2'),
898
+ exposes.presets.power_on_behavior(),
899
+ ],
900
+ endpoint: (device) => {
901
+ return {'l1': 1, 'l2': 2};
902
+ },
903
+ meta: {multiEndpoint: true},
904
+ configure: async (device, coordinatorEndpoint, logger) => {
905
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
906
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
907
+ },
908
+ },
885
909
  {
886
910
  fingerprint: [{modelID: 'TS0003', manufacturerName: '_TZ3000_vsasbzkf'},
887
911
  {modelID: 'TS0003', manufacturerName: '_TZ3000_odzoiovu'}],
@@ -1038,7 +1062,9 @@ module.exports = [
1038
1062
  tz.tuya_thermostat_window_detect, tz.tuya_thermostat_schedule, tz.tuya_thermostat_week, tz.tuya_thermostat_away_preset,
1039
1063
  tz.tuya_thermostat_schedule_programming_mode],
1040
1064
  exposes: [
1041
- e.child_lock(), e.window_detection(), e.battery_low(), e.valve_detection(), e.position(),
1065
+ e.child_lock(), e.window_detection(),
1066
+ exposes.binary('window_open', ea.STATE).withDescription('Window open?'),
1067
+ e.battery_low(), e.valve_detection(), e.position(),
1042
1068
  exposes.climate().withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
1043
1069
  .withLocalTemperature(ea.STATE).withSystemMode(['heat', 'auto', 'off'], ea.STATE_SET,
1044
1070
  'Mode of this device, in the `heat` mode the TS0601 will remain continuously heating, i.e. it does not regulate ' +
package/devices/xiaomi.js CHANGED
@@ -1305,12 +1305,13 @@ module.exports = [
1305
1305
  description: 'Aqara wireless relay controller',
1306
1306
  fromZigbee: [fz.xiaomi_switch_basic, fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off, fz.xiaomi_basic_raw],
1307
1307
  meta: {multiEndpoint: true},
1308
- toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power],
1308
+ toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power, tz.xiaomi_switch_power_outage_memory],
1309
1309
  endpoint: (device) => {
1310
1310
  return {'l1': 1, 'l2': 2};
1311
1311
  },
1312
1312
  exposes: [e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.voltage(), e.current(),
1313
1313
  e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.power_outage_count(false),
1314
+ e.power_outage_memory(),
1314
1315
  exposes.binary('interlock', ea.STATE_SET, true, false)
1315
1316
  .withDescription('Enabling prevents both relais being on at the same time'),
1316
1317
  ],
package/lib/tuya.js CHANGED
@@ -258,6 +258,7 @@ const dataPoints = {
258
258
  scheduleWorkday: 112,
259
259
  scheduleHoliday: 113,
260
260
  awayTemp: 114,
261
+ windowOpen: 115,
261
262
  autoLock: 116,
262
263
  awayDays: 117,
263
264
  // Manufacturer specific
@@ -420,7 +421,9 @@ const dataPoints = {
420
421
  tuyaSabFormaldehyd: 22,
421
422
  // tuya Smart Air House Keeper, Multifunctionale air quality detector.
422
423
  // CO2, Temp, Humidity, VOC and Formaldehyd same as Smart Air Box
423
- tuyaSahkMP25: 20,
424
+ tuyaSahkMP25: 2,
425
+ tuyaSahkCO2: 22,
426
+ tuyaSahkFormaldehyd: 20,
424
427
  // Tuya CO (carbon monoxide) smart air box
425
428
  tuyaSabCOalarm: 1,
426
429
  tuyaSabCO: 2,
package/lib/xiaomi.js CHANGED
@@ -129,7 +129,11 @@ const buffer2DataObject = (meta, model, buffer) => {
129
129
  }
130
130
  }
131
131
 
132
- if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: Processed buffer into data ${JSON.stringify(dataObject)}`);
132
+ if (meta.logger) {
133
+ meta.logger.debug(`${model.zigbeeModel}: Processed buffer into data ${JSON.stringify(dataObject,
134
+ (key, value) => typeof value === 'bigint' ? value.toString() : value)}`);
135
+ }
136
+
133
137
 
134
138
  return dataObject;
135
139
  };