zigbee-herdsman-converters 14.0.424 → 14.0.425
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 +12 -1
- package/converters/toZigbee.js +15 -1
- package/devices/lixee.js +47 -28
- package/devices/moes.js +2 -1
- package/devices/schneider_electric.js +10 -6
- package/devices/tuya.js +2 -2
- package/devices/xiaomi.js +7 -7
- package/lib/constants.js +8 -0
- package/lib/legacy.js +8 -6
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -5525,7 +5525,7 @@ const converters = {
|
|
|
5525
5525
|
|
|
5526
5526
|
// Maybe other QKBG also support release/hold?
|
|
5527
5527
|
const actionLookup = !isLegacyEnabled(options) && ['QBKG03LM', 'QBKG22LM', 'QBKG04LM', 'QBKG21LM'].includes(model.model) ?
|
|
5528
|
-
{0: 'hold', 1: 'release'} : {0: 'single', 1: 'single'};
|
|
5528
|
+
{0: 'hold', 1: 'release', 2: 'double'} : {0: 'single', 1: 'single'};
|
|
5529
5529
|
|
|
5530
5530
|
// Dont' use postfixWithEndpointName here, endpoints don't match
|
|
5531
5531
|
if (mapping) {
|
|
@@ -7541,6 +7541,17 @@ const converters = {
|
|
|
7541
7541
|
return result;
|
|
7542
7542
|
},
|
|
7543
7543
|
},
|
|
7544
|
+
wiser_lighting_ballast_configuration: {
|
|
7545
|
+
cluster: 'lightingBallastCfg',
|
|
7546
|
+
type: ['attributeReport', 'readResponse'],
|
|
7547
|
+
convert: (model, msg, publish, options, meta) => {
|
|
7548
|
+
const result = converters.lighting_ballast_configuration.convert(model, msg, publish, options, meta);
|
|
7549
|
+
if (msg.data.hasOwnProperty('wiserControlMode')) {
|
|
7550
|
+
result.dimmer_mode = constants.wiserDimmerControlMode[msg.data['wiserControlMode']];
|
|
7551
|
+
}
|
|
7552
|
+
return result;
|
|
7553
|
+
},
|
|
7554
|
+
},
|
|
7544
7555
|
schneider_ui_action: {
|
|
7545
7556
|
cluster: 'wiserDeviceInfo',
|
|
7546
7557
|
type: 'attributeReport',
|
package/converters/toZigbee.js
CHANGED
|
@@ -2449,7 +2449,9 @@ const converters = {
|
|
|
2449
2449
|
matsee_garage_door_opener: {
|
|
2450
2450
|
key: ['trigger'],
|
|
2451
2451
|
convertSet: (entity, key, value, meta) => {
|
|
2452
|
-
|
|
2452
|
+
const state = meta.message.hasOwnProperty('trigger') ? meta.message.trigger : true;
|
|
2453
|
+
tuya.sendDataPointBool(entity, tuya.dataPoints.garageDoorTrigger, state);
|
|
2454
|
+
return {state: {trigger: state}};
|
|
2453
2455
|
},
|
|
2454
2456
|
},
|
|
2455
2457
|
SPZ01_power_outage_memory: {
|
|
@@ -6317,6 +6319,18 @@ const converters = {
|
|
|
6317
6319
|
await entity.read('lightingBallastCfg', [0xe000], {manufacturerCode: 0x105e});
|
|
6318
6320
|
},
|
|
6319
6321
|
},
|
|
6322
|
+
wiser_dimmer_mode: {
|
|
6323
|
+
key: ['dimmer_mode'],
|
|
6324
|
+
convertSet: async (entity, key, value, meta) => {
|
|
6325
|
+
const controlMode = utils.getKey(constants.wiserDimmerControlMode, value, value, Number);
|
|
6326
|
+
await entity.write('lightingBallastCfg', {'wiserControlMode': controlMode},
|
|
6327
|
+
{manufacturerCode: herdsman.Zcl.ManufacturerCode.SCHNEIDER});
|
|
6328
|
+
return {state: {dimmer_mode: value}};
|
|
6329
|
+
},
|
|
6330
|
+
convertGet: async (entity, key, meta) => {
|
|
6331
|
+
await entity.read('lightingBallastCfg', ['wiserControlMode'], {manufacturerCode: herdsman.Zcl.ManufacturerCode.SCHNEIDER});
|
|
6332
|
+
},
|
|
6333
|
+
},
|
|
6320
6334
|
schneider_temperature_measured_value: {
|
|
6321
6335
|
key: ['temperature_measured_value'],
|
|
6322
6336
|
convertSet: async (entity, key, value, meta) => {
|
package/devices/lixee.js
CHANGED
|
@@ -192,6 +192,9 @@ const fzLocal = {
|
|
|
192
192
|
},
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
+
|
|
196
|
+
// we are doing it with exclusion and not inclusion because the list is dynamic (based on zlinky mode),
|
|
197
|
+
// and change based on that. Just some few attributes are useless, so we exclude them
|
|
195
198
|
const tarifsDef = {
|
|
196
199
|
histo_BASE: {fname: 'Historique - BASE',
|
|
197
200
|
currentTarf: 'BASE', excluded: [
|
|
@@ -298,16 +301,16 @@ const exposedData = [
|
|
|
298
301
|
{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
302
|
{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
303
|
{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, report: {change: 100
|
|
302
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
303
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100
|
|
304
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
305
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100
|
|
306
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
307
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false, report: {change: 100
|
|
308
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100
|
|
309
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100
|
|
310
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100
|
|
304
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHC', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('HCHC index')},
|
|
305
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHP', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('HCHP index')},
|
|
306
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHN', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('EJPHN index')},
|
|
307
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHPM', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('EJPHPM index')},
|
|
308
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJB', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('BBRHCJB index')},
|
|
309
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJB', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('BBRHPJB index')},
|
|
310
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJW', ea.STATE).withUnit('kWh').withProperty('current_tier3_summ_delivered').withDescription('BBRHCJW index')},
|
|
311
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJW', ea.STATE).withUnit('kWh').withProperty('current_tier4_summ_delivered').withDescription('BBRHPJW index')},
|
|
312
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJR', ea.STATE).withUnit('kWh').withProperty('current_tier5_summ_delivered').withDescription('BBRHCJR index')},
|
|
313
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100}, 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
314
|
{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
315
|
{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
316
|
{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)')},
|
|
@@ -317,7 +320,7 @@ const exposedData = [
|
|
|
317
320
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentMaxPhB', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IMAX2', ea.STATE).withUnit('A').withProperty('rms_current_max_ph_b').withDescription('RMS current peak (phase 2)')},
|
|
318
321
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentMaxPhC', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IMAX3', ea.STATE).withUnit('A').withProperty('rms_current_max_ph_c').withDescription('RMS current peak (phase 3)')},
|
|
319
322
|
{cluster: clustersDef._0x0B04, att: 'activePowerMax', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('PMAX', ea.STATE).withUnit('W').withProperty('active_power_max').withDescription('Three-phase power peak')},
|
|
320
|
-
{cluster: clustersDef._0x0B04, att: 'apparentPower', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.
|
|
323
|
+
{cluster: clustersDef._0x0B04, att: 'apparentPower', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.all, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('PAPP', ea.STATE).withUnit('VA').withProperty('apparent_power').withDescription('Apparent power')},
|
|
321
324
|
{cluster: clustersDef._0x0702, att: 'activeRegisterTierDelivered', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('PTEC', ea.STATE).withProperty('active_register_tier_delivered').withDescription('Current pricing period')},
|
|
322
325
|
{cluster: clustersDef._0xFF66, att: 'tomorrowColor', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('DEMAIN', ea.STATE).withProperty('tomorrow_color').withDescription('Tomorrow color')},
|
|
323
326
|
{cluster: clustersDef._0xFF66, att: 'scheduleHPHC', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HHPHC', ea.STATE).withProperty('schedule_h_p_h_c').withDescription('Schedule HPHC')},
|
|
@@ -334,16 +337,16 @@ const exposedData = [
|
|
|
334
337
|
{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
338
|
{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
339
|
{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
|
|
338
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true, report: {change: 100
|
|
339
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true, report: {change: 100
|
|
340
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100
|
|
341
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100
|
|
342
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100
|
|
343
|
-
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false, report: {change: 100
|
|
344
|
-
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false, report: {change: 100
|
|
345
|
-
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false, report: {change: 100
|
|
346
|
-
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false, report: {change: 100
|
|
340
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: true, report: {change: 100}, 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)')},
|
|
341
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true, report: {change: 100}, 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)')},
|
|
342
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true, report: {change: 100}, 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)')},
|
|
343
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
344
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
345
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
346
|
+
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
347
|
+
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
348
|
+
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false, report: {change: 100}, 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)')},
|
|
349
|
+
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false, report: {change: 100}, 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
350
|
{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
351
|
{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
352
|
{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)')},
|
|
@@ -469,7 +472,7 @@ function getCurrentConfig(device, options, logger=console) {
|
|
|
469
472
|
case linkyMode == linkyModeDef.legacy && tarifsDef.histo_EJP.currentTarf:
|
|
470
473
|
myExpose = myExpose.filter((a) => !tarifsDef.histo_EJP.excluded.includes(a.exposes.name));
|
|
471
474
|
break;
|
|
472
|
-
case linkyMode == linkyModeDef.legacy && currentTarf.startsWith(tarifsDef.histo_BBR.currentTarf):
|
|
475
|
+
case linkyMode == linkyModeDef.legacy && currentTarf && currentTarf.startsWith(tarifsDef.histo_BBR.currentTarf):
|
|
473
476
|
myExpose = myExpose.filter((a) => !tarifsDef.histo_BBR.excluded.includes(a.exposes.name));
|
|
474
477
|
break;
|
|
475
478
|
case linkyMode == linkyModeDef.standard && tarifsDef.stand_SEM_WE_MERCR.currentTarf:
|
|
@@ -514,8 +517,9 @@ const definition = {
|
|
|
514
517
|
.withDescription(`Power with single or three phase. May require restart (default: auto)`),
|
|
515
518
|
exposes.enum(`production`, ea.SET, ['auto', 'true', 'false']).withDescription(`If you produce energy back to the grid (works ONLY when linky_mode: ${linkyModeDef.standard}, default: auto)`),
|
|
516
519
|
exposes.enum(`tarif`, ea.SET, [...Object.entries(tarifsDef).map(( [k, v] ) => (v.fname)), 'auto'])
|
|
517
|
-
.withDescription(`
|
|
520
|
+
.withDescription(`Overrides the automatic current tarif. This option will exclude unnecesary attributes. Open a issue to support more of them. Default: auto`),
|
|
518
521
|
exposes.options.precision(`kWh`),
|
|
522
|
+
exposes.numeric(`measurement_poll_chunk`, ea.SET).withValueMin(1).withDescription(`During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requieres Z2M restart. Default: 1`),
|
|
519
523
|
],
|
|
520
524
|
configure: async (device, coordinatorEndpoint, logger, options) => {
|
|
521
525
|
const endpoint = device.getEndpoint(1);
|
|
@@ -544,7 +548,7 @@ const definition = {
|
|
|
544
548
|
for (const e of suscribeNew) {
|
|
545
549
|
let params = {
|
|
546
550
|
att: e.att,
|
|
547
|
-
min:
|
|
551
|
+
min: repInterval.MINUTE,
|
|
548
552
|
max: repInterval.MINUTES_15,
|
|
549
553
|
change: 1,
|
|
550
554
|
};
|
|
@@ -567,18 +571,33 @@ const definition = {
|
|
|
567
571
|
ota: ota.lixee,
|
|
568
572
|
onEvent: async (type, data, device, options) => {
|
|
569
573
|
const endpoint = device.getEndpoint(1);
|
|
570
|
-
if (type === '
|
|
574
|
+
if (type === 'start') {
|
|
575
|
+
endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null});
|
|
576
|
+
} else if (type === 'stop') {
|
|
571
577
|
clearInterval(globalStore.getValue(device, 'interval'));
|
|
572
578
|
globalStore.clearValue(device, 'interval');
|
|
573
579
|
} else if (!globalStore.hasValue(device, 'interval')) {
|
|
574
580
|
const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
|
|
581
|
+
const measurement_poll_chunk = options && options.measurement_poll_chunk ? options.measurement_poll_chunk : 1;
|
|
575
582
|
|
|
576
583
|
const interval = setInterval(async () => {
|
|
577
584
|
const currentExposes = getCurrentConfig(device, options)
|
|
578
585
|
.filter((e) => !endpoint.configuredReportings.some((r) => r.cluster.name == e.cluster && r.attribute.name == e.att));
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
586
|
+
|
|
587
|
+
for (const key in clustersDef) {
|
|
588
|
+
if (Object.hasOwnProperty.call(clustersDef, key)) {
|
|
589
|
+
const cluster = clustersDef[key];
|
|
590
|
+
|
|
591
|
+
const targ = currentExposes.filter((e)=> e.cluster == cluster).map((e)=> e.att);
|
|
592
|
+
if (targ.length) {
|
|
593
|
+
let i; let j;
|
|
594
|
+
// Split array by chunks
|
|
595
|
+
for (i = 0, j = targ.length; i < j; i += measurement_poll_chunk) {
|
|
596
|
+
await endpoint
|
|
597
|
+
.read(cluster, targ.slice(i, i + measurement_poll_chunk), {manufacturerCode: null});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
582
601
|
}
|
|
583
602
|
}, seconds * 1000);
|
|
584
603
|
globalStore.putValue(device, 'interval', interval);
|
package/devices/moes.js
CHANGED
|
@@ -10,7 +10,8 @@ const ea = exposes.access;
|
|
|
10
10
|
|
|
11
11
|
module.exports = [
|
|
12
12
|
{
|
|
13
|
-
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'}
|
|
13
|
+
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'},
|
|
14
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_2xlvlnez'}],
|
|
14
15
|
model: 'ZP-LZ-FR2U',
|
|
15
16
|
vendor: 'Moes',
|
|
16
17
|
description: 'Zigbee 3.0 dual USB wireless socket plug',
|
|
@@ -100,13 +100,15 @@ module.exports = [
|
|
|
100
100
|
model: 'CCT5010-0001',
|
|
101
101
|
vendor: 'Schneider Electric',
|
|
102
102
|
description: 'Micro module dimmer',
|
|
103
|
-
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.
|
|
104
|
-
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
|
|
103
|
+
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
|
|
104
|
+
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
|
|
105
105
|
exposes: [e.light_brightness().withLevelConfig(),
|
|
106
106
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
107
107
|
.withDescription('Specifies the minimum light output of the ballast'),
|
|
108
108
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
109
|
-
.withDescription('Specifies the maximum light output of the ballast')
|
|
109
|
+
.withDescription('Specifies the maximum light output of the ballast'),
|
|
110
|
+
exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
|
|
111
|
+
.withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
|
|
110
112
|
whiteLabel: [{vendor: 'Elko', model: 'EKO07090'}],
|
|
111
113
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
112
114
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
@@ -134,13 +136,15 @@ module.exports = [
|
|
|
134
136
|
model: 'WDE002334',
|
|
135
137
|
vendor: 'Schneider Electric',
|
|
136
138
|
description: 'Rotary dimmer',
|
|
137
|
-
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.
|
|
138
|
-
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
|
|
139
|
+
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
|
|
140
|
+
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
|
|
139
141
|
exposes: [e.light_brightness().withLevelConfig(),
|
|
140
142
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
141
143
|
.withDescription('Specifies the minimum light output of the ballast'),
|
|
142
144
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
143
|
-
.withDescription('Specifies the maximum light output of the ballast')
|
|
145
|
+
.withDescription('Specifies the maximum light output of the ballast'),
|
|
146
|
+
exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
|
|
147
|
+
.withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
|
|
144
148
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
145
149
|
const endpoint = device.getEndpoint(3);
|
|
146
150
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
|
package/devices/tuya.js
CHANGED
|
@@ -12,7 +12,7 @@ const utils = require('../lib/utils');
|
|
|
12
12
|
|
|
13
13
|
const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
|
|
14
14
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
15
|
-
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg'
|
|
15
|
+
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg'];
|
|
16
16
|
|
|
17
17
|
const tzLocal = {
|
|
18
18
|
TS0504B_color: {
|
|
@@ -1753,7 +1753,7 @@ module.exports = [
|
|
|
1753
1753
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
1754
1754
|
},
|
|
1755
1755
|
exposes: [exposes.binary('trigger', ea.STATE_SET, true, false).withDescription('Trigger the door movement'),
|
|
1756
|
-
|
|
1756
|
+
exposes.binary('garage_door_contact', ea.STATE, true, false)],
|
|
1757
1757
|
},
|
|
1758
1758
|
{
|
|
1759
1759
|
fingerprint: [{modelID: 'TS0201', manufacturerName: '_TZ3000_qaaysllp'}],
|
package/devices/xiaomi.js
CHANGED
|
@@ -436,11 +436,11 @@ module.exports = [
|
|
|
436
436
|
fromZigbee: [fz.xiaomi_on_off_ignore_endpoint_4_5_6, fz.xiaomi_on_off_action, fz.legacy.QBKG04LM_QBKG11LM_click,
|
|
437
437
|
fz.xiaomi_operation_mode_basic],
|
|
438
438
|
exposes: [
|
|
439
|
-
e.switch(), e.action(['
|
|
440
|
-
exposes.enum('operation_mode', ea.
|
|
439
|
+
e.switch(), e.action(['release', 'hold']),
|
|
440
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_relay', 'decoupled'])
|
|
441
441
|
.withDescription('Decoupled mode'),
|
|
442
442
|
],
|
|
443
|
-
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_basic],
|
|
443
|
+
toZigbee: [tz.on_off, {...tz.xiaomi_switch_operation_mode_basic, convertGet: null}],
|
|
444
444
|
endpoint: (device) => {
|
|
445
445
|
return {'system': 1, 'default': 2};
|
|
446
446
|
},
|
|
@@ -484,15 +484,15 @@ module.exports = [
|
|
|
484
484
|
e.switch().withEndpoint('left'),
|
|
485
485
|
e.switch().withEndpoint('right'),
|
|
486
486
|
e.temperature(),
|
|
487
|
-
e.action(['
|
|
488
|
-
exposes.enum('operation_mode', ea.
|
|
487
|
+
e.action(['release_left', 'release_right', 'release_both']),
|
|
488
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_left_relay', 'control_right_relay', 'decoupled'])
|
|
489
489
|
.withDescription('Operation mode for left button')
|
|
490
490
|
.withEndpoint('left'),
|
|
491
|
-
exposes.enum('operation_mode', ea.
|
|
491
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_left_relay', 'control_right_relay', 'decoupled'])
|
|
492
492
|
.withDescription('Operation mode for right button')
|
|
493
493
|
.withEndpoint('right'),
|
|
494
494
|
],
|
|
495
|
-
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_basic, tz.xiaomi_power],
|
|
495
|
+
toZigbee: [tz.on_off, {...tz.xiaomi_switch_operation_mode_basic, convertGet: null}, tz.xiaomi_power],
|
|
496
496
|
meta: {multiEndpoint: true},
|
|
497
497
|
endpoint: (device) => {
|
|
498
498
|
return {'system': 1, 'left': 2, 'right': 3};
|
package/lib/constants.js
CHANGED
|
@@ -247,6 +247,13 @@ const easyCodeTouchActions = {
|
|
|
247
247
|
0xFF0E: 'zigbee_unlock',
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
+
const wiserDimmerControlMode = {
|
|
251
|
+
0: 'auto',
|
|
252
|
+
1: 'rc',
|
|
253
|
+
2: 'rl',
|
|
254
|
+
3: 'rl_led',
|
|
255
|
+
};
|
|
256
|
+
|
|
250
257
|
module.exports = {
|
|
251
258
|
OneJanuary2000,
|
|
252
259
|
repInterval,
|
|
@@ -275,4 +282,5 @@ module.exports = {
|
|
|
275
282
|
lockSoundVolume,
|
|
276
283
|
lockUserStatus,
|
|
277
284
|
easyCodeTouchActions,
|
|
285
|
+
wiserDimmerControlMode,
|
|
278
286
|
};
|
package/lib/legacy.js
CHANGED
|
@@ -1012,12 +1012,14 @@ const fromZigbee = {
|
|
|
1012
1012
|
type: ['attributeReport'],
|
|
1013
1013
|
options: [exposes.options.legacy()],
|
|
1014
1014
|
convert: (model, msg, publish, options, meta) => {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
if (isLegacyEnabled(options)) {
|
|
1016
|
+
const mapping = {4: 'left', 5: 'right'};
|
|
1017
|
+
const button = mapping[msg.endpoint.ID];
|
|
1018
|
+
if (button) {
|
|
1019
|
+
const payload = {};
|
|
1020
|
+
payload[`button_${button}`] = msg.data['onOff'] === 1 ? 'release' : 'hold';
|
|
1021
|
+
return payload;
|
|
1022
|
+
}
|
|
1021
1023
|
}
|
|
1022
1024
|
},
|
|
1023
1025
|
},
|
package/npm-shrinkwrap.json
CHANGED