zigbee-herdsman-converters 14.0.399 → 14.0.400

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.
@@ -4045,7 +4045,8 @@ const converters = {
4045
4045
  exposes.options.precision('humidity'), exposes.options.calibration('humidity'),
4046
4046
  exposes.options.precision('co2'), exposes.options.calibration('co2'),
4047
4047
  exposes.options.precision('voc'), exposes.options.calibration('voc'),
4048
- exposes.options.precision('formaldehyd'), exposes.options.calibration('formaldehyd')],
4048
+ exposes.options.precision('formaldehyd'), exposes.options.calibration('formaldehyd'),
4049
+ exposes.options.precision('pm25'), exposes.options.calibration('pm25')],
4049
4050
  convert: (model, msg, publish, options, meta) => {
4050
4051
  const dpValue = tuya.firstDpValue(msg, meta, 'tuya_air_quality');
4051
4052
  const dp = dpValue.dp;
@@ -4062,6 +4063,8 @@ const converters = {
4062
4063
  case tuya.dataPoints.tuyaSabFormaldehyd:
4063
4064
  // Not sure which unit this is, supposedly mg/m³, but the value seems way too high.
4064
4065
  return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
4066
+ case tuya.dataPoints.tuyaSahkMP25:
4067
+ return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4065
4068
  default:
4066
4069
  meta.logger.warn(`zigbee-herdsman-converters:TuyaSmartAirBox: Unrecognized DP #${
4067
4070
  dp} with data ${JSON.stringify(dpValue)}`);
@@ -5250,9 +5253,11 @@ const converters = {
5250
5253
  else if (index === 5) {
5251
5254
  if (['JT-BZ-01AQ/A'].includes(model.model)) payload.power_outage_count = value;
5252
5255
  } else if (index === 100) {
5253
- if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
5256
+ if (['QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
5254
5257
  const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
5255
5258
  payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
5259
+ } else if (['WXKG14LM', 'WXKG16LM', 'WXKG17LM'].includes(model.model)) {
5260
+ payload.click_mode = {1: 'fast', 2: 'multi'}[value];
5256
5261
  } else {
5257
5262
  payload.state = value === 1 ? 'ON' : 'OFF';
5258
5263
  }
@@ -5260,9 +5265,15 @@ const converters = {
5260
5265
  if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
5261
5266
  const mapping = model.model === 'QBCZ15LM' ? 'usb' : 'right';
5262
5267
  payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
5268
+ } else if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
5269
+ payload.state_center = value === 1 ? 'ON' : 'OFF';
5263
5270
  } else if (['RTCGQ12LM'].includes(model.model)) {
5264
5271
  payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
5265
5272
  }
5273
+ } else if (index ===102 ) {
5274
+ if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
5275
+ payload.state_right = value === 1 ? 'ON' : 'OFF';
5276
+ }
5266
5277
  } else if (index === 105) payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[value]; // RTCGQ13LM
5267
5278
  else if (index === 149) {
5268
5279
  payload.energy = precisionRound(value, 2); // 0x95
@@ -7229,6 +7240,26 @@ const converters = {
7229
7240
  return {occupancy: (zoneStatus & 1) > 0, tamper: (zoneStatus & 4) > 0};
7230
7241
  },
7231
7242
  },
7243
+ ZM35HQ_attr: {
7244
+ cluster: 'ssIasZone',
7245
+ type: ['attributeReport', 'readResponse'],
7246
+ convert: (model, msg, publish, options, meta) => {
7247
+ let result = {};
7248
+ const data = msg.data;
7249
+ if (data && data.hasOwnProperty('zoneStatus')) {
7250
+ result = converters.ias_occupancy_alarm_1_report.convert(model, msg, publish, options, meta);
7251
+ }
7252
+ if (data && data.hasOwnProperty('currentZoneSensitivityLevel')) {
7253
+ const senslookup = {'0': 'low', '1': 'medium', '2': 'high'};
7254
+ result.sensitivity = senslookup[data.currentZoneSensitivityLevel];
7255
+ }
7256
+ if (data && data.hasOwnProperty('61441')) {
7257
+ const keeptimelookup = {'0': 30, '1': 60, '2': 120};
7258
+ result.keep_time = keeptimelookup[data['61441']];
7259
+ }
7260
+ return result;
7261
+ },
7262
+ },
7232
7263
  tuya_gas: {
7233
7264
  cluster: 'manuSpecificTuya',
7234
7265
  type: ['commandDataResponse'],
@@ -5961,6 +5961,29 @@ const converters = {
5961
5961
  }
5962
5962
  },
5963
5963
  },
5964
+ ZM35HQ_attr: {
5965
+ key: [
5966
+ 'sensitivity', 'keep_time',
5967
+ ],
5968
+ convertSet: async (entity, key, value, meta) => {
5969
+ switch (key) {
5970
+ case 'sensitivity':
5971
+ await entity.write('ssIasZone', {currentZoneSensitivityLevel: {'low': 0, 'medium': 1, 'high': 2}[value]},
5972
+ {sendWhen: 'active'});
5973
+ break;
5974
+ case 'keep_time':
5975
+ await entity.write('ssIasZone', {61441: {value: {'30': 0, '60': 1, '120': 2}[value], type: 0x20}}, {sendWhen: 'active'});
5976
+ break;
5977
+ default: // Unknown key
5978
+ throw new Error(`Unhandled key ${key}`);
5979
+ }
5980
+ },
5981
+ convertGet: async (entity, key, meta) => {
5982
+ // Apparently, reading values may interfere with a commandStatusChangeNotification for changed occupancy.
5983
+ // Therefore, read "zoneStatus" as well.
5984
+ await entity.read('ssIasZone', ['currentZoneSensitivityLevel', 61441, 'zoneStatus'], {sendWhen: 'active'});
5985
+ },
5986
+ },
5964
5987
  TS0210_sensitivity: {
5965
5988
  key: ['sensitivity'],
5966
5989
  convertSet: async (entity, key, value, meta) => {
package/devices/ikea.js CHANGED
@@ -746,10 +746,10 @@ module.exports = [
746
746
  extend: tradfriExtend.light_onoff_brightness_colortemp_color(),
747
747
  },
748
748
  {
749
- zigbeeModel: ['TRADFRIbulbE14WWclear250lm'],
749
+ zigbeeModel: ['TRADFRIbulbE14WWclear250lm', 'TRADFRIbulbE12WWclear250lm'],
750
750
  model: 'LED1935C3',
751
751
  vendor: 'IKEA',
752
- description: 'TRADFRI LED bulb E14 WW clear 250 lumen, dimmable',
752
+ description: 'TRADFRI LED bulb E12/E14 WW clear 250 lumen, dimmable',
753
753
  extend: tradfriExtend.light_onoff_brightness(),
754
754
  },
755
755
  {
@@ -40,7 +40,6 @@ module.exports = [
40
40
  description: 'Motion sensor',
41
41
  fromZigbee: [fz.battery, fz.ias_occupancy_alarm_1],
42
42
  toZigbee: [],
43
- meta: {battery: {dontDividePercentage: true}},
44
43
  exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
45
44
  configure: async (device, coordinatorEndpoint, logger) => {
46
45
  const endpoint = device.getEndpoint(1);
@@ -642,4 +642,35 @@ module.exports = [
642
642
  await reporting.currentSummDelivered(endpoint, {min: 60, change: 1});
643
643
  },
644
644
  },
645
+ {
646
+ zigbeeModel: ['NHMOTION/SWITCH/1'],
647
+ model: '545D6306',
648
+ vendor: 'Schneider Electric',
649
+ description: 'LK FUGA Wiser wireless PIR with relay',
650
+ fromZigbee: [fz.on_off, fz.illuminance, fz.occupancy, fz.occupancy_timeout],
651
+ exposes: [e.switch().withEndpoint('l1'), e.occupancy(), e.illuminance_lux(), e.illuminance(),
652
+ exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(3600)
653
+ .withDescription('Time in seconds after which occupancy is cleared after detecting it')],
654
+ toZigbee: [tz.on_off, tz.occupancy_timeout],
655
+ endpoint: (device) => {
656
+ return {'default': 37, 'l1': 1, 'l2': 37};
657
+ },
658
+ meta: {multiEndpoint: true},
659
+ configure: async (device, coordinatorEndpoint, logger) => {
660
+ const endpoint1 = device.getEndpoint(1);
661
+ const binds1 = ['genBasic', 'genIdentify', 'genOnOff'];
662
+ await reporting.bind(endpoint1, coordinatorEndpoint, binds1);
663
+ await reporting.onOff(endpoint1);
664
+ // read switch state
665
+ await endpoint1.read('genOnOff', ['onOff']);
666
+
667
+ const endpoint37 = device.getEndpoint(37);
668
+ const binds37 = ['msIlluminanceMeasurement', 'msOccupancySensing'];
669
+ await reporting.bind(endpoint37, coordinatorEndpoint, binds37);
670
+ await reporting.occupancy(endpoint37);
671
+ await reporting.illuminance(endpoint37);
672
+ // read occupancy_timeout
673
+ await endpoint37.read('msOccupancySensing', ['pirOToUDelay']);
674
+ },
675
+ },
645
676
  ];
package/devices/tuya.js CHANGED
@@ -89,6 +89,15 @@ module.exports = [
89
89
  toZigbee: [],
90
90
  exposes: [e.temperature(), e.humidity(), e.co2(), e.voc(), e.formaldehyd()],
91
91
  },
92
+ {
93
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_dwcarsat'}],
94
+ model: 'TS0601_smart_air_house_keeper',
95
+ vendor: 'TuYa',
96
+ description: 'Smart air house keeper',
97
+ fromZigbee: [fz.tuya_air_quality],
98
+ toZigbee: [],
99
+ exposes: [e.temperature(), e.humidity(), e.co2(), e.voc(), e.formaldehyd(), e.pm25()],
100
+ },
92
101
  {
93
102
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ggev5fsl'}],
94
103
  model: 'TS0601_gas_sensor',
@@ -230,9 +239,7 @@ module.exports = [
230
239
  {modelID: 'TS0202', manufacturerName: '_TZ3000_mmtwjmaq'},
231
240
  {modelID: 'TS0202', manufacturerName: '_TZ3000_kmh5qpmb'},
232
241
  {modelID: 'TS0202', manufacturerName: '_TYZB01_zwvaj5wy'},
233
- {modelID: 'TS0202', manufacturerName: '_TZ3000_mcxw5ehu'},
234
242
  {modelID: 'TS0202', manufacturerName: '_TZ3000_bsvqrxru'},
235
- {modelID: 'TS0202', manufacturerName: '_TZ3000_msl6wxk9'},
236
243
  {modelID: 'TS0202', manufacturerName: '_TYZB01_tv3wxhcz'},
237
244
  {modelID: 'TS0202', manufacturerName: '_TYZB01_hqbdru35'},
238
245
  {modelID: 'TS0202', manufacturerName: '_TZ3000_tiwq83wk'},
@@ -245,6 +252,19 @@ module.exports = [
245
252
  toZigbee: [],
246
253
  exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
247
254
  },
255
+ {
256
+ fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3000_mcxw5ehu'},
257
+ {modelID: 'TS0202', manufacturerName: '_TZ3000_msl6wxk9'}],
258
+ model: 'ZM-35H-Q',
259
+ vendor: 'TuYa',
260
+ description: 'Motion Sensor',
261
+ fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery, fz.ignore_basic_report, fz.ZM35HQ_attr],
262
+ toZigbee: [tz.ZM35HQ_attr],
263
+ exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery(),
264
+ exposes.enum('sensitivity', ea.ALL, ['low', 'medium', 'high']).withDescription('PIR sensor sensitivity'),
265
+ exposes.enum('keep_time', ea.ALL, ['30', '60', '120']).withDescription('PIR keep time in seconds'),
266
+ ],
267
+ },
248
268
  {
249
269
  fingerprint: [{modelID: 'TS0207', manufacturerName: '_TZ3000_m0vaazab'},
250
270
  {modelID: 'TS0207', manufacturerName: '_TZ3000_ufttklsz'},
@@ -326,8 +346,7 @@ module.exports = [
326
346
  ],
327
347
  },
328
348
  {
329
- fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_oiymh3qu'},
330
- {modelID: 'TS011F', manufacturerName: '_TZ3000_o1jzcxou'}],
349
+ fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_oiymh3qu'}],
331
350
  model: 'TS011F_socket_module',
332
351
  vendor: 'TuYa',
333
352
  description: 'Socket module',
@@ -336,12 +355,15 @@ module.exports = [
336
355
  },
337
356
  {
338
357
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_wxtp7c5y'},
339
- {modelID: 'TS011F', manufacturerName: '_TYZB01_mtunwanm'}],
358
+ {modelID: 'TS011F', manufacturerName: '_TYZB01_mtunwanm'},
359
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_o1jzcxou'}],
340
360
  model: 'TS011F_wall_outlet',
341
361
  vendor: 'TuYa',
342
362
  description: 'In-wall outlet',
343
363
  extend: extend.switch(),
344
- whiteLabel: [{vendor: 'Teekar', model: 'SWP86-01OG'}, {vendor: 'ClickSmart+', model: 'CMA30035'}],
364
+ whiteLabel: [{vendor: 'Teekar', model: 'SWP86-01OG'},
365
+ {vendor: 'ClickSmart+', model: 'CMA30035'},
366
+ {vendor: 'BSEED', model: 'Zigbee Socket'}],
345
367
  },
346
368
  {
347
369
  fingerprint: [{modelID: 'isltm67\u0000', manufacturerName: '_TYST11_pisltm67'}],
@@ -1590,6 +1612,7 @@ module.exports = [
1590
1612
  vendor: 'TuYa',
1591
1613
  description: 'Multiprise with 4 AC outlets and 2 USB super charging ports (16A)',
1592
1614
  extend: extend.switch(),
1615
+ fromZigbee: [fz.on_off_skip_duplicate_transaction],
1593
1616
  exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
1594
1617
  e.switch().withEndpoint('l4')],
1595
1618
  whiteLabel: [{vendor: 'LEELKI', model: 'WP33-EU'}],
package/devices/xiaomi.js CHANGED
@@ -736,9 +736,6 @@ module.exports = [
736
736
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
737
737
  .withDescription('Decoupled mode for left button'),
738
738
  ],
739
- configure: async (device, coordinatorEndpoint, logger) => {
740
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
741
- },
742
739
  onEvent: preventReset,
743
740
  ota: ota.zigbeeOTA,
744
741
  },
@@ -767,9 +764,6 @@ module.exports = [
767
764
  .withDescription('Decoupled mode for right button')
768
765
  .withEndpoint('right'),
769
766
  ],
770
- configure: async (device, coordinatorEndpoint, logger) => {
771
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
772
- },
773
767
  onEvent: preventReset,
774
768
  ota: ota.zigbeeOTA,
775
769
  },
@@ -804,10 +798,8 @@ module.exports = [
804
798
  .withDescription('Decoupled mode for right button')
805
799
  .withEndpoint('right'),
806
800
  ],
807
- configure: async (device, coordinatorEndpoint, logger) => {
808
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
809
- },
810
801
  onEvent: preventReset,
802
+ ota: ota.zigbeeOTA,
811
803
  },
812
804
  {
813
805
  zigbeeModel: ['lumi.sens', 'lumi.sensor_ht'],
@@ -997,7 +989,7 @@ module.exports = [
997
989
  e.voltage().withAccess(ea.STATE), e.current(), e.consumer_connected(), e.led_disabled_night(),
998
990
  e.power_outage_memory(), exposes.binary('auto_off', ea.STATE_SET, true, false)
999
991
  .withDescription('Turn the device automatically off when attached device consumes less than 2W for 20 minutes'),
1000
- exposes.numeric('overload_protection', exposes.access.ALL).withValueMin(100).withValueMax(2200).withUnit('W')
992
+ exposes.numeric('overload_protection', exposes.access.ALL).withValueMin(100).withValueMax(2300).withUnit('W')
1001
993
  .withDescription('Maximum allowed load, turns off if exceeded')],
1002
994
  ota: ota.zigbeeOTA,
1003
995
  },
@@ -1691,7 +1683,7 @@ module.exports = [
1691
1683
  zigbeeModel: ['lumi.plug.macn01'],
1692
1684
  model: 'ZNCZ15LM',
1693
1685
  vendor: 'Xiaomi',
1694
- description: 'Aqara T1 power plug ZigBee',
1686
+ description: 'Aqara smart plug T1 (china standard)',
1695
1687
  fromZigbee: [fz.on_off, fz.xiaomi_power, fz.aqara_opple],
1696
1688
  toZigbee: [tz.on_off, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_led_disabled_night,
1697
1689
  tz.xiaomi_overload_protection, tz.xiaomi_socket_button_lock],
@@ -1700,9 +1692,6 @@ module.exports = [
1700
1692
  e.power_outage_memory(), e.led_disabled_night(), e.button_lock(),
1701
1693
  exposes.numeric('overload_protection', exposes.access.ALL).withValueMin(100).withValueMax(2500).withUnit('W')
1702
1694
  .withDescription('Maximum allowed load, turns off if exceeded')],
1703
- configure: async (device, coordinatorEndpoint, logger) => {
1704
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
1705
- },
1706
1695
  ota: ota.zigbeeOTA,
1707
1696
  },
1708
1697
  {
@@ -1755,7 +1744,7 @@ module.exports = [
1755
1744
  zigbeeModel: ['lumi.plug.sacn03'],
1756
1745
  model: 'QBCZ15LM',
1757
1746
  vendor: 'Xiaomi',
1758
- description: 'Aqara smart wall outlet H1 usb',
1747
+ description: 'Aqara smart wall outlet H1 (USB)',
1759
1748
  fromZigbee: [fz.on_off, fz.xiaomi_power, fz.aqara_opple],
1760
1749
  toZigbee: [tz.on_off, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_led_disabled_night,
1761
1750
  tz.xiaomi_button_switch_mode, tz.xiaomi_overload_protection, tz.xiaomi_socket_button_lock],
@@ -1771,9 +1760,6 @@ module.exports = [
1771
1760
  .withDescription('Control both relay and usb or only the relay with the physical switch button'),
1772
1761
  exposes.numeric('overload_protection', exposes.access.ALL).withValueMin(100).withValueMax(2500).withUnit('W')
1773
1762
  .withDescription('Maximum allowed load, turns off if exceeded')],
1774
- configure: async (device, coordinatorEndpoint, logger) => {
1775
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
1776
- },
1777
1763
  ota: ota.zigbeeOTA,
1778
1764
  },
1779
1765
  {
@@ -1805,9 +1791,6 @@ module.exports = [
1805
1791
  e.current(), e.power_outage_memory(), e.led_disabled_night(), e.button_lock(),
1806
1792
  exposes.numeric('overload_protection', exposes.access.ALL).withValueMin(100).withValueMax(2500).withUnit('W')
1807
1793
  .withDescription('Maximum allowed load, turns off if exceeded')],
1808
- configure: async (device, coordinatorEndpoint, logger) => {
1809
- await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
1810
- },
1811
1794
  ota: ota.zigbeeOTA,
1812
1795
  },
1813
1796
  {
@@ -1873,7 +1856,7 @@ module.exports = [
1873
1856
  model: 'WXKG14LM',
1874
1857
  vendor: 'Xiaomi',
1875
1858
  description: 'Aqara wireless remote switch H1 (single rocker)',
1876
- fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
1859
+ fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple, fz.command_toggle],
1877
1860
  toZigbee: [tz.xiaomi_switch_click_mode, tz.aqara_opple_operation_mode],
1878
1861
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'hold']),
1879
1862
  exposes.enum('click_mode', ea.ALL, ['fast', 'multi'])
package/lib/tuya.js CHANGED
@@ -418,6 +418,9 @@ const dataPoints = {
418
418
  tuyaSabHumidity: 19,
419
419
  tuyaSabVOC: 21,
420
420
  tuyaSabFormaldehyd: 22,
421
+ // tuya Smart Air House Keeper, Multifunctionale air quality detector.
422
+ // CO2, Temp, Humidity, VOC and Formaldehyd same as Smart Air Box
423
+ tuyaSahkMP25: 20,
421
424
  lidlTimer: 5,
422
425
  // Moes MS-105 Dimmer
423
426
  moes105DimmerState1: 1,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.399",
3
+ "version": "14.0.400",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.399",
3
+ "version": "14.0.400",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [