zigbee-herdsman-converters 15.0.92 → 15.0.94
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.
- package/devices/bosch.js +160 -18
- package/devices/gledopto.js +1 -1
- package/devices/heimgard_technologies.js +18 -0
- package/devices/namron.js +0 -7
- package/devices/philips.js +1 -1
- package/devices/tlwglobal.js +28 -0
- package/devices/zemismart.js +1 -1
- package/package.json +1 -1
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
|
-
|
|
747
|
-
|
|
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 {'
|
|
868
|
+
return {'left': 2, 'right': 3};
|
|
750
869
|
},
|
|
751
|
-
meta: {multiEndpoint: true},
|
|
752
870
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
await reporting.bind(
|
|
764
|
-
await reporting.
|
|
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/gledopto.js
CHANGED
|
@@ -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',
|
package/devices/namron.js
CHANGED
|
@@ -481,13 +481,6 @@ module.exports = [
|
|
|
481
481
|
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
|
|
482
482
|
await reporting.thermostatKeypadLockMode(endpoint);
|
|
483
483
|
|
|
484
|
-
await endpoint.configureReporting('hvacThermostat', [{
|
|
485
|
-
attribute: 'occupancy',
|
|
486
|
-
minimumReportInterval: 0,
|
|
487
|
-
maximumReportInterval: constants.repInterval.HOUR,
|
|
488
|
-
reportableChange: null,
|
|
489
|
-
}]);
|
|
490
|
-
|
|
491
484
|
// Metering
|
|
492
485
|
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier']);
|
|
493
486
|
await endpoint.read('haElectricalMeasurement', ['acCurrentDivisor']);
|
package/devices/philips.js
CHANGED
|
@@ -620,7 +620,7 @@ module.exports = [
|
|
|
620
620
|
extend: philips.extend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
|
-
zigbeeModel: ['LCG002', '929003047701', '929003047701', '929003526202_01', '929003526202_02', '929003526202_03'],
|
|
623
|
+
zigbeeModel: ['LCG002', '929003047701', '929003047701', '929003526202_01', '929003526202_02', '929003526202_03', '929003526101'],
|
|
624
624
|
model: '929001953101',
|
|
625
625
|
vendor: 'Philips',
|
|
626
626
|
description: 'Hue White and Color Ambiance GU10',
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
// Tested working with firmare 2.5.3_r58: dimming, on/off, and effects give no
|
|
5
|
+
// errors (although the stop effect and the finish effect do nothing).
|
|
6
|
+
{
|
|
7
|
+
zigbeeModel: ['K10-1220Z'],
|
|
8
|
+
model: 'K10-1220Z',
|
|
9
|
+
vendor: 'TLW Global',
|
|
10
|
+
description: '12V LED smart driver 15W with 6-port micro plug connector',
|
|
11
|
+
extend: extend.light_onoff_brightness(),
|
|
12
|
+
},
|
|
13
|
+
// K10-1230Z and K10-1250Z untested, but assumed to be consistent with K10-1220W
|
|
14
|
+
{
|
|
15
|
+
zigbeeModel: ['K10-1230Z'],
|
|
16
|
+
model: 'K10-1230Z',
|
|
17
|
+
vendor: 'TLW Global',
|
|
18
|
+
description: '12V LED smart driver 30W with 6-port micro plug connector',
|
|
19
|
+
extend: extend.light_onoff_brightness(),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
zigbeeModel: ['K10-1250Z'],
|
|
23
|
+
model: 'K10-1250Z',
|
|
24
|
+
vendor: 'TLW Global',
|
|
25
|
+
description: '12V LED smart driver 50W with 6-port micro plug connector',
|
|
26
|
+
extend: extend.light_onoff_brightness(),
|
|
27
|
+
},
|
|
28
|
+
];
|
package/devices/zemismart.js
CHANGED
|
@@ -124,7 +124,7 @@ module.exports = [
|
|
|
124
124
|
'button_6_hold', 'button_6_single', 'button_6_double'])],
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
fingerprint: tuya.fingerprint('TS011F', ['_TZ3000_zigisuyh', '_TZ3000_v4mevirn', '_TZ3000_mlswgkc3']),
|
|
127
|
+
fingerprint: tuya.fingerprint('TS011F', ['_TZ3000_zigisuyh', '_TZ3000_v4mevirn', '_TZ3000_mlswgkc3', '_TZ3000_dlug3kbc']),
|
|
128
128
|
model: 'ZIGBEE-B09-UK',
|
|
129
129
|
vendor: 'Zemismart',
|
|
130
130
|
description: 'Zigbee smart outlet universal socket with USB port',
|