zigbee-herdsman-converters 20.1.1 → 20.3.0
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/CHANGELOG.md +44 -0
- package/converters/toZigbee.d.ts +340 -340
- package/devices/ctm.d.ts.map +1 -1
- package/devices/ctm.js +41 -0
- package/devices/ctm.js.map +1 -1
- package/devices/elko.js +2 -2
- package/devices/gledopto.d.ts.map +1 -1
- package/devices/gledopto.js +14 -6
- package/devices/gledopto.js.map +1 -1
- package/devices/ikea.d.ts.map +1 -1
- package/devices/ikea.js +13 -7
- package/devices/ikea.js.map +1 -1
- package/devices/immax.js +1 -1
- package/devices/immax.js.map +1 -1
- package/devices/lanesto.js +1 -1
- package/devices/lanesto.js.map +1 -1
- package/devices/lonsonho.js +2 -2
- package/devices/lonsonho.js.map +1 -1
- package/devices/lumi.d.ts.map +1 -1
- package/devices/lumi.js +31 -1
- package/devices/lumi.js.map +1 -1
- package/devices/osram.d.ts.map +1 -1
- package/devices/osram.js +7 -0
- package/devices/osram.js.map +1 -1
- package/devices/philips.d.ts.map +1 -1
- package/devices/philips.js +14 -0
- package/devices/philips.js.map +1 -1
- package/devices/robb.d.ts.map +1 -1
- package/devices/robb.js +16 -0
- package/devices/robb.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +23 -5
- package/devices/tuya.js.map +1 -1
- package/devices/vimar.js +1 -1
- package/devices/vimar.js.map +1 -1
- package/lib/generateDefinition.js +0 -1
- package/lib/generateDefinition.js.map +1 -1
- package/lib/ledvance.d.ts +1 -1
- package/lib/legacy.d.ts +123 -123
- package/lib/legrand.d.ts +6 -6
- package/lib/lumi.d.ts +103 -87
- package/lib/lumi.d.ts.map +1 -1
- package/lib/lumi.js +210 -1
- package/lib/lumi.js.map +1 -1
- package/lib/philips.d.ts +10 -10
- package/lib/tuya.d.ts +22 -19
- package/lib/tuya.d.ts.map +1 -1
- package/lib/tuya.js +14 -1
- package/lib/tuya.js.map +1 -1
- package/lib/zosung.d.ts +2 -2
- package/package.json +7 -7
package/lib/lumi.js
CHANGED
|
@@ -1437,6 +1437,146 @@ exports.lumiModernExtend = {
|
|
|
1437
1437
|
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1438
1438
|
...args,
|
|
1439
1439
|
}),
|
|
1440
|
+
lumiCurtainSpeed: (args) => modernExtend.numeric({
|
|
1441
|
+
name: 'curtain_speed',
|
|
1442
|
+
cluster: 'manuSpecificLumi',
|
|
1443
|
+
attribute: { ID: 0x043b, type: 0x20 },
|
|
1444
|
+
description: 'Speed of curtain movement',
|
|
1445
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1446
|
+
access: 'ALL',
|
|
1447
|
+
unit: '%',
|
|
1448
|
+
valueMin: 1,
|
|
1449
|
+
valueMax: 100,
|
|
1450
|
+
entityCategory: 'config',
|
|
1451
|
+
...args,
|
|
1452
|
+
}),
|
|
1453
|
+
lumiCurtainManualOpenClose: (args) => modernExtend.binary({
|
|
1454
|
+
name: 'manual_open_close',
|
|
1455
|
+
valueOn: ['ON', 1],
|
|
1456
|
+
valueOff: ['OFF', 0],
|
|
1457
|
+
cluster: 'manuSpecificLumi',
|
|
1458
|
+
attribute: 'curtainHandOpen',
|
|
1459
|
+
description: 'Gently pull to open/close the curtain automatically',
|
|
1460
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1461
|
+
access: 'ALL',
|
|
1462
|
+
entityCategory: 'config',
|
|
1463
|
+
...args,
|
|
1464
|
+
}),
|
|
1465
|
+
lumiCurtainAdaptivePullingSpeed: (args) => modernExtend.binary({
|
|
1466
|
+
name: 'adaptive_pulling_speed',
|
|
1467
|
+
valueOn: ['ON', 1],
|
|
1468
|
+
valueOff: ['OFF', 0],
|
|
1469
|
+
cluster: 'manuSpecificLumi',
|
|
1470
|
+
attribute: { ID: 0x0442, type: 0x20 },
|
|
1471
|
+
description: 'The faster/slower the curtain is pulled manually, the faster/slower the curtain will move',
|
|
1472
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1473
|
+
access: 'ALL',
|
|
1474
|
+
entityCategory: 'config',
|
|
1475
|
+
...args,
|
|
1476
|
+
}),
|
|
1477
|
+
lumiCurtainManualStop: (args) => modernExtend.binary({
|
|
1478
|
+
name: 'manual_stop',
|
|
1479
|
+
valueOn: ['ON', 1],
|
|
1480
|
+
valueOff: ['OFF', 0],
|
|
1481
|
+
cluster: 'manuSpecificLumi',
|
|
1482
|
+
attribute: { ID: 0x043a, type: 0x10 },
|
|
1483
|
+
description: 'Manually pulling the curtain during operation stops the motor',
|
|
1484
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1485
|
+
access: 'ALL',
|
|
1486
|
+
entityCategory: 'config',
|
|
1487
|
+
...args,
|
|
1488
|
+
}),
|
|
1489
|
+
lumiCurtainReverse: (args) => modernExtend.binary({
|
|
1490
|
+
name: 'reverse_direction',
|
|
1491
|
+
valueOn: [true, 1],
|
|
1492
|
+
valueOff: [false, 0],
|
|
1493
|
+
cluster: 'closuresWindowCovering',
|
|
1494
|
+
attribute: 'windowCoveringMode',
|
|
1495
|
+
description: 'Whether the curtain direction is inverted',
|
|
1496
|
+
access: 'ALL',
|
|
1497
|
+
entityCategory: 'config',
|
|
1498
|
+
...args,
|
|
1499
|
+
}),
|
|
1500
|
+
lumiCurtainStatus: (args) => modernExtend.enumLookup({
|
|
1501
|
+
name: 'status',
|
|
1502
|
+
lookup: { closing: 0, opening: 1, stopped: 2, blocked: 3 },
|
|
1503
|
+
cluster: 'manuSpecificLumi',
|
|
1504
|
+
attribute: { ID: 0x0421, type: 0x20 },
|
|
1505
|
+
description: 'Current status of the curtain (Opening, Closing, Stopped, Blocked)',
|
|
1506
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1507
|
+
access: 'STATE',
|
|
1508
|
+
entityCategory: 'diagnostic',
|
|
1509
|
+
...args,
|
|
1510
|
+
}),
|
|
1511
|
+
lumiCurtainLastManualOperation: (args) => modernExtend.enumLookup({
|
|
1512
|
+
name: 'last_manual_operation',
|
|
1513
|
+
lookup: { open: 1, close: 2, stop: 3 },
|
|
1514
|
+
cluster: 'manuSpecificLumi',
|
|
1515
|
+
attribute: { ID: 0x0425, type: 0x20 },
|
|
1516
|
+
description: 'Last triggered manual operation',
|
|
1517
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1518
|
+
access: 'STATE',
|
|
1519
|
+
entityCategory: 'diagnostic',
|
|
1520
|
+
...args,
|
|
1521
|
+
}),
|
|
1522
|
+
lumiCurtainPosition: (args) => modernExtend.numeric({
|
|
1523
|
+
name: 'curtain_position',
|
|
1524
|
+
cluster: 'manuSpecificLumi',
|
|
1525
|
+
attribute: { ID: 0x041f, type: 0x20 },
|
|
1526
|
+
description: 'Current position of the curtain',
|
|
1527
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1528
|
+
access: 'STATE',
|
|
1529
|
+
unit: '%',
|
|
1530
|
+
valueMin: 1,
|
|
1531
|
+
valueMax: 100,
|
|
1532
|
+
entityCategory: 'diagnostic',
|
|
1533
|
+
...args,
|
|
1534
|
+
}),
|
|
1535
|
+
lumiCurtainTraverseTime: (args) => modernExtend.numeric({
|
|
1536
|
+
name: 'traverse_time',
|
|
1537
|
+
cluster: 'manuSpecificLumi',
|
|
1538
|
+
attribute: { ID: 0x0403, type: 0x20 },
|
|
1539
|
+
description: 'Time in seconds to get from one end to another',
|
|
1540
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1541
|
+
access: 'STATE',
|
|
1542
|
+
unit: 'sec',
|
|
1543
|
+
entityCategory: 'diagnostic',
|
|
1544
|
+
...args,
|
|
1545
|
+
}),
|
|
1546
|
+
lumiCurtainCalibrationStatus: (args) => modernExtend.enumLookup({
|
|
1547
|
+
name: 'calibration_status',
|
|
1548
|
+
lookup: { not_calibrated: 0, half_calibrated: 1, fully_calibrated: 2 },
|
|
1549
|
+
cluster: 'manuSpecificLumi',
|
|
1550
|
+
attribute: { ID: 0x0426, type: 0x20 },
|
|
1551
|
+
description: 'Calibration status of the curtain (Not calibrated, Half calibrated, Fully calibrated)',
|
|
1552
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1553
|
+
access: 'STATE',
|
|
1554
|
+
entityCategory: 'diagnostic',
|
|
1555
|
+
...args,
|
|
1556
|
+
}),
|
|
1557
|
+
lumiCurtainCalibrated: (args) => modernExtend.binary({
|
|
1558
|
+
name: 'calibrated',
|
|
1559
|
+
valueOn: [true, 1],
|
|
1560
|
+
valueOff: [false, 0],
|
|
1561
|
+
cluster: 'manuSpecificLumi',
|
|
1562
|
+
attribute: 'curtainCalibrated',
|
|
1563
|
+
description: 'Indicates if this device is calibrated',
|
|
1564
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1565
|
+
access: 'STATE',
|
|
1566
|
+
entityCategory: 'diagnostic',
|
|
1567
|
+
...args,
|
|
1568
|
+
}),
|
|
1569
|
+
lumiCurtainIdentifyBeep: (args) => modernExtend.enumLookup({
|
|
1570
|
+
name: 'identify_beep',
|
|
1571
|
+
lookup: { short: 0, '1_sec': 1, '2_sec': 2 },
|
|
1572
|
+
cluster: 'manuSpecificLumi',
|
|
1573
|
+
attribute: { ID: 0x0404, type: 0x20 },
|
|
1574
|
+
description: 'Device will beep for chosen time duration',
|
|
1575
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1576
|
+
access: 'ALL',
|
|
1577
|
+
entityCategory: 'config',
|
|
1578
|
+
...args,
|
|
1579
|
+
}),
|
|
1440
1580
|
lumiPowerOnBehavior: (args) => modernExtend.enumLookup({
|
|
1441
1581
|
name: 'power_on_behavior',
|
|
1442
1582
|
lookup: { on: 0, previous: 1, off: 2, inverted: 3 },
|
|
@@ -4416,7 +4556,9 @@ exports.toZigbee = {
|
|
|
4416
4556
|
lumi_curtain_limits_calibration: {
|
|
4417
4557
|
key: ['limits_calibration'],
|
|
4418
4558
|
convertSet: async (entity, key, value, meta) => {
|
|
4419
|
-
|
|
4559
|
+
(0, utils_1.assertString)(value);
|
|
4560
|
+
const normalizedValue = value.toLowerCase();
|
|
4561
|
+
switch (normalizedValue) {
|
|
4420
4562
|
case 'start':
|
|
4421
4563
|
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x01, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4422
4564
|
break;
|
|
@@ -4449,6 +4591,73 @@ exports.toZigbee = {
|
|
|
4449
4591
|
}
|
|
4450
4592
|
},
|
|
4451
4593
|
},
|
|
4594
|
+
lumi_curtain_automatic_calibration_ZNCLDJ01LM: {
|
|
4595
|
+
key: ['automatic_calibration'],
|
|
4596
|
+
convertSet: async (entity, key, value, meta) => {
|
|
4597
|
+
// Check if the curtain is already calibrated
|
|
4598
|
+
const checkIfCalibrated = async () => {
|
|
4599
|
+
const result = await entity.read('manuSpecificLumi', ['curtainCalibrated']);
|
|
4600
|
+
return result ? result.curtainCalibrated : false;
|
|
4601
|
+
};
|
|
4602
|
+
if (await checkIfCalibrated()) {
|
|
4603
|
+
logger_1.logger.info('End positions already calibrated. Reset the calibration before proceeding.', NS);
|
|
4604
|
+
return;
|
|
4605
|
+
}
|
|
4606
|
+
// Reset Calibration
|
|
4607
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x00, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4608
|
+
logger_1.logger.info('Starting the calibration process...', NS);
|
|
4609
|
+
// Wait for 3 seconds
|
|
4610
|
+
await (0, utils_1.sleep)(3000);
|
|
4611
|
+
// Move the curtain to one direction
|
|
4612
|
+
await entity.command('closuresWindowCovering', 'goToLiftPercentage', { percentageliftvalue: 100 }, (0, utils_1.getOptions)(meta.mapped, entity));
|
|
4613
|
+
logger_1.logger.info('Moving curtain and waiting to reach the end position.', NS);
|
|
4614
|
+
// Wait until the curtain gets into a moving state, then wait until it gets blocked or stopped
|
|
4615
|
+
const waitForStateTransition = async (initialStates, desiredStates) => {
|
|
4616
|
+
return new Promise((resolve) => {
|
|
4617
|
+
const checkState = async () => {
|
|
4618
|
+
const result = await entity.read('manuSpecificLumi', [0x0421]);
|
|
4619
|
+
const state = result ? result[0x0421] : null;
|
|
4620
|
+
if (!initialStates.includes(state)) {
|
|
4621
|
+
const checkDesiredState = async () => {
|
|
4622
|
+
const result = await entity.read('manuSpecificLumi', [0x0421]);
|
|
4623
|
+
const state = result ? result[0x0421] : null;
|
|
4624
|
+
if (desiredStates.includes(state)) {
|
|
4625
|
+
resolve();
|
|
4626
|
+
}
|
|
4627
|
+
else {
|
|
4628
|
+
setTimeout(checkDesiredState, 500);
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
setTimeout(checkDesiredState, 500);
|
|
4632
|
+
}
|
|
4633
|
+
else {
|
|
4634
|
+
setTimeout(checkState, 500);
|
|
4635
|
+
}
|
|
4636
|
+
};
|
|
4637
|
+
void checkState();
|
|
4638
|
+
});
|
|
4639
|
+
};
|
|
4640
|
+
await waitForStateTransition([2, 3], [2, 3]);
|
|
4641
|
+
// Wait for 1 second
|
|
4642
|
+
await (0, utils_1.sleep)(1000);
|
|
4643
|
+
// Set First Calibration Position
|
|
4644
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x01, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4645
|
+
logger_1.logger.info('End position 1 has been set.', NS);
|
|
4646
|
+
// Wait for 3 seconds
|
|
4647
|
+
await (0, utils_1.sleep)(3000);
|
|
4648
|
+
// Move the curtain in the opposite direction
|
|
4649
|
+
await entity.command('closuresWindowCovering', 'goToLiftPercentage', { percentageliftvalue: 0 }, (0, utils_1.getOptions)(meta.mapped, entity));
|
|
4650
|
+
logger_1.logger.info('Moving curtain in the opposite direction and waiting to reach the end position.', NS);
|
|
4651
|
+
// Wait until the curtain gets into a moving state, then wait until it gets blocked or stopped
|
|
4652
|
+
await waitForStateTransition([2, 3], [2, 3]);
|
|
4653
|
+
// Wait for 1 second
|
|
4654
|
+
await (0, utils_1.sleep)(1000);
|
|
4655
|
+
// Set Second Calibration Position
|
|
4656
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x02, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4657
|
+
logger_1.logger.info('End position 2 has been set.', NS);
|
|
4658
|
+
logger_1.logger.info('Calibration process completed.', NS);
|
|
4659
|
+
},
|
|
4660
|
+
},
|
|
4452
4661
|
lumi_buzzer: {
|
|
4453
4662
|
key: ['buzzer'],
|
|
4454
4663
|
convertSet: async (entity, key, value, meta) => {
|