zigbee-herdsman-converters 14.0.415 → 14.0.419
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 +10 -20
- package/devices/adeo.js +8 -1
- package/devices/ecodim.js +1 -1
- package/devices/kwikset.js +18 -0
- package/devices/lixee.js +43 -32
- package/devices/paulmann.js +1 -1
- package/devices/philips.js +27 -1
- package/devices/schneider_electric.js +1 -0
- package/devices/tplink.js +3 -3
- package/devices/tuya.js +3 -1
- package/devices/woox.js +1 -1
- package/lib/utils.js +18 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -423,9 +423,12 @@ const converters = {
|
|
|
423
423
|
// This is for occupancy sensor that send motion start AND stop messages
|
|
424
424
|
cluster: 'msOccupancySensing',
|
|
425
425
|
type: ['attributeReport', 'readResponse'],
|
|
426
|
+
options: [exposes.options.no_occupancy_since()],
|
|
426
427
|
convert: (model, msg, publish, options, meta) => {
|
|
427
428
|
if (msg.data.hasOwnProperty('occupancy')) {
|
|
428
|
-
|
|
429
|
+
const payload = {occupancy: (msg.data.occupancy % 2) > 0};
|
|
430
|
+
utils.noOccupancySince(msg.endpoint, payload, options, publish);
|
|
431
|
+
return payload;
|
|
429
432
|
}
|
|
430
433
|
},
|
|
431
434
|
},
|
|
@@ -449,32 +452,19 @@ const converters = {
|
|
|
449
452
|
options.occupancy_timeout : 90;
|
|
450
453
|
|
|
451
454
|
// Stop existing timers because motion is detected and set a new one.
|
|
452
|
-
globalStore.getValue(msg.endpoint, '
|
|
453
|
-
globalStore.putValue(msg.endpoint, 'timers', []);
|
|
455
|
+
clearTimeout(globalStore.getValue(msg.endpoint, 'occupancy_timer', null));
|
|
454
456
|
|
|
455
457
|
if (timeout !== 0) {
|
|
456
458
|
const timer = setTimeout(() => {
|
|
457
459
|
publish({occupancy: false});
|
|
458
460
|
}, timeout * 1000);
|
|
459
461
|
|
|
460
|
-
globalStore.
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// No occupancy since
|
|
464
|
-
if (options && options.no_occupancy_since) {
|
|
465
|
-
options.no_occupancy_since.forEach((since) => {
|
|
466
|
-
const timer = setTimeout(() => {
|
|
467
|
-
publish({no_occupancy_since: since});
|
|
468
|
-
}, since * 1000);
|
|
469
|
-
globalStore.getValue(msg.endpoint, 'timers').push(timer);
|
|
470
|
-
});
|
|
462
|
+
globalStore.putValue(msg.endpoint, 'occupancy_timer', timer);
|
|
471
463
|
}
|
|
472
464
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
return {occupancy: true};
|
|
477
|
-
}
|
|
465
|
+
const payload = {occupancy: true};
|
|
466
|
+
utils.noOccupancySince(msg.endpoint, payload, options, publish);
|
|
467
|
+
return payload;
|
|
478
468
|
},
|
|
479
469
|
},
|
|
480
470
|
occupancy_timeout: {
|
|
@@ -5362,7 +5352,7 @@ const converters = {
|
|
|
5362
5352
|
payload.voltage = value;
|
|
5363
5353
|
payload.battery = batteryVoltageToPercentage(value, '3V_2100');
|
|
5364
5354
|
} else if (index === 3) {
|
|
5365
|
-
if (!['WXCJKG11LM
|
|
5355
|
+
if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
|
|
5366
5356
|
payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
|
|
5367
5357
|
}
|
|
5368
5358
|
} else if (index === 5) {
|
package/devices/adeo.js
CHANGED
|
@@ -6,6 +6,13 @@ const tz = require('../converters/toZigbee');
|
|
|
6
6
|
const e = exposes.presets;
|
|
7
7
|
|
|
8
8
|
module.exports = [
|
|
9
|
+
{
|
|
10
|
+
zigbeeModel: ['ZBEK-12'],
|
|
11
|
+
model: 'IA-CDZFB2AA007NA-MZN-01',
|
|
12
|
+
vendor: 'ADEO',
|
|
13
|
+
description: 'ENKI LEXMAN E27 LED white',
|
|
14
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
15
|
+
},
|
|
9
16
|
{
|
|
10
17
|
zigbeeModel: ['LDSENK01F'],
|
|
11
18
|
model: 'LDSENK01F',
|
|
@@ -19,7 +26,7 @@ module.exports = [
|
|
|
19
26
|
},
|
|
20
27
|
},
|
|
21
28
|
{
|
|
22
|
-
zigbeeModel: ['LXEK-5'],
|
|
29
|
+
zigbeeModel: ['LXEK-5', 'ZBEK-26'],
|
|
23
30
|
model: 'HR-C99C-Z-C045',
|
|
24
31
|
vendor: 'ADEO',
|
|
25
32
|
description: 'RGB CTT LEXMAN ENKI remote control',
|
package/devices/ecodim.js
CHANGED
|
@@ -40,7 +40,7 @@ module.exports = [
|
|
|
40
40
|
]},
|
|
41
41
|
],
|
|
42
42
|
zigbeeModel: ['Dimmer-Switch-ZB3.0'],
|
|
43
|
-
model: 'Eco-Dim.07',
|
|
43
|
+
model: 'Eco-Dim.07/Eco-Dim.10',
|
|
44
44
|
vendor: 'EcoDim',
|
|
45
45
|
description: 'Zigbee & Z-wave dimmer',
|
|
46
46
|
extend: extend.light_onoff_brightness({noConfigure: true, disableEffect: true}),
|
package/devices/kwikset.js
CHANGED
|
@@ -83,4 +83,22 @@ module.exports = [
|
|
|
83
83
|
},
|
|
84
84
|
exposes: [e.lock(), e.battery()],
|
|
85
85
|
},
|
|
86
|
+
{
|
|
87
|
+
zigbeeModel: ['SMARTCODE_LEVER_5'],
|
|
88
|
+
model: '99120-021',
|
|
89
|
+
vendor: 'Kwikset',
|
|
90
|
+
description: '912 SmartCode traditional electronic lever',
|
|
91
|
+
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery, fz.lock_programming_event, fz.lock_pin_code_response],
|
|
92
|
+
toZigbee: [tz.lock, tz.pincode_lock],
|
|
93
|
+
meta: {pinCodeCount: 30},
|
|
94
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
95
|
+
const endpoint = device.getEndpoint(2);
|
|
96
|
+
console.log(device);
|
|
97
|
+
console.log(endpoint.clusters);
|
|
98
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
|
99
|
+
await reporting.lockState(endpoint);
|
|
100
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
101
|
+
},
|
|
102
|
+
exposes: [e.lock(), e.battery(), e.pincode()],
|
|
103
|
+
},
|
|
86
104
|
];
|
package/devices/lixee.js
CHANGED
|
@@ -295,19 +295,19 @@ const clustersDef = {
|
|
|
295
295
|
const exposedData = [
|
|
296
296
|
// Historique
|
|
297
297
|
{cluster: clustersDef._0x0702, att: 'meterSerialNumber', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('ADCO', ea.STATE).withProperty('meter_serial_number').withDescription('Serial Number')},
|
|
298
|
-
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true,
|
|
298
|
+
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BASE', ea.STATE).withUnit('kWh').withProperty('current_summ_delivered').withDescription('Base index')},
|
|
299
299
|
{cluster: clustersDef._0xFF66, att: 'currentTarif', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('OPTARIF', ea.STATE).withProperty('current_tarif').withDescription('Tarif option')},
|
|
300
300
|
{cluster: clustersDef._0x0B01, att: 'availablePower', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('ISOUSC', ea.STATE).withUnit('A').withProperty('available_power').withDescription('Subscribed intensity level')},
|
|
301
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false,
|
|
302
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false,
|
|
303
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false,
|
|
304
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false,
|
|
305
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false,
|
|
306
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false,
|
|
307
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false,
|
|
308
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false,
|
|
309
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false,
|
|
310
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false,
|
|
301
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHC', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('HCHC index')},
|
|
302
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHP', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('HCHP index')},
|
|
303
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHN', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('EJPHN index')},
|
|
304
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHPM', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('EJPHPM index')},
|
|
305
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJB', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('BBRHCJB index')},
|
|
306
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJB', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('BBRHPJB index')},
|
|
307
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJW', ea.STATE).withUnit('kWh').withProperty('current_tier3_summ_delivered').withDescription('BBRHCJW index')},
|
|
308
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJW', ea.STATE).withUnit('kWh').withProperty('current_tier4_summ_delivered').withDescription('BBRHPJW index')},
|
|
309
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJR', ea.STATE).withUnit('kWh').withProperty('current_tier5_summ_delivered').withDescription('BBRHCJR index')},
|
|
310
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJR', ea.STATE).withUnit('kWh').withProperty('current_tier6_summ_delivered').withDescription('BBRHPJR index')},
|
|
311
311
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrent', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST', ea.STATE).withUnit('A').withProperty('rms_current').withDescription('RMS current')},
|
|
312
312
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrent', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST1', ea.STATE).withUnit('A').withProperty('rms_current').withDescription('RMS current (phase 1)')},
|
|
313
313
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentPhB', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST2', ea.STATE).withUnit('A').withProperty('rms_current_ph_b').withDescription('RMS current (phase 2)')},
|
|
@@ -333,22 +333,22 @@ const exposedData = [
|
|
|
333
333
|
{cluster: clustersDef._0xFF66, att: 'currentIndexTarif', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('NTARF', ea.STATE).withProperty('current_index_tarif').withDescription('Current tariff index number')},
|
|
334
334
|
{cluster: clustersDef._0x0B01, att: 'softwareRevision', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('VTIC', ea.STATE).withProperty('software_revision').withDescription('Customer tele-information protocol version')},
|
|
335
335
|
{cluster: clustersDef._0xFF66, att: 'currentDate', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.text('DATE', ea.STATE).withProperty('current_date').withDescription('Current date and time')},
|
|
336
|
-
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true,
|
|
337
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: true,
|
|
338
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true,
|
|
339
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true,
|
|
340
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false,
|
|
341
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false,
|
|
342
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false,
|
|
343
|
-
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false,
|
|
344
|
-
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false,
|
|
345
|
-
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false,
|
|
346
|
-
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false,
|
|
347
|
-
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD01', reportable: true,
|
|
348
|
-
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD02', reportable: false,
|
|
349
|
-
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD03', reportable: false,
|
|
350
|
-
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD04', reportable: false,
|
|
351
|
-
{cluster: clustersDef._0x0702, att: 'currentSummReceived', reportable: true,
|
|
336
|
+
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EAST', ea.STATE).withUnit('kWh').withProperty('current_summ_delivered').withDescription('Total active power delivered')},
|
|
337
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: true, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF01', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('Total provider active power delivered (index 01)')},
|
|
338
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF02', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('Total provider active power delivered (index 02)')},
|
|
339
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF03', ea.STATE).withUnit('kWh').withProperty('current_tier3_summ_delivered').withDescription('Total provider active power delivered (index 03)')},
|
|
340
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF04', ea.STATE).withUnit('kWh').withProperty('current_tier4_summ_delivered').withDescription('Total provider active power delivered (index 04)')},
|
|
341
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF05', ea.STATE).withUnit('kWh').withProperty('current_tier5_summ_delivered').withDescription('Total provider active power delivered (index 05)')},
|
|
342
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF06', ea.STATE).withUnit('kWh').withProperty('current_tier6_summ_delivered').withDescription('Total provider active power delivered (index 06)')},
|
|
343
|
+
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF07', ea.STATE).withUnit('kWh').withProperty('current_tier7_summ_delivered').withDescription('Total provider active power delivered (index 07)')},
|
|
344
|
+
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF08', ea.STATE).withUnit('kWh').withProperty('current_tier8_summ_delivered').withDescription('Total provider active power delivered (index 08)')},
|
|
345
|
+
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF09', ea.STATE).withUnit('kWh').withProperty('current_tier9_summ_delivered').withDescription('Total provider active power delivered (index 09)')},
|
|
346
|
+
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false, report: {change: 100, min: 60}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF10', ea.STATE).withUnit('kWh').withProperty('current_tier10_summ_delivered').withDescription('Total provider active power delivered (index 10)')},
|
|
347
|
+
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD01', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD01', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d01').withDescription('Active energy withdrawn Distributor (index 01)')},
|
|
348
|
+
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD02', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD02', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d02').withDescription('Active energy withdrawn Distributor (index 02)')},
|
|
349
|
+
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD03', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD03', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d03').withDescription('Active energy withdrawn Distributor (index 03)')},
|
|
350
|
+
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD04', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD04', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d04').withDescription('Active energy withdrawn Distributor (index 04)')},
|
|
351
|
+
{cluster: clustersDef._0x0702, att: 'currentSummReceived', reportable: true, report: {change: 100}, onlyProducer: true, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EAIT', ea.STATE).withUnit('kWh').withProperty('current_summ_received').withDescription('Total active power injected')},
|
|
352
352
|
{cluster: clustersDef._0x0B04, att: 'totalReactivePower', reportable: true, onlyProducer: true, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('ERQ1', ea.STATE).withUnit('VArh').withProperty('total_reactive_power').withDescription('Total reactive power (Q1)')},
|
|
353
353
|
{cluster: clustersDef._0x0B04, att: 'reactivePower', reportable: true, onlyProducer: true, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('ERQ2', ea.STATE).withUnit('VArh').withProperty('reactive_power').withDescription('Total reactive power (Q2)')},
|
|
354
354
|
{cluster: clustersDef._0x0B04, att: 'reactivePowerPhB', reportable: true, onlyProducer: true, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('ERQ3', ea.STATE).withUnit('VArh').withProperty('reactive_power_ph_b').withDescription('Total reactive power (Q3)')},
|
|
@@ -491,7 +491,12 @@ const definition = {
|
|
|
491
491
|
// docs generation
|
|
492
492
|
let exposes;
|
|
493
493
|
if (device == null && options == null) {
|
|
494
|
-
exposes = exposedData.map((e) => e.exposes)
|
|
494
|
+
exposes = exposedData.map((e) => e.exposes)
|
|
495
|
+
.filter((value, index, self) =>
|
|
496
|
+
index === self.findIndex((t) => (
|
|
497
|
+
t.property === value.property // Remove duplicates
|
|
498
|
+
)),
|
|
499
|
+
);
|
|
495
500
|
} else {
|
|
496
501
|
exposes = getCurrentConfig(device, options).map((e) => e.exposes);
|
|
497
502
|
}
|
|
@@ -533,13 +538,19 @@ const definition = {
|
|
|
533
538
|
});
|
|
534
539
|
|
|
535
540
|
for (const e of suscribeNew) {
|
|
536
|
-
let
|
|
537
|
-
|
|
538
|
-
|
|
541
|
+
let params = {
|
|
542
|
+
att: e.att,
|
|
543
|
+
min: 0,
|
|
544
|
+
max: repInterval.MINUTES_15,
|
|
545
|
+
change: 1,
|
|
546
|
+
};
|
|
547
|
+
// Override reportings
|
|
548
|
+
if (e.hasOwnProperty('report')) {
|
|
549
|
+
params = {...params, ...e.report};
|
|
539
550
|
}
|
|
540
551
|
configReportings.push(endpoint
|
|
541
552
|
.configureReporting(
|
|
542
|
-
e.cluster, reporting.payload(
|
|
553
|
+
e.cluster, reporting.payload(params.att, params.min, params.max, params.change)),
|
|
543
554
|
);
|
|
544
555
|
}
|
|
545
556
|
(await Promise.allSettled(configReportings))
|
package/devices/paulmann.js
CHANGED
package/devices/philips.js
CHANGED
|
@@ -45,6 +45,15 @@ module.exports = [
|
|
|
45
45
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
46
46
|
ota: ota.zigbeeOTA,
|
|
47
47
|
},
|
|
48
|
+
{
|
|
49
|
+
zigbeeModel: ['929003047401'],
|
|
50
|
+
model: '929003047401',
|
|
51
|
+
vendor: 'Philips',
|
|
52
|
+
description: 'Hue White and Color Ambiance GU10 (Centura)',
|
|
53
|
+
meta: {turnsOffAtBrightness1: true},
|
|
54
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
55
|
+
ota: ota.zigbeeOTA,
|
|
56
|
+
},
|
|
48
57
|
{
|
|
49
58
|
zigbeeModel: ['929003056901'],
|
|
50
59
|
model: '929003056901',
|
|
@@ -652,7 +661,7 @@ module.exports = [
|
|
|
652
661
|
ota: ota.zigbeeOTA,
|
|
653
662
|
},
|
|
654
663
|
{
|
|
655
|
-
zigbeeModel: ['LWW003'],
|
|
664
|
+
zigbeeModel: ['LWW003', 'LWF003'],
|
|
656
665
|
model: '9290018216',
|
|
657
666
|
vendor: 'Philips',
|
|
658
667
|
description: 'Hue white A60 bulb E27 bluetooth',
|
|
@@ -1468,6 +1477,15 @@ module.exports = [
|
|
|
1468
1477
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
|
|
1469
1478
|
ota: ota.zigbeeOTA,
|
|
1470
1479
|
},
|
|
1480
|
+
{
|
|
1481
|
+
zigbeeModel: ['929003054801'],
|
|
1482
|
+
model: '929003054801',
|
|
1483
|
+
vendor: 'Philips',
|
|
1484
|
+
description: 'Hue white ambiance suspension Amaze with Bluetooth',
|
|
1485
|
+
meta: {turnsOffAtBrightness1: true},
|
|
1486
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
1487
|
+
ota: ota.zigbeeOTA,
|
|
1488
|
+
},
|
|
1471
1489
|
{
|
|
1472
1490
|
zigbeeModel: ['LWF001', 'LWF002', 'LWW001'],
|
|
1473
1491
|
model: '9290011370B',
|
|
@@ -2688,6 +2706,14 @@ module.exports = [
|
|
|
2688
2706
|
extend: hueExtend.light_onoff_brightness(),
|
|
2689
2707
|
ota: ota.zigbeeOTA,
|
|
2690
2708
|
},
|
|
2709
|
+
{
|
|
2710
|
+
zigbeeModel: ['915005997301'],
|
|
2711
|
+
model: '915005997301',
|
|
2712
|
+
vendor: 'Philips',
|
|
2713
|
+
description: 'Hue Bluetooth white & color ambiance ceiling lamp Infuse medium',
|
|
2714
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2715
|
+
ota: ota.zigbeeOTA,
|
|
2716
|
+
},
|
|
2691
2717
|
{
|
|
2692
2718
|
zigbeeModel: ['915005997501'],
|
|
2693
2719
|
model: '915005997501',
|
|
@@ -379,6 +379,7 @@ module.exports = [
|
|
|
379
379
|
endpoint: (device) => {
|
|
380
380
|
return {'top': 21, 'bottom': 22};
|
|
381
381
|
},
|
|
382
|
+
whiteLabel: [{vendor: 'Elko', model: 'EKO07117'}],
|
|
382
383
|
meta: {multiEndpoint: true},
|
|
383
384
|
exposes: [e.action(['on_top', 'off_top', 'on_bottom', 'off_bottom', 'brightness_move_up_top', 'brightness_stop_top',
|
|
384
385
|
'brightness_move_down_top', 'brightness_stop_top', 'brightness_move_up_bottom', 'brightness_stop_bottom',
|
package/devices/tplink.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const exposes = require('
|
|
2
|
-
const fz = {...require('
|
|
3
|
-
const reporting = require('
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
+
const reporting = require('../lib/reporting');
|
|
4
4
|
const e = exposes.presets;
|
|
5
5
|
|
|
6
6
|
module.exports = [
|
package/devices/tuya.js
CHANGED
|
@@ -1158,6 +1158,7 @@ module.exports = [
|
|
|
1158
1158
|
vendor: 'TuYa',
|
|
1159
1159
|
whiteLabel: [{vendor: 'LELLKI', model: 'TS011F_plug'}, {vendor: 'NEO', model: 'NAS-WR01B'},
|
|
1160
1160
|
{vendor: 'BlitzWolf', model: 'BW-SHP15'}],
|
|
1161
|
+
ota: ota.zigbeeOTA,
|
|
1161
1162
|
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
|
|
1162
1163
|
fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1163
1164
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
|
|
@@ -1207,6 +1208,7 @@ module.exports = [
|
|
|
1207
1208
|
description: 'Smart plug (with power monitoring by polling)',
|
|
1208
1209
|
vendor: 'TuYa',
|
|
1209
1210
|
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'}],
|
|
1211
|
+
ota: ota.zigbeeOTA,
|
|
1210
1212
|
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
|
|
1211
1213
|
fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1212
1214
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
|
|
@@ -1306,7 +1308,7 @@ module.exports = [
|
|
|
1306
1308
|
description: 'PIR sensor',
|
|
1307
1309
|
fromZigbee: [fz.battery, fz.ignore_basic_report, fz.ias_occupancy_alarm_1],
|
|
1308
1310
|
toZigbee: [],
|
|
1309
|
-
whiteLabel: [{vendor: 'Samotech', model: 'SM301Z'}],
|
|
1311
|
+
whiteLabel: [{vendor: 'Samotech', model: 'SM301Z'}, {vendor: 'Nedis', model: 'ZBSM10WT'}],
|
|
1310
1312
|
exposes: [e.battery(), e.occupancy(), e.battery_low(), e.tamper()],
|
|
1311
1313
|
},
|
|
1312
1314
|
{
|
package/devices/woox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
|
-
const reporting = require('
|
|
2
|
+
const reporting = require('../lib/reporting');
|
|
3
3
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
4
4
|
const tz = require('../converters/toZigbee');
|
|
5
5
|
const tuya = require('../lib/tuya');
|
package/lib/utils.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const globalStore = require('./store');
|
|
4
|
+
|
|
3
5
|
function isLegacyEnabled(options) {
|
|
4
6
|
return !options.hasOwnProperty('legacy') || options.legacy;
|
|
5
7
|
}
|
|
@@ -386,7 +388,23 @@ function extendDevice(deviceConfigs, modelName, adjustments) {
|
|
|
386
388
|
return {...baseDevice, ...adjustments};
|
|
387
389
|
}
|
|
388
390
|
|
|
391
|
+
function noOccupancySince(endpoint, newPayload, options, publish) {
|
|
392
|
+
if (options && options.no_occupancy_since && newPayload.occupancy) {
|
|
393
|
+
globalStore.getValue(endpoint, 'no_occupancy_since_timers', []).forEach((t) => clearTimeout(t));
|
|
394
|
+
globalStore.putValue(endpoint, 'no_occupancy_since_timers', []);
|
|
395
|
+
|
|
396
|
+
newPayload.no_occupancy_since = 0;
|
|
397
|
+
options.no_occupancy_since.forEach((since) => {
|
|
398
|
+
const timer = setTimeout(() => {
|
|
399
|
+
publish({no_occupancy_since: since});
|
|
400
|
+
}, since * 1000);
|
|
401
|
+
globalStore.getValue(endpoint, 'no_occupancy_since_timers').push(timer);
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
389
406
|
module.exports = {
|
|
407
|
+
noOccupancySince,
|
|
390
408
|
getOptions,
|
|
391
409
|
isLegacyEnabled,
|
|
392
410
|
precisionRound,
|
package/npm-shrinkwrap.json
CHANGED