zigbee-herdsman-converters 14.0.501 → 14.0.502

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.
@@ -8413,6 +8413,52 @@ const converters = {
8413
8413
  return result;
8414
8414
  },
8415
8415
  },
8416
+ tuya_smart_human_presense_sensor: {
8417
+ cluster: 'manuSpecificTuya',
8418
+ type: ['commandDataResponse', 'commandDataReport'],
8419
+ convert: (model, msg, publish, options, meta) => {
8420
+ const dpValue = tuya.firstDpValue(msg, meta, 'tuya_smart_human_presense_sensor');
8421
+ const dp = dpValue.dp;
8422
+ const value = tuya.getDataValue(dpValue);
8423
+ let result = null;
8424
+ switch (dp) {
8425
+ case tuya.dataPoints.tshpsPresenceState:
8426
+ result = {presence: {0: false, 1: true}[value]};
8427
+ break;
8428
+ case tuya.dataPoints.tshpscSensitivity:
8429
+ result = {radar_sensitivity: value};
8430
+ break;
8431
+ case tuya.dataPoints.tshpsMinimumRange:
8432
+ result = {minimum_range: value/100};
8433
+ break;
8434
+ case tuya.dataPoints.tshpsMaximumRange:
8435
+ result = {maximum_range: value/100};
8436
+ break;
8437
+ case tuya.dataPoints.tshpsTargetDistance:
8438
+ result = {target_distance: value/100};
8439
+ break;
8440
+ case tuya.dataPoints.tshpsDetectionDelay:
8441
+ result = {detection_delay: value/10};
8442
+ break;
8443
+ case tuya.dataPoints.tshpsFadingTime:
8444
+ result = {fading_time: value/10};
8445
+ break;
8446
+ case tuya.dataPoints.tshpsIlluminanceLux:
8447
+ result = {illuminance_lux: value};
8448
+ break;
8449
+ case tuya.dataPoints.tshpsCLI: // not recognize
8450
+ result = {cli: value};
8451
+ break;
8452
+ case tuya.dataPoints.tshpsSelfTest: // not recognize
8453
+ result = {self_test: value};
8454
+ break;
8455
+ default:
8456
+ meta.logger
8457
+ .warn(`fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP ${dp} with data ${JSON.stringify(dpValue)}`);
8458
+ }
8459
+ return result;
8460
+ },
8461
+ },
8416
8462
  // #endregion
8417
8463
 
8418
8464
  // #region Ignore converters (these message dont need parsing).
@@ -5633,7 +5633,10 @@ const converters = {
5633
5633
  },
5634
5634
  },
5635
5635
  nous_lcd_temperature_humidity_sensor: {
5636
- 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
+ ],
5637
5640
  convertSet: async (entity, key, value, meta) => {
5638
5641
  switch (key) {
5639
5642
  case 'temperature_unit_convert':
@@ -5648,6 +5651,15 @@ const converters = {
5648
5651
  case 'temperature_sensitivity':
5649
5652
  await tuya.sendDataPointValue(entity, tuya.dataPoints.nousTempSensitivity, Math.round(value * 10));
5650
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;
5651
5663
  default: // Unknown key
5652
5664
  meta.logger.warn(`Unhandled key ${key}`);
5653
5665
  }
@@ -7372,6 +7384,30 @@ const converters = {
7372
7384
  }
7373
7385
  },
7374
7386
  },
7387
+ tuya_smart_human_presense_sensor: {
7388
+ key: ['radar_sensitivity', 'minimum_range', 'maximum_range', 'detection_delay', 'fading_time'],
7389
+ convertSet: async (entity, key, value, meta) => {
7390
+ switch (key) {
7391
+ case 'radar_sensitivity':
7392
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpscSensitivity, value);
7393
+ break;
7394
+ case 'minimum_range':
7395
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMinimumRange, value*100);
7396
+ break;
7397
+ case 'maximum_range':
7398
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMaximumRange, value*100);
7399
+ break;
7400
+ case 'detection_delay':
7401
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsDetectionDelay, value*10);
7402
+ break;
7403
+ case 'fading_time':
7404
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsFadingTime, value*10);
7405
+ break;
7406
+ default: // Unknown Key
7407
+ meta.logger.warn(`toZigbee.tuya_smart_human_presense_sensor: Unhandled Key ${key}`);
7408
+ }
7409
+ },
7410
+ },
7375
7411
  // #endregion
7376
7412
 
7377
7413
  // #region Ignore converters
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',
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
  },
@@ -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
@@ -2248,4 +2248,59 @@ module.exports = [
2248
2248
  fromZigbee: [fz.tuya_remote],
2249
2249
  toZigbee: [],
2250
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.text('self_test', ea.STATE).withDescription('not recognize'),
2273
+ ],
2274
+ },
2275
+ {
2276
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}],
2277
+ model: 'JM-TRH-ZGB-V1',
2278
+ vendor: 'TuYa',
2279
+ description: 'Temperature & humidity sensor with clock',
2280
+ fromZigbee: [fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
2281
+ toZigbee: [tz.nous_lcd_temperature_humidity_sensor],
2282
+ onEvent: tuya.onEventSetLocalTime,
2283
+ configure: async (device, coordinatorEndpoint, logger) => {
2284
+ const endpoint = device.getEndpoint(1);
2285
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
2286
+ },
2287
+ exposes: [
2288
+ e.temperature(), e.humidity(), e.battery(),
2289
+ exposes.numeric('report_interval', ea.STATE_SET).withUnit('min').withValueMin(5).withValueMax(60).withValueStep(5)
2290
+ .withDescription('Report interval'),
2291
+ exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
2292
+ exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
2293
+ .withDescription('Temperature alarm status'),
2294
+ exposes.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
2295
+ .withDescription('Alarm temperature max'),
2296
+ exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
2297
+ .withDescription('Alarm temperature min'),
2298
+ exposes.enum('humidity_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
2299
+ .withDescription('Humidity alarm status'),
2300
+ exposes.numeric('max_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
2301
+ .withDescription('Alarm humidity max'),
2302
+ exposes.numeric('min_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
2303
+ .withDescription('Alarm humidity min'),
2304
+ ],
2305
+ },
2251
2306
  ];
package/devices/xiaomi.js CHANGED
@@ -1960,6 +1960,7 @@ module.exports = [
1960
1960
  model: 'WXKG16LM',
1961
1961
  vendor: 'Xiaomi',
1962
1962
  description: 'Aqara wireless remote switch E1 (single rocker)',
1963
+ meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
1963
1964
  fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
1964
1965
  toZigbee: [tz.xiaomi_switch_click_mode],
1965
1966
  exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
package/lib/tuya.js CHANGED
@@ -617,8 +617,12 @@ const dataPoints = {
617
617
  nousTempUnitConvert: 9,
618
618
  nousMaxTemp: 10,
619
619
  nousMinTemp: 11,
620
+ nousMaxHumi: 12,
621
+ nousMinHumi: 13,
620
622
  nousTempAlarm: 14,
623
+ nousHumiAlarm: 15,
621
624
  nousTempSensitivity: 19,
625
+ nousReportInterval: 17,
622
626
  // TUYA / HUMIDITY/ILLUMINANCE/TEMPERATURE SENSOR
623
627
  thitBatteryPercentage: 3,
624
628
  thitIlluminanceLux: 7,
@@ -671,6 +675,17 @@ const dataPoints = {
671
675
  connecteTempProgram: 105,
672
676
  connecteOpenWindow: 106,
673
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
674
689
  };
675
690
 
676
691
  const thermostatWeekFormat = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.501",
3
+ "version": "14.0.502",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [