zigbee-herdsman-converters 14.0.500 → 14.0.503

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.
@@ -2562,42 +2562,51 @@ const converters = {
2562
2562
  const dpValue = tuya.firstDpValue(msg, meta, 'neo_nas_pd07');
2563
2563
  const dp = dpValue.dp;
2564
2564
  const value = tuya.getDataValue(dpValue);
2565
- if (dp === 101) return {occupancy: value > 0 ? true : false};
2566
- else if (dp === 102) {
2565
+ switch (dp) {
2566
+ case tuya.dataPoints.neoOccupancy:
2567
+ return {occupancy: value > 0 ? true : false};
2568
+ case 102:
2567
2569
  return {
2568
2570
  power_type: {0: 'battery_full', 1: 'battery_high', 2: 'battery_medium', 3: 'battery_low', 4: 'usb'}[value],
2569
2571
  battery_low: value === 3,
2570
2572
  };
2571
- } else if (dp === 103) {
2573
+ case tuya.dataPoints.neoTamper:
2572
2574
  return {tamper: value > 0 ? true : false};
2573
- } else if (dp === 104) {
2575
+ case 104:
2574
2576
  return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
2575
- } else if (dp === 105) {
2577
+ case 105:
2576
2578
  return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
2577
- } else if (dp === tuya.dataPoints.neoMinTemp) {
2579
+ case tuya.dataPoints.neoMinTemp:
2578
2580
  return {temperature_min: value};
2579
- } else if (dp === tuya.dataPoints.neoMaxTemp) {
2581
+ case tuya.dataPoints.neoMaxTemp:
2580
2582
  return {temperature_max: value};
2581
- } else if (dp === tuya.dataPoints.neoMinHumidity) {
2583
+ case tuya.dataPoints.neoMinHumidity:
2582
2584
  return {humidity_min: value};
2583
- } else if (dp === tuya.dataPoints.neoMaxHumidity) {
2585
+ case tuya.dataPoints.neoMaxHumidity:
2584
2586
  return {humidity_max: value};
2585
- } else if (dp === 113) {
2587
+ case tuya.dataPoints.neoTempScale:
2588
+ return {temperature_scale: value ? '°C' : '°F'};
2589
+ case 111:
2590
+ return {unknown_111: value ? 'ON' : 'OFF'};
2591
+ case 112:
2592
+ return {unknown_112: value ? 'ON' : 'OFF'};
2593
+ case tuya.dataPoints.neoTempHumidityAlarm:
2586
2594
  return {alarm: {0: 'over_temperature', 1: 'over_humidity',
2587
2595
  2: 'below_min_temperature', 3: 'below_min_humdity', 4: 'off'}[value]};
2588
- } else {
2589
- meta.logger.warn(`fromZigbee.neo_nas_pd07: Unrecognized DP #${dp} with data ${JSON.stringify(dpValue)}`);
2596
+ default: // Unknown code
2597
+ meta.logger.warn(`fz.neo_nas_pd07: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
2590
2598
  }
2591
2599
  },
2592
2600
  },
2593
2601
  neo_t_h_alarm: {
2594
2602
  cluster: 'manuSpecificTuya',
2595
2603
  type: ['commandDataReport', 'commandDataResponse'],
2604
+ options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
2605
+ exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
2596
2606
  convert: (model, msg, publish, options, meta) => {
2597
2607
  const dpValue = tuya.firstDpValue(msg, meta, 'neo_t_h_alarm');
2598
2608
  const dp = dpValue.dp;
2599
2609
  const value = tuya.getDataValue(dpValue);
2600
-
2601
2610
  switch (dp) {
2602
2611
  case tuya.dataPoints.neoAlarm:
2603
2612
  return {alarm: value};
@@ -2610,9 +2619,9 @@ const converters = {
2610
2619
  case tuya.dataPoints.neoDuration: // 0x0267 [0,0,0,10] duration alarm in second
2611
2620
  return {duration: value};
2612
2621
  case tuya.dataPoints.neoTemp: // 0x0269 [0,0,0,240] temperature
2613
- return {temperature: (value / 10).toFixed(1)};
2622
+ return {temperature: calibrateAndPrecisionRoundOptions((value / 10), options, 'temperature')};
2614
2623
  case tuya.dataPoints.neoHumidity: // 0x026A [0,0,0,36] humidity
2615
- return {humidity: value};
2624
+ return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
2616
2625
  case tuya.dataPoints.neoMinTemp: // 0x026B [0,0,0,18] min alarm temperature
2617
2626
  return {temperature_min: value};
2618
2627
  case tuya.dataPoints.neoMaxTemp: // 0x026C [0,0,0,27] max alarm temperature
@@ -2633,7 +2642,7 @@ const converters = {
2633
2642
  case tuya.dataPoints.neoVolume: // 0x0474 [0]/[1]/[2] Volume 0-max, 2-low
2634
2643
  return {volume: {2: 'low', 1: 'medium', 0: 'high'}[value]};
2635
2644
  default: // Unknown code
2636
- meta.logger.warn(`Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
2645
+ meta.logger.warn(`fz.neo_t_h_alarm: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
2637
2646
  }
2638
2647
  },
2639
2648
  },
@@ -4309,14 +4318,19 @@ const converters = {
4309
4318
  // DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
4310
4319
  case tuya.dataPoints.tuyaSabCO2:
4311
4320
  if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
4321
+ if (value === 0xaaab) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
4312
4322
  return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4313
4323
  } else if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
4314
- return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
4324
+ return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd') / 100};
4315
4325
  } else {
4316
4326
  return {co2: calibrateAndPrecisionRoundOptions(value, options, 'co2')};
4317
4327
  }
4318
4328
  case tuya.dataPoints.tuyaSabVOC:
4319
- return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc')};
4329
+ if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
4330
+ return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc') / 10};
4331
+ } else {
4332
+ return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc')};
4333
+ }
4320
4334
  case tuya.dataPoints.tuyaSahkFormaldehyd:
4321
4335
  return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
4322
4336
  default:
@@ -4737,7 +4751,7 @@ const converters = {
4737
4751
  }
4738
4752
  return {brightness: mapNumberRange(value, 10, 1000, 0, 254)};
4739
4753
  }
4740
- } else if (meta.device.manufacturerName === '_TZE200_3p5ydos3') {
4754
+ } else if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots'].includes(meta.device.manufacturerName)) {
4741
4755
  if (dpValue.dp === tuya.dataPoints.eardaDimmerLevel) {
4742
4756
  return {brightness: mapNumberRange(value, 0, 1000, 0, 254)};
4743
4757
  } else if (dpValue.dp === tuya.dataPoints.dimmerMinLevel) {
@@ -7258,14 +7272,14 @@ const converters = {
7258
7272
  const dpValue = tuya.firstDpValue(msg, meta, 'ZB003X');
7259
7273
  const dp = dpValue.dp;
7260
7274
  const value = tuya.getDataValue(dpValue);
7261
-
7262
7275
  switch (dp) {
7263
7276
  case tuya.dataPoints.fantemTemp:
7264
- return {temperature: calibrateAndPrecisionRoundOptions((value / 10).toFixed(1), options, 'temperature')};
7277
+ return {temperature: calibrateAndPrecisionRoundOptions((value / 10), options, 'temperature')};
7265
7278
  case tuya.dataPoints.fantemHumidity:
7266
7279
  return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
7267
7280
  case tuya.dataPoints.fantemBattery:
7268
- return {battery: value};
7281
+ // second battery level, first battery is reported by fz.battery
7282
+ return {battery2: value};
7269
7283
  case tuya.dataPoints.fantemReportingTime:
7270
7284
  return {reporting_time: value};
7271
7285
  case tuya.dataPoints.fantemTempCalibration:
@@ -7281,12 +7295,11 @@ const converters = {
7281
7295
  case tuya.dataPoints.fantemMotionEnable:
7282
7296
  return {pir_enable: value};
7283
7297
  case tuya.dataPoints.fantemLedEnable:
7284
- return {led_enable: value};
7298
+ return {led_enable: value ? false : true};
7285
7299
  case tuya.dataPoints.fantemReportingEnable:
7286
7300
  return {reporting_enable: value};
7287
7301
  default:
7288
- meta.logger.warn(`zigbee-herdsman-converters:FantemZB003X: Unrecognized DP #${
7289
- dp} with data ${JSON.stringify(dpValue)}`);
7302
+ meta.logger.warn(`fz.ZB003X: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
7290
7303
  }
7291
7304
  },
7292
7305
  },
@@ -7296,7 +7309,7 @@ const converters = {
7296
7309
  convert: (model, msg, publish, options, meta) => {
7297
7310
  const data = msg.data;
7298
7311
  const senslookup = {'0': 'low', '1': 'medium', '2': 'high'};
7299
- const keeptimelookup = {'0': 0, '1': 30, '2': 60, '3': 120, '4': 240};
7312
+ const keeptimelookup = {'0': 0, '1': 30, '2': 60, '3': 120, '4': 240, '5': 480};
7300
7313
  if (data && data.hasOwnProperty('currentZoneSensitivityLevel')) {
7301
7314
  const value = data.currentZoneSensitivityLevel;
7302
7315
  return {sensitivity: senslookup[value]};
@@ -7326,12 +7339,11 @@ const converters = {
7326
7339
  case tuya.dataPoints.fantemPowerSupplyMode:
7327
7340
  return {power_supply_mode: {0: 'unknown', 1: 'no_neutral', 2: 'with_neutral'}[value]};
7328
7341
  case tuya.dataPoints.fantemExtSwitchType:
7329
- return {ext_switch_type: {0: 'unknown', 1: 'toggle_sw', 2: 'momentary_sw', 3: 'rotary_sw',
7330
- 4: 'auto_config'}[value]};
7342
+ return {switch_type: {0: 'unknown', 1: 'toggle', 2: 'momentary', 3: 'rotary', 4: 'auto_config'}[value]};
7331
7343
  case tuya.dataPoints.fantemLoadDetectionMode:
7332
7344
  return {load_detection_mode: {0: 'none', 1: 'first_power_on', 2: 'every_power_on'}[value]};
7333
7345
  case tuya.dataPoints.fantemExtSwitchStatus:
7334
- return {ext_switch_status: value};
7346
+ return {switch_status: value};
7335
7347
  case tuya.dataPoints.fantemControlMode:
7336
7348
  return {control_mode: {0: 'ext_switch', 1: 'remote', 2: 'both'}[value]};
7337
7349
  case 111:
@@ -8399,6 +8411,52 @@ const converters = {
8399
8411
  return result;
8400
8412
  },
8401
8413
  },
8414
+ tuya_smart_human_presense_sensor: {
8415
+ cluster: 'manuSpecificTuya',
8416
+ type: ['commandDataResponse', 'commandDataReport'],
8417
+ convert: (model, msg, publish, options, meta) => {
8418
+ const dpValue = tuya.firstDpValue(msg, meta, 'tuya_smart_human_presense_sensor');
8419
+ const dp = dpValue.dp;
8420
+ const value = tuya.getDataValue(dpValue);
8421
+ let result = null;
8422
+ switch (dp) {
8423
+ case tuya.dataPoints.tshpsPresenceState:
8424
+ result = {presence: {0: false, 1: true}[value]};
8425
+ break;
8426
+ case tuya.dataPoints.tshpscSensitivity:
8427
+ result = {radar_sensitivity: value};
8428
+ break;
8429
+ case tuya.dataPoints.tshpsMinimumRange:
8430
+ result = {minimum_range: value/100};
8431
+ break;
8432
+ case tuya.dataPoints.tshpsMaximumRange:
8433
+ result = {maximum_range: value/100};
8434
+ break;
8435
+ case tuya.dataPoints.tshpsTargetDistance:
8436
+ result = {target_distance: value/100};
8437
+ break;
8438
+ case tuya.dataPoints.tshpsDetectionDelay:
8439
+ result = {detection_delay: value/10};
8440
+ break;
8441
+ case tuya.dataPoints.tshpsFadingTime:
8442
+ result = {fading_time: value/10};
8443
+ break;
8444
+ case tuya.dataPoints.tshpsIlluminanceLux:
8445
+ result = {illuminance_lux: value};
8446
+ break;
8447
+ case tuya.dataPoints.tshpsCLI: // not recognize
8448
+ result = {cli: value};
8449
+ break;
8450
+ case tuya.dataPoints.tshpsSelfTest:
8451
+ result = {self_test: tuya.tuyaHPSCheckingResult [value]};
8452
+ break;
8453
+ default:
8454
+ meta.logger
8455
+ .warn(`fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP ${dp} with data ${JSON.stringify(dpValue)}`);
8456
+ }
8457
+ return result;
8458
+ },
8459
+ },
8402
8460
  // #endregion
8403
8461
 
8404
8462
  // #region Ignore converters (these message dont need parsing).
@@ -5531,7 +5531,7 @@ const converters = {
5531
5531
  },
5532
5532
  },
5533
5533
  neo_nas_pd07: {
5534
- key: ['temperature_max', 'temperature_min', 'humidity_max', 'humidity_min'],
5534
+ key: ['temperature_max', 'temperature_min', 'humidity_max', 'humidity_min', 'temperature_scale', 'unknown_111', 'unknown_112'],
5535
5535
  convertSet: async (entity, key, value, meta) => {
5536
5536
  switch (key) {
5537
5537
  case 'temperature_max':
@@ -5546,8 +5546,17 @@ const converters = {
5546
5546
  case 'humidity_min':
5547
5547
  await tuya.sendDataPointValue(entity, tuya.dataPoints.neoMinHumidity, value);
5548
5548
  break;
5549
+ case 'temperature_scale':
5550
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.neoTempScale, value === '°C');
5551
+ break;
5552
+ case 'unknown_111':
5553
+ await tuya.sendDataPointBool(entity, 111, value === 'ON');
5554
+ break;
5555
+ case 'unknown_112':
5556
+ await tuya.sendDataPointBool(entity, 112, value === 'ON');
5557
+ break;
5549
5558
  default: // Unknown key
5550
- throw new Error(`toZigbee.neo_nas_pd07: Unhandled key ${key}`);
5559
+ throw new Error(`tz.neo_nas_pd07: Unhandled key ${key}`);
5551
5560
  }
5552
5561
  },
5553
5562
  },
@@ -5593,7 +5602,7 @@ const converters = {
5593
5602
  await tuya.sendDataPointBool(entity, tuya.dataPoints.neoHumidityAlarm, value);
5594
5603
  break;
5595
5604
  default: // Unknown key
5596
- throw new Error(`Unhandled key ${key}`);
5605
+ throw new Error(`tz.neo_t_h_alarm: Unhandled key ${key}`);
5597
5606
  }
5598
5607
  },
5599
5608
  },
@@ -5624,7 +5633,10 @@ const converters = {
5624
5633
  },
5625
5634
  },
5626
5635
  nous_lcd_temperature_humidity_sensor: {
5627
- key: ['min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert'],
5636
+ key: [
5637
+ 'min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert',
5638
+ 'min_humidity', 'max_humidity', 'report_interval',
5639
+ ],
5628
5640
  convertSet: async (entity, key, value, meta) => {
5629
5641
  switch (key) {
5630
5642
  case 'temperature_unit_convert':
@@ -5639,6 +5651,15 @@ const converters = {
5639
5651
  case 'temperature_sensitivity':
5640
5652
  await tuya.sendDataPointValue(entity, tuya.dataPoints.nousTempSensitivity, Math.round(value * 10));
5641
5653
  break;
5654
+ case 'min_humidity':
5655
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinHumi, Math.round(value * 10));
5656
+ break;
5657
+ case 'max_humidity':
5658
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMaxHumi, Math.round(value * 10));
5659
+ break;
5660
+ case 'report_interval':
5661
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousReportInterval, value);
5662
+ break;
5642
5663
  default: // Unknown key
5643
5664
  meta.logger.warn(`Unhandled key ${key}`);
5644
5665
  }
@@ -6469,48 +6490,49 @@ const converters = {
6469
6490
  convertSet: async (entity, key, value, meta) => {
6470
6491
  switch (key) {
6471
6492
  case 'reporting_time':
6472
- await tuya.sendDataPointValue(entity, 102, value, 'sendData');
6493
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemReportingTime, value, 'sendData');
6473
6494
  break;
6474
6495
  case 'temperature_calibration':
6475
6496
  value = Math.round(value * 10);
6476
6497
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6477
- await tuya.sendDataPointValue(entity, 104, value, 'sendData');
6498
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemTempCalibration, value, 'sendData');
6478
6499
  break;
6479
6500
  case 'humidity_calibration':
6480
6501
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6481
- await tuya.sendDataPointValue(entity, 105, value, 'sendData');
6502
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemHumidityCalibration, value, 'sendData');
6482
6503
  break;
6483
6504
  case 'illuminance_calibration':
6484
6505
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6485
- await tuya.sendDataPointValue(entity, 106, value, 'sendData');
6506
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemLuxCalibration, value, 'sendData');
6486
6507
  break;
6487
6508
  case 'pir_enable':
6488
- await tuya.sendDataPointBool(entity, 109, value, 'sendData');
6509
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemMotionEnable, value, 'sendData');
6489
6510
  break;
6490
6511
  case 'led_enable':
6491
- await tuya.sendDataPointBool(entity, 111, value, 'sendData');
6512
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemLedEnable, value === false, 'sendData');
6492
6513
  break;
6493
6514
  case 'reporting_enable':
6494
- await tuya.sendDataPointBool(entity, 112, value, 'sendData');
6515
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemReportingEnable, value, 'sendData');
6495
6516
  break;
6496
6517
  case 'sensitivity':
6497
6518
  await entity.write('ssIasZone', {currentZoneSensitivityLevel: {'low': 0, 'medium': 1, 'high': 2}[value]});
6498
6519
  break;
6499
6520
  case 'keep_time':
6500
- await entity.write('ssIasZone', {61441: {value: {'0': 0, '30': 1, '60': 2, '120': 3, '240': 4}[value], type: 0x20}});
6521
+ await entity.write('ssIasZone', {61441: {value: {'0': 0, '30': 1, '60': 2, '120': 3,
6522
+ '240': 4, '480': 5}[value], type: 0x20}});
6501
6523
  break;
6502
6524
  default: // Unknown key
6503
- throw new Error(`Unhandled key ${key}`);
6525
+ throw new Error(`tz.ZB003X: Unhandled key ${key}`);
6504
6526
  }
6505
6527
  },
6506
6528
  },
6507
6529
  ZB006X_settings: {
6508
- key: ['ext_switch_type', 'load_detection_mode', 'control_mode'],
6530
+ key: ['switch_type', 'load_detection_mode', 'control_mode'],
6509
6531
  convertSet: async (entity, key, value, meta) => {
6510
6532
  switch (key) {
6511
- case 'ext_switch_type':
6512
- await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemExtSwitchType, {'unknown': 0, 'toggle_sw': 1,
6513
- 'momentary_sw': 2, 'rotary_sw': 3, 'auto_config': 4}[value], 'sendData');
6533
+ case 'switch_type':
6534
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemExtSwitchType, {'unknown': 0, 'toggle': 1,
6535
+ 'momentary': 2, 'rotary': 3, 'auto_config': 4}[value], 'sendData');
6514
6536
  break;
6515
6537
  case 'load_detection_mode':
6516
6538
  await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemLoadDetectionMode, {'none': 0, 'first_power_on': 1,
@@ -7363,6 +7385,30 @@ const converters = {
7363
7385
  }
7364
7386
  },
7365
7387
  },
7388
+ tuya_smart_human_presense_sensor: {
7389
+ key: ['radar_sensitivity', 'minimum_range', 'maximum_range', 'detection_delay', 'fading_time'],
7390
+ convertSet: async (entity, key, value, meta) => {
7391
+ switch (key) {
7392
+ case 'radar_sensitivity':
7393
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpscSensitivity, value);
7394
+ break;
7395
+ case 'minimum_range':
7396
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMinimumRange, value*100);
7397
+ break;
7398
+ case 'maximum_range':
7399
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMaximumRange, value*100);
7400
+ break;
7401
+ case 'detection_delay':
7402
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsDetectionDelay, value*10);
7403
+ break;
7404
+ case 'fading_time':
7405
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsFadingTime, value*10);
7406
+ break;
7407
+ default: // Unknown Key
7408
+ meta.logger.warn(`toZigbee.tuya_smart_human_presense_sensor: Unhandled Key ${key}`);
7409
+ }
7410
+ },
7411
+ },
7366
7412
  // #endregion
7367
7413
 
7368
7414
  // #region Ignore converters
package/devices/fantem.js CHANGED
@@ -20,9 +20,9 @@ module.exports = [
20
20
  exposes: [e.light_brightness(),
21
21
  e.action(['on', 'off', 'brightness_move_down', 'brightness_move_up', 'brightness_stop']),
22
22
  exposes.enum('control_mode', ea.STATE_SET, ['ext_switch', 'remote', 'both']).withDescription('Control mode'),
23
- exposes.enum('ext_switch_type', ea.STATE_SET, ['unknown', 'toggle_sw', 'momentary_sw', 'rotary_sw', 'auto_config'])
23
+ exposes.enum('switch_type', ea.STATE_SET, ['unknown', 'toggle', 'momentary', 'rotary', 'auto_config'])
24
24
  .withDescription('External switch type'),
25
- exposes.numeric('ext_switch_status', ea.STATE).withDescription('External switch status')
25
+ exposes.numeric('switch_status', ea.STATE).withDescription('External switch status')
26
26
  .withValueMin(-10000).withValueMax(10000),
27
27
  exposes.enum('load_detection_mode', ea.STATE_SET, ['none', 'first_power_on', 'every_power_on'])
28
28
  .withDescription('Load detection mode'),
@@ -43,30 +43,33 @@ module.exports = [
43
43
  // https://github.com/Koenkk/zigbee2mqtt/issues/9057#issuecomment-1007742130
44
44
  await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
45
45
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
46
- await reporting.onOff(endpoint);
47
46
  },
48
47
  },
49
48
  {
50
- fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'}, {modelID: 'TS0202', manufacturerName: '_TZ3210_zmy9hjay'}],
49
+ fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'},
50
+ {modelID: 'TS0202', manufacturerName: '_TZ3210_zmy9hjay'}],
51
51
  model: 'ZB003-X',
52
52
  vendor: 'Fantem',
53
53
  description: '4 in 1 multi sensor',
54
54
  fromZigbee: [fz.battery, fz.ignore_basic_report, fz.illuminance, fz.ZB003X, fz.ZB003X_attr, fz.ZB003X_occupancy],
55
55
  toZigbee: [tz.ZB003X],
56
- exposes: [e.occupancy(), e.tamper(), e.battery(), e.illuminance(), e.illuminance_lux().withUnit('lx'), e.temperature(),
57
- e.humidity(), exposes.numeric('reporting_time', ea.STATE_SET).withDescription('Reporting interval in minutes')
58
- .withValueMin(0).withValueMax(1440),
59
- exposes.numeric('temperature_calibration', ea.STATE_SET).withDescription('Temperature calibration')
56
+ exposes: [e.occupancy(), e.tamper(), e.illuminance_lux(), e.illuminance(), e.temperature(), e.humidity(),
57
+ e.battery(), e.battery_voltage(),
58
+ exposes.numeric('battery2', ea.STATE).withUnit('%').withDescription('Remaining battery 2 in %'),
59
+ exposes.numeric('illuminance_calibration', ea.STATE_SET).withDescription('Illuminance calibration in lux')
60
60
  .withValueMin(-20).withValueMax(20),
61
+ exposes.numeric('temperature_calibration', ea.STATE_SET).withDescription('Temperature calibration (-2.0...2.0)')
62
+ .withValueMin(-2).withValueMax(2).withValueStep(0.1),
61
63
  exposes.numeric('humidity_calibration', ea.STATE_SET).withDescription('Humidity calibration')
62
- .withValueMin(-50).withValueMax(50),
63
- exposes.numeric('illuminance_calibration', ea.STATE_SET).withDescription('Illuminance calibration')
64
- .withValueMin(-10000).withValueMax(10000),
64
+ .withValueMin(-15).withValueMax(15),
65
+ exposes.binary('reporting_enable', ea.STATE_SET, true, false).withDescription('Enable reporting'),
66
+ exposes.numeric('reporting_time', ea.STATE_SET).withDescription('Reporting interval in minutes')
67
+ .withValueMin(0).withValueMax(1440).withValueStep(5),
68
+ exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enable LED'),
65
69
  exposes.binary('pir_enable', ea.STATE_SET, true, false).withDescription('Enable PIR sensor'),
66
- exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enabled LED'),
67
- exposes.binary('reporting_enable', ea.STATE_SET, true, false).withDescription('Enabled reporting'),
68
70
  exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']).withDescription('PIR sensor sensitivity'),
69
71
  // eslint-disable-next-line
70
- exposes.enum('keep_time', ea.STATE_SET, ['0', '30', '60', '120', '240']).withDescription('PIR keep time in seconds')],
72
+ exposes.enum('keep_time', ea.STATE_SET, ['0', '30', '60', '120', '240', '480'])
73
+ .withDescription('PIR keep time in seconds')],
71
74
  },
72
75
  ];
package/devices/heiman.js CHANGED
@@ -469,7 +469,7 @@ module.exports = [
469
469
  exposes: [e.vibration(), e.battery_low(), e.tamper(), e.battery()],
470
470
  },
471
471
  {
472
- fingerprint: [{modelID: 'Vibration-EF_3.0', manufacturerName: 'HEIMAN'}],
472
+ fingerprint: [{modelID: 'Vibration-EF_3.0', manufacturerName: 'HEIMAN'}, {modelID: 'Vibration-EF-3.0', manufacturerName: 'HEIMAN'}],
473
473
  model: 'HS1VS-EF',
474
474
  vendor: 'HEIMAN',
475
475
  description: 'Vibration sensor',
@@ -210,7 +210,7 @@ module.exports = [
210
210
  exposes.numeric('calibration_time', ea.STATE).withUnit('S').withDescription('Calibration time')],
211
211
  },
212
212
  {
213
- fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}],
213
+ fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_ngqk6jia'}],
214
214
  model: 'TS110E_1gang',
215
215
  vendor: 'Lonsonho',
216
216
  description: 'Zigbee smart dimmer module 1 gang with neutral',
package/devices/moes.js CHANGED
@@ -15,11 +15,11 @@ module.exports = [
15
15
  model: 'ZP-LZ-FR2U',
16
16
  vendor: 'Moes',
17
17
  description: 'Zigbee 3.0 dual USB wireless socket plug',
18
- fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory],
19
- toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
18
+ fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory, fz.ts011f_plug_child_mode],
19
+ toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_child_mode],
20
20
  exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
21
21
  exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
22
- .withDescription('Recover state after power outage')],
22
+ .withDescription('Recover state after power outage'), e.child_lock()],
23
23
  endpoint: (device) => {
24
24
  return {'l1': 1, 'l2': 2};
25
25
  },
package/devices/neo.js CHANGED
@@ -12,18 +12,18 @@ module.exports = [
12
12
  model: 'NAS-AB02B0',
13
13
  vendor: 'Neo',
14
14
  description: 'Temperature & humidity sensor and alarm',
15
- fromZigbee: [fz.neo_t_h_alarm, fz.ignore_basic_report],
15
+ fromZigbee: [fz.neo_t_h_alarm, fz.ignore_basic_report, fz.ignore_tuya_set_time],
16
16
  toZigbee: [tz.neo_t_h_alarm],
17
17
  exposes: [
18
18
  e.temperature(), e.humidity(), exposes.binary('humidity_alarm', ea.STATE_SET, true, false), e.battery_low(),
19
19
  exposes.binary('temperature_alarm', ea.STATE_SET, true, false),
20
20
  exposes.binary('alarm', ea.STATE_SET, true, false),
21
21
  exposes.enum('melody', ea.STATE_SET, Array.from(Array(18).keys()).map((x)=>(x+1).toString())),
22
- exposes.numeric('duration', ea.STATE_SET).withUnit('second').withValueMin(0).withValueMax(1000),
23
- exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-10).withValueMax(35),
24
- exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-10).withValueMax(35),
25
- exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100),
26
- exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100),
22
+ exposes.numeric('duration', ea.STATE_SET).withUnit('second').withValueMin(0).withValueMax(1800),
23
+ exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
24
+ exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
25
+ exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
26
+ exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
27
27
  exposes.enum('volume', ea.STATE_SET, ['low', 'medium', 'high']),
28
28
  exposes.enum('power_type', ea.STATE, ['battery_full', 'battery_high', 'battery_medium', 'battery_low', 'usb']),
29
29
  ],
@@ -62,16 +62,25 @@ module.exports = [
62
62
  model: 'NAS-PD07',
63
63
  vendor: 'Neo',
64
64
  description: 'Motion, temperature & humidity sensor',
65
- fromZigbee: [fz.neo_nas_pd07],
65
+ fromZigbee: [fz.neo_nas_pd07, fz.ignore_tuya_set_time],
66
66
  toZigbee: [tz.neo_nas_pd07],
67
67
  onEvent: tuya.onEventSetTime,
68
68
  exposes: [e.occupancy(), e.humidity(), e.temperature(), e.tamper(), e.battery_low(),
69
69
  exposes.enum('power_type', ea.STATE, ['battery_full', 'battery_high', 'battery_medium', 'battery_low', 'usb']),
70
70
  exposes.enum('alarm', ea.STATE, ['over_temperature', 'over_humidity', 'below_min_temperature', 'below_min_humdity', 'off'])
71
71
  .withDescription('Temperature/humidity alarm status'),
72
- exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-40).withValueMax(40),
73
- exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-40).withValueMax(40),
74
- exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100),
75
- exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)],
72
+ exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
73
+ exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
74
+ exposes.binary('temperature_scale', ea.STATE_SET, '°C', '°F').withDescription('Temperature scale (°F/°C)'),
75
+ exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
76
+ exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
77
+ // exposes.binary('unknown_111', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown datapoint 111 (default: ON)'),
78
+ // exposes.binary('unknown_112', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown datapoint 112 (default: ON)')
79
+ ],
80
+ configure: async (device, coordinatorEndpoint, logger) => {
81
+ const endpoint = device.getEndpoint(1);
82
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
83
+ await endpoint.command('manuSpecificTuya', 'mcuVersionRequest', {'seq': 0x0002});
84
+ },
76
85
  },
77
86
  ];
package/devices/nue_3a.js CHANGED
@@ -286,7 +286,7 @@ module.exports = [
286
286
  extend: extend.light_onoff_brightness_colortemp_color(),
287
287
  },
288
288
  {
289
- zigbeeModel: ['LXN60-LS27-Z30'],
289
+ zigbeeModel: ['LXN60-LS27-Z30', 'FEB56-ZCW2CLX1.0'],
290
290
  model: 'WL-SD001-9W',
291
291
  vendor: 'Nue / 3A',
292
292
  description: '9W RGB LED downlight',
@@ -2579,6 +2579,15 @@ module.exports = [
2579
2579
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2580
2580
  ota: ota.zigbeeOTA,
2581
2581
  },
2582
+ {
2583
+ zigbeeModel: ['929003046201_01', '929003046201_02', '929003046201_03'],
2584
+ model: '929003046201',
2585
+ vendor: 'Philips',
2586
+ description: 'Hue White Ambiance Runner triple spotlight',
2587
+ meta: {turnsOffAtBrightness1: true},
2588
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2589
+ ota: ota.zigbeeOTA,
2590
+ },
2582
2591
  {
2583
2592
  zigbeeModel: ['5309331P6', '5309330P6', '929003046301_03', '929003046301_02'],
2584
2593
  model: '5309331P6',
@@ -16,6 +16,7 @@ module.exports = [
16
16
  {modelID: 'TS0601', manufacturerName: '_TZE200_c88teujp'},
17
17
  {modelID: 'TS0601', manufacturerName: '_TZE200_yw7cahqs'},
18
18
  {modelID: 'TS0601', manufacturerName: '_TZE200_azqp6ssj'},
19
+ {modelID: 'TS0601', manufacturerName: '_TZE200_bvu2wnxz'},
19
20
  {modelID: 'TS0601', manufacturerName: '_TZE200_zuhszj9s'},
20
21
  {modelID: 'TS0601', manufacturerName: '_TZE200_9gvruqf5'},
21
22
  {modelID: 'TS0601', manufacturerName: '_TZE200_zr9c0day'},
package/devices/tuya.js CHANGED
@@ -13,7 +13,7 @@ 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'];
16
+ '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau'];
17
17
 
18
18
  const tzLocal = {
19
19
  TS0504B_color: {
@@ -1413,7 +1413,8 @@ module.exports = [
1413
1413
  model: 'TS011F_plug_3',
1414
1414
  description: 'Smart plug (with power monitoring by polling)',
1415
1415
  vendor: 'TuYa',
1416
- whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'}],
1416
+ whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
1417
+ {vendor: 'Avatto', model: 'MIUCOT10Z'}],
1417
1418
  ota: ota.zigbeeOTA,
1418
1419
  fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
1419
1420
  fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
@@ -2247,4 +2248,60 @@ module.exports = [
2247
2248
  fromZigbee: [fz.tuya_remote],
2248
2249
  toZigbee: [],
2249
2250
  },
2251
+ {
2252
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ikvncluo'}],
2253
+ model: 'TS0601_smart_human_presense_sensor',
2254
+ vendor: 'TuYa',
2255
+ description: 'Smart Human presence sensor',
2256
+ fromZigbee: [fz.tuya_smart_human_presense_sensor],
2257
+ toZigbee: [tz.tuya_smart_human_presense_sensor],
2258
+ exposes: [
2259
+ e.illuminance_lux(), e.presence(),
2260
+ exposes.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('m'),
2261
+ exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1)
2262
+ .withDescription('sensitivity of the radar'),
2263
+ exposes.numeric('minimum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
2264
+ .withDescription('Minimum range').withUnit('m'),
2265
+ exposes.numeric('maximum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
2266
+ .withDescription('Maximum range').withUnit('m'),
2267
+ exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1)
2268
+ .withDescription('Detection delay').withUnit('s'),
2269
+ exposes.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(1500).withValueStep(1)
2270
+ .withDescription('Fading time').withUnit('s'),
2271
+ // exposes.text('cli', ea.STATE).withDescription('not recognize'),
2272
+ exposes.enum('self_test', ea.STATE, Object.values(tuya.tuyaHPSCheckingResult))
2273
+ .withDescription('Self_test, possible resuts: checking, check_success, check_failure, others, comm_fault, radar_fault.'),
2274
+ ],
2275
+ },
2276
+ {
2277
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}],
2278
+ model: 'JM-TRH-ZGB-V1',
2279
+ vendor: 'TuYa',
2280
+ description: 'Temperature & humidity sensor with clock',
2281
+ fromZigbee: [fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
2282
+ toZigbee: [tz.nous_lcd_temperature_humidity_sensor],
2283
+ onEvent: tuya.onEventSetLocalTime,
2284
+ configure: async (device, coordinatorEndpoint, logger) => {
2285
+ const endpoint = device.getEndpoint(1);
2286
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
2287
+ },
2288
+ exposes: [
2289
+ e.temperature(), e.humidity(), e.battery(),
2290
+ exposes.numeric('report_interval', ea.STATE_SET).withUnit('min').withValueMin(5).withValueMax(60).withValueStep(5)
2291
+ .withDescription('Report interval'),
2292
+ exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
2293
+ exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
2294
+ .withDescription('Temperature alarm status'),
2295
+ exposes.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
2296
+ .withDescription('Alarm temperature max'),
2297
+ exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
2298
+ .withDescription('Alarm temperature min'),
2299
+ exposes.enum('humidity_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
2300
+ .withDescription('Humidity alarm status'),
2301
+ exposes.numeric('max_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
2302
+ .withDescription('Alarm humidity max'),
2303
+ exposes.numeric('min_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
2304
+ .withDescription('Alarm humidity min'),
2305
+ ],
2306
+ },
2250
2307
  ];
package/devices/xiaomi.js CHANGED
@@ -844,15 +844,17 @@ module.exports = [
844
844
  model: 'WSDCGQ12LM',
845
845
  vendor: 'Xiaomi',
846
846
  description: 'Aqara T1 temperature, humidity and pressure sensor',
847
- fromZigbee: [fz.xiaomi_basic, fz.temperature, fz.humidity, fz.pressure],
847
+ fromZigbee: [fz.aqara_opple, fz.temperature, fz.humidity, fz.pressure, fz.battery],
848
848
  toZigbee: [],
849
+ exposes: [e.temperature(), e.humidity(), e.pressure(), e.battery(), e.battery_voltage()],
849
850
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
850
851
  configure: async (device, coordinatorEndpoint, logger) => {
851
852
  const endpoint = device.getEndpoint(1);
852
853
  const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
853
854
  await reporting.bind(endpoint, coordinatorEndpoint, binds);
855
+ await endpoint.read('genPowerCfg', ['batteryVoltage']);
854
856
  },
855
- exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
857
+ ota: ota.zigbeeOTA,
856
858
  },
857
859
  {
858
860
  zigbeeModel: ['lumi.sensor_motion'],
@@ -1958,6 +1960,7 @@ module.exports = [
1958
1960
  model: 'WXKG16LM',
1959
1961
  vendor: 'Xiaomi',
1960
1962
  description: 'Aqara wireless remote switch E1 (single rocker)',
1963
+ meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
1961
1964
  fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
1962
1965
  toZigbee: [tz.xiaomi_switch_click_mode],
1963
1966
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
package/lib/tuya.js CHANGED
@@ -358,11 +358,14 @@ const dataPoints = {
358
358
  moesSmaxTempSet: 108,
359
359
  moesSminTempSet: 109,
360
360
  // Neo T&H
361
+ neoOccupancy: 101,
361
362
  neoPowerType: 101,
362
363
  neoMelody: 102,
363
364
  neoDuration: 103,
365
+ neoTamper: 103,
364
366
  neoAlarm: 104,
365
367
  neoTemp: 105,
368
+ neoTempScale: 106,
366
369
  neoHumidity: 106,
367
370
  neoMinTemp: 107,
368
371
  neoMaxTemp: 108,
@@ -370,6 +373,7 @@ const dataPoints = {
370
373
  neoMaxHumidity: 110,
371
374
  neoUnknown2: 112,
372
375
  neoTempAlarm: 113,
376
+ neoTempHumidityAlarm: 113,
373
377
  neoHumidityAlarm: 114,
374
378
  neoUnknown3: 115,
375
379
  neoVolume: 116,
@@ -613,8 +617,12 @@ const dataPoints = {
613
617
  nousTempUnitConvert: 9,
614
618
  nousMaxTemp: 10,
615
619
  nousMinTemp: 11,
620
+ nousMaxHumi: 12,
621
+ nousMinHumi: 13,
616
622
  nousTempAlarm: 14,
623
+ nousHumiAlarm: 15,
617
624
  nousTempSensitivity: 19,
625
+ nousReportInterval: 17,
618
626
  // TUYA / HUMIDITY/ILLUMINANCE/TEMPERATURE SENSOR
619
627
  thitBatteryPercentage: 3,
620
628
  thitIlluminanceLux: 7,
@@ -667,6 +675,17 @@ const dataPoints = {
667
675
  connecteTempProgram: 105,
668
676
  connecteOpenWindow: 106,
669
677
  connecteMaxProtectTemp: 107,
678
+ // TuYa Smart Human Presense Sensor
679
+ tshpsPresenceState: 1,
680
+ tshpscSensitivity: 2,
681
+ tshpsMinimumRange: 3,
682
+ tshpsMaximumRange: 4,
683
+ tshpsTargetDistance: 9,
684
+ tshpsDetectionDelay: 101,
685
+ tshpsFadingTime: 102,
686
+ tshpsIlluminanceLux: 104,
687
+ tshpsCLI: 103, // not recognize
688
+ tshpsSelfTest: 6, // not recognize
670
689
  };
671
690
 
672
691
  const thermostatWeekFormat = {
@@ -833,6 +852,14 @@ const moesSwitch = {
833
852
  3: 'freeze',
834
853
  },
835
854
  };
855
+ const tuyaHPSCheckingResult = {
856
+ 0: 'checking',
857
+ 1: 'check_success',
858
+ 2: 'check_failure',
859
+ 3: 'others',
860
+ 4: 'comm_fault',
861
+ 5: 'radar_fault',
862
+ };
836
863
 
837
864
  // Return `seq` - transaction ID for handling concrete response
838
865
  async function sendDataPoints(entity, dpValues, cmd, seq=undefined) {
@@ -991,4 +1018,5 @@ module.exports = {
991
1018
  tuyaRadar,
992
1019
  ZMLookups,
993
1020
  moesSwitch,
1021
+ tuyaHPSCheckingResult,
994
1022
  };
package/lib/xiaomi.js CHANGED
@@ -158,7 +158,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
158
158
  }
159
159
  break;
160
160
  case '3':
161
- if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
161
+ if (['WSDCGQ12LM'].includes(model.model)) {
162
+ // This temperature value is ignored because with greater accuracy it is reported in key №100
163
+ } else if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
162
164
  payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
163
165
  }
164
166
  break;
@@ -200,7 +202,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
200
202
  // We don't know what the value means for these devices.
201
203
  // https://github.com/Koenkk/zigbee2mqtt/issues/11126
202
204
  // https://github.com/Koenkk/zigbee2mqtt/issues/12279
203
- } else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
205
+ } else if (['WSDCGQ01LM', 'WSDCGQ11LM', 'WSDCGQ12LM'].includes(model.model)) {
204
206
  // https://github.com/Koenkk/zigbee2mqtt/issues/798
205
207
  // Sometimes the sensor publishes non-realistic vales, filter these
206
208
  const temperature = parseFloat(value) / 100.0;
@@ -242,7 +244,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
242
244
  payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
243
245
  } else if (['RTCGQ12LM', 'RTCGQ14LM'].includes(model.model)) {
244
246
  payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
245
- } else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
247
+ } else if (['WSDCGQ01LM', 'WSDCGQ11LM', 'WSDCGQ12LM'].includes(model.model)) {
246
248
  // https://github.com/Koenkk/zigbee2mqtt/issues/798
247
249
  // Sometimes the sensor publishes non-realistic vales, filter these
248
250
  const humidity = parseFloat(value) / 100.0;
@@ -260,6 +262,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
260
262
  payload.state_right = value === 1 ? 'ON' : 'OFF';
261
263
  } else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
262
264
  payload.pressure = calibrateAndPrecisionRoundOptions(value/100.0, options, 'pressure');
265
+ } else if (['WSDCGQ12LM'].includes(model.model)) {
266
+ // This pressure value is ignored because it is less accurate than reported in the 'scaledValue' attribute
267
+ // of the 'msPressureMeasurement' cluster
263
268
  } else if (['RTCZCGQ11LM'].includes(model.model)) {
264
269
  if (meta.device.applicationVersion < 50) {
265
270
  payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.500",
3
+ "version": "14.0.503",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [