zigbee-herdsman 10.5.0 → 10.6.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 +7 -0
- package/dist/adapter/ember/ezsp/consts.d.ts +1 -1
- package/dist/adapter/ember/ezsp/consts.js +1 -1
- package/dist/adapter/ember/ezsp/enums.d.ts +59 -8
- package/dist/adapter/ember/ezsp/enums.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/enums.js +59 -7
- package/dist/adapter/ember/ezsp/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.d.ts +16 -0
- package/dist/adapter/ember/ezsp/ezsp.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.js +39 -10
- package/dist/adapter/ember/ezsp/ezsp.js.map +1 -1
- package/package.json +1 -1
|
@@ -1486,6 +1486,25 @@ class Ezsp extends node_events_1.default {
|
|
|
1486
1486
|
throw new ezspError_1.EzspError(sendStatus);
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Set the channel number the device will accept in ZDO Mgmt Network Update command to change channel.
|
|
1491
|
+
* If a ZDO Mgmt Network Update command is received by the device specifying a channel that does not match with the given
|
|
1492
|
+
* channel, the ZDO Mgmt Network Update command will be ignored by the device.
|
|
1493
|
+
* A value of 0xFF indicates that any channel received in a ZDO Mgmt Network Update command
|
|
1494
|
+
* will be accepted which is also the default value set by the stack.
|
|
1495
|
+
* @param channel uint8_t
|
|
1496
|
+
*/
|
|
1497
|
+
async ezspSetPendingNetworkUpdateChannel(channel) {
|
|
1498
|
+
if (this.version < 0x12) {
|
|
1499
|
+
throw new ezspError_1.EzspError(enums_1.EzspStatus.ERROR_INVALID_FRAME_ID);
|
|
1500
|
+
}
|
|
1501
|
+
const sendBuffalo = this.startCommand(enums_2.EzspFrameID.SET_PENDING_NETWORK_UPDATE_CHANNEL);
|
|
1502
|
+
sendBuffalo.writeUInt8(channel);
|
|
1503
|
+
const sendStatus = await this.sendCommand(sendBuffalo);
|
|
1504
|
+
if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
|
|
1505
|
+
throw new ezspError_1.EzspError(sendStatus);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1489
1508
|
/**
|
|
1490
1509
|
* Retrieve the endpoint number located at the specified index.
|
|
1491
1510
|
* @param index uint8_t Index to retrieve the endpoint number for.
|
|
@@ -1662,40 +1681,36 @@ class Ezsp extends node_events_1.default {
|
|
|
1662
1681
|
let expectedTokenDataLength = 0;
|
|
1663
1682
|
// the size of corresponding the EZSP Mfg token, please refer to app/util/ezsp/ezsp-enum.h
|
|
1664
1683
|
switch (tokenId) {
|
|
1665
|
-
|
|
1684
|
+
case enums_2.EzspMfgTokenId.BOOTLOAD_AES_KEY:
|
|
1685
|
+
case enums_2.EzspMfgTokenId.SL_ZIGBEE_EZSP_STORAGE:
|
|
1686
|
+
case enums_2.EzspMfgTokenId.STRING:
|
|
1687
|
+
expectedTokenDataLength = 255; // removed legacy
|
|
1688
|
+
break;
|
|
1666
1689
|
case enums_2.EzspMfgTokenId.CUSTOM_VERSION:
|
|
1667
1690
|
case enums_2.EzspMfgTokenId.MANUF_ID:
|
|
1668
1691
|
case enums_2.EzspMfgTokenId.PHY_CONFIG:
|
|
1669
1692
|
case enums_2.EzspMfgTokenId.CTUNE:
|
|
1670
1693
|
expectedTokenDataLength = 2;
|
|
1671
1694
|
break;
|
|
1672
|
-
// 8 bytes
|
|
1673
|
-
case enums_2.EzspMfgTokenId.EZSP_STORAGE:
|
|
1674
1695
|
case enums_2.EzspMfgTokenId.CUSTOM_EUI_64:
|
|
1675
1696
|
expectedTokenDataLength = 8;
|
|
1676
1697
|
break;
|
|
1677
|
-
// 16 bytes
|
|
1678
|
-
case enums_2.EzspMfgTokenId.STRING:
|
|
1679
1698
|
case enums_2.EzspMfgTokenId.BOARD_NAME:
|
|
1680
|
-
case enums_2.EzspMfgTokenId.BOOTLOAD_AES_KEY:
|
|
1681
1699
|
expectedTokenDataLength = 16;
|
|
1682
1700
|
break;
|
|
1683
|
-
// 20 bytes
|
|
1684
1701
|
case enums_2.EzspMfgTokenId.INSTALLATION_CODE:
|
|
1685
1702
|
expectedTokenDataLength = 20;
|
|
1686
1703
|
break;
|
|
1687
|
-
// 40 bytes
|
|
1688
1704
|
case enums_2.EzspMfgTokenId.ASH_CONFIG:
|
|
1689
1705
|
expectedTokenDataLength = 40;
|
|
1690
1706
|
break;
|
|
1691
|
-
// 92 bytes
|
|
1692
1707
|
case enums_2.EzspMfgTokenId.CBKE_DATA:
|
|
1693
1708
|
expectedTokenDataLength = 92;
|
|
1694
1709
|
break;
|
|
1695
1710
|
default:
|
|
1696
1711
|
break;
|
|
1697
1712
|
}
|
|
1698
|
-
if (tokenDataLength !== expectedTokenDataLength) {
|
|
1713
|
+
if (expectedTokenDataLength === 255 || tokenDataLength !== expectedTokenDataLength) {
|
|
1699
1714
|
throw new ezspError_1.EzspError(enums_1.EzspStatus.ERROR_INVALID_VALUE);
|
|
1700
1715
|
}
|
|
1701
1716
|
const tokenData = this.buffalo.readListUInt8(tokenDataLength);
|
|
@@ -3731,6 +3746,20 @@ class Ezsp extends node_events_1.default {
|
|
|
3731
3746
|
throw new ezspError_1.EzspError(sendStatus);
|
|
3732
3747
|
}
|
|
3733
3748
|
}
|
|
3749
|
+
/**
|
|
3750
|
+
* When enabled, the stack clears the binding table on definitive leave (not
|
|
3751
|
+
* leave-with-rejoin), as required for Zigbee 4.0 security profile (e.g.
|
|
3752
|
+
* CN-Reset-TC-01).
|
|
3753
|
+
* @param clear True to clear bindings on leave; false to disable.
|
|
3754
|
+
*/
|
|
3755
|
+
async ezspClearBindingTableOnLeave(clear) {
|
|
3756
|
+
const sendBuffalo = this.startCommand(enums_2.EzspFrameID.CLEAR_BINDING_TABLE_ON_LEAVE);
|
|
3757
|
+
sendBuffalo.writeUInt8(clear ? 1 : 0);
|
|
3758
|
+
const sendStatus = await this.sendCommand(sendBuffalo);
|
|
3759
|
+
if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
|
|
3760
|
+
throw new ezspError_1.EzspError(sendStatus);
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3734
3763
|
/**
|
|
3735
3764
|
* Callback
|
|
3736
3765
|
* The NCP used the external binding modification policy to decide how to handle
|