@willieee802/zigbee-herdsman-converters 15.0.91 → 15.0.100

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.
@@ -7758,6 +7758,14 @@ const converters = {
7758
7758
  buttonMapping = {1: '1', 2: '2'};
7759
7759
  } else if (model.model === 'SBM300ZB3') {
7760
7760
  buttonMapping = {1: '1', 2: '2', 3: '3'};
7761
+ } else if (model.model === 'SBM300ZB4') {
7762
+ buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7763
+ } else if (model.model === 'SBM300ZC2') {
7764
+ buttonMapping = {1: '1', 2: '2'};
7765
+ } else if (model.model === 'SBM300ZC3') {
7766
+ buttonMapping = {1: '1', 2: '2', 3: '3'};
7767
+ } else if (model.model === 'SBM300ZC4') {
7768
+ buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7761
7769
  } else if (model.model === 'MSM-300ZB') {
7762
7770
  buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7763
7771
  }
package/devices/aldi.js CHANGED
@@ -1,45 +1,8 @@
1
1
  const exposes = require('../lib/exposes');
2
- const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
3
- const tuya = require('../lib/tuya');
2
+ const fz = require('../converters/fromZigbee');
4
3
  const e = exposes.presets;
5
4
 
6
5
  module.exports = [
7
- {
8
- fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_j0gtlepx'}],
9
- model: 'L122FF63H11A5.0W',
10
- vendor: 'Aldi',
11
- description: 'LIGHTWAY smart home LED-lamp - spot',
12
- extend: tuya.extend.light_onoff_brightness_colortemp_color(),
13
- meta: {applyRedFix: true},
14
- },
15
- {
16
- fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_iivsrikg'}],
17
- model: 'L122AA63H11A6.5W',
18
- vendor: 'Aldi',
19
- description: 'LIGHTWAY smart home LED-lamp - candle',
20
- extend: tuya.extend.light_onoff_brightness_colortemp_color(),
21
- },
22
- {
23
- fingerprint: [{modelID: 'TS0502B', manufacturerName: '_TZ3000_g1glzzfk'}],
24
- model: 'F122SB62H22A4.5W',
25
- vendor: 'Aldi',
26
- description: 'LIGHTWAY smart home LED-lamp - filament',
27
- extend: tuya.extend.light_onoff_brightness_colortemp(),
28
- },
29
- {
30
- fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_v1srfw9x'}],
31
- model: 'C422AC11D41H140.0W',
32
- vendor: 'Aldi',
33
- description: 'MEGOS LED panel RGB+CCT 40W 3600lm 62 x 62 cm',
34
- extend: tuya.extend.light_onoff_brightness_colortemp_color(),
35
- },
36
- {
37
- fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_gb5gaeca'}],
38
- model: 'C422AC14D41H140.0W',
39
- vendor: 'Aldi',
40
- description: 'MEGOS LED panel RGB+CCT 40W 3600lm 30 x 120 cm',
41
- extend: tuya.extend.light_onoff_brightness_colortemp_color(),
42
- },
43
6
  {
44
7
  fingerprint: [{modelID: 'TS1001', manufacturerName: '_TZ3000_ztrfrcsu'}],
45
8
  model: '141L100RC',
package/devices/bosch.js CHANGED
@@ -4,7 +4,6 @@ const fz = require('../converters/fromZigbee');
4
4
  const tz = require('../converters/toZigbee');
5
5
  const reporting = require('../lib/reporting');
6
6
  const utils = require('../lib/utils');
7
- const extend = require('../lib/extend');
8
7
  const constants = require('../lib/constants');
9
8
  const ota = require('../lib/ota');
10
9
  const e = exposes.presets;
@@ -13,6 +12,26 @@ const ea = exposes.access;
13
12
  // Radiator Thermostat II
14
13
  const boschManufacturer = {manufacturerCode: 0x1209};
15
14
 
15
+ // BMCT
16
+ const stateDeviceType = {
17
+ 'light': 0x04,
18
+ 'shutter': 0x01,
19
+ };
20
+ // BMCT
21
+ const stateMotor = {
22
+ 'idle': 0x00,
23
+ 'opening': 0x02,
24
+ 'closing': 0x01,
25
+ };
26
+ // BMCT
27
+ const stateSwitchType = {
28
+ 'button': 0x01,
29
+ 'button_key_change': 0x02,
30
+ 'rocker_switch': 0x03,
31
+ 'rocker_rwitch_key_change': 0x04,
32
+ };
33
+
34
+
16
35
  // Twinguard
17
36
  const smokeSensitivity = {
18
37
  'low': 3,
@@ -55,6 +74,84 @@ const displayedTemperature = {
55
74
 
56
75
  // Radiator Thermostat II
57
76
  const tzLocal = {
77
+ bmct: {
78
+ key: [
79
+ 'device_type',
80
+ 'switch_type',
81
+ 'child_lock', 'child_lock_left', 'child_lock_right',
82
+ 'calibration_closing_time', 'calibration_opening_time',
83
+ 'state',
84
+ ],
85
+ convertSet: async (entity, key, value, meta) => {
86
+ if (key === 'state') {
87
+ const state = value.toLowerCase();
88
+ utils.validateValue(state, ['toggle', 'off', 'on', 'open', 'close', 'stop']);
89
+ if ( state === 'on' || state === 'off' || state === 'toggle') {
90
+ await entity.command('genOnOff', state, {}, utils.getOptions(meta.mapped, entity));
91
+ if (state === 'toggle') {
92
+ const currentState = meta.state[`state${meta.endpoint_name ? `_${meta.endpoint_name}` : ''}`];
93
+ return currentState ? {state: {state: currentState === 'OFF' ? 'ON' : 'OFF'}} : {};
94
+ } else {
95
+ return {state: {state: state.toUpperCase()}};
96
+ }
97
+ } else if ( state === 'open' || state === 'close' || state === 'stop') {
98
+ const lookup = {'open': 'upOpen', 'close': 'downClose', 'stop': 'stop', 'on': 'upOpen', 'off': 'downClose'};
99
+ value = value.toLowerCase();
100
+ utils.validateValue(value, Object.keys(lookup));
101
+ await entity.command('closuresWindowCovering', lookup[value], {}, utils.getOptions(meta.mapped, entity));
102
+ }
103
+ }
104
+ if (key === 'device_type') {
105
+ const index = stateDeviceType[value];
106
+ await entity.write(0xFCA0, {0x0000: {value: index, type: 0x30}}, boschManufacturer);
107
+ return {state: {device_type: value}};
108
+ }
109
+ if (key === 'switch_type') {
110
+ const index = stateSwitchType[value];
111
+ await entity.write(0xFCA0, {0x0001: {value: index, type: 0x30}}, boschManufacturer);
112
+ return {state: {switch_type: value}};
113
+ }
114
+ if (key === 'child_lock') {
115
+ const index = stateOffOn[value];
116
+ await entity.write(0xFCA0, {0x0008: {value: index, type: 0x10}}, boschManufacturer);
117
+ return {state: {child_lock: value}};
118
+ }
119
+ if (key === 'calibration_closing_time') {
120
+ const index = value *10;
121
+ await entity.write(0xFCA0, {0x0002: {value: index, type: 0x23}}, boschManufacturer);
122
+ return {state: {calibration_closing_time: value}};
123
+ }
124
+ if (key === 'calibration_opening_time') {
125
+ const index = value *10;
126
+ await entity.write(0xFCA0, {0x0003: {value: index, type: 0x23}}, boschManufacturer);
127
+ return {state: {calibration_opening_time: value}};
128
+ }
129
+ },
130
+ convertGet: async (entity, key, meta) => {
131
+ switch (key) {
132
+ case 'state':
133
+ await entity.read('genOnOff', ['onOff']);
134
+ break;
135
+ case 'device_type':
136
+ await entity.read(0xFCA0, [0x0000], boschManufacturer);
137
+ break;
138
+ case 'switch_type':
139
+ await entity.read(0xFCA0, [0x0001], boschManufacturer);
140
+ break;
141
+ case 'child_lock':
142
+ await entity.read(0xFCA0, [0x0008], boschManufacturer);
143
+ break;
144
+ case 'calibration_closing_time':
145
+ await entity.read(0xFCA0, [0x0002], boschManufacturer);
146
+ break;
147
+ case 'calibration_opening_time':
148
+ await entity.read(0xFCA0, [0x0003], boschManufacturer);
149
+ break;
150
+ default: // Unknown key
151
+ throw new Error(`Unhandled key toZigbee.bcmt.convertGet ${key}`);
152
+ }
153
+ },
154
+ },
58
155
  bwa1: {
59
156
  key: ['alarm_on_motion', 'test'],
60
157
  convertSet: async (entity, key, value, meta) => {
@@ -256,6 +353,27 @@ const tzLocal = {
256
353
 
257
354
 
258
355
  const fzLocal = {
356
+ bmct: {
357
+ cluster: '64672',
358
+ type: ['attributeReport', 'readResponse'],
359
+ options: [],
360
+ convert: (model, msg, publish, options, meta) => {
361
+ const result = {};
362
+ const data = msg.data;
363
+ if (data.hasOwnProperty(0x0000)) {
364
+ result.device_type = (Object.keys(stateDeviceType)[msg.data[0x0000]]);
365
+ } else if (data.hasOwnProperty(0x0001)) {
366
+ result.switch_type = (Object.keys(stateSwitchType)[msg.data[0x0001]]);
367
+ } else if (data.hasOwnProperty(0x0002)) {
368
+ result.calibration_closing_time = msg.data[0x0002];
369
+ } else if (data.hasOwnProperty(0x0003)) {
370
+ result.calibration_opening_time = msg.data[0x0003];
371
+ } else if (data.hasOwnProperty(0x0013)) {
372
+ result.motor_state = (Object.keys(stateMotor)[msg.data[0x0013]]);
373
+ }
374
+ return result;
375
+ },
376
+ },
259
377
  bwa1_alarm_on_motion: {
260
378
  cluster: '64684',
261
379
  type: ['attributeReport', 'readResponse'],
@@ -742,27 +860,51 @@ const definition = [
742
860
  zigbeeModel: ['RBSH-MMS-ZB-EU'],
743
861
  model: 'BMCT-SLZ',
744
862
  vendor: 'Bosch',
745
- description: 'Light/shutter control II',
746
- extend: extend.switch(),
747
- exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
863
+ description: 'Bosch Light/shutter control unit II',
864
+ fromZigbee: [fzLocal.bmct, fz.cover_position_tilt, fz.on_off, fz.power_on_behavior],
865
+ toZigbee: [tzLocal.bmct, tz.cover_position_tilt, tz.on_off, tz.power_on_behavior],
866
+ meta: {multiEndpoint: true},
748
867
  endpoint: (device) => {
749
- return {'l1': 2, 'l2': 3};
868
+ return {'left': 2, 'right': 3};
750
869
  },
751
- meta: {multiEndpoint: true},
752
870
  configure: async (device, coordinatorEndpoint, logger) => {
753
- // Configuration values:
754
- // 0x0000 0x0001
755
- // Roller Shutter 1 3
756
- // Window Blind 2 3
757
- // Light Switch 4 3
758
-
759
- // Configure device as dual switch.
760
- // Device will perform a rejoin after this write
761
- await device.getEndpoint(1).write(0xfca0, {0x0000: {value: 0x04, type: 0x30}, 0x0001: {value: 0x03, type: 0x30}});
762
-
763
- await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
764
- await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
871
+ const endpoint1 = device.getEndpoint(1);
872
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genIdentify', 'closuresWindowCovering', 64672]);
873
+ await endpoint1.unbind('genOnOff', coordinatorEndpoint);
874
+ await endpoint1.read(64672, [0x0000, 0x0001, 0x0002, 0x0003, 0x0008, 0x0013], boschManufacturer);
875
+ const endpoint2 = device.getEndpoint(2);
876
+ await endpoint2.read(64672, [0x0008], boschManufacturer);
877
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genIdentify', 'genOnOff']);
878
+ await reporting.onOff(endpoint2);
879
+ const endpoint3 = device.getEndpoint(3);
880
+ await endpoint3.read(64672, [0x0008], boschManufacturer);
881
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genIdentify', 'genOnOff']);
882
+ await reporting.onOff(endpoint3);
765
883
  },
884
+ exposes: [
885
+ // light
886
+ exposes.enum('device_type', ea.ALL, Object.keys(stateDeviceType))
887
+ .withDescription('Device type: '),
888
+ exposes.enum('switch_type', ea.ALL, Object.keys(stateSwitchType))
889
+ .withDescription('Module controlled by a rocker switch or a button'),
890
+ e.switch().withEndpoint('left'),
891
+ e.switch().withEndpoint('right'),
892
+ e.power_on_behavior().withEndpoint('right'),
893
+ e.power_on_behavior().withEndpoint('left'),
894
+ exposes.binary('child_lock', ea.ALL, 'ON', 'OFF').withEndpoint('left')
895
+ .withDescription('Enable/Disable child lock'),
896
+ exposes.binary('child_lock', ea.ALL, 'ON', 'OFF').withEndpoint('right')
897
+ .withDescription('Enable/Disable child lock'),
898
+ // cover
899
+ e.cover_position().setAccess('state', ea.ALL),
900
+ exposes.enum('motor_state', ea.STATE, Object.keys(stateMotor))
901
+ .withDescription('Shutter motor actual state '),
902
+ exposes.binary('child_lock', ea.ALL, 'ON', 'OFF').withDescription('Enable/Disable child lock'),
903
+ exposes.numeric('calibration_closing_time', ea.ALL).withUnit('S')
904
+ .withDescription('Calibration opening time').withValueMin(1).withValueMax(90),
905
+ exposes.numeric('calibration_opening_time', ea.ALL).withUnit('S')
906
+ .withDescription('Calibration closing time').withValueMin(1).withValueMax(90),
907
+ ],
766
908
  },
767
909
  ];
768
910
 
package/devices/climax.js CHANGED
@@ -82,14 +82,14 @@ module.exports = [
82
82
  vendor: 'Climax',
83
83
  description: 'Smart siren',
84
84
  fromZigbee: [fz.battery, fz.ias_wd, fz.ias_enroll, fz.ias_siren],
85
- toZigbee: [tz.warning_simple, tz.ias_max_duration, tz.warning],
85
+ toZigbee: [tz.warning_simple, tz.ias_max_duration, tz.warning, tz.squawk],
86
86
  configure: async (device, coordinatorEndpoint, logger) => {
87
87
  const endpoint = device.getEndpoint(1);
88
88
  await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'ssIasZone', 'ssIasWd']);
89
89
  await endpoint.read('ssIasZone', ['zoneState', 'iasCieAddr', 'zoneId']);
90
90
  await endpoint.read('ssIasWd', ['maxDuration']);
91
91
  },
92
- exposes: [e.battery_low(), e.tamper(), e.warning(),
92
+ exposes: [e.battery_low(), e.tamper(), e.warning(), e.squawk(),
93
93
  exposes.numeric('max_duration', ea.ALL).withUnit('s').withValueMin(0).withValueMax(600).withDescription('Duration of Siren'),
94
94
  exposes.binary('alarm', ea.SET, 'START', 'OFF').withDescription('Manual start of siren')],
95
95
  },
@@ -112,7 +112,7 @@ module.exports = [
112
112
  exposes: [e.carbon_monoxide(), e.battery_low(), e.tamper(), e.battery()],
113
113
  },
114
114
  {
115
- zigbeeModel: ['KP-ACE_00.00.03.12TC'],
115
+ zigbeeModel: ['KP-ACE_00.00.03.12TC', 'KP-ACE_00.00.03.11TC'],
116
116
  model: 'KP-23EL-ZBS-ACE',
117
117
  vendor: 'Climax',
118
118
  description: 'Remote Keypad',
@@ -292,7 +292,7 @@ module.exports = [
292
292
  description: 'Power plug',
293
293
  fromZigbee: [fz.on_off, develco.fz.electrical_measurement, develco.fz.metering],
294
294
  toZigbee: [tz.on_off],
295
- exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
295
+ exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.ac_frequency()],
296
296
  configure: async (device, coordinatorEndpoint, logger) => {
297
297
  const endpoint = device.getEndpoint(2);
298
298
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
@@ -303,6 +303,7 @@ module.exports = [
303
303
  await reporting.rmsVoltage(endpoint);
304
304
  await reporting.readMeteringMultiplierDivisor(endpoint);
305
305
  await reporting.currentSummDelivered(endpoint);
306
+ await reporting.acFrequency(endpoint);
306
307
  },
307
308
  endpoint: (device) => {
308
309
  return {default: 2};
@@ -361,6 +362,30 @@ module.exports = [
361
362
  return {default: 2};
362
363
  },
363
364
  },
365
+ {
366
+ zigbeeModel: ['SPLZB-137'],
367
+ model: 'SPLZB-137',
368
+ vendor: 'Develco',
369
+ description: 'Power plug',
370
+ fromZigbee: [fz.on_off, develco.fz.electrical_measurement, develco.fz.metering],
371
+ toZigbee: [tz.on_off],
372
+ exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.ac_frequency()],
373
+ configure: async (device, coordinatorEndpoint, logger) => {
374
+ const endpoint = device.getEndpoint(2);
375
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
376
+ await reporting.onOff(endpoint);
377
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint, true);
378
+ await reporting.activePower(endpoint);
379
+ await reporting.rmsCurrent(endpoint);
380
+ await reporting.rmsVoltage(endpoint);
381
+ await reporting.readMeteringMultiplierDivisor(endpoint);
382
+ await reporting.currentSummDelivered(endpoint);
383
+ await reporting.acFrequency(endpoint);
384
+ },
385
+ endpoint: (device) => {
386
+ return {default: 2};
387
+ },
388
+ },
364
389
  {
365
390
  zigbeeModel: ['SMRZB-143'],
366
391
  model: 'SMRZB-143',
@@ -307,7 +307,7 @@ module.exports = [
307
307
  vendor: 'Gledopto',
308
308
  ota: ota.zigbeeOTA,
309
309
  description: 'Zigbee LED Controller W (pro)',
310
- extend: gledoptoExtend.light_onoff_brightness({noConfigure: true}),
310
+ extend: gledoptoExtend.light_onoff_brightness({noConfigure: true, disablePowerOnBehavior: false}),
311
311
  configure: async (device, coordinatorEndpoint, logger) => {
312
312
  await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
313
313
  await configureReadModelID(device, coordinatorEndpoint, logger);
@@ -24,6 +24,24 @@ module.exports = [
24
24
  exposes: [
25
25
  e.lock(), e.battery(), e.auto_relock_time().withValueMin(0).withValueMax(3600), e.sound_volume()],
26
26
  },
27
+ {
28
+ zigbeeModel: ['HT-SLM-2'],
29
+ model: 'HT-SLM-2',
30
+ vendor: 'Heimgard Technologies',
31
+ description: 'Doorlock with fingerprint',
32
+ fromZigbee: [fz.lock, fz.battery, fz.lock_pin_code_response, fz.lock_user_status_response],
33
+ toZigbee: [tz.lock, tz.lock_sound_volume, tz.identify, tz.pincode_lock, tz.lock_userstatus],
34
+ meta: {pinCodeCount: 39},
35
+ ota: ota.zigbeeOTA,
36
+ configure: async (device, coordinatorEndpoint, logger) => {
37
+ const endpoint = device.getEndpoint(1);
38
+ await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
39
+ await reporting.lockState(endpoint);
40
+ await reporting.batteryPercentageRemaining(endpoint);
41
+ await endpoint.read('closuresDoorLock', ['lockState', 'soundVolume']);
42
+ },
43
+ exposes: [e.lock(), e.pincode(), e.battery(), e.sound_volume()],
44
+ },
27
45
  {
28
46
  zigbeeModel: ['HC-IWDIM-1'],
29
47
  model: 'HC-IWDIM-1',
@@ -8,6 +8,18 @@ const e = exposes.presets;
8
8
  const ea = exposes.access;
9
9
 
10
10
  module.exports = [
11
+ {
12
+ zigbeeModel: ['5120.2210'],
13
+ model: '5120.2210',
14
+ vendor: 'iluminize',
15
+ description: 'Zigbee 3.0 actuator mini 1x 230V',
16
+ extend: extend.switch(),
17
+ configure: async (device, coordinatorEndpoint, logger) => {
18
+ const endpoint = device.getEndpoint(1);
19
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
20
+ await reporting.onOff(endpoint);
21
+ },
22
+ },
11
23
  {
12
24
  zigbeeModel: ['511.050'],
13
25
  model: '511.050',