zigbee-herdsman-converters 14.0.338 → 14.0.342

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.
@@ -2735,7 +2735,7 @@ const converters = {
2735
2735
  const currentTime = new Date().getTime();
2736
2736
  const utcTime = Math.round((currentTime - OneJanuary2000) / 1000);
2737
2737
  const localTime = Math.round(currentTime / 1000) - (new Date()).getTimezoneOffset() * 60;
2738
- const endpoint = msg.device.getEndpoint(1);
2738
+ const endpoint = msg.endpoint;
2739
2739
  const payload = {
2740
2740
  payloadSize: 8,
2741
2741
  payload: [
@@ -4927,6 +4927,11 @@ const converters = {
4927
4927
  value = data.readUInt32LE(i+2);
4928
4928
  i += 5;
4929
4929
  break;
4930
+ case 36:
4931
+ // 0x24 Zcl40BitUint
4932
+ value = [data.readUInt32LE(i+2), data.readUInt8(i+6)];
4933
+ i += 6;
4934
+ break;
4930
4935
  case 39:
4931
4936
  // 0x27 Zcl64BitUint
4932
4937
  value = data.readBigUInt64BE(i+2);
@@ -20,6 +20,21 @@ module.exports = [
20
20
  device.skipDefaultResponse = true;
21
21
  },
22
22
  },
23
+ {
24
+ zigbeeModel: ['SWITCH-ZR02'],
25
+ model: 'SWITCH-ZR02',
26
+ vendor: 'eWeLink',
27
+ description: 'Zigbee smart switch',
28
+ extend: extend.switch(),
29
+ fromZigbee: [fz.on_off_skip_duplicate_transaction],
30
+ configure: async (device, coordinatorEndpoint, logger) => {
31
+ const endpoint = device.getEndpoint(1);
32
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
33
+ },
34
+ onEvent: async (type, data, device) => {
35
+ device.skipDefaultResponse = true;
36
+ },
37
+ },
23
38
  {
24
39
  zigbeeModel: ['ZB-SW01'],
25
40
  model: 'ZB-SW01',
package/devices/heiman.js CHANGED
@@ -73,6 +73,7 @@ module.exports = [
73
73
  globalStore.clearValue(device, 'interval');
74
74
  } else if (!globalStore.hasValue(device, 'interval')) {
75
75
  const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
76
+ if (seconds === -1) return;
76
77
  const interval = setInterval(async () => {
77
78
  try {
78
79
  await endpoint.read('haElectricalMeasurement', ['rmsVoltage', 'rmsCurrent', 'activePower']);
@@ -85,7 +86,8 @@ module.exports = [
85
86
  },
86
87
  {
87
88
  zigbeeModel: ['SMOK_V16', 'SMOK_V15', 'b5db59bfd81e4f1f95dc57fdbba17931', '98293058552c49f38ad0748541ee96ba', 'SMOK_YDLV10',
88
- 'FB56-SMF02HM1.4', 'SmokeSensor-N-3.0', '319fa36e7384414a9ea62cba8f6e7626', 'c3442b4ac59b4ba1a83119d938f283ab'],
89
+ 'FB56-SMF02HM1.4', 'SmokeSensor-N-3.0', '319fa36e7384414a9ea62cba8f6e7626', 'c3442b4ac59b4ba1a83119d938f283ab',
90
+ 'SmokeSensor-EF-3.0'],
89
91
  model: 'HS1SA',
90
92
  vendor: 'HEIMAN',
91
93
  description: 'Smoke detector',
@@ -99,7 +101,7 @@ module.exports = [
99
101
  exposes: [e.smoke(), e.battery_low(), e.battery()],
100
102
  },
101
103
  {
102
- zigbeeModel: ['SmokeSensor-N', 'SmokeSensor-EF-3.0', 'SmokeSensor-EM'],
104
+ zigbeeModel: ['SmokeSensor-N', 'SmokeSensor-EM'],
103
105
  model: 'HS3SA',
104
106
  vendor: 'HEIMAN',
105
107
  description: 'Smoke detector',
package/devices/ikea.js CHANGED
@@ -32,6 +32,18 @@ const bulbOnEvent = async (type, data, device) => {
32
32
  }
33
33
  };
34
34
 
35
+ const configureRemote = async (device, coordinatorEndpoint, logger) => {
36
+ // Firmware 2.3.75 >= only supports binding to endpoint, before only to group
37
+ // - https://github.com/Koenkk/zigbee2mqtt/issues/2772#issuecomment-577389281
38
+ // - https://github.com/Koenkk/zigbee2mqtt/issues/7716
39
+ const endpoint = device.getEndpoint(1);
40
+ const version = device.softwareBuildID.split('.').map((n) => Number(n));
41
+ const bindTarget = version[0] >= 2 && version[1] >= 3 && version[2] >= 75 ? coordinatorEndpoint : constants.defaultBindGroup;
42
+ await endpoint.bind('genOnOff', bindTarget);
43
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
44
+ await reporting.batteryPercentageRemaining(endpoint);
45
+ };
46
+
35
47
  const tradfriExtend = {
36
48
  light_onoff_brightness: (options = {}) => ({
37
49
  ...extend.light_onoff_brightness(options),
@@ -302,10 +314,10 @@ module.exports = [
302
314
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
303
315
  },
304
316
  {
305
- zigbeeModel: ['TRADFRI bulb E14 WS 470lm', 'TRADFRI bulb E12 WS 450lm'],
317
+ zigbeeModel: ['TRADFRI bulb E14 WS 470lm', 'TRADFRI bulb E12 WS 450lm', 'TRADFRI bulb E17 WS 440lm'],
306
318
  model: 'LED1903C5/LED1835C6',
307
319
  vendor: 'IKEA',
308
- description: 'TRADFRI bulb E12/E14 WS 450/470 lumen, dimmable, white spectrum, opal white',
320
+ description: 'TRADFRI bulb E12/E14/E17 WS 450/470/440 lumen, dimmable, white spectrum, opal white',
309
321
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
310
322
  },
311
323
  {
@@ -518,14 +530,7 @@ module.exports = [
518
530
  toZigbee: [],
519
531
  ota: ota.tradfri,
520
532
  meta: {battery: {dontDividePercentage: true}},
521
- configure: async (device, coordinatorEndpoint, logger) => {
522
- const endpoint = device.getEndpoint(1);
523
- // See explanation in E1743, only applies to E1810 (for E1524 it has no effect)
524
- // https://github.com/Koenkk/zigbee2mqtt/issues/2772#issuecomment-577389281
525
- await endpoint.bind('genOnOff', constants.defaultBindGroup);
526
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
527
- await reporting.batteryPercentageRemaining(endpoint);
528
- },
533
+ configure: configureRemote,
529
534
  },
530
535
  {
531
536
  zigbeeModel: ['Remote Control N2'],
@@ -540,12 +545,7 @@ module.exports = [
540
545
  toZigbee: [],
541
546
  ota: ota.tradfri,
542
547
  meta: {battery: {dontDividePercentage: true}},
543
- configure: async (device, coordinatorEndpoint, logger) => {
544
- const endpoint = device.getEndpoint(1);
545
- await endpoint.bind('genOnOff', constants.defaultBindGroup);
546
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
547
- await reporting.batteryPercentageRemaining(endpoint);
548
- },
548
+ configure: configureRemote,
549
549
  },
550
550
  {
551
551
  zigbeeModel: ['TRADFRI on/off switch'],
@@ -558,16 +558,7 @@ module.exports = [
558
558
  toZigbee: [],
559
559
  ota: ota.tradfri,
560
560
  meta: {disableActionGroup: true, battery: {dontDividePercentage: true}},
561
- configure: async (device, coordinatorEndpoint, logger) => {
562
- const endpoint = device.getEndpoint(1);
563
- // By default this device controls group 0, some devices are by default in
564
- // group 0 causing the remote to control them.
565
- // By binding it to a random group, e.g. 901, it will send the commands to group 901 instead of 0
566
- // https://github.com/Koenkk/zigbee2mqtt/issues/2772#issuecomment-577389281
567
- await endpoint.bind('genOnOff', constants.defaultBindGroup);
568
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
569
- await reporting.batteryPercentageRemaining(endpoint);
570
- },
561
+ configure: configureRemote,
571
562
  },
572
563
  {
573
564
  zigbeeModel: ['KNYCKLAN Open/Close remote'],
@@ -579,16 +570,7 @@ module.exports = [
579
570
  toZigbee: [],
580
571
  ota: ota.tradfri,
581
572
  meta: {disableActionGroup: true, battery: {dontDividePercentage: true}},
582
- configure: async (device, coordinatorEndpoint, logger) => {
583
- const endpoint = device.getEndpoint(1);
584
- // By default this device controls group 0, some devices are by default in
585
- // group 0 causing the remote to control them.
586
- // By binding it to a random group, e.g. 901, it will send the commands to group 901 instead of 0
587
- // https://github.com/Koenkk/zigbee2mqtt/issues/2772#issuecomment-577389281
588
- await endpoint.bind('genOnOff', constants.defaultBindGroup);
589
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
590
- await reporting.batteryPercentageRemaining(endpoint);
591
- },
573
+ configure: configureRemote,
592
574
  },
593
575
  {
594
576
  zigbeeModel: ['KNYCKLAN receiver'],
@@ -613,14 +595,7 @@ module.exports = [
613
595
  toZigbee: [],
614
596
  ota: ota.tradfri,
615
597
  meta: {disableActionGroup: true, battery: {dontDividePercentage: true}},
616
- configure: async (device, coordinatorEndpoint, logger) => {
617
- const endpoint = device.getEndpoint(1);
618
- // By default this device controls group 0, some devices are by default in
619
- // group 0 causing the remote to control them.
620
- // By binding it to a random group, e.g. 901, it will send the commands to group 901 instead of 0
621
- await reporting.bind(endpoint, constants.defaultBindGroup, ['genPowerCfg']);
622
- await reporting.batteryPercentageRemaining(endpoint);
623
- },
598
+ configure: configureRemote,
624
599
  },
625
600
  {
626
601
  zigbeeModel: ['SYMFONISK Sound Controller'],
@@ -722,16 +697,7 @@ module.exports = [
722
697
  toZigbee: [],
723
698
  meta: {battery: {dontDividePercentage: true}},
724
699
  ota: ota.tradfri,
725
- configure: async (device, coordinatorEndpoint, logger) => {
726
- const endpoint = device.getEndpoint(1);
727
- // By default this device controls group 0, some devices are by default in
728
- // group 0 causing the remote to control them.
729
- // By binding it to a random group, e.g. 901, it will send the commands to group 901 instead of 0
730
- // https://github.com/Koenkk/zigbee2mqtt/issues/2772#issuecomment-577389281
731
- await endpoint.bind('genOnOff', constants.defaultBindGroup);
732
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
733
- await reporting.batteryPercentageRemaining(endpoint);
734
- },
700
+ configure: configureRemote,
735
701
  },
736
702
  {
737
703
  zigbeeModel: ['GUNNARP panel round'],
package/devices/namron.js CHANGED
@@ -184,6 +184,13 @@ module.exports = [
184
184
  return {l1: 1, l2: 2, l3: 3, l4: 4};
185
185
  },
186
186
  },
187
+ {
188
+ zigbeeModel: ['3802961'],
189
+ model: '3802961',
190
+ vendor: 'Namron',
191
+ description: 'LED 9W CCT E27',
192
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
193
+ },
187
194
  {
188
195
  zigbeeModel: ['3802962'],
189
196
  model: '3802962',
package/devices/tuya.js CHANGED
@@ -80,12 +80,16 @@ module.exports = [
80
80
  },
81
81
  {
82
82
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_mvn6jl7x'},
83
- {modelID: 'TS011F', manufacturerName: '_TZ3000_raviyuvk'}, {modelID: 'TS011F', manufacturerName: '_TYZB01_hlla45kx'}],
83
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_raviyuvk'}, {modelID: 'TS011F', manufacturerName: '_TYZB01_hlla45kx'},
84
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_92qd4sqa'}],
84
85
  model: 'TS011F_2_gang_wall',
85
86
  vendor: 'TuYa',
86
87
  description: '2 gang wall outlet',
87
- extend: extend.switch(),
88
- exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
88
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_backlight_mode]),
89
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_backlight_mode]),
90
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
91
+ exposes.enum('power_on_behavior', ea.ALL, ['on', 'off', 'previous']),
92
+ exposes.enum('backlight_mode', ea.ALL, ['LOW', 'MEDIUM', 'HIGH'])],
89
93
  whiteLabel: [{vendor: 'ClickSmart+', model: 'CMA30036'}],
90
94
  endpoint: (device) => {
91
95
  return {'l1': 1, 'l2': 2};
@@ -835,8 +839,6 @@ module.exports = [
835
839
  e.battery_low(), e.child_lock(), e.open_window(), e.open_window_temperature().withValueMin(0).withValueMax(30),
836
840
  e.holiday_temperature().withValueMin(0).withValueMax(30), e.comfort_temperature().withValueMin(0).withValueMax(30),
837
841
  e.eco_temperature().withValueMin(0).withValueMax(30),
838
- e.battery_low(), e.child_lock(), e.open_window(), e.open_window_temperature(), e.holiday_temperature(),
839
- e.comfort_temperature(), e.eco_temperature(),
840
842
  exposes.climate().withPreset(['auto', 'manual', 'holiday']).withLocalTemperatureCalibration(-20, 20, 1, ea.STATE_SET)
841
843
  .withLocalTemperature(ea.STATE).withSetpoint('current_heating_setpoint', 0, 30, 0.5, ea.STATE_SET),
842
844
  exposes.numeric('boost_timeset_countdown', ea.STATE_SET).withUnit('second').withDescription('Setting '+
@@ -849,8 +851,6 @@ module.exports = [
849
851
  ' by switching the heating off. To achieve this, the valve is closed fully. To activate the '+
850
852
  'heating stop, the device display "HS" ‚press the pair button to cancel.'),
851
853
  exposes.binary('online', ea.STATE_SET, 'ON', 'OFF').withDescription('Is the device online'),
852
- exposes.text('holiday_mode_date', ea.STATE_SET).withDescription('The holiday mode( ⛱ ) will '+
853
- 'automatically start at the set time starting point and run the holiday temperature.'),
854
854
  exposes.numeric('holiday_mode_date', ea.STATE_SET).withDescription('The holiday mode( ⛱ ) will '+
855
855
  'automatically start at the set time starting point and run the holiday temperature.')
856
856
  .withValueMin(0).withValueMax(1000),
@@ -988,6 +988,7 @@ module.exports = [
988
988
  globalStore.clearValue(device, 'interval');
989
989
  } else if (!globalStore.hasValue(device, 'interval')) {
990
990
  const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
991
+ if (seconds === -1) return;
991
992
  const interval = setInterval(async () => {
992
993
  try {
993
994
  await endpoint.read('haElectricalMeasurement', ['rmsVoltage', 'rmsCurrent', 'activePower']);
@@ -1084,6 +1085,7 @@ module.exports = [
1084
1085
  globalStore.clearValue(device, 'interval');
1085
1086
  } else if (!globalStore.hasValue(device, 'interval')) {
1086
1087
  const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
1088
+ if (seconds === -1) return;
1087
1089
  const interval = setInterval(async () => {
1088
1090
  try {
1089
1091
  await endpoint.read('haElectricalMeasurement', ['rmsVoltage', 'rmsCurrent', 'activePower']);
@@ -1230,7 +1232,8 @@ module.exports = [
1230
1232
  },
1231
1233
  },
1232
1234
  {
1233
- fingerprint: [{modelID: 'TS0011', manufacturerName: '_TZ3000_ji4araar'}, {modelID: 'TS0011', manufacturerName: '_TZ3000_qmi1cfuq'}],
1235
+ fingerprint: [{modelID: 'TS0011', manufacturerName: '_TZ3000_ji4araar'}, {modelID: 'TS0011', manufacturerName: '_TZ3000_qmi1cfuq'},
1236
+ {modelID: 'TS0011', manufacturerName: '_TZ3000_txpirhfq'}],
1234
1237
  model: 'TS0011_switch_module',
1235
1238
  vendor: 'TuYa',
1236
1239
  description: '1 gang switch module - (without neutral)',
@@ -1241,7 +1244,7 @@ module.exports = [
1241
1244
  exposes.presets.power_on_behavior(),
1242
1245
  exposes.presets.switch_type_2(),
1243
1246
  ],
1244
- whiteLabel: [{vendor: 'AVATTO', model: '1gang N-ZLWSM01'}],
1247
+ whiteLabel: [{vendor: 'AVATTO', model: '1gang N-ZLWSM01'}, {vendor: 'SMATRUL', model: 'TMZ02L-16A-W'}],
1245
1248
  configure: async (device, coordinatorEndpoint, logger) => {
1246
1249
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
1247
1250
  device.powerSource = 'Mains (single phase)';
package/lib/exposes.js CHANGED
@@ -495,7 +495,7 @@ module.exports = {
495
495
  no_position_support: () => new Binary('no_position_support', access.SET, true, false).withDescription('Set to true when your device only reports position 0, 100 and 50 (in this case your device has an older firmware) (default false).'),
496
496
  transition: () => new Numeric(`transition`, access.SET).withValueMin(0).withDescription('Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).'),
497
497
  legacy: () => new Binary(`legacy`, access.SET, true, false).withDescription(`Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true).`),
498
- measurement_poll_interval: () => new Numeric(`measurement_poll_interval`, access.SET).withValueMin(0).withDescription(`This device does not support reporting electric measurements so it is polled instead. The default poll interval is 60 seconds.`),
498
+ measurement_poll_interval: () => new Numeric(`measurement_poll_interval`, access.SET).withValueMin(-1).withDescription(`This device does not support reporting electric measurements so it is polled instead. The default poll interval is 60 seconds, set to -1 to disable.`),
499
499
  illuminance_below_threshold_check: () => new Binary(`illuminance_below_threshold_check`, access.SET, true, false).withDescription(`Set to false to also send messages when illuminance is above threshold in night mode (default true).`),
500
500
  },
501
501
  presets: {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.338",
3
+ "version": "14.0.342",
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.338",
3
+ "version": "14.0.342",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [