zigbee-herdsman-converters 14.0.602 → 14.0.605

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.
@@ -4839,7 +4839,8 @@ const converters = {
4839
4839
  }
4840
4840
  return {brightness: mapNumberRange(value, 10, 1000, 0, 254)};
4841
4841
  }
4842
- } else if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots'].includes(meta.device.manufacturerName)) {
4842
+ } else if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots', '_TZE200_w4cryh2i']
4843
+ .includes(meta.device.manufacturerName)) {
4843
4844
  if (dpValue.dp === tuya.dataPoints.eardaDimmerLevel) {
4844
4845
  return {brightness: mapNumberRange(value, 0, 1000, 0, 254)};
4845
4846
  } else if (dpValue.dp === tuya.dataPoints.dimmerMinLevel) {
@@ -3825,7 +3825,7 @@ const converters = {
3825
3825
  // upscale to 1000
3826
3826
  let newValue;
3827
3827
  let dp = tuya.dataPoints.dimmerLevel;
3828
- if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots'].includes(meta.device.manufacturerName)) {
3828
+ if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots', '_TZE200_w4cryh2i'].includes(meta.device.manufacturerName)) {
3829
3829
  dp = tuya.dataPoints.eardaDimmerLevel;
3830
3830
  }
3831
3831
  if (key === 'brightness_min') {
package/devices/adeo.js CHANGED
@@ -80,6 +80,13 @@ module.exports = [
80
80
  description: 'ENKI LEXMAN RGBTW GU10 Bulb',
81
81
  extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
82
82
  },
83
+ {
84
+ zigbeeModel: ['ZBEK-10'],
85
+ model: 'IC-CDZFB2AC004HA-MZN',
86
+ vendor: 'ADEO',
87
+ description: 'ENKI LEXMAN E14 LED white',
88
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
89
+ },
83
90
  {
84
91
  zigbeeModel: ['ZBEK-12'],
85
92
  model: 'IA-CDZFB2AA007NA-MZN-01',
@@ -336,6 +336,13 @@ module.exports = [
336
336
  description: 'Hue Iris rose limited edition (generation 4) ',
337
337
  extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
338
338
  },
339
+ {
340
+ zigbeeModel: ['929002401201'],
341
+ model: '929002401201',
342
+ vendor: 'Philips',
343
+ description: 'Hue Iris copper special edition (generation 4) ',
344
+ extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
345
+ },
339
346
  {
340
347
  zigbeeModel: ['5063130P7'],
341
348
  model: '5063130P7',
@@ -2734,4 +2741,11 @@ module.exports = [
2734
2741
  description: 'Hue White E26 806 lumen',
2735
2742
  extend: hueExtend.light_onoff_brightness(),
2736
2743
  },
2744
+ {
2745
+ zigbeeModel: ['3402931P7'],
2746
+ model: '3402931P7',
2747
+ vendor: 'Philips',
2748
+ description: 'Philips Hue Adore Bathroom Mirror Light',
2749
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
2750
+ },
2737
2751
  ];
@@ -4,9 +4,41 @@ const tz = require('../converters/toZigbee');
4
4
  const reporting = require('../lib/reporting');
5
5
  const extend = require('../lib/extend');
6
6
  const ota = require('../lib/ota');
7
+ const globalStore = require('../lib/store');
7
8
  const e = exposes.presets;
8
9
  const ea = exposes.access;
9
10
 
11
+ const fzLocal = {
12
+ DMS300_IN: {
13
+ cluster: 'msOccupancySensing',
14
+ type: ['attributeReport', 'readResponse'],
15
+ options: [exposes.options.no_occupancy_since_false()],
16
+ convert: (model, msg, publish, options, meta) => {
17
+ const occupancyIn = msg.data.occupancy;
18
+ globalStore.putValue(msg.endpoint, 'occupancy_in', occupancyIn);
19
+ const occupancy = occupancyIn | globalStore.getValue(msg.endpoint, 'occupancy_out', 0);
20
+ return {
21
+ occupancy_in: (occupancyIn & 1) > 0,
22
+ occupancy: (occupancy & 1) > 0,
23
+ };
24
+ },
25
+ },
26
+ DMS300_OUT: {
27
+ cluster: 'ssIasZone',
28
+ type: 'commandStatusChangeNotification',
29
+ convert: (model, msg, publish, options, meta) => {
30
+ const occupancyOut = msg.data.zonestatus;
31
+ globalStore.putValue(msg.endpoint, 'occupancy_out', occupancyOut);
32
+ const occupancy = occupancyOut | globalStore.getValue(msg.endpoint, 'occupancy_in', 0);
33
+ return {
34
+ occupancy_out: (occupancyOut & 1) > 0,
35
+ occupancy: (occupancy & 1) > 0,
36
+ };
37
+ },
38
+ },
39
+ };
40
+
41
+
10
42
  module.exports = [
11
43
  {
12
44
  fingerprint: [
@@ -397,18 +429,27 @@ module.exports = [
397
429
  ota: ota.zigbeeOTA,
398
430
  description: 'SiHAS dual motion sensor',
399
431
  meta: {battery: {voltageToPercentage: '3V_2100'}},
400
- fromZigbee: [fz.battery, fz.occupancy, fz.occupancy_timeout],
432
+ fromZigbee: [fz.battery, fzLocal.DMS300_OUT, fzLocal.DMS300_IN, fz.occupancy_timeout],
401
433
  toZigbee: [tz.occupancy_timeout],
402
434
  configure: async (device, coordinatorEndpoint, logger) => {
403
435
  const endpoint = device.getEndpoint(1);
404
- const binds = ['genPowerCfg', 'msOccupancySensing'];
436
+ const binds = ['genPowerCfg', 'msOccupancySensing', 'ssIasZone'];
405
437
  await reporting.bind(endpoint, coordinatorEndpoint, binds);
406
438
  await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
407
439
  await reporting.occupancy(endpoint, {min: 1, max: 600, change: 1});
440
+ const payload = [{
441
+ attribute: 'zoneStatus', minimumReportInterval: 1, maximumReportInterval: 600, reportableChange: 1}];
442
+ await endpoint.configureReporting('ssIasZone', payload);
408
443
  await endpoint.read('msOccupancySensing', ['pirOToUDelay']);
409
444
  },
410
- exposes: [e.battery(), e.battery_voltage(), e.occupancy(),
411
- exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(65535)],
445
+ exposes: [e.battery(), e.battery_voltage(),
446
+ exposes.binary('occupancy_in', ea.STATE, true, false)
447
+ .withDescription('Indicates whether "IN" Sensor of the device detected occupancy'),
448
+ exposes.binary('occupancy_out', ea.STATE, true, false)
449
+ .withDescription('Indicates whether "OUT" Sensor of the device detected occupancy'),
450
+ exposes.binary('occupancy', ea.STATE, true, false)
451
+ .withDescription('Indicates whether "IN or OUT" Sensor of the device detected occupancy'),
452
+ exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(3600)],
412
453
  },
413
454
  {
414
455
  zigbeeModel: ['ISM300Z3'],
package/devices/sonoff.js CHANGED
@@ -7,6 +7,19 @@ const extend = require('../lib/extend');
7
7
  const e = exposes.presets;
8
8
  const ota = require('../lib/ota');
9
9
 
10
+ const fzLocal = {
11
+ // SNZB-02 reports stranges values sometimes
12
+ // https://github.com/Koenkk/zigbee2mqtt/issues/13640
13
+ SNZB02_temperature: {
14
+ ...fz.temperature,
15
+ convert: (model, msg, publish, options, meta) => {
16
+ if (msg.data.measuredValue > -10000 && msg.data.measuredValue < 10000) {
17
+ return fz.temperature.convert(model, msg, publish, options, meta);
18
+ }
19
+ },
20
+ },
21
+ };
22
+
10
23
  module.exports = [
11
24
  {
12
25
  zigbeeModel: ['BASICZBR3'],
@@ -119,7 +132,7 @@ module.exports = [
119
132
  whiteLabel: [{vendor: 'eWeLink', model: 'RHK08'}],
120
133
  description: 'Temperature and humidity sensor',
121
134
  exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
122
- fromZigbee: [fz.temperature, fz.humidity, fz.battery],
135
+ fromZigbee: [fzLocal.SNZB02_temperature, fz.humidity, fz.battery],
123
136
  toZigbee: [],
124
137
  configure: async (device, coordinatorEndpoint, logger) => {
125
138
  try {
package/devices/tuya.js CHANGED
@@ -23,6 +23,18 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
23
23
  '_TZ3000_ss98ec5d', '_TZ3000_gznh2xla'];
24
24
 
25
25
  const tzLocal = {
26
+ hpsz: {
27
+ key: ['led_state'],
28
+ convertSet: async (entity, key, value, meta) => {
29
+ switch (key) {
30
+ case 'led_state': {
31
+ const ledState = value.toUpperCase() === 'ON' ? true : false;
32
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.HPSZLEDState, ledState);
33
+ return {led_state: value};
34
+ }
35
+ }
36
+ },
37
+ },
26
38
  TS0504B_color: {
27
39
  key: ['color'],
28
40
  convertSet: async (entity, key, value, meta) => {
@@ -271,6 +283,34 @@ const tzLocal = {
271
283
  };
272
284
 
273
285
  const fzLocal = {
286
+ hpsz: {
287
+ cluster: 'manuSpecificTuya',
288
+ type: ['commandDataResponse', 'commandDataReport'],
289
+ convert: (model, msg, publish, options, meta) => {
290
+ const dpValue = tuya.firstDpValue(msg, meta, 'hpsz');
291
+ const dp = dpValue.dp;
292
+ const value = tuya.getDataValue(dpValue);
293
+ let result = null;
294
+ switch (dp) {
295
+ case tuya.dataPoints.HPSZInductionState:
296
+ result = {presence: value === 1};
297
+ break;
298
+ case tuya.dataPoints.HPSZPresenceTime:
299
+ result = {duration_of_attendance: value};
300
+ break;
301
+ case tuya.dataPoints.HPSZLeavingTime:
302
+ result = {duration_of_absence: value};
303
+ break;
304
+ case tuya.dataPoints.HPSZLEDState:
305
+ result = {state: value};
306
+ break;
307
+ default:
308
+ meta.logger.warn(`zigbee-herdsman-converters:hpsz: NOT RECOGNIZED DP #${
309
+ dp} with data ${JSON.stringify(dpValue)}`);
310
+ }
311
+ return result;
312
+ },
313
+ },
274
314
  metering_skip_duplicate: {
275
315
  ...fz.metering,
276
316
  convert: (model, msg, publish, options, meta) => {
@@ -278,6 +318,13 @@ const fzLocal = {
278
318
  return fz.metering.convert(model, msg, publish, options, meta);
279
319
  },
280
320
  },
321
+ electrical_measurement_skip_duplicate: {
322
+ ...fz.electrical_measurement,
323
+ convert: (model, msg, publish, options, meta) => {
324
+ if (utils.hasAlreadyProcessedMessage(msg)) return;
325
+ return fz.electrical_measurement.convert(model, msg, publish, options, meta);
326
+ },
327
+ },
281
328
  scenes_recall_scene_65029: {
282
329
  cluster: '65029',
283
330
  type: ['raw', 'attributeReport'],
@@ -759,6 +806,7 @@ module.exports = [
759
806
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_1mtktxdk'},
760
807
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_remypqqm'},
761
808
  {modelID: 'TS0505B', manufacturerName: '_TZ3000_kohbva1f'},
809
+ {modelID: 'TS0505B', manufacturerName: '_TZ3000_luit1t00'},
762
810
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_wslkvrau'},
763
811
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_0rn9qhnu'},
764
812
  {modelID: 'TS0505B', manufacturerName: '_TZ3210_ejctepku'},
@@ -819,7 +867,8 @@ module.exports = [
819
867
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_bfvybixd'},
820
868
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_i2i0bsnv'},
821
869
  {modelID: 'TS0504B', manufacturerName: '_TZ3210_elzv6aia'},
822
- {modelID: 'TS0504B', manufacturerName: '_TZ3210_1elppmba'}],
870
+ {modelID: 'TS0504B', manufacturerName: '_TZ3210_1elppmba'},
871
+ {modelID: 'TS0504B', manufacturerName: '_TZ3210_onejz0gt'}],
823
872
  model: 'TS0504B',
824
873
  vendor: 'TuYa',
825
874
  description: 'Zigbee RGBW light',
@@ -982,6 +1031,7 @@ module.exports = [
982
1031
  {modelID: 'TS0601', manufacturerName: '_TZE200_ebwgzdqq'},
983
1032
  {modelID: 'TS0601', manufacturerName: '_TZE200_9i9dt8is'},
984
1033
  {modelID: 'TS0601', manufacturerName: '_TZE200_dfxkcots'},
1034
+ {modelID: 'TS0601', manufacturerName: '_TZE200_w4cryh2i'},
985
1035
  {modelID: 'TS0601', manufacturerName: '_TZE200_ojzhk75b'},
986
1036
  {modelID: 'TS0601', manufacturerName: '_TZE200_swaamsoy'},
987
1037
  {modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
@@ -1232,6 +1282,7 @@ module.exports = [
1232
1282
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_nvaik6gk'},
1233
1283
  {modelID: 'TS0502B', manufacturerName: '_TZ3000_armwcncd'},
1234
1284
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_2p6wbry3'},
1285
+ {modelID: 'TS0502B', manufacturerName: '_TZB210_nfzrlz29'},
1235
1286
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_qamcypen'},
1236
1287
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_zdrhqmo0'},
1237
1288
  {modelID: 'TS0502B', manufacturerName: '_TZ3210_2cjfbpy0'},
@@ -1741,6 +1792,7 @@ module.exports = [
1741
1792
  {modelID: 'TS0601', manufacturerName: '_TZE200_e9ba97vf'}, /* model: 'TV01-ZB', vendor: 'Moes' */
1742
1793
  {modelID: 'TS0601', manufacturerName: '_TZE200_husqqvux'}, /* model: 'TSL-TRV-TV01ZG', vendor: 'Tesla Smart' */
1743
1794
  {modelID: 'TS0601', manufacturerName: '_TZE200_lllliz3p'}, /* model: 'TV02-Zigbee', vendor: 'TuYa' */
1795
+ {modelID: 'TS0601', manufacturerName: '_TZE200_mudxchsu'}, /* model: 'TV05-ZG curve', vendor: 'TuYa' */
1744
1796
  ],
1745
1797
  model: 'TV02-Zigbee',
1746
1798
  vendor: 'TuYa',
@@ -1935,7 +1987,7 @@ module.exports = [
1935
1987
  {vendor: 'BlitzWolf', model: 'BW-SHP15'}, {vendor: 'Nous', model: 'A1Z'}, {vendor: 'BlitzWolf', model: 'BW-SHP13'},
1936
1988
  {vendor: 'MatSee Plus', model: 'PJ-ZSW01'}],
1937
1989
  ota: ota.zigbeeOTA,
1938
- fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
1990
+ fromZigbee: [fz.on_off, fzLocal.electrical_measurement_skip_duplicate, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
1939
1991
  fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1940
1992
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1941
1993
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -1989,7 +2041,7 @@ module.exports = [
1989
2041
  whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
1990
2042
  {vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}],
1991
2043
  ota: ota.zigbeeOTA,
1992
- fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
2044
+ fromZigbee: [fz.on_off, fzLocal.electrical_measurement_skip_duplicate, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
1993
2045
  fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
1994
2046
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1995
2047
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -2182,6 +2234,8 @@ module.exports = [
2182
2234
  },
2183
2235
  meta: {multiEndpoint: true},
2184
2236
  configure: async (device, coordinatorEndpoint, logger) => {
2237
+ await device.getEndpoint(1).read('genBasic',
2238
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
2185
2239
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
2186
2240
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2187
2241
  device.powerSource = 'Mains (single phase)';
@@ -2975,7 +3029,7 @@ module.exports = [
2975
3029
  fromZigbee: [fz.ZG204ZL_lms],
2976
3030
  toZigbee: [tz.ZG204ZL_lms],
2977
3031
  exposes: [
2978
- e.occupancy(), e.illuminance(), e.battery(),
3032
+ e.occupancy(), e.illuminance().withUnit('lx'), e.battery(),
2979
3033
  exposes.enum('sensitivity', ea.ALL, ['low', 'medium', 'high'])
2980
3034
  .withDescription('PIR sensor sensitivity (refresh and update only while active)'),
2981
3035
  exposes.enum('keep_time', ea.ALL, ['10', '30', '60', '120'])
@@ -3068,4 +3122,21 @@ module.exports = [
3068
3122
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity']);
3069
3123
  },
3070
3124
  },
3125
+ {
3126
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_0u3bj3rc'}],
3127
+ model: 'TS0601_human_presence_sensor',
3128
+ vendor: 'TuYa',
3129
+ description: 'Human presence sensor Zigbee',
3130
+ fromZigbee: [fzLocal.hpsz],
3131
+ toZigbee: [tzLocal.hpsz],
3132
+ onEvent: tuya.onEventSetLocalTime,
3133
+ exposes: [e.presence(),
3134
+ exposes.numeric('duration_of_attendance', ea.STATE).withUnit('minutes')
3135
+ .withDescription('Shows the presence duration in minutes'),
3136
+ exposes.numeric('duration_of_absence', ea.STATE).withUnit('minutes')
3137
+ .withDescription('Shows the duration of the absence in minutes'),
3138
+ exposes.enum('led_state', ea.STATE_SET, ['on', 'off'])
3139
+ .withDescription('Turns the onboard LED on or off'),
3140
+ ],
3141
+ },
3071
3142
  ];
package/devices/yale.js CHANGED
@@ -4,7 +4,7 @@ const tz = require('../converters/toZigbee');
4
4
  const reporting = require('../lib/reporting');
5
5
  const e = exposes.presets;
6
6
 
7
- const lockExtend = (meta) => {
7
+ const lockExtend = (meta, lockStateOptions=null, binds=['closuresDoorLock', 'genPowerCfg']) => {
8
8
  return {
9
9
  fromZigbee: [fz.lock, fz.battery, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response,
10
10
  fz.lock_user_status_response],
@@ -13,8 +13,8 @@ const lockExtend = (meta) => {
13
13
  exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_user()],
14
14
  configure: async (device, coordinatorEndpoint, logger) => {
15
15
  const endpoint = device.getEndpoint(1);
16
- await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
17
- await reporting.lockState(endpoint);
16
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
17
+ await reporting.lockState(endpoint, lockStateOptions);
18
18
  await reporting.batteryPercentageRemaining(endpoint);
19
19
  },
20
20
  };
@@ -129,7 +129,7 @@ module.exports = [
129
129
  model: 'YDF40',
130
130
  vendor: 'Yale',
131
131
  description: 'Real living lock / Intelligent biometric digital lock',
132
- extend: lockExtend(),
132
+ extend: lockExtend({}, {max: 900}, ['closuresDoorLock']),
133
133
  },
134
134
  {
135
135
  zigbeeModel: ['06ffff2027'],
package/lib/tuya.js CHANGED
@@ -842,6 +842,11 @@ const dataPoints = {
842
842
  alectoSilence: 16,
843
843
  // BAC-002-ALZB - Moes like thermostat with Fan control
844
844
  bacFanMode: 28,
845
+ // Human Presence Sensor Zigbee Radiowave Tuya
846
+ HPSZInductionState: 1,
847
+ HPSZPresenceTime: 101,
848
+ HPSZLeavingTime: 102,
849
+ HPSZLEDState: 103,
845
850
  };
846
851
 
847
852
  const thermostatWeekFormat = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.602",
3
+ "version": "14.0.605",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [