zigbee-herdsman-converters 14.0.452 → 14.0.455
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 +14 -136
- package/converters/toZigbee.js +12 -0
- package/devices/plugwise.js +20 -0
- package/devices/tuya.js +5 -1
- package/devices/waxman.js +1 -1
- package/devices/xiaomi.js +40 -36
- package/lib/xiaomi.js +60 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -5266,10 +5266,22 @@ const converters = {
|
|
|
5266
5266
|
return {power: precisionRound(msg.data['presentValue'], 2)};
|
|
5267
5267
|
},
|
|
5268
5268
|
},
|
|
5269
|
-
|
|
5269
|
+
xiaomi_basic: {
|
|
5270
5270
|
cluster: 'genBasic',
|
|
5271
5271
|
type: ['attributeReport', 'readResponse'],
|
|
5272
|
-
options:
|
|
5272
|
+
options: (definition) => {
|
|
5273
|
+
const result = [];
|
|
5274
|
+
if (definition.exposes.find((e) => e.name === 'temperature')) {
|
|
5275
|
+
result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
|
|
5276
|
+
}
|
|
5277
|
+
if (definition.exposes.find((e) => e.name === 'illuminance')) {
|
|
5278
|
+
result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
|
|
5279
|
+
}
|
|
5280
|
+
if (definition.exposes.find((e) => e.name === 'illuminance_lux')) {
|
|
5281
|
+
result.push(exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual'));
|
|
5282
|
+
}
|
|
5283
|
+
return result;
|
|
5284
|
+
},
|
|
5273
5285
|
convert: (model, msg, publish, options, meta) => {
|
|
5274
5286
|
const payload = xiaomi.numericAttributes2Payload(msg, meta, model, options, msg.data);
|
|
5275
5287
|
return payload;
|
|
@@ -5312,31 +5324,6 @@ const converters = {
|
|
|
5312
5324
|
return payload;
|
|
5313
5325
|
},
|
|
5314
5326
|
},
|
|
5315
|
-
xiaomi_battery: {
|
|
5316
|
-
cluster: 'genBasic',
|
|
5317
|
-
type: ['attributeReport', 'readResponse'],
|
|
5318
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5319
|
-
let voltage = null;
|
|
5320
|
-
if (msg.data['65281']) {
|
|
5321
|
-
voltage = msg.data['65281']['1'];
|
|
5322
|
-
} else if (msg.data['65282']) {
|
|
5323
|
-
voltage = msg.data['65282']['1'].elmVal;
|
|
5324
|
-
}
|
|
5325
|
-
|
|
5326
|
-
if (voltage) {
|
|
5327
|
-
const payload = {
|
|
5328
|
-
voltage: voltage, // @deprecated
|
|
5329
|
-
// voltage: voltage / 1000.0,
|
|
5330
|
-
};
|
|
5331
|
-
|
|
5332
|
-
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
5333
|
-
payload.battery = batteryVoltageToPercentage(payload.voltage, model.meta.battery.voltageToPercentage);
|
|
5334
|
-
}
|
|
5335
|
-
|
|
5336
|
-
return payload;
|
|
5337
|
-
}
|
|
5338
|
-
},
|
|
5339
|
-
},
|
|
5340
5327
|
xiaomi_on_off_action: {
|
|
5341
5328
|
cluster: 'genOnOff',
|
|
5342
5329
|
type: ['attributeReport'],
|
|
@@ -5404,32 +5391,6 @@ const converters = {
|
|
|
5404
5391
|
}
|
|
5405
5392
|
},
|
|
5406
5393
|
},
|
|
5407
|
-
RTCGQ11LM_interval: {
|
|
5408
|
-
cluster: 'genBasic',
|
|
5409
|
-
type: ['attributeReport', 'readResponse'],
|
|
5410
|
-
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
5411
|
-
exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'),
|
|
5412
|
-
exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual')],
|
|
5413
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5414
|
-
if (msg.data['65281']) {
|
|
5415
|
-
const result = {};
|
|
5416
|
-
if (msg.data['65281'].hasOwnProperty('11')) {
|
|
5417
|
-
const illuminance = msg.data['65281']['11'];
|
|
5418
|
-
// DEPRECATED: remove illuminance_lux here.
|
|
5419
|
-
result.illuminance = calibrateAndPrecisionRoundOptions(illuminance, options, 'illuminance');
|
|
5420
|
-
result.illuminance_lux = calibrateAndPrecisionRoundOptions(illuminance, options, 'illuminance_lux');
|
|
5421
|
-
}
|
|
5422
|
-
|
|
5423
|
-
if (msg.data['65281'].hasOwnProperty('3')) {
|
|
5424
|
-
let temperature = msg.data['65281']['3'];
|
|
5425
|
-
temperature = calibrateAndPrecisionRoundOptions(temperature, options, 'temperature');
|
|
5426
|
-
result.temperature = temperature;
|
|
5427
|
-
}
|
|
5428
|
-
|
|
5429
|
-
return result;
|
|
5430
|
-
}
|
|
5431
|
-
},
|
|
5432
|
-
},
|
|
5433
5394
|
RTCGQ11LM_illuminance: {
|
|
5434
5395
|
cluster: 'msIlluminanceMeasurement',
|
|
5435
5396
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -5562,27 +5523,6 @@ const converters = {
|
|
|
5562
5523
|
return {contact: msg.data['onOff'] === 0};
|
|
5563
5524
|
},
|
|
5564
5525
|
},
|
|
5565
|
-
xiaomi_contact_interval: {
|
|
5566
|
-
cluster: 'genBasic',
|
|
5567
|
-
type: ['attributeReport', 'readResponse'],
|
|
5568
|
-
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature')],
|
|
5569
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5570
|
-
if (msg.data.hasOwnProperty('65281')) {
|
|
5571
|
-
const result = {};
|
|
5572
|
-
if (msg.data['65281'].hasOwnProperty('100')) {
|
|
5573
|
-
result.contact = msg.data['65281']['100'] === 0;
|
|
5574
|
-
}
|
|
5575
|
-
|
|
5576
|
-
if (msg.data['65281'].hasOwnProperty('3')) {
|
|
5577
|
-
let temperature = msg.data['65281']['3'];
|
|
5578
|
-
temperature = calibrateAndPrecisionRoundOptions(temperature, options, 'temperature');
|
|
5579
|
-
result.temperature = temperature;
|
|
5580
|
-
}
|
|
5581
|
-
|
|
5582
|
-
return result;
|
|
5583
|
-
}
|
|
5584
|
-
},
|
|
5585
|
-
},
|
|
5586
5526
|
W2_module_carbon_monoxide: {
|
|
5587
5527
|
cluster: 'ssIasZone',
|
|
5588
5528
|
type: 'commandStatusChangeNotification',
|
|
@@ -5593,39 +5533,6 @@ const converters = {
|
|
|
5593
5533
|
};
|
|
5594
5534
|
},
|
|
5595
5535
|
},
|
|
5596
|
-
WSDCGQ01LM_WSDCGQ11LM_interval: {
|
|
5597
|
-
cluster: 'genBasic',
|
|
5598
|
-
type: ['attributeReport', 'readResponse'],
|
|
5599
|
-
options: [exposes.options.precision('pressure'), exposes.options.calibration('pressure'),
|
|
5600
|
-
exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
5601
|
-
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
5602
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5603
|
-
if (msg.data['65281']) {
|
|
5604
|
-
const result = {};
|
|
5605
|
-
const temperature = parseFloat(msg.data['65281']['100']) / 100.0;
|
|
5606
|
-
const humidity = parseFloat(msg.data['65281']['101']) / 100.0;
|
|
5607
|
-
|
|
5608
|
-
// https://github.com/Koenkk/zigbee2mqtt/issues/798
|
|
5609
|
-
// Sometimes the sensor publishes non-realistic vales, filter these
|
|
5610
|
-
if (temperature > -65 && temperature < 65) {
|
|
5611
|
-
result.temperature = calibrateAndPrecisionRoundOptions(temperature, options, 'temperature');
|
|
5612
|
-
}
|
|
5613
|
-
|
|
5614
|
-
// in the 0 - 100 range, don't produce messages beyond these values.
|
|
5615
|
-
if (humidity >= 0 && humidity <= 100) {
|
|
5616
|
-
result.humidity = calibrateAndPrecisionRoundOptions(humidity, options, 'humidity');
|
|
5617
|
-
}
|
|
5618
|
-
|
|
5619
|
-
// Check if contains pressure (WSDCGQ11LM only)
|
|
5620
|
-
if (msg.data['65281'].hasOwnProperty('102')) {
|
|
5621
|
-
const pressure = parseFloat(msg.data['65281']['102']) / 100.0;
|
|
5622
|
-
result.pressure = calibrateAndPrecisionRoundOptions(pressure, options, 'pressure');
|
|
5623
|
-
}
|
|
5624
|
-
|
|
5625
|
-
return result;
|
|
5626
|
-
}
|
|
5627
|
-
},
|
|
5628
|
-
},
|
|
5629
5536
|
xiaomi_temperature: {
|
|
5630
5537
|
cluster: 'msTemperatureMeasurement',
|
|
5631
5538
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature')],
|
|
@@ -5640,22 +5547,6 @@ const converters = {
|
|
|
5640
5547
|
}
|
|
5641
5548
|
},
|
|
5642
5549
|
},
|
|
5643
|
-
SJCGQ11LM_temperature: {
|
|
5644
|
-
cluster: 'genBasic',
|
|
5645
|
-
type: ['attributeReport', 'readResponse'],
|
|
5646
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5647
|
-
if (msg.data.hasOwnProperty('65281')) {
|
|
5648
|
-
const result = {};
|
|
5649
|
-
if (msg.data['65281'].hasOwnProperty('3')) {
|
|
5650
|
-
let temperature = msg.data['65281']['3'];
|
|
5651
|
-
temperature = calibrateAndPrecisionRoundOptions(temperature, options, 'temperature');
|
|
5652
|
-
result.temperature = temperature;
|
|
5653
|
-
}
|
|
5654
|
-
|
|
5655
|
-
return result;
|
|
5656
|
-
}
|
|
5657
|
-
},
|
|
5658
|
-
},
|
|
5659
5550
|
xiaomi_WXKG11LM_action: {
|
|
5660
5551
|
cluster: 'genOnOff',
|
|
5661
5552
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -6667,19 +6558,6 @@ const converters = {
|
|
|
6667
6558
|
return result;
|
|
6668
6559
|
},
|
|
6669
6560
|
},
|
|
6670
|
-
JTYJGD01LMBW_smoke_density: {
|
|
6671
|
-
cluster: 'genBasic',
|
|
6672
|
-
type: ['attributeReport', 'readResponse'],
|
|
6673
|
-
convert: (model, msg, publish, options, meta) => {
|
|
6674
|
-
const data = msg.data;
|
|
6675
|
-
if (data && data['65281']) {
|
|
6676
|
-
const basicAttrs = data['65281'];
|
|
6677
|
-
if (basicAttrs.hasOwnProperty('100')) {
|
|
6678
|
-
return {smoke_density: basicAttrs['100']};
|
|
6679
|
-
}
|
|
6680
|
-
}
|
|
6681
|
-
},
|
|
6682
|
-
},
|
|
6683
6561
|
JTQJBF01LMBW_sensitivity: {
|
|
6684
6562
|
cluster: 'ssIasZone',
|
|
6685
6563
|
type: ['attributeReport', 'readResponse'],
|
package/converters/toZigbee.js
CHANGED
|
@@ -2453,6 +2453,18 @@ const converters = {
|
|
|
2453
2453
|
await entity.read('genAnalogOutput', [0x0055]);
|
|
2454
2454
|
},
|
|
2455
2455
|
},
|
|
2456
|
+
xiaomi_curtain_acn002_charging_status: {
|
|
2457
|
+
key: ['charging_status'],
|
|
2458
|
+
convertGet: async (entity, key, meta) => {
|
|
2459
|
+
await entity.read('aqaraOpple', [0x0409], manufacturerOptions.xiaomi);
|
|
2460
|
+
},
|
|
2461
|
+
},
|
|
2462
|
+
xiaomi_curtain_acn002_battery: {
|
|
2463
|
+
key: ['battery'],
|
|
2464
|
+
convertGet: async (entity, key, meta) => {
|
|
2465
|
+
await entity.read('aqaraOpple', [0x040a], manufacturerOptions.xiaomi);
|
|
2466
|
+
},
|
|
2467
|
+
},
|
|
2456
2468
|
ledvance_commands: {
|
|
2457
2469
|
/* deprectated osram_*/
|
|
2458
2470
|
key: ['set_transition', 'remember_state', 'osram_set_transition', 'osram_remember_state'],
|
package/devices/plugwise.js
CHANGED
|
@@ -3,6 +3,7 @@ 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 e = exposes.presets;
|
|
6
|
+
const ea = exposes.access;
|
|
6
7
|
|
|
7
8
|
module.exports = [
|
|
8
9
|
{
|
|
@@ -21,4 +22,23 @@ module.exports = [
|
|
|
21
22
|
},
|
|
22
23
|
exposes: [e.switch(), e.power(), e.energy()],
|
|
23
24
|
},
|
|
25
|
+
{
|
|
26
|
+
zigbeeModel: ['106-03'],
|
|
27
|
+
model: '106-03',
|
|
28
|
+
vendor: 'Plugwise',
|
|
29
|
+
description: 'Tom thermostatic radiator valve',
|
|
30
|
+
fromZigbee: [fz.thermostat, fz.temperature, fz.battery],
|
|
31
|
+
toZigbee: [tz.thermostat_system_mode, tz.thermostat_occupied_heating_setpoint, tz.thermostat_pi_heating_demand],
|
|
32
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
33
|
+
const endpoint = device.getEndpoint(1);
|
|
34
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genPowerCfg', 'hvacThermostat']);
|
|
35
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
36
|
+
},
|
|
37
|
+
exposes: [e.battery(),
|
|
38
|
+
exposes.climate()
|
|
39
|
+
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5, ea.ALL).withLocalTemperature(ea.STATE)
|
|
40
|
+
.withSystemMode(['off', 'auto'], ea.ALL)
|
|
41
|
+
.withPiHeatingDemand(ea.STATE_GET),
|
|
42
|
+
],
|
|
43
|
+
},
|
|
24
44
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -238,7 +238,8 @@ module.exports = [
|
|
|
238
238
|
{modelID: 'TS0505B', manufacturerName: '_TZ3210_bfwvfyx1'},
|
|
239
239
|
{modelID: 'TS0505B', manufacturerName: '_TZ3210_leyz4rju'},
|
|
240
240
|
{modelID: 'TS0505B', manufacturerName: '_TZ3210_jd3z4yig'},
|
|
241
|
-
{modelID: 'TS0505B', manufacturerName: '_TZ3210_dgdjiw1c'}
|
|
241
|
+
{modelID: 'TS0505B', manufacturerName: '_TZ3210_dgdjiw1c'},
|
|
242
|
+
{modelID: 'TS0505B', manufacturerName: '_TZ3210_qxenlrin'}],
|
|
242
243
|
model: 'TS0505B',
|
|
243
244
|
vendor: 'TuYa',
|
|
244
245
|
description: 'Zigbee RGB+CCT light',
|
|
@@ -289,6 +290,7 @@ module.exports = [
|
|
|
289
290
|
{modelID: 'TS0501B', manufacturerName: '_TZ3210_9q49basr'},
|
|
290
291
|
{modelID: 'TS0501B', manufacturerName: '_TZ3210_i680rtja'},
|
|
291
292
|
{modelID: 'TS0501B', manufacturerName: '_TZ3210_grnwgegn'},
|
|
293
|
+
{modelID: 'TS0501B', manufacturerName: '_TZ3210_nehayyhx'},
|
|
292
294
|
{modelID: 'TS0501B', manufacturerName: '_TZ3210_wuheofsg'},
|
|
293
295
|
{modelID: 'TS0501B', manufacturerName: '_TZ3210_e5t9bfdv'}],
|
|
294
296
|
model: 'TS0501B',
|
|
@@ -636,6 +638,7 @@ module.exports = [
|
|
|
636
638
|
{modelID: 'TS0502B', manufacturerName: '_TZ3000_fzwhym79'},
|
|
637
639
|
{modelID: 'TS0502B', manufacturerName: '_TZ3210_rm0hthdo'},
|
|
638
640
|
{modelID: 'TS0502B', manufacturerName: '_TZ3210_zwqnazkb'},
|
|
641
|
+
{modelID: 'TS0502B', manufacturerName: '_TZ3210_ijsj2evj'},
|
|
639
642
|
],
|
|
640
643
|
model: 'TS0502B',
|
|
641
644
|
vendor: 'TuYa',
|
|
@@ -1038,6 +1041,7 @@ module.exports = [
|
|
|
1038
1041
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ywdxldoj'},
|
|
1039
1042
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cwnjrr72'},
|
|
1040
1043
|
{modelID: 'TS0601', manufacturerName: '_TZE200_pvvbommb'},
|
|
1044
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_9sfg7gm0'}, // HomeCloud
|
|
1041
1045
|
{modelID: 'TS0601', manufacturerName: '_TZE200_2atgpdho'}, // HY367
|
|
1042
1046
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cpmgn2cf'},
|
|
1043
1047
|
],
|
package/devices/waxman.js
CHANGED
|
@@ -21,7 +21,7 @@ module.exports = [
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
zigbeeModel: ['House Water Valve - MDL-TBD'],
|
|
24
|
+
zigbeeModel: ['House Water Valve - MDL-TBD', 'leakSMART Water Valve v2.10'],
|
|
25
25
|
// Should work with all manufacturer model numbers for the 2.0 series:
|
|
26
26
|
// 8850000 3/4"
|
|
27
27
|
// 8850100 1"
|
package/devices/xiaomi.js
CHANGED
|
@@ -159,7 +159,7 @@ module.exports = [
|
|
|
159
159
|
vendor: 'Xiaomi',
|
|
160
160
|
description: 'MiJia wireless switch',
|
|
161
161
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
162
|
-
fromZigbee: [fz.
|
|
162
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_WXKG01LM_action, fz.legacy.WXKG01LM_click],
|
|
163
163
|
exposes: [e.battery(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release', 'many']), e.battery_voltage()],
|
|
164
164
|
toZigbee: [],
|
|
165
165
|
},
|
|
@@ -170,7 +170,7 @@ module.exports = [
|
|
|
170
170
|
description: 'Aqara wireless switch',
|
|
171
171
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
172
172
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release'])],
|
|
173
|
-
fromZigbee: [fz.xiaomi_multistate_action, fz.xiaomi_WXKG11LM_action, fz.
|
|
173
|
+
fromZigbee: [fz.xiaomi_multistate_action, fz.xiaomi_WXKG11LM_action, fz.xiaomi_basic,
|
|
174
174
|
fz.legacy.WXKG11LM_click, fz.legacy.xiaomi_action_click_multistate],
|
|
175
175
|
toZigbee: [],
|
|
176
176
|
},
|
|
@@ -181,7 +181,7 @@ module.exports = [
|
|
|
181
181
|
description: 'Aqara wireless switch (with gyroscope)',
|
|
182
182
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
183
183
|
exposes: [e.battery(), e.action(['single', 'double', 'hold', 'release', 'shake']), e.battery_voltage()],
|
|
184
|
-
fromZigbee: [fz.
|
|
184
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_multistate_action, fz.legacy.WXKG12LM_action_click_multistate],
|
|
185
185
|
toZigbee: [],
|
|
186
186
|
},
|
|
187
187
|
{
|
|
@@ -191,7 +191,7 @@ module.exports = [
|
|
|
191
191
|
description: 'Aqara single key wireless wall switch (2016 model)',
|
|
192
192
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
193
193
|
exposes: [e.battery(), e.action(['single']), e.battery_voltage()],
|
|
194
|
-
fromZigbee: [fz.xiaomi_on_off_action, fz.
|
|
194
|
+
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG03LM_click],
|
|
195
195
|
toZigbee: [],
|
|
196
196
|
onEvent: preventReset,
|
|
197
197
|
},
|
|
@@ -202,7 +202,7 @@ module.exports = [
|
|
|
202
202
|
description: 'Aqara single key wireless wall switch (2018 model)',
|
|
203
203
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
204
204
|
exposes: [e.battery(), e.action(['single', 'double', 'hold']), e.battery_voltage()],
|
|
205
|
-
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.
|
|
205
|
+
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
206
206
|
fz.legacy.WXKG03LM_click, fz.legacy.xiaomi_action_click_multistate],
|
|
207
207
|
toZigbee: [],
|
|
208
208
|
onEvent: preventReset,
|
|
@@ -212,7 +212,7 @@ module.exports = [
|
|
|
212
212
|
model: 'WXKG06LM',
|
|
213
213
|
vendor: 'Xiaomi',
|
|
214
214
|
description: 'Aqara D1 single key wireless wall switch',
|
|
215
|
-
fromZigbee: [fz.
|
|
215
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_on_off_action, fz.xiaomi_multistate_action],
|
|
216
216
|
toZigbee: [],
|
|
217
217
|
exposes: [e.battery(),
|
|
218
218
|
e.action(['single', 'double', 'hold']),
|
|
@@ -235,7 +235,7 @@ module.exports = [
|
|
|
235
235
|
description: 'Aqara double key wireless wall switch (2016 model)',
|
|
236
236
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
237
237
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both']), e.battery_voltage()],
|
|
238
|
-
fromZigbee: [fz.xiaomi_on_off_action, fz.
|
|
238
|
+
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG02LM_click],
|
|
239
239
|
toZigbee: [],
|
|
240
240
|
onEvent: preventReset,
|
|
241
241
|
},
|
|
@@ -247,7 +247,7 @@ module.exports = [
|
|
|
247
247
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
248
248
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'double_both',
|
|
249
249
|
'hold_left', 'hold_right', 'hold_both']), e.battery_voltage()],
|
|
250
|
-
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.
|
|
250
|
+
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
251
251
|
fz.legacy.WXKG02LM_click, fz.legacy.WXKG02LM_click_multistate],
|
|
252
252
|
toZigbee: [],
|
|
253
253
|
onEvent: preventReset,
|
|
@@ -454,7 +454,7 @@ module.exports = [
|
|
|
454
454
|
vendor: 'Xiaomi',
|
|
455
455
|
description: 'Aqara single key wired wall switch',
|
|
456
456
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_on_off_ignore_endpoint_4_5_6,
|
|
457
|
-
fz.legacy.QBKG04LM_QBKG11LM_click, fz.
|
|
457
|
+
fz.legacy.QBKG04LM_QBKG11LM_click, fz.xiaomi_basic, fz.xiaomi_operation_mode_basic,
|
|
458
458
|
fz.legacy.QBKG11LM_click, fz.ignore_multistate_report, fz.xiaomi_power],
|
|
459
459
|
exposes: [
|
|
460
460
|
e.switch(), e.power().withAccess(ea.STATE_GET), e.temperature(),
|
|
@@ -475,7 +475,7 @@ module.exports = [
|
|
|
475
475
|
vendor: 'Xiaomi',
|
|
476
476
|
description: 'Aqara double key wired wall switch without neutral wire. Doesn\'t work as a router and doesn\'t support power meter',
|
|
477
477
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_on_off_ignore_endpoint_4_5_6, fz.legacy.QBKG03LM_QBKG12LM_click,
|
|
478
|
-
fz.legacy.QBKG03LM_buttons, fz.xiaomi_operation_mode_basic, fz.
|
|
478
|
+
fz.legacy.QBKG03LM_buttons, fz.xiaomi_operation_mode_basic, fz.xiaomi_basic],
|
|
479
479
|
exposes: [
|
|
480
480
|
e.switch().withEndpoint('left'),
|
|
481
481
|
e.switch().withEndpoint('right'),
|
|
@@ -508,7 +508,7 @@ module.exports = [
|
|
|
508
508
|
vendor: 'Xiaomi',
|
|
509
509
|
description: 'Aqara double key wired wall switch',
|
|
510
510
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_on_off_ignore_endpoint_4_5_6,
|
|
511
|
-
fz.legacy.QBKG03LM_QBKG12LM_click, fz.
|
|
511
|
+
fz.legacy.QBKG03LM_QBKG12LM_click, fz.xiaomi_basic, fz.xiaomi_operation_mode_basic, fz.legacy.QBKG12LM_click,
|
|
512
512
|
fz.xiaomi_power],
|
|
513
513
|
exposes: [
|
|
514
514
|
e.switch().withEndpoint('left'),
|
|
@@ -538,7 +538,7 @@ module.exports = [
|
|
|
538
538
|
vendor: 'Xiaomi',
|
|
539
539
|
description: 'Aqara D1 double key wireless wall switch',
|
|
540
540
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
541
|
-
fromZigbee: [fz.
|
|
541
|
+
fromZigbee: [fz.xiaomi_basic, fz.legacy.xiaomi_on_off_action, fz.legacy.xiaomi_multistate_action],
|
|
542
542
|
toZigbee: [],
|
|
543
543
|
endpoint: (device) => {
|
|
544
544
|
return {left: 1, right: 2, both: 3};
|
|
@@ -681,7 +681,7 @@ module.exports = [
|
|
|
681
681
|
model: 'QBKG23LM',
|
|
682
682
|
vendor: 'Xiaomi',
|
|
683
683
|
description: 'Aqara D1 1 gang smart wall switch (with neutral wire)',
|
|
684
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.
|
|
684
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_basic, fz.xiaomi_multistate_action],
|
|
685
685
|
toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_switch_operation_mode_basic],
|
|
686
686
|
endpoint: (device) => {
|
|
687
687
|
return {'system': 1};
|
|
@@ -815,7 +815,7 @@ module.exports = [
|
|
|
815
815
|
vendor: 'Xiaomi',
|
|
816
816
|
description: 'MiJia temperature & humidity sensor',
|
|
817
817
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
818
|
-
fromZigbee: [fz.
|
|
818
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity],
|
|
819
819
|
toZigbee: [],
|
|
820
820
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
821
821
|
},
|
|
@@ -825,7 +825,7 @@ module.exports = [
|
|
|
825
825
|
vendor: 'Xiaomi',
|
|
826
826
|
description: 'Aqara temperature, humidity and pressure sensor',
|
|
827
827
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
828
|
-
fromZigbee: [fz.
|
|
828
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity, fz.pressure],
|
|
829
829
|
toZigbee: [],
|
|
830
830
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
|
|
831
831
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -838,7 +838,7 @@ module.exports = [
|
|
|
838
838
|
model: 'WSDCGQ12LM',
|
|
839
839
|
vendor: 'Xiaomi',
|
|
840
840
|
description: 'Aqara T1 temperature, humidity and pressure sensor',
|
|
841
|
-
fromZigbee: [fz.
|
|
841
|
+
fromZigbee: [fz.xiaomi_basic, fz.temperature, fz.humidity, fz.pressure],
|
|
842
842
|
toZigbee: [],
|
|
843
843
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
844
844
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -854,7 +854,7 @@ module.exports = [
|
|
|
854
854
|
vendor: 'Xiaomi',
|
|
855
855
|
description: 'MiJia human body movement sensor',
|
|
856
856
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
857
|
-
fromZigbee: [fz.
|
|
857
|
+
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout],
|
|
858
858
|
toZigbee: [],
|
|
859
859
|
exposes: [e.battery(), e.occupancy(), e.battery_voltage()],
|
|
860
860
|
},
|
|
@@ -864,7 +864,7 @@ module.exports = [
|
|
|
864
864
|
vendor: 'Xiaomi',
|
|
865
865
|
description: 'Aqara human body movement and illuminance sensor',
|
|
866
866
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
867
|
-
fromZigbee: [fz.
|
|
867
|
+
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance],
|
|
868
868
|
toZigbee: [],
|
|
869
869
|
exposes: [e.battery(), e.occupancy(), e.temperature(), e.battery_voltage(), e.illuminance_lux().withProperty('illuminance'),
|
|
870
870
|
e.illuminance().withUnit('lx').withDescription('Measured illuminance in lux')],
|
|
@@ -941,7 +941,7 @@ module.exports = [
|
|
|
941
941
|
vendor: 'Xiaomi',
|
|
942
942
|
description: 'MiJia door & window contact sensor',
|
|
943
943
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
944
|
-
fromZigbee: [fz.
|
|
944
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
945
945
|
toZigbee: [],
|
|
946
946
|
exposes: [e.battery(), e.contact(), e.battery_voltage()],
|
|
947
947
|
},
|
|
@@ -951,7 +951,7 @@ module.exports = [
|
|
|
951
951
|
vendor: 'Xiaomi',
|
|
952
952
|
description: 'Aqara door & window contact sensor',
|
|
953
953
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
954
|
-
fromZigbee: [fz.
|
|
954
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
955
955
|
toZigbee: [],
|
|
956
956
|
exposes: [e.battery(), e.contact(), e.temperature(), e.battery_voltage()],
|
|
957
957
|
configure: async (device) => {
|
|
@@ -965,7 +965,7 @@ module.exports = [
|
|
|
965
965
|
vendor: 'Xiaomi',
|
|
966
966
|
description: 'Aqara water leak sensor',
|
|
967
967
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
968
|
-
fromZigbee: [fz.
|
|
968
|
+
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
969
969
|
toZigbee: [],
|
|
970
970
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.battery_voltage(), e.temperature()],
|
|
971
971
|
},
|
|
@@ -975,7 +975,7 @@ module.exports = [
|
|
|
975
975
|
vendor: 'Xiaomi',
|
|
976
976
|
description: 'Aqara T1 water leak sensor',
|
|
977
977
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
978
|
-
fromZigbee: [fz.
|
|
978
|
+
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
979
979
|
toZigbee: [],
|
|
980
980
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.tamper(), e.battery_voltage()],
|
|
981
981
|
ota: ota.zigbeeOTA,
|
|
@@ -986,7 +986,7 @@ module.exports = [
|
|
|
986
986
|
vendor: 'Xiaomi',
|
|
987
987
|
description: 'Mi/Aqara smart home cube',
|
|
988
988
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
989
|
-
fromZigbee: [fz.
|
|
989
|
+
fromZigbee: [fz.xiaomi_basic, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog],
|
|
990
990
|
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'),
|
|
991
991
|
e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'),
|
|
992
992
|
e.action(['shake', 'wakeup', 'fall', 'tap', 'slide', 'flip180', 'flip90', 'rotate_left', 'rotate_right'])],
|
|
@@ -997,7 +997,7 @@ module.exports = [
|
|
|
997
997
|
model: 'ZNCZ02LM',
|
|
998
998
|
description: 'Mi power plug ZigBee',
|
|
999
999
|
vendor: 'Xiaomi',
|
|
1000
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.
|
|
1000
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_basic, fz.ignore_occupancy_report, fz.ignore_illuminance_report],
|
|
1001
1001
|
toZigbee: [tz.on_off, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_power],
|
|
1002
1002
|
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.power_outage_memory()],
|
|
1003
1003
|
ota: ota.zigbeeOTA,
|
|
@@ -1007,7 +1007,7 @@ module.exports = [
|
|
|
1007
1007
|
model: 'ZNCZ03LM',
|
|
1008
1008
|
description: 'Mi power plug ZigBee TW',
|
|
1009
1009
|
vendor: 'Xiaomi',
|
|
1010
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.
|
|
1010
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_basic, fz.ignore_occupancy_report, fz.ignore_illuminance_report],
|
|
1011
1011
|
toZigbee: [tz.on_off, tz.xiaomi_power],
|
|
1012
1012
|
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature().withAccess(ea.STATE),
|
|
1013
1013
|
e.voltage().withAccess(ea.STATE)],
|
|
@@ -1035,7 +1035,7 @@ module.exports = [
|
|
|
1035
1035
|
model: 'ZNCZ12LM',
|
|
1036
1036
|
description: 'Mi power plug ZigBee US',
|
|
1037
1037
|
vendor: 'Xiaomi',
|
|
1038
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.
|
|
1038
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_basic, fz.ignore_occupancy_report, fz.ignore_illuminance_report],
|
|
1039
1039
|
toZigbee: [tz.on_off, tz.xiaomi_power],
|
|
1040
1040
|
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature().withAccess(ea.STATE),
|
|
1041
1041
|
e.voltage().withAccess(ea.STATE)],
|
|
@@ -1045,7 +1045,7 @@ module.exports = [
|
|
|
1045
1045
|
model: 'SP-EUC01',
|
|
1046
1046
|
description: 'Aqara EU smart plug',
|
|
1047
1047
|
vendor: 'Xiaomi',
|
|
1048
|
-
fromZigbee: [fz.on_off, fz.
|
|
1048
|
+
fromZigbee: [fz.on_off, fz.xiaomi_basic, fz.electrical_measurement, fz.metering,
|
|
1049
1049
|
fz.aqara_opple, fz.xiaomi_power, fz.device_temperature],
|
|
1050
1050
|
toZigbee: [tz.on_off],
|
|
1051
1051
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -1105,7 +1105,7 @@ module.exports = [
|
|
|
1105
1105
|
model: 'ZNCZ11LM',
|
|
1106
1106
|
vendor: 'Xiaomi',
|
|
1107
1107
|
description: 'Aqara power plug ZigBee',
|
|
1108
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.ignore_occupancy_report, fz.
|
|
1108
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.ignore_occupancy_report, fz.xiaomi_basic],
|
|
1109
1109
|
toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_led_disabled_night,
|
|
1110
1110
|
tz.xiaomi_switch_power_outage_memory, tz.xiaomi_auto_off],
|
|
1111
1111
|
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.voltage().withAccess(ea.STATE),
|
|
@@ -1132,7 +1132,7 @@ module.exports = [
|
|
|
1132
1132
|
model: 'QBCZ11LM',
|
|
1133
1133
|
description: 'Aqara socket Zigbee',
|
|
1134
1134
|
vendor: 'Xiaomi',
|
|
1135
|
-
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.
|
|
1135
|
+
fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_basic],
|
|
1136
1136
|
toZigbee: [tz.on_off, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_power],
|
|
1137
1137
|
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature().withAccess(ea.STATE),
|
|
1138
1138
|
e.voltage().withAccess(ea.STATE), e.power_outage_memory()],
|
|
@@ -1144,7 +1144,7 @@ module.exports = [
|
|
|
1144
1144
|
description: 'MiJia Honeywell smoke detector',
|
|
1145
1145
|
vendor: 'Xiaomi',
|
|
1146
1146
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
1147
|
-
fromZigbee: [fz.
|
|
1147
|
+
fromZigbee: [fz.xiaomi_basic, fz.JTYJGD01LMBW_smoke],
|
|
1148
1148
|
toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
|
|
1149
1149
|
exposes: [
|
|
1150
1150
|
e.smoke(), e.battery_low(), e.tamper(), e.battery(), exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']),
|
|
@@ -1214,7 +1214,7 @@ module.exports = [
|
|
|
1214
1214
|
vendor: 'Xiaomi',
|
|
1215
1215
|
description: 'Aqara vibration sensor',
|
|
1216
1216
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
1217
|
-
fromZigbee: [fz.
|
|
1217
|
+
fromZigbee: [fz.xiaomi_basic, fz.DJT11LM_vibration],
|
|
1218
1218
|
toZigbee: [tz.DJT11LM_vibration_sensitivity],
|
|
1219
1219
|
exposes: [
|
|
1220
1220
|
e.battery(), e.vibration(), e.action(['vibration', 'tilt', 'drop']),
|
|
@@ -1286,8 +1286,10 @@ module.exports = [
|
|
|
1286
1286
|
vendor: 'Xiaomi',
|
|
1287
1287
|
fromZigbee: [fz.xiaomi_curtain_acn002_position, fz.xiaomi_curtain_acn002_status, fz.cover_position_tilt, fz.ignore_basic_report,
|
|
1288
1288
|
fz.aqara_opple],
|
|
1289
|
-
toZigbee: [tz.xiaomi_curtain_position_state],
|
|
1290
|
-
exposes: [e.cover_position().setAccess('state', ea.ALL), e.battery(),
|
|
1289
|
+
toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_acn002_battery, tz.xiaomi_curtain_acn002_charging_status],
|
|
1290
|
+
exposes: [e.cover_position().setAccess('state', ea.ALL), e.battery().withAccess(ea.STATE_GET),
|
|
1291
|
+
exposes.binary('charging_status', ea.STATE_GET, true, false)
|
|
1292
|
+
.withDescription('The current charging status.'),
|
|
1291
1293
|
exposes.enum('motor_state', ea.STATE, ['declining', 'rising', 'pause', 'blocked'])
|
|
1292
1294
|
.withDescription('The current state of the motor.'),
|
|
1293
1295
|
exposes.binary('running', ea.STATE, true, false)
|
|
@@ -1295,6 +1297,8 @@ module.exports = [
|
|
|
1295
1297
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1296
1298
|
device.powerSource = 'Battery';
|
|
1297
1299
|
device.save();
|
|
1300
|
+
const endpoint = device.getEndpoint(1);
|
|
1301
|
+
await endpoint.read('aqaraOpple', [0x040a], {manufacturerCode: 0x115f});
|
|
1298
1302
|
},
|
|
1299
1303
|
ota: ota.zigbeeOTA,
|
|
1300
1304
|
},
|
|
@@ -1303,7 +1307,7 @@ module.exports = [
|
|
|
1303
1307
|
model: 'LLKZMK11LM',
|
|
1304
1308
|
vendor: 'Xiaomi',
|
|
1305
1309
|
description: 'Aqara wireless relay controller',
|
|
1306
|
-
fromZigbee: [fz.
|
|
1310
|
+
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off, fz.xiaomi_basic_raw],
|
|
1307
1311
|
meta: {multiEndpoint: true},
|
|
1308
1312
|
toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power, tz.xiaomi_switch_power_outage_memory],
|
|
1309
1313
|
endpoint: (device) => {
|
|
@@ -1322,7 +1326,7 @@ module.exports = [
|
|
|
1322
1326
|
model: 'ZNMS12LM',
|
|
1323
1327
|
description: 'Aqara S2 lock',
|
|
1324
1328
|
vendor: 'Xiaomi',
|
|
1325
|
-
fromZigbee: [fz.
|
|
1329
|
+
fromZigbee: [fz.xiaomi_basic, fz.ZNMS12LM_ZNMS13LM_closuresDoorLock_report, fz.ZNMS12LM_low_battery],
|
|
1326
1330
|
toZigbee: [],
|
|
1327
1331
|
exposes: [
|
|
1328
1332
|
e.battery(), e.battery_voltage(), e.battery_low(), exposes.binary('state', ea.STATE, 'UNLOCK', 'LOCK'),
|
|
@@ -1870,7 +1874,7 @@ module.exports = [
|
|
|
1870
1874
|
exposes.numeric('action_rotation_percent_speed', ea.STATE).withUnit('%').withDescription('Rotation percent speed'),
|
|
1871
1875
|
exposes.numeric('action_rotation_time', ea.STATE).withUnit('ms').withDescription('Rotation time'),
|
|
1872
1876
|
],
|
|
1873
|
-
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.
|
|
1877
|
+
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic, fz.aqara_opple, fz.aqara_knob_rotation],
|
|
1874
1878
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1875
1879
|
onEvent: preventReset,
|
|
1876
1880
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/lib/xiaomi.js
CHANGED
|
@@ -148,7 +148,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
148
148
|
break;
|
|
149
149
|
case '1':
|
|
150
150
|
payload.voltage = value;
|
|
151
|
-
|
|
151
|
+
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
152
|
+
payload.battery = batteryVoltageToPercentage(value, model.meta.battery.voltageToPercentage);
|
|
153
|
+
}
|
|
152
154
|
break;
|
|
153
155
|
case '2':
|
|
154
156
|
if (['JT-BZ-01AQ/A'].includes(model.model)) {
|
|
@@ -171,6 +173,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
171
173
|
case '10':
|
|
172
174
|
payload.switch_type = {1: 'toggle', 2: 'momentary'}[value];
|
|
173
175
|
break;
|
|
176
|
+
case '11':
|
|
177
|
+
payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
|
|
178
|
+
// DEPRECATED: remove illuminance_lux here.
|
|
179
|
+
payload.illuminance_lux = calibrateAndPrecisionRoundOptions(value, options, 'illuminance_lux');
|
|
180
|
+
break;
|
|
174
181
|
case '100':
|
|
175
182
|
if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM', 'LLKZMK11LM', 'QBKG12LM', 'QBKG03LM'].includes(model.model)) {
|
|
176
183
|
let mapping;
|
|
@@ -190,6 +197,22 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
190
197
|
} else if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
|
|
191
198
|
// We don't know what the value means for these devices.
|
|
192
199
|
// https://github.com/Koenkk/zigbee2mqtt/issues/11126
|
|
200
|
+
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
201
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/798
|
|
202
|
+
// Sometimes the sensor publishes non-realistic vales, filter these
|
|
203
|
+
const temperature = parseFloat(value) / 100.0;
|
|
204
|
+
if (temperature > -65 && temperature < 65) {
|
|
205
|
+
payload.temperature = calibrateAndPrecisionRoundOptions(temperature, options, 'temperature');
|
|
206
|
+
}
|
|
207
|
+
} else if (['RTCGQ11LM'].includes(model.model)) {
|
|
208
|
+
// It contains the occupancy, but in z2m we use a custom timer to do it, so we ignore it
|
|
209
|
+
// payload.occupancy = value === 1;
|
|
210
|
+
} else if (['MCCGQ11LM'].includes(model.model)) {
|
|
211
|
+
payload.contact = value === 0;
|
|
212
|
+
} else if (['SJCGQ11LM'].includes(model.model)) {
|
|
213
|
+
payload.water_leak = value === 1;
|
|
214
|
+
} else if (['JTYJ-GD-01LM/BW'].includes(model.model)) {
|
|
215
|
+
payload.smoke_density = value;
|
|
193
216
|
} else {
|
|
194
217
|
payload.state = value === 1 ? 'ON' : 'OFF';
|
|
195
218
|
}
|
|
@@ -215,6 +238,13 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
215
238
|
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
|
|
216
239
|
} else if (['RTCGQ12LM'].includes(model.model)) {
|
|
217
240
|
payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
|
|
241
|
+
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
242
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/798
|
|
243
|
+
// Sometimes the sensor publishes non-realistic vales, filter these
|
|
244
|
+
const humidity = parseFloat(value) / 100.0;
|
|
245
|
+
if (humidity >= 0 && humidity <= 100) {
|
|
246
|
+
payload.humidity = calibrateAndPrecisionRoundOptions(humidity, options, 'humidity');
|
|
247
|
+
}
|
|
218
248
|
} else if (['ZNJLBL01LM'].includes(model.model)) {
|
|
219
249
|
payload.battery = value;
|
|
220
250
|
} else if (['RTCZCGQ11LM'].includes(model.model)) {
|
|
@@ -224,6 +254,8 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
224
254
|
case '102':
|
|
225
255
|
if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
|
|
226
256
|
payload.state_right = value === 1 ? 'ON' : 'OFF';
|
|
257
|
+
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
258
|
+
payload.pressure = calibrateAndPrecisionRoundOptions(value, options, 'pressure');
|
|
227
259
|
} else if (['RTCZCGQ11LM'].includes(model.model)) {
|
|
228
260
|
if (meta.device.applicationVersion < 50) {
|
|
229
261
|
payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
|
|
@@ -261,7 +293,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
261
293
|
}
|
|
262
294
|
break;
|
|
263
295
|
case '152':
|
|
264
|
-
|
|
296
|
+
if (['DJT11LM'].includes(model.model)) {
|
|
297
|
+
// We don't know what implies for this device, it contains values like 30, 50,... that don't seem to change
|
|
298
|
+
} else {
|
|
299
|
+
payload.power = precisionRound(value, 2); // 0x98
|
|
300
|
+
}
|
|
265
301
|
break;
|
|
266
302
|
case '159':
|
|
267
303
|
payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value]; // JT-BZ-01AQ/A
|
|
@@ -372,6 +408,16 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
372
408
|
case '550':
|
|
373
409
|
payload.button_switch_mode = value === 1 ? 'relay_and_usb' : 'relay';
|
|
374
410
|
break;
|
|
411
|
+
case '1033':
|
|
412
|
+
if (['ZNJLBL01LM'].includes(model.model)) {
|
|
413
|
+
payload.charging_status = value === 1;
|
|
414
|
+
}
|
|
415
|
+
break;
|
|
416
|
+
case '1034':
|
|
417
|
+
if (['ZNJLBL01LM'].includes(model.model)) {
|
|
418
|
+
payload.battery = value;
|
|
419
|
+
}
|
|
420
|
+
break;
|
|
375
421
|
case '1289':
|
|
376
422
|
payload.dimmer_mode = {3: 'rgbw', 1: 'dual_ct'}[value];
|
|
377
423
|
break;
|
|
@@ -381,6 +427,18 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
381
427
|
payload = {...payload, ...payload65281};
|
|
382
428
|
}
|
|
383
429
|
break;
|
|
430
|
+
case '65282':
|
|
431
|
+
// This is a a complete structure with attributes, like element 0 for state, element 1 for voltage...
|
|
432
|
+
// At this moment we only extract what we are sure, for example, position 0 seems to be always 1 for a
|
|
433
|
+
// occupancy sensor, so we ignore it at this moment
|
|
434
|
+
if (['MCCGQ01LM'].includes(model.model)) {
|
|
435
|
+
payload.contact = value[0].elmVal === 0;
|
|
436
|
+
}
|
|
437
|
+
payload.voltage = value[1].elmVal;
|
|
438
|
+
if (model.meta && model.meta.battery && model.meta.battery.voltageToPercentage) {
|
|
439
|
+
payload.battery = batteryVoltageToPercentage(payload.voltage, model.meta.battery.voltageToPercentage);
|
|
440
|
+
}
|
|
441
|
+
break;
|
|
384
442
|
case 'mode':
|
|
385
443
|
payload.operation_mode = ['command', 'event'][value];
|
|
386
444
|
break;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.455",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "zigbee-herdsman-converters",
|
|
9
|
-
"version": "14.0.
|
|
9
|
+
"version": "14.0.455",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^0.26.1",
|