zigbee-herdsman-converters 14.0.558 → 14.0.561
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/converters/fromZigbee.js +1 -1
- package/devices/adeo.js +18 -4
- package/devices/bticino.js +1 -1
- package/devices/envilar.js +7 -0
- package/devices/lidl.js +8 -0
- package/devices/lonsonho.js +50 -2
- package/devices/neo.js +2 -2
- package/devices/nue_3a.js +60 -0
- package/devices/philips.js +1 -1
- package/devices/plugwise.js +110 -2
- package/devices/third_reality.js +13 -0
- package/devices/weiser.js +17 -3
- package/devices/xiaomi.js +40 -40
- package/lib/extend.js +38 -12
- package/lib/utils.js +1 -9
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
package/devices/adeo.js
CHANGED
|
@@ -112,14 +112,28 @@ module.exports = [
|
|
|
112
112
|
zigbeeModel: ['LXEK-2'],
|
|
113
113
|
model: '9CZA-G1521-Q1A',
|
|
114
114
|
vendor: 'ADEO',
|
|
115
|
-
description: 'ENKI
|
|
115
|
+
description: 'ENKI LEXMAN E27 14W to 100W LED RGBW',
|
|
116
116
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
117
117
|
},
|
|
118
|
+
{
|
|
119
|
+
zigbeeModel: ['LDSENK07'],
|
|
120
|
+
model: 'LDSENK07',
|
|
121
|
+
vendor: 'ADEO',
|
|
122
|
+
description: 'ENKI LEXMAN wireless smart outdoor siren',
|
|
123
|
+
fromZigbee: [fz.battery, fz.ias_siren],
|
|
124
|
+
toZigbee: [tz.warning],
|
|
125
|
+
exposes: [e.warning(), e.battery(), e.battery_low(), e.tamper()],
|
|
126
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
127
|
+
device.defaultSendRequestWhen = 'immediate';
|
|
128
|
+
device.save();
|
|
129
|
+
await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
|
|
130
|
+
},
|
|
131
|
+
},
|
|
118
132
|
{
|
|
119
133
|
zigbeeModel: ['ZBEK-2'],
|
|
120
134
|
model: 'IG-CDZOTAAG014RA-MAN',
|
|
121
135
|
vendor: 'ADEO',
|
|
122
|
-
description: 'ENKI
|
|
136
|
+
description: 'ENKI LEXMAN E27 14W to 100W LED RGBW v2',
|
|
123
137
|
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
124
138
|
},
|
|
125
139
|
{
|
|
@@ -133,7 +147,7 @@ module.exports = [
|
|
|
133
147
|
zigbeeModel: ['LXEK-7'],
|
|
134
148
|
model: '9CZA-A806ST-Q1Z',
|
|
135
149
|
vendor: 'ADEO',
|
|
136
|
-
description: 'ENKI
|
|
150
|
+
description: 'ENKI LEXMAN E27 LED white',
|
|
137
151
|
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
138
152
|
},
|
|
139
153
|
{
|
|
@@ -157,7 +171,7 @@ module.exports = [
|
|
|
157
171
|
zigbeeModel: ['LDSENK10'],
|
|
158
172
|
model: 'LDSENK10',
|
|
159
173
|
vendor: 'ADEO',
|
|
160
|
-
description: 'LEXMAN motion sensor',
|
|
174
|
+
description: 'ENKI LEXMAN motion sensor',
|
|
161
175
|
fromZigbee: [fz.ias_occupancy_alarm_1],
|
|
162
176
|
toZigbee: [],
|
|
163
177
|
exposes: [e.occupancy(), e.battery_low(), e.tamper()],
|
package/devices/bticino.js
CHANGED
|
@@ -26,7 +26,7 @@ module.exports = [
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
zigbeeModel: [' Dimmer switch with neutral\u0000\u0000\u0000\u0000'],
|
|
29
|
-
model: '
|
|
29
|
+
model: 'L4411C/N4411C/NT4411C',
|
|
30
30
|
vendor: 'BTicino',
|
|
31
31
|
description: 'Dimmer switch with neutral',
|
|
32
32
|
extend: extend.light_onoff_brightness({noConfigure: true}),
|
package/devices/envilar.js
CHANGED
|
@@ -5,6 +5,13 @@ const e = exposes.presets;
|
|
|
5
5
|
const fz = require('../converters/fromZigbee');
|
|
6
6
|
|
|
7
7
|
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
zigbeeModel: ['ZG_LED_DRIVER42CC'],
|
|
10
|
+
model: 'ZG_LED_DRIVER42CC',
|
|
11
|
+
vendor: 'ENVILAR',
|
|
12
|
+
description: 'Zigbee LED driver',
|
|
13
|
+
extend: extend.light_onoff_brightness(),
|
|
14
|
+
},
|
|
8
15
|
{
|
|
9
16
|
zigbeeModel: ['ZG50CC-CCT-DRIVER'],
|
|
10
17
|
model: 'ZG50CC-CCT-DRIVER',
|
package/devices/lidl.js
CHANGED
|
@@ -857,4 +857,12 @@ module.exports = [
|
|
|
857
857
|
}),
|
|
858
858
|
],
|
|
859
859
|
},
|
|
860
|
+
{
|
|
861
|
+
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_taspddvq'}],
|
|
862
|
+
model: 'HG08383A',
|
|
863
|
+
vendor: 'Lidl',
|
|
864
|
+
description: 'Livarno outdoor LED light chain',
|
|
865
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disableColorTempStartup: true}),
|
|
866
|
+
meta: {applyRedFix: true, enhancedHue: false},
|
|
867
|
+
},
|
|
860
868
|
];
|
package/devices/lonsonho.js
CHANGED
|
@@ -3,9 +3,47 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const utils = require('../lib/utils');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
const ea = exposes.access;
|
|
8
9
|
|
|
10
|
+
const fzLocal = {
|
|
11
|
+
TS110E_switch_type: {
|
|
12
|
+
cluster: 'genLevelCtrl',
|
|
13
|
+
type: ['attributeReport', 'readResponse'],
|
|
14
|
+
convert: (model, msg, publish, options, meta) => {
|
|
15
|
+
const property = 0xfc02;
|
|
16
|
+
if (msg.data.hasOwnProperty(property)) {
|
|
17
|
+
const value = msg.data[property];
|
|
18
|
+
const lookup = {0: 'momentary', 1: 'toggle', 2: 'state'};
|
|
19
|
+
if (lookup.hasOwnProperty(value)) {
|
|
20
|
+
const propertyName = utils.postfixWithEndpointName('switch_type', msg, model);
|
|
21
|
+
return {[propertyName]: lookup[value]};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const tzLocal = {
|
|
29
|
+
TS110E_switch_type: {
|
|
30
|
+
key: ['switch_type'],
|
|
31
|
+
convertSet: async (entity, key, value, meta) => {
|
|
32
|
+
value = value.toLowerCase();
|
|
33
|
+
const lookup = {'momentary': 0, 'toggle': 1, 'state': 2};
|
|
34
|
+
|
|
35
|
+
utils.validateValue(value, Object.keys(lookup));
|
|
36
|
+
const payload = lookup[value];
|
|
37
|
+
|
|
38
|
+
await entity.write('genLevelCtrl', {0xfc02: {value: payload, type: 0x20}});
|
|
39
|
+
return {state: {switch_type: value}};
|
|
40
|
+
},
|
|
41
|
+
convertGet: async (entity, key, meta) => {
|
|
42
|
+
await entity.read('genLevelCtrl', [0xfc02]);
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
9
47
|
module.exports = [
|
|
10
48
|
{
|
|
11
49
|
fingerprint: [{modelID: 'TS130F', manufacturerName: '_TZ3000_vd43bbfq'}, {modelID: 'TS130F', manufacturerName: '_TZ3000_fccpjz5z'}],
|
|
@@ -221,9 +259,19 @@ module.exports = [
|
|
|
221
259
|
model: 'TS110E_2gang',
|
|
222
260
|
vendor: 'Lonsonho',
|
|
223
261
|
description: 'Zigbee smart dimmer module 2 gang with neutral',
|
|
224
|
-
|
|
262
|
+
fromZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true}).fromZigbee.concat([
|
|
263
|
+
fz.tuya_switch_power_outage_memory, fzLocal.TS110E_switch_type]),
|
|
264
|
+
toZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true}).toZigbee.concat([
|
|
265
|
+
tz.tuya_switch_power_outage_memory, tzLocal.TS110E_switch_type]),
|
|
225
266
|
meta: {multiEndpoint: true},
|
|
226
|
-
exposes: [
|
|
267
|
+
exposes: [
|
|
268
|
+
e.light_brightness().withEndpoint('l1'),
|
|
269
|
+
e.light_brightness().withEndpoint('l2'),
|
|
270
|
+
exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore']).withDescription('Recover state after power outage')
|
|
271
|
+
.withEndpoint('l1'),
|
|
272
|
+
exposes.presets.switch_type_2().withEndpoint('l1'),
|
|
273
|
+
exposes.presets.switch_type_2().withEndpoint('l2'),
|
|
274
|
+
],
|
|
227
275
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
228
276
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
229
277
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
package/devices/neo.js
CHANGED
|
@@ -35,7 +35,7 @@ module.exports = [
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_t1blo2bj'}
|
|
38
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_t1blo2bj'}],
|
|
39
39
|
zigbeeModel: ['1blo2bj'],
|
|
40
40
|
model: 'NAS-AB02B2',
|
|
41
41
|
vendor: 'Neo',
|
|
@@ -58,7 +58,7 @@ module.exports = [
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_7hfcudw5'}],
|
|
61
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_7hfcudw5'}, {modelID: 'TS0202', manufacturerName: '_TZ3000_kmh5qpmb'}],
|
|
62
62
|
model: 'NAS-PD07',
|
|
63
63
|
vendor: 'Neo',
|
|
64
64
|
description: 'Motion, temperature & humidity sensor',
|
package/devices/nue_3a.js
CHANGED
|
@@ -4,6 +4,32 @@ const tz = require('../converters/toZigbee');
|
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
6
|
const e = exposes.presets;
|
|
7
|
+
const ea = exposes.access;
|
|
8
|
+
|
|
9
|
+
const fzLocal = {
|
|
10
|
+
LXN59_cover_options: {
|
|
11
|
+
cluster: 'closuresWindowCovering',
|
|
12
|
+
type: ['attributeReport', 'readResponse'],
|
|
13
|
+
convert: (model, msg, publish, options, meta) => {
|
|
14
|
+
const result = {};
|
|
15
|
+
if (msg.data.hasOwnProperty('tuyaMovingState')) {
|
|
16
|
+
const value = msg.data['tuyaMovingState'];
|
|
17
|
+
const movingLookup = {0: 'DOWN', 1: 'UP', 2: 'STOP'};
|
|
18
|
+
result.moving = movingLookup[value];
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
LXN59_cover_state_via_onoff: {
|
|
24
|
+
cluster: 'genOnOff',
|
|
25
|
+
type: ['attributeReport', 'readResponse'],
|
|
26
|
+
convert: (model, msg, publish, options, meta) => {
|
|
27
|
+
if (msg.data.hasOwnProperty('onOff')) {
|
|
28
|
+
return {state: msg.data['onOff'] === 1 ? 'CLOSE' : 'OPEN'};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
7
33
|
|
|
8
34
|
module.exports = [
|
|
9
35
|
{
|
|
@@ -247,6 +273,40 @@ module.exports = [
|
|
|
247
273
|
description: 'Smart 7W E27 light bulb',
|
|
248
274
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
249
275
|
},
|
|
276
|
+
{
|
|
277
|
+
zigbeeModel: ['LXN59-CS27LX1.0'],
|
|
278
|
+
model: 'ZW-EU-4C',
|
|
279
|
+
vendor: 'Nue / 3A',
|
|
280
|
+
description: 'Zigbee smart curtain switch',
|
|
281
|
+
fromZigbee: [fz.cover_position_tilt, fzLocal.LXN59_cover_state_via_onoff, fzLocal.LXN59_cover_options],
|
|
282
|
+
toZigbee: [tz.cover_state, tz.cover_position_tilt],
|
|
283
|
+
meta: {disableDefaultResponse: true},
|
|
284
|
+
exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN'])],
|
|
285
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
286
|
+
const endpoint1 = device.getEndpoint(1);
|
|
287
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
288
|
+
await reporting.onOff(endpoint1);
|
|
289
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['closuresWindowCovering']);
|
|
290
|
+
await reporting.currentPositionLiftPercentage(endpoint1);
|
|
291
|
+
device.powerSource = 'Mains (single phase)';
|
|
292
|
+
device.save();
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
zigbeeModel: ['LXX60-CS27LX1.0'],
|
|
297
|
+
model: 'ZW-EC-01',
|
|
298
|
+
vendor: 'Nue / 3A',
|
|
299
|
+
description: 'Zigbee smart curtain switch',
|
|
300
|
+
extend: extend.switch(),
|
|
301
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
302
|
+
const endpoint1 = device.getEndpoint(1);
|
|
303
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
|
|
304
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['closuresWindowCovering']);
|
|
305
|
+
await reporting.onOff(endpoint1);
|
|
306
|
+
device.powerSource = 'Mains (single phase)';
|
|
307
|
+
device.save();
|
|
308
|
+
},
|
|
309
|
+
},
|
|
250
310
|
{
|
|
251
311
|
zigbeeModel: ['LXN56-0S27LX1.1', 'LXN56-0S27LX1.3'],
|
|
252
312
|
model: 'HGZB-20-UK',
|
package/devices/philips.js
CHANGED
|
@@ -2111,7 +2111,7 @@ module.exports = [
|
|
|
2111
2111
|
extend: hueExtend.light_onoff_brightness_colortemp(),
|
|
2112
2112
|
},
|
|
2113
2113
|
{
|
|
2114
|
-
zigbeeModel: ['929003047101'],
|
|
2114
|
+
zigbeeModel: ['929003047101', '929003045101_03'],
|
|
2115
2115
|
model: '929003047101',
|
|
2116
2116
|
vendor: 'Philips',
|
|
2117
2117
|
description: 'Hue White ambiance Milliskin (round)',
|
package/devices/plugwise.js
CHANGED
|
@@ -2,8 +2,97 @@ const exposes = require('../lib/exposes');
|
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
|
+
const utils = require('../lib/utils');
|
|
5
6
|
const e = exposes.presets;
|
|
6
7
|
const ea = exposes.access;
|
|
8
|
+
const herdsman = require('zigbee-herdsman');
|
|
9
|
+
|
|
10
|
+
const manufacturerOptions = {manufacturerCode: herdsman.Zcl.ManufacturerCode.PLUGWISE_BV};
|
|
11
|
+
|
|
12
|
+
const plugwisePushForce = {
|
|
13
|
+
0: 'standard',
|
|
14
|
+
0x60000: 'high',
|
|
15
|
+
0x70000: 'very_high',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const plugwiseRadioStrength = {
|
|
19
|
+
0: 'normal',
|
|
20
|
+
1: 'high',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const fzLocal = {
|
|
24
|
+
plugwise_radiator_valve: {
|
|
25
|
+
cluster: 'hvacThermostat',
|
|
26
|
+
type: ['attributeReport', 'readResponse'],
|
|
27
|
+
convert: (model, msg, publish, options, meta) => {
|
|
28
|
+
const result = fz.thermostat.convert(model, msg, publish, options, meta);
|
|
29
|
+
|
|
30
|
+
// Reports pIHeatingDemand between 0 and 100 already
|
|
31
|
+
if (typeof msg.data['pIHeatingDemand'] == 'number') {
|
|
32
|
+
result.pi_heating_demand = utils.precisionRound(msg.data['pIHeatingDemand'], 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (typeof msg.data[0x4003] == 'number') {
|
|
36
|
+
result.current_heating_setpoint = utils.precisionRound(msg.data[0x4003], 2) / 100;
|
|
37
|
+
}
|
|
38
|
+
if (typeof msg.data[0x4008] == 'number') {
|
|
39
|
+
result.plugwise_t_diff = msg.data[0x4008];
|
|
40
|
+
}
|
|
41
|
+
if (typeof msg.data[0x4002] == 'number') {
|
|
42
|
+
result.error_status = msg.data[0x4002];
|
|
43
|
+
}
|
|
44
|
+
if (typeof msg.data[0x4001] == 'number') {
|
|
45
|
+
result.valve_position = msg.data[0x4001];
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const tzLocal = {
|
|
53
|
+
plugwise_calibrate_valve: {
|
|
54
|
+
key: ['calibrate_valve'],
|
|
55
|
+
convertSet: async (entity, key, value, meta) => {
|
|
56
|
+
await entity.command('hvacThermostat', 'plugwiseCalibrateValve', {},
|
|
57
|
+
{srcEndpoint: 11, disableDefaultResponse: true, sendWhen: 'active'});
|
|
58
|
+
return {state: {'calibrate_valve': value}};
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
plugwise_valve_position: {
|
|
62
|
+
key: ['plugwise_valve_position', 'valve_position'],
|
|
63
|
+
convertSet: async (entity, key, value, meta) => {
|
|
64
|
+
const payload = {0x4001: {value, type: 0x20}};
|
|
65
|
+
await entity.write('hvacThermostat', payload, manufacturerOptions);
|
|
66
|
+
// Tom does not automatically send back updated value so ask for it
|
|
67
|
+
await entity.read('hvacThermostat', [0x4001], manufacturerOptions);
|
|
68
|
+
},
|
|
69
|
+
convertGet: async (entity, key, meta) => {
|
|
70
|
+
await entity.read('hvacThermostat', [0x4001], manufacturerOptions);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
plugwise_push_force: {
|
|
74
|
+
key: ['plugwise_push_force', 'force'],
|
|
75
|
+
convertSet: async (entity, key, value, meta) => {
|
|
76
|
+
const val = utils.getKey(plugwisePushForce, value, value, Number);
|
|
77
|
+
const payload = {0x4012: {value: val, type: 0x23}};
|
|
78
|
+
await entity.write('hvacThermostat', payload, manufacturerOptions);
|
|
79
|
+
},
|
|
80
|
+
convertGet: async (entity, key, meta) => {
|
|
81
|
+
await entity.read('hvacThermostat', [0x4012], manufacturerOptions);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
plugwise_radio_strength: {
|
|
85
|
+
key: ['plugwise_radio_strength', 'radio_strength'],
|
|
86
|
+
convertSet: async (entity, key, value, meta) => {
|
|
87
|
+
const val = utils.getKey(plugwiseRadioStrength, value, value, Number);
|
|
88
|
+
const payload = {0x4014: {value: val, type: 0x10}};
|
|
89
|
+
await entity.write('hvacThermostat', payload, manufacturerOptions);
|
|
90
|
+
},
|
|
91
|
+
convertGet: async (entity, key, meta) => {
|
|
92
|
+
await entity.read('hvacThermostat', [0x4014], manufacturerOptions);
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
7
96
|
|
|
8
97
|
module.exports = [
|
|
9
98
|
{
|
|
@@ -27,18 +116,37 @@ module.exports = [
|
|
|
27
116
|
model: '106-03',
|
|
28
117
|
vendor: 'Plugwise',
|
|
29
118
|
description: 'Tom thermostatic radiator valve',
|
|
30
|
-
fromZigbee: [fz.thermostat, fz.temperature, fz.battery],
|
|
31
|
-
toZigbee: [
|
|
119
|
+
fromZigbee: [fz.thermostat, fz.temperature, fz.battery, fzLocal.plugwise_radiator_valve],
|
|
120
|
+
toZigbee: [
|
|
121
|
+
tz.thermostat_system_mode,
|
|
122
|
+
tz.thermostat_occupied_heating_setpoint,
|
|
123
|
+
tz.thermostat_pi_heating_demand,
|
|
124
|
+
tzLocal.plugwise_valve_position,
|
|
125
|
+
tzLocal.plugwise_push_force,
|
|
126
|
+
tzLocal.plugwise_radio_strength,
|
|
127
|
+
tzLocal.plugwise_calibrate_valve,
|
|
128
|
+
],
|
|
32
129
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
33
130
|
const endpoint = device.getEndpoint(1);
|
|
34
131
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genPowerCfg', 'hvacThermostat']);
|
|
35
132
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
133
|
+
await reporting.thermostatTemperature(endpoint);
|
|
134
|
+
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
36
135
|
},
|
|
37
136
|
exposes: [e.battery(),
|
|
38
137
|
exposes.climate()
|
|
39
138
|
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5, ea.ALL).withLocalTemperature(ea.STATE)
|
|
40
139
|
.withSystemMode(['off', 'auto'], ea.ALL)
|
|
41
140
|
.withPiHeatingDemand(ea.STATE_GET),
|
|
141
|
+
exposes.numeric('valve_position', ea.ALL).withValueMin(0).withValueMax(100)
|
|
142
|
+
.withDescription('Directly control the radiator valve. The values range from 0 (valve ' +
|
|
143
|
+
'closed) to 100 (valve fully open)'),
|
|
144
|
+
exposes.enum('force', ea.ALL, ['standard', 'high', 'very_high'])
|
|
145
|
+
.withDescription('How hard the motor pushes the valve. The closer to the boiler, the higher the force needed'),
|
|
146
|
+
exposes.enum('radio_strength', ea.ALL, ['normal', 'high'])
|
|
147
|
+
.withDescription('Transmits with higher power when range is not sufficient'),
|
|
148
|
+
exposes.binary('calibrate_valve', ea.STATE_SET, 'calibrate', 'idle')
|
|
149
|
+
.withDescription('Calibrates valve on next wakeup'),
|
|
42
150
|
],
|
|
43
151
|
},
|
|
44
152
|
];
|
package/devices/third_reality.js
CHANGED
|
@@ -121,4 +121,17 @@ module.exports = [
|
|
|
121
121
|
},
|
|
122
122
|
exposes: [e.cover_position(), e.battery()],
|
|
123
123
|
},
|
|
124
|
+
{
|
|
125
|
+
zigbeeModel: ['3RSB22BZ'],
|
|
126
|
+
model: '3RSB22BZ',
|
|
127
|
+
vendor: 'Third Reality',
|
|
128
|
+
description: 'Smart button',
|
|
129
|
+
fromZigbee: [fz.battery, fz.itcmdr_clicks],
|
|
130
|
+
toZigbee: [],
|
|
131
|
+
exposes: [e.battery(), e.battery_low(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
|
|
132
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
133
|
+
device.powerSource = 'Battery';
|
|
134
|
+
device.save();
|
|
135
|
+
},
|
|
136
|
+
},
|
|
124
137
|
];
|
package/devices/weiser.js
CHANGED
|
@@ -40,14 +40,28 @@ module.exports = [
|
|
|
40
40
|
model: '9GED21500-005',
|
|
41
41
|
vendor: 'Weiser',
|
|
42
42
|
description: 'SmartCode 10 Touch',
|
|
43
|
-
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery],
|
|
44
|
-
toZigbee: [tz.lock],
|
|
43
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
44
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
45
|
+
meta: {pinCodeCount: 30},
|
|
45
46
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
46
47
|
const endpoint = device.getEndpoint(2);
|
|
47
48
|
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
48
49
|
await reporting.lockState(endpoint);
|
|
49
50
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
50
51
|
},
|
|
51
|
-
|
|
52
|
+
// Note - Keypad triggered deletions do not cause a zigbee event, though Adds work fine.
|
|
53
|
+
onEvent: async (type, data, device) => {
|
|
54
|
+
// When we receive a code updated message, lets read the new value
|
|
55
|
+
if (data.type === 'commandProgrammingEventNotification' &&
|
|
56
|
+
data.cluster === 'closuresDoorLock' &&
|
|
57
|
+
data.data &&
|
|
58
|
+
data.data.userid !== undefined &&
|
|
59
|
+
// Don't read RF events, we can do this with retrieve_state
|
|
60
|
+
(data.data.programeventsrc === undefined || constants.lockSourceName[data.data.programeventsrc] != 'rf')
|
|
61
|
+
) {
|
|
62
|
+
await device.endpoints[0].command('closuresDoorLock', 'getPinCode', {userid: data.data.userid}, {});
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_source_user()],
|
|
52
66
|
},
|
|
53
67
|
];
|
package/devices/xiaomi.js
CHANGED
|
@@ -47,7 +47,7 @@ module.exports = [
|
|
|
47
47
|
description: 'Aqara E1 door & window contact sensor',
|
|
48
48
|
fromZigbee: [fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
|
|
49
49
|
toZigbee: [],
|
|
50
|
-
meta: {battery: {voltageToPercentage: '
|
|
50
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
51
51
|
exposes: [e.contact(), e.battery(), e.battery_low(), e.battery_voltage()],
|
|
52
52
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
53
53
|
const endpoint = device.getEndpoint(1);
|
|
@@ -63,7 +63,7 @@ module.exports = [
|
|
|
63
63
|
description: 'Aqara P1 door & window contact sensor',
|
|
64
64
|
fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
|
|
65
65
|
toZigbee: [],
|
|
66
|
-
meta: {battery: {voltageToPercentage: '
|
|
66
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
67
67
|
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -168,7 +168,7 @@ module.exports = [
|
|
|
168
168
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4040GL'}, {vendor: 'Xiaomi', model: 'YTC4006CN'},
|
|
169
169
|
{vendor: 'Xiaomi', model: 'YTC4017CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
170
170
|
description: 'MiJia wireless switch',
|
|
171
|
-
meta: {battery: {voltageToPercentage: '
|
|
171
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
172
172
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_WXKG01LM_action, fz.legacy.WXKG01LM_click],
|
|
173
173
|
exposes: [e.battery(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release', 'many']), e.battery_voltage(),
|
|
174
174
|
e.power_outage_count(false)],
|
|
@@ -179,7 +179,7 @@ module.exports = [
|
|
|
179
179
|
model: 'WXKG11LM',
|
|
180
180
|
vendor: 'Xiaomi',
|
|
181
181
|
description: 'Aqara wireless switch',
|
|
182
|
-
meta: {battery: {voltageToPercentage: '
|
|
182
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
183
183
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release']),
|
|
184
184
|
e.device_temperature(), e.power_outage_count()],
|
|
185
185
|
fromZigbee: [fz.xiaomi_multistate_action, fz.xiaomi_WXKG11LM_action, fz.xiaomi_basic,
|
|
@@ -191,7 +191,7 @@ module.exports = [
|
|
|
191
191
|
model: 'WXKG12LM',
|
|
192
192
|
vendor: 'Xiaomi',
|
|
193
193
|
description: 'Aqara wireless switch (with gyroscope)',
|
|
194
|
-
meta: {battery: {voltageToPercentage: '
|
|
194
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
195
195
|
exposes: [e.battery(), e.action(['single', 'double', 'hold', 'release', 'shake']), e.battery_voltage()],
|
|
196
196
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_multistate_action, fz.legacy.WXKG12LM_action_click_multistate],
|
|
197
197
|
toZigbee: [],
|
|
@@ -201,7 +201,7 @@ module.exports = [
|
|
|
201
201
|
model: 'WXKG03LM_rev1',
|
|
202
202
|
vendor: 'Xiaomi',
|
|
203
203
|
description: 'Aqara single key wireless wall switch (2016 model)',
|
|
204
|
-
meta: {battery: {voltageToPercentage: '
|
|
204
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
205
205
|
exposes: [e.battery(), e.action(['single']), e.battery_voltage()],
|
|
206
206
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG03LM_click],
|
|
207
207
|
toZigbee: [],
|
|
@@ -212,7 +212,7 @@ module.exports = [
|
|
|
212
212
|
model: 'WXKG03LM_rev2',
|
|
213
213
|
vendor: 'Xiaomi',
|
|
214
214
|
description: 'Aqara single key wireless wall switch (2018 model)',
|
|
215
|
-
meta: {battery: {voltageToPercentage: '
|
|
215
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
216
216
|
exposes: [e.battery(), e.action(['single', 'double', 'hold']), e.battery_voltage()],
|
|
217
217
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
218
218
|
fz.legacy.WXKG03LM_click, fz.legacy.xiaomi_action_click_multistate],
|
|
@@ -230,7 +230,7 @@ module.exports = [
|
|
|
230
230
|
e.action(['single', 'double', 'hold']),
|
|
231
231
|
e.battery_voltage()],
|
|
232
232
|
onEvent: preventReset,
|
|
233
|
-
meta: {battery: {voltageToPercentage: '
|
|
233
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
234
234
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
235
235
|
try {
|
|
236
236
|
const endpoint = device.endpoints[1];
|
|
@@ -245,7 +245,7 @@ module.exports = [
|
|
|
245
245
|
model: 'WXKG02LM_rev1',
|
|
246
246
|
vendor: 'Xiaomi',
|
|
247
247
|
description: 'Aqara double key wireless wall switch (2016 model)',
|
|
248
|
-
meta: {battery: {voltageToPercentage: '
|
|
248
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
249
249
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both']), e.battery_voltage(), e.power_outage_count(false)],
|
|
250
250
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG02LM_click],
|
|
251
251
|
toZigbee: [],
|
|
@@ -256,7 +256,7 @@ module.exports = [
|
|
|
256
256
|
model: 'WXKG02LM_rev2',
|
|
257
257
|
vendor: 'Xiaomi',
|
|
258
258
|
description: 'Aqara double key wireless wall switch (2018 model)',
|
|
259
|
-
meta: {battery: {voltageToPercentage: '
|
|
259
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
260
260
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'double_both',
|
|
261
261
|
'hold_left', 'hold_right', 'hold_both']), e.battery_voltage()],
|
|
262
262
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
@@ -560,7 +560,7 @@ module.exports = [
|
|
|
560
560
|
model: 'WXKG07LM',
|
|
561
561
|
vendor: 'Xiaomi',
|
|
562
562
|
description: 'Aqara D1 double key wireless wall switch',
|
|
563
|
-
meta: {battery: {voltageToPercentage: '
|
|
563
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
564
564
|
fromZigbee: [fz.xiaomi_basic, fz.legacy.xiaomi_on_off_action, fz.legacy.xiaomi_multistate_action],
|
|
565
565
|
toZigbee: [],
|
|
566
566
|
endpoint: (device) => {
|
|
@@ -840,7 +840,7 @@ module.exports = [
|
|
|
840
840
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4042GL'}, {vendor: 'Xiaomi', model: 'YTC4007CN'},
|
|
841
841
|
{vendor: 'Xiaomi', model: 'YTC4018CN'}],
|
|
842
842
|
description: 'MiJia temperature & humidity sensor',
|
|
843
|
-
meta: {battery: {voltageToPercentage: '
|
|
843
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
844
844
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity],
|
|
845
845
|
toZigbee: [],
|
|
846
846
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
@@ -850,7 +850,7 @@ module.exports = [
|
|
|
850
850
|
model: 'WSDCGQ11LM',
|
|
851
851
|
vendor: 'Xiaomi',
|
|
852
852
|
description: 'Aqara temperature, humidity and pressure sensor',
|
|
853
|
-
meta: {battery: {voltageToPercentage: '
|
|
853
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
854
854
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity, fz.pressure],
|
|
855
855
|
toZigbee: [],
|
|
856
856
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
|
|
@@ -868,7 +868,7 @@ module.exports = [
|
|
|
868
868
|
toZigbee: [],
|
|
869
869
|
exposes: [e.temperature(), e.humidity(), e.pressure(), e.device_temperature(), e.battery(), e.battery_voltage(),
|
|
870
870
|
e.power_outage_count(false)],
|
|
871
|
-
meta: {battery: {voltageToPercentage: '
|
|
871
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
872
872
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
873
873
|
const endpoint = device.getEndpoint(1);
|
|
874
874
|
const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
|
|
@@ -884,7 +884,7 @@ module.exports = [
|
|
|
884
884
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4041GL'}, {vendor: 'Xiaomi', model: 'YTC4004CN'},
|
|
885
885
|
{vendor: 'Xiaomi', model: 'YTC4016CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
886
886
|
description: 'MiJia human body movement sensor',
|
|
887
|
-
meta: {battery: {voltageToPercentage: '
|
|
887
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
888
888
|
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout],
|
|
889
889
|
toZigbee: [],
|
|
890
890
|
exposes: [e.battery(), e.occupancy(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -894,7 +894,7 @@ module.exports = [
|
|
|
894
894
|
model: 'RTCGQ11LM',
|
|
895
895
|
vendor: 'Xiaomi',
|
|
896
896
|
description: 'Aqara human body movement and illuminance sensor',
|
|
897
|
-
meta: {battery: {voltageToPercentage: '
|
|
897
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
898
898
|
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance],
|
|
899
899
|
toZigbee: [],
|
|
900
900
|
exposes: [e.battery(), e.occupancy(), e.device_temperature(), e.battery_voltage(), e.illuminance_lux().withProperty('illuminance'),
|
|
@@ -912,7 +912,7 @@ module.exports = [
|
|
|
912
912
|
exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
|
|
913
913
|
.withDescription('Time interval for detecting actions'),
|
|
914
914
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
915
|
-
meta: {battery: {voltageToPercentage: '
|
|
915
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
916
916
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
917
917
|
const endpoint = device.getEndpoint(1);
|
|
918
918
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -931,7 +931,7 @@ module.exports = [
|
|
|
931
931
|
exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
|
|
932
932
|
.withDescription('Time interval for detecting actions'),
|
|
933
933
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
934
|
-
meta: {battery: {voltageToPercentage: '
|
|
934
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
935
935
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
936
936
|
const endpoint = device.getEndpoint(1);
|
|
937
937
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -959,7 +959,7 @@ module.exports = [
|
|
|
959
959
|
'blue LED will blink once when motion is detected. ' +
|
|
960
960
|
'Press pairing button right before changing this otherwise it will fail.'),
|
|
961
961
|
e.device_temperature(), e.battery(), e.battery_voltage()],
|
|
962
|
-
meta: {battery: {voltageToPercentage: '
|
|
962
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
963
963
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
964
964
|
const endpoint = device.getEndpoint(1);
|
|
965
965
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -1005,7 +1005,7 @@ module.exports = [
|
|
|
1005
1005
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4039GL'}, {vendor: 'Xiaomi', model: 'YTC4005CN'},
|
|
1006
1006
|
{vendor: 'Xiaomi', model: 'YTC4015CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
1007
1007
|
description: 'MiJia door & window contact sensor',
|
|
1008
|
-
meta: {battery: {voltageToPercentage: '
|
|
1008
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1009
1009
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
1010
1010
|
toZigbee: [],
|
|
1011
1011
|
exposes: [e.battery(), e.contact(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -1015,7 +1015,7 @@ module.exports = [
|
|
|
1015
1015
|
model: 'MCCGQ11LM',
|
|
1016
1016
|
vendor: 'Xiaomi',
|
|
1017
1017
|
description: 'Aqara door & window contact sensor',
|
|
1018
|
-
meta: {battery: {voltageToPercentage: '
|
|
1018
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1019
1019
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
1020
1020
|
toZigbee: [],
|
|
1021
1021
|
exposes: [e.battery(), e.contact(), e.device_temperature(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -1029,7 +1029,7 @@ module.exports = [
|
|
|
1029
1029
|
model: 'SJCGQ11LM',
|
|
1030
1030
|
vendor: 'Xiaomi',
|
|
1031
1031
|
description: 'Aqara water leak sensor',
|
|
1032
|
-
meta: {battery: {voltageToPercentage: '
|
|
1032
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1033
1033
|
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
1034
1034
|
toZigbee: [],
|
|
1035
1035
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.battery_voltage(), e.device_temperature(), e.power_outage_count(false)],
|
|
@@ -1039,7 +1039,7 @@ module.exports = [
|
|
|
1039
1039
|
model: 'SJCGQ12LM',
|
|
1040
1040
|
vendor: 'Xiaomi',
|
|
1041
1041
|
description: 'Aqara T1 water leak sensor',
|
|
1042
|
-
meta: {battery: {voltageToPercentage: '
|
|
1042
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1043
1043
|
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
1044
1044
|
toZigbee: [],
|
|
1045
1045
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.tamper(), e.battery_voltage()],
|
|
@@ -1050,7 +1050,7 @@ module.exports = [
|
|
|
1050
1050
|
model: 'MFKZQ01LM',
|
|
1051
1051
|
vendor: 'Xiaomi',
|
|
1052
1052
|
description: 'Mi/Aqara smart home cube',
|
|
1053
|
-
meta: {battery: {voltageToPercentage: '
|
|
1053
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1054
1054
|
fromZigbee: [fz.xiaomi_basic, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog],
|
|
1055
1055
|
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'), e.device_temperature(), e.power_outage_count(false),
|
|
1056
1056
|
e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'), e.cube_side('side'),
|
|
@@ -1210,7 +1210,7 @@ module.exports = [
|
|
|
1210
1210
|
description: 'MiJia Honeywell smoke detector',
|
|
1211
1211
|
vendor: 'Xiaomi',
|
|
1212
1212
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4020RT'}],
|
|
1213
|
-
meta: {battery: {voltageToPercentage: '
|
|
1213
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1214
1214
|
fromZigbee: [fz.xiaomi_basic, fz.JTYJGD01LMBW_smoke],
|
|
1215
1215
|
toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
|
|
1216
1216
|
exposes: [
|
|
@@ -1290,7 +1290,7 @@ module.exports = [
|
|
|
1290
1290
|
exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a smoke ' +
|
|
1291
1291
|
'is detected, other detectors with this option enabled will also sound the alarm buzzer'),
|
|
1292
1292
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
1293
|
-
meta: {battery: {voltageToPercentage: '
|
|
1293
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1294
1294
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1295
1295
|
const endpoint = device.getEndpoint(1);
|
|
1296
1296
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -1316,7 +1316,7 @@ module.exports = [
|
|
|
1316
1316
|
model: 'DJT11LM',
|
|
1317
1317
|
vendor: 'Xiaomi',
|
|
1318
1318
|
description: 'Aqara vibration sensor',
|
|
1319
|
-
meta: {battery: {voltageToPercentage: '
|
|
1319
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1320
1320
|
fromZigbee: [fz.xiaomi_basic, fz.DJT11LM_vibration],
|
|
1321
1321
|
toZigbee: [tz.DJT11LM_vibration_sensitivity],
|
|
1322
1322
|
exposes: [
|
|
@@ -1541,7 +1541,7 @@ module.exports = [
|
|
|
1541
1541
|
]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
1542
1542
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
1543
1543
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1544
|
-
meta: {battery: {voltageToPercentage: '
|
|
1544
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1545
1545
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1546
1546
|
const endpoint = device.getEndpoint(1);
|
|
1547
1547
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1563,7 +1563,7 @@ module.exports = [
|
|
|
1563
1563
|
]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
1564
1564
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
1565
1565
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1566
|
-
meta: {battery: {voltageToPercentage: '
|
|
1566
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1567
1567
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1568
1568
|
const endpoint = device.getEndpoint(1);
|
|
1569
1569
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1590,7 +1590,7 @@ module.exports = [
|
|
|
1590
1590
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)'),
|
|
1591
1591
|
e.power_outage_count(false)],
|
|
1592
1592
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1593
|
-
meta: {battery: {voltageToPercentage: '
|
|
1593
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1594
1594
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1595
1595
|
const endpoint = device.getEndpoint(1);
|
|
1596
1596
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1607,7 +1607,7 @@ module.exports = [
|
|
|
1607
1607
|
description: 'MiJia light intensity sensor',
|
|
1608
1608
|
fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
|
|
1609
1609
|
toZigbee: [],
|
|
1610
|
-
meta: {battery: {voltageToPercentage: '
|
|
1610
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1611
1611
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1612
1612
|
const endpoint = device.getEndpoint(1);
|
|
1613
1613
|
await reporting.bind(endpoint, coordinatorEndpoint, ['msIlluminanceMeasurement']);
|
|
@@ -1761,7 +1761,7 @@ module.exports = [
|
|
|
1761
1761
|
description: 'Aqara wireless remote switch H1 (double rocker)',
|
|
1762
1762
|
fromZigbee: [fz.battery, fz.xiaomi_multistate_action, fz.aqara_opple, fz.command_toggle],
|
|
1763
1763
|
toZigbee: [tz.xiaomi_switch_click_mode, tz.aqara_opple_operation_mode],
|
|
1764
|
-
meta: {battery: {voltageToPercentage: '
|
|
1764
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}, multiEndpoint: true},
|
|
1765
1765
|
exposes: [
|
|
1766
1766
|
e.battery(), e.battery_voltage(), e.action([
|
|
1767
1767
|
'single_left', 'single_right', 'single_both',
|
|
@@ -1848,7 +1848,7 @@ module.exports = [
|
|
|
1848
1848
|
description: 'Aqara TVOC air quality monitor',
|
|
1849
1849
|
fromZigbee: [fz.xiaomi_tvoc, fz.battery, fz.temperature, fz.humidity, fz.aqara_opple],
|
|
1850
1850
|
toZigbee: [],
|
|
1851
|
-
meta: {battery: {voltageToPercentage: '
|
|
1851
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1852
1852
|
exposes: [e.temperature(), e.humidity(), e.voc(), e.device_temperature(), e.battery(), e.battery_voltage()],
|
|
1853
1853
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1854
1854
|
const endpoint = device.getEndpoint(1);
|
|
@@ -1927,7 +1927,7 @@ module.exports = [
|
|
|
1927
1927
|
model: 'WXKG13LM',
|
|
1928
1928
|
vendor: 'Xiaomi',
|
|
1929
1929
|
description: 'Aqara T1 wireless mini switch',
|
|
1930
|
-
meta: {battery: {voltageToPercentage: '
|
|
1930
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1931
1931
|
fromZigbee: [fz.battery, fz.aqara_opple_multistate, fz.aqara_opple],
|
|
1932
1932
|
toZigbee: [],
|
|
1933
1933
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quintuple', 'hold', 'release', 'many'])],
|
|
@@ -1943,7 +1943,7 @@ module.exports = [
|
|
|
1943
1943
|
description: 'Aqara T1 light intensity sensor',
|
|
1944
1944
|
fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
|
|
1945
1945
|
toZigbee: [tz.GZCGQ11LM_detection_period],
|
|
1946
|
-
meta: {battery: {voltageToPercentage: '
|
|
1946
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1947
1947
|
exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux(),
|
|
1948
1948
|
exposes.numeric('detection_period', exposes.access.ALL).withValueMin(1).withValueMax(59).withUnit('s')
|
|
1949
1949
|
.withDescription('Time interval in seconds to report after light changes')],
|
|
@@ -1982,7 +1982,7 @@ module.exports = [
|
|
|
1982
1982
|
description: 'Aqara T1 door & window contact sensor',
|
|
1983
1983
|
fromZigbee: [fz.xiaomi_contact, fz.aqara_opple],
|
|
1984
1984
|
toZigbee: [],
|
|
1985
|
-
meta: {battery: {voltageToPercentage: '
|
|
1985
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
1986
1986
|
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
|
1987
1987
|
},
|
|
1988
1988
|
{
|
|
@@ -2006,7 +2006,7 @@ module.exports = [
|
|
|
2006
2006
|
model: 'ZNXNKG02LM',
|
|
2007
2007
|
vendor: 'Xiaomi',
|
|
2008
2008
|
description: 'Aqara knob H1 (wireless)',
|
|
2009
|
-
meta: {battery: {voltageToPercentage: '
|
|
2009
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
2010
2010
|
exposes: [e.battery(), e.battery_voltage(),
|
|
2011
2011
|
e.action(['single', 'double', 'hold', 'release', 'start_rotating', 'rotation', 'stop_rotating']),
|
|
2012
2012
|
exposes.enum('operation_mode', ea.ALL, ['event', 'command']).withDescription('Button mode'),
|
|
@@ -2029,7 +2029,7 @@ module.exports = [
|
|
|
2029
2029
|
model: 'WXKG16LM',
|
|
2030
2030
|
vendor: 'Xiaomi',
|
|
2031
2031
|
description: 'Aqara wireless remote switch E1 (single rocker)',
|
|
2032
|
-
meta: {battery: {voltageToPercentage: '
|
|
2032
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
2033
2033
|
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
2034
2034
|
toZigbee: [tz.xiaomi_switch_click_mode],
|
|
2035
2035
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
|
|
@@ -2045,7 +2045,7 @@ module.exports = [
|
|
|
2045
2045
|
model: 'WXKG17LM',
|
|
2046
2046
|
vendor: 'Xiaomi',
|
|
2047
2047
|
description: 'Aqara E1 double key wireless switch',
|
|
2048
|
-
meta: {battery: {voltageToPercentage: '
|
|
2048
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
2049
2049
|
exposes: [e.battery(), e.battery_voltage(),
|
|
2050
2050
|
e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'hold_left', 'hold_right']),
|
|
2051
2051
|
// eslint-disable-next-line max-len
|
|
@@ -2073,7 +2073,7 @@ module.exports = [
|
|
|
2073
2073
|
'multi: supports more events like double and hold'),
|
|
2074
2074
|
exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
2075
2075
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
2076
|
-
meta: {battery: {voltageToPercentage: '
|
|
2076
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3200'}},
|
|
2077
2077
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2078
2078
|
const endpoint1 = device.getEndpoint(1);
|
|
2079
2079
|
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
package/lib/extend.js
CHANGED
|
@@ -12,11 +12,16 @@ const extend = {
|
|
|
12
12
|
return {exposes, fromZigbee, toZigbee};
|
|
13
13
|
},
|
|
14
14
|
light_onoff_brightness: (options={}) => {
|
|
15
|
-
options = {disableEffect: false, ...options};
|
|
15
|
+
options = {disableEffect: false, disablePowerOnBehavior: false, ...options};
|
|
16
16
|
const exposes = [e.light_brightness(), ...(!options.disableEffect ? [e.effect()] : [])];
|
|
17
|
-
const fromZigbee = [fz.on_off, fz.brightness, fz.level_config, fz.
|
|
17
|
+
const fromZigbee = [fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
18
18
|
const toZigbee = [tz.light_onoff_brightness, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
19
|
-
tz.light_brightness_step, tz.level_config,
|
|
19
|
+
tz.light_brightness_step, tz.level_config, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
20
|
+
|
|
21
|
+
if (!options.disablePowerOnBehavior) {
|
|
22
|
+
fromZigbee.push(fz.power_on_behavior);
|
|
23
|
+
toZigbee.push(tz.power_on_behavior);
|
|
24
|
+
}
|
|
20
25
|
|
|
21
26
|
const result = {exposes, fromZigbee, toZigbee};
|
|
22
27
|
if (!options.noConfigure) {
|
|
@@ -28,18 +33,23 @@ const extend = {
|
|
|
28
33
|
return result;
|
|
29
34
|
},
|
|
30
35
|
light_onoff_brightness_colortemp: (options={}) => {
|
|
31
|
-
options = {disableEffect: false, disableColorTempStartup: false, ...options};
|
|
36
|
+
options = {disableEffect: false, disableColorTempStartup: false, disablePowerOnBehavior: false, ...options};
|
|
32
37
|
const exposes = [e.light_brightness_colortemp(options.colorTempRange), ...(!options.disableEffect ? [e.effect()] : [])];
|
|
33
38
|
const toZigbee = [tz.light_onoff_brightness, tz.light_colortemp, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
34
39
|
tz.light_colortemp_move, tz.light_brightness_step, tz.light_colortemp_step, tz.light_colortemp_startup, tz.level_config,
|
|
35
|
-
tz.
|
|
36
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.
|
|
40
|
+
tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
41
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
37
42
|
|
|
38
43
|
if (options.disableColorTempStartup) {
|
|
39
44
|
exposes[0].removeFeature('color_temp_startup');
|
|
40
45
|
toZigbee.splice(toZigbee.indexOf(tz.light_colortemp_startup), 1);
|
|
41
46
|
}
|
|
42
47
|
|
|
48
|
+
if (!options.disablePowerOnBehavior) {
|
|
49
|
+
fromZigbee.push(fz.power_on_behavior);
|
|
50
|
+
toZigbee.push(tz.power_on_behavior);
|
|
51
|
+
}
|
|
52
|
+
|
|
43
53
|
const result = {exposes, fromZigbee, toZigbee};
|
|
44
54
|
if (!options.noConfigure) {
|
|
45
55
|
result.configure = async (device, coordinatorEndpoint, logger) => {
|
|
@@ -50,14 +60,19 @@ const extend = {
|
|
|
50
60
|
return result;
|
|
51
61
|
},
|
|
52
62
|
light_onoff_brightness_color: (options={}) => {
|
|
53
|
-
options = {disableEffect: false, supportsHS: false, preferHS: false, ...options};
|
|
63
|
+
options = {disableEffect: false, supportsHS: false, preferHS: false, disablePowerOnBehavior: false, ...options};
|
|
54
64
|
const exposes = [(options.supportsHS ? e.light_brightness_color(options.preferHS) : e.light_brightness_colorxy()),
|
|
55
65
|
...(!options.disableEffect ? [e.effect()] : [])];
|
|
56
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.
|
|
66
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
57
67
|
const toZigbee = [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
58
|
-
tz.light_brightness_step, tz.level_config, tz.
|
|
68
|
+
tz.light_brightness_step, tz.level_config, tz.light_hue_saturation_move,
|
|
59
69
|
tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
60
70
|
|
|
71
|
+
if (!options.disablePowerOnBehavior) {
|
|
72
|
+
fromZigbee.push(fz.power_on_behavior);
|
|
73
|
+
toZigbee.push(tz.power_on_behavior);
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
const result = {exposes, fromZigbee, toZigbee};
|
|
62
77
|
if (!options.noConfigure) {
|
|
63
78
|
result.configure = async (device, coordinatorEndpoint, logger) => {
|
|
@@ -68,14 +83,20 @@ const extend = {
|
|
|
68
83
|
return result;
|
|
69
84
|
},
|
|
70
85
|
light_onoff_brightness_colortemp_color: (options={}) => {
|
|
71
|
-
options = {
|
|
86
|
+
options = {
|
|
87
|
+
disableEffect: false,
|
|
88
|
+
supportsHS: false,
|
|
89
|
+
disableColorTempStartup: false,
|
|
90
|
+
preferHS: false,
|
|
91
|
+
disablePowerOnBehavior: false,
|
|
92
|
+
...options};
|
|
72
93
|
const exposes = [(options.supportsHS ? e.light_brightness_colortemp_color(options.colorTempRange, options.preferHS) :
|
|
73
94
|
e.light_brightness_colortemp_colorxy(options.colorTempRange)), ...(!options.disableEffect ? [e.effect()] : [])];
|
|
74
|
-
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.
|
|
95
|
+
const fromZigbee = [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.ignore_basic_report];
|
|
75
96
|
const toZigbee = [
|
|
76
97
|
tz.light_onoff_brightness, tz.light_color_colortemp, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
77
98
|
tz.light_colortemp_move, tz.light_brightness_step, tz.light_colortemp_step, tz.light_hue_saturation_move,
|
|
78
|
-
tz.light_hue_saturation_step, tz.light_colortemp_startup, tz.level_config, tz.
|
|
99
|
+
tz.light_hue_saturation_step, tz.light_colortemp_startup, tz.level_config, tz.light_color_options,
|
|
79
100
|
tz.light_color_mode, ...(!options.disableEffect ? [tz.effect] : [])];
|
|
80
101
|
|
|
81
102
|
if (options.disableColorTempStartup) {
|
|
@@ -83,6 +104,11 @@ const extend = {
|
|
|
83
104
|
toZigbee.splice(toZigbee.indexOf(tz.light_colortemp_startup), 1);
|
|
84
105
|
}
|
|
85
106
|
|
|
107
|
+
if (!options.disablePowerOnBehavior) {
|
|
108
|
+
fromZigbee.push(fz.power_on_behavior);
|
|
109
|
+
toZigbee.push(tz.power_on_behavior);
|
|
110
|
+
}
|
|
111
|
+
|
|
86
112
|
const result = {exposes, fromZigbee, toZigbee};
|
|
87
113
|
if (!options.noConfigure) {
|
|
88
114
|
result.configure = async (device, coordinatorEndpoint, logger) => {
|
package/lib/utils.js
CHANGED
|
@@ -102,13 +102,7 @@ function toPercentage(value, min, max, log=false) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const normalised = (value - min) / (max - min);
|
|
105
|
-
|
|
106
|
-
if (log == true) {
|
|
107
|
-
percentage = normalised === 0 ? 0 : normalised * (1 - Math.log( normalised ));
|
|
108
|
-
} else {
|
|
109
|
-
percentage = normalised;
|
|
110
|
-
}
|
|
111
|
-
return Math.round(percentage * 100);
|
|
105
|
+
return Math.round(normalised * 100);
|
|
112
106
|
}
|
|
113
107
|
|
|
114
108
|
function addActionGroup(payload, msg, definition) {
|
|
@@ -169,8 +163,6 @@ function batteryVoltageToPercentage(voltage, option) {
|
|
|
169
163
|
percentage = Math.round(percentage);
|
|
170
164
|
} else if (option === '3V_2850_3200') {
|
|
171
165
|
percentage = toPercentage(voltage, 2850, 3200);
|
|
172
|
-
} else if (option === '3V_2850_3000_log') {
|
|
173
|
-
percentage = toPercentage(voltage, 2850, 3000, true);
|
|
174
166
|
} else if (option === '4LR6AA1_5v') {
|
|
175
167
|
percentage = toPercentage(voltage, 3000, 4200);
|
|
176
168
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.561",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
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.
|
|
41
|
+
"zigbee-herdsman": "^0.14.40"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|