zigbee-herdsman-converters 14.0.502 → 14.0.505

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.
@@ -4751,7 +4751,7 @@ const converters = {
4751
4751
  }
4752
4752
  return {brightness: mapNumberRange(value, 10, 1000, 0, 254)};
4753
4753
  }
4754
- } else if (meta.device.manufacturerName === '_TZE200_3p5ydos3') {
4754
+ } else if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots'].includes(meta.device.manufacturerName)) {
4755
4755
  if (dpValue.dp === tuya.dataPoints.eardaDimmerLevel) {
4756
4756
  return {brightness: mapNumberRange(value, 0, 1000, 0, 254)};
4757
4757
  } else if (dpValue.dp === tuya.dataPoints.dimmerMinLevel) {
@@ -7272,14 +7272,14 @@ const converters = {
7272
7272
  const dpValue = tuya.firstDpValue(msg, meta, 'ZB003X');
7273
7273
  const dp = dpValue.dp;
7274
7274
  const value = tuya.getDataValue(dpValue);
7275
-
7276
7275
  switch (dp) {
7277
7276
  case tuya.dataPoints.fantemTemp:
7278
- return {temperature: calibrateAndPrecisionRoundOptions((value / 10).toFixed(1), options, 'temperature')};
7277
+ return {temperature: calibrateAndPrecisionRoundOptions((value / 10), options, 'temperature')};
7279
7278
  case tuya.dataPoints.fantemHumidity:
7280
7279
  return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
7281
7280
  case tuya.dataPoints.fantemBattery:
7282
- return {battery: value};
7281
+ // second battery level, first battery is reported by fz.battery
7282
+ return {battery2: value};
7283
7283
  case tuya.dataPoints.fantemReportingTime:
7284
7284
  return {reporting_time: value};
7285
7285
  case tuya.dataPoints.fantemTempCalibration:
@@ -7295,12 +7295,11 @@ const converters = {
7295
7295
  case tuya.dataPoints.fantemMotionEnable:
7296
7296
  return {pir_enable: value};
7297
7297
  case tuya.dataPoints.fantemLedEnable:
7298
- return {led_enable: value};
7298
+ return {led_enable: value ? false : true};
7299
7299
  case tuya.dataPoints.fantemReportingEnable:
7300
7300
  return {reporting_enable: value};
7301
7301
  default:
7302
- meta.logger.warn(`zigbee-herdsman-converters:FantemZB003X: Unrecognized DP #${
7303
- dp} with data ${JSON.stringify(dpValue)}`);
7302
+ meta.logger.warn(`fz.ZB003X: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
7304
7303
  }
7305
7304
  },
7306
7305
  },
@@ -7310,7 +7309,7 @@ const converters = {
7310
7309
  convert: (model, msg, publish, options, meta) => {
7311
7310
  const data = msg.data;
7312
7311
  const senslookup = {'0': 'low', '1': 'medium', '2': 'high'};
7313
- 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};
7314
7313
  if (data && data.hasOwnProperty('currentZoneSensitivityLevel')) {
7315
7314
  const value = data.currentZoneSensitivityLevel;
7316
7315
  return {sensitivity: senslookup[value]};
@@ -7340,12 +7339,11 @@ const converters = {
7340
7339
  case tuya.dataPoints.fantemPowerSupplyMode:
7341
7340
  return {power_supply_mode: {0: 'unknown', 1: 'no_neutral', 2: 'with_neutral'}[value]};
7342
7341
  case tuya.dataPoints.fantemExtSwitchType:
7343
- return {ext_switch_type: {0: 'unknown', 1: 'toggle_sw', 2: 'momentary_sw', 3: 'rotary_sw',
7344
- 4: 'auto_config'}[value]};
7342
+ return {switch_type: {0: 'unknown', 1: 'toggle', 2: 'momentary', 3: 'rotary', 4: 'auto_config'}[value]};
7345
7343
  case tuya.dataPoints.fantemLoadDetectionMode:
7346
7344
  return {load_detection_mode: {0: 'none', 1: 'first_power_on', 2: 'every_power_on'}[value]};
7347
7345
  case tuya.dataPoints.fantemExtSwitchStatus:
7348
- return {ext_switch_status: value};
7346
+ return {switch_status: value};
7349
7347
  case tuya.dataPoints.fantemControlMode:
7350
7348
  return {control_mode: {0: 'ext_switch', 1: 'remote', 2: 'both'}[value]};
7351
7349
  case 111:
@@ -8449,8 +8447,8 @@ const converters = {
8449
8447
  case tuya.dataPoints.tshpsCLI: // not recognize
8450
8448
  result = {cli: value};
8451
8449
  break;
8452
- case tuya.dataPoints.tshpsSelfTest: // not recognize
8453
- result = {self_test: value};
8450
+ case tuya.dataPoints.tshpsSelfTest:
8451
+ result = {self_test: tuya.tuyaHPSCheckingResult [value]};
8454
8452
  break;
8455
8453
  default:
8456
8454
  meta.logger
@@ -6490,48 +6490,49 @@ const converters = {
6490
6490
  convertSet: async (entity, key, value, meta) => {
6491
6491
  switch (key) {
6492
6492
  case 'reporting_time':
6493
- await tuya.sendDataPointValue(entity, 102, value, 'sendData');
6493
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemReportingTime, value, 'sendData');
6494
6494
  break;
6495
6495
  case 'temperature_calibration':
6496
6496
  value = Math.round(value * 10);
6497
6497
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6498
- await tuya.sendDataPointValue(entity, 104, value, 'sendData');
6498
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemTempCalibration, value, 'sendData');
6499
6499
  break;
6500
6500
  case 'humidity_calibration':
6501
6501
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6502
- await tuya.sendDataPointValue(entity, 105, value, 'sendData');
6502
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemHumidityCalibration, value, 'sendData');
6503
6503
  break;
6504
6504
  case 'illuminance_calibration':
6505
6505
  if (value < 0) value = 0xFFFFFFFF + value + 1;
6506
- await tuya.sendDataPointValue(entity, 106, value, 'sendData');
6506
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemLuxCalibration, value, 'sendData');
6507
6507
  break;
6508
6508
  case 'pir_enable':
6509
- await tuya.sendDataPointBool(entity, 109, value, 'sendData');
6509
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemMotionEnable, value, 'sendData');
6510
6510
  break;
6511
6511
  case 'led_enable':
6512
- await tuya.sendDataPointBool(entity, 111, value, 'sendData');
6512
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemLedEnable, value === false, 'sendData');
6513
6513
  break;
6514
6514
  case 'reporting_enable':
6515
- await tuya.sendDataPointBool(entity, 112, value, 'sendData');
6515
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemReportingEnable, value, 'sendData');
6516
6516
  break;
6517
6517
  case 'sensitivity':
6518
6518
  await entity.write('ssIasZone', {currentZoneSensitivityLevel: {'low': 0, 'medium': 1, 'high': 2}[value]});
6519
6519
  break;
6520
6520
  case 'keep_time':
6521
- 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}});
6522
6523
  break;
6523
6524
  default: // Unknown key
6524
- throw new Error(`Unhandled key ${key}`);
6525
+ throw new Error(`tz.ZB003X: Unhandled key ${key}`);
6525
6526
  }
6526
6527
  },
6527
6528
  },
6528
6529
  ZB006X_settings: {
6529
- key: ['ext_switch_type', 'load_detection_mode', 'control_mode'],
6530
+ key: ['switch_type', 'load_detection_mode', 'control_mode'],
6530
6531
  convertSet: async (entity, key, value, meta) => {
6531
6532
  switch (key) {
6532
- case 'ext_switch_type':
6533
- await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemExtSwitchType, {'unknown': 0, 'toggle_sw': 1,
6534
- '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');
6535
6536
  break;
6536
6537
  case 'load_detection_mode':
6537
6538
  await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemLoadDetectionMode, {'none': 0, 'first_power_on': 1,
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
  ];
@@ -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
@@ -165,7 +165,7 @@ module.exports = [
165
165
  },
166
166
  },
167
167
  {
168
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_tz32mtza'}],
168
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_tz32mtza'}, {modelID: 'TS0601', manufacturerName: '_TZE200_vm1gyrso'}],
169
169
  model: 'ZTS-EU_3gang',
170
170
  vendor: 'Moes',
171
171
  description: 'Wall touch light switch (3 gang)',
@@ -1406,6 +1406,15 @@ module.exports = [
1406
1406
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
1407
1407
  ota: ota.zigbeeOTA,
1408
1408
  },
1409
+ {
1410
+ zigbeeModel: ['929003055501'],
1411
+ model: '929003055501',
1412
+ vendor: 'Philips',
1413
+ description: 'Hue white ambiance Still',
1414
+ meta: {turnsOffAtBrightness1: true},
1415
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
1416
+ ota: ota.zigbeeOTA,
1417
+ },
1409
1418
  {
1410
1419
  zigbeeModel: ['LTC003'],
1411
1420
  model: '3261331P7',
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', '_TZ3000_9vo5icau'];
16
+ '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw'];
17
17
 
18
18
  const tzLocal = {
19
19
  TS0504B_color: {
@@ -700,6 +700,7 @@ module.exports = [
700
700
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_zwqnazkb'},
701
701
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_ijsj2evj'},
702
702
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_pgq2qvyv'},
703
+ {modelID: 'TS0502B', manufacturerName: '_TZ3210_nvaik6gk'},
703
704
  ],
704
705
  model: 'TS0502B',
705
706
  vendor: 'TuYa',
@@ -2269,7 +2270,8 @@ module.exports = [
2269
2270
  exposes.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(1500).withValueStep(1)
2270
2271
  .withDescription('Fading time').withUnit('s'),
2271
2272
  // exposes.text('cli', ea.STATE).withDescription('not recognize'),
2272
- // exposes.text('self_test', ea.STATE).withDescription('not recognize'),
2273
+ exposes.enum('self_test', ea.STATE, Object.values(tuya.tuyaHPSCheckingResult))
2274
+ .withDescription('Self_test, possible resuts: checking, check_success, check_failure, others, comm_fault, radar_fault.'),
2273
2275
  ],
2274
2276
  },
2275
2277
  {
@@ -0,0 +1,11 @@
1
+ const extend = require('../lib/extend');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['5991711'],
6
+ model: 'C5850000',
7
+ vendor: 'Villeroy & Boch',
8
+ description: 'Subway 3.0 Zigbee home Aautomation kit ',
9
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [160, 450]}),
10
+ },
11
+ ];
package/lib/tuya.js CHANGED
@@ -852,6 +852,14 @@ const moesSwitch = {
852
852
  3: 'freeze',
853
853
  },
854
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
+ };
855
863
 
856
864
  // Return `seq` - transaction ID for handling concrete response
857
865
  async function sendDataPoints(entity, dpValues, cmd, seq=undefined) {
@@ -1010,4 +1018,5 @@ module.exports = {
1010
1018
  tuyaRadar,
1011
1019
  ZMLookups,
1012
1020
  moesSwitch,
1021
+ tuyaHPSCheckingResult,
1013
1022
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.502",
3
+ "version": "14.0.505",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
36
36
  "dependencies": {
37
- "axios": "^0.26.1",
37
+ "axios": "^0.27.2",
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^2.2.0",
41
- "zigbee-herdsman": "^0.14.26"
41
+ "zigbee-herdsman": "^0.14.27"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",