@willieee802/zigbee-herdsman 0.34.3 → 0.36.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +86 -0
- package/dist/adapter/ember/adapter/emberAdapter.d.ts +28 -35
- package/dist/adapter/ember/adapter/emberAdapter.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/emberAdapter.js +40 -51
- package/dist/adapter/ember/adapter/emberAdapter.js.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.d.ts +6 -3
- package/dist/adapter/ember/adapter/oneWaitress.d.ts.map +1 -1
- package/dist/adapter/ember/adapter/oneWaitress.js +1 -0
- package/dist/adapter/ember/adapter/oneWaitress.js.map +1 -1
- package/dist/adapter/ember/adapter/requestQueue.js +1 -1
- package/dist/adapter/ember/adapter/requestQueue.js.map +1 -1
- package/dist/adapter/ember/enums.d.ts +121 -131
- package/dist/adapter/ember/enums.d.ts.map +1 -1
- package/dist/adapter/ember/enums.js +120 -134
- package/dist/adapter/ember/enums.js.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.d.ts +1 -2
- package/dist/adapter/ember/ezsp/ezsp.d.ts.map +1 -1
- package/dist/adapter/ember/ezsp/ezsp.js +10 -13
- package/dist/adapter/ember/ezsp/ezsp.js.map +1 -1
- package/dist/adapter/ember/uart/ash.d.ts +18 -11
- package/dist/adapter/ember/uart/ash.d.ts.map +1 -1
- package/dist/adapter/ember/uart/ash.js +52 -35
- package/dist/adapter/ember/uart/ash.js.map +1 -1
- package/dist/adapter/ezsp/adapter/backup.d.ts +4 -0
- package/dist/adapter/ezsp/adapter/backup.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/backup.js +32 -0
- package/dist/adapter/ezsp/adapter/backup.js.map +1 -1
- package/dist/adapter/ezsp/adapter/ezspAdapter.d.ts +2 -2
- package/dist/adapter/ezsp/adapter/ezspAdapter.d.ts.map +1 -1
- package/dist/adapter/ezsp/adapter/ezspAdapter.js +5 -8
- package/dist/adapter/ezsp/adapter/ezspAdapter.js.map +1 -1
- package/dist/adapter/ezsp/driver/driver.d.ts +6 -1
- package/dist/adapter/ezsp/driver/driver.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/driver.js +100 -15
- package/dist/adapter/ezsp/driver/driver.js.map +1 -1
- package/dist/adapter/ezsp/driver/ezsp.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/ezsp.js +1 -0
- package/dist/adapter/ezsp/driver/ezsp.js.map +1 -1
- package/dist/adapter/ezsp/driver/types/struct.d.ts +1 -1
- package/dist/adapter/ezsp/driver/types/struct.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/types/struct.js.map +1 -1
- package/dist/adapter/ezsp/driver/utils/index.d.ts +2 -1
- package/dist/adapter/ezsp/driver/utils/index.d.ts.map +1 -1
- package/dist/adapter/ezsp/driver/utils/index.js +2 -2
- package/dist/adapter/ezsp/driver/utils/index.js.map +1 -1
- package/dist/adapter/serialPort.d.ts +3 -0
- package/dist/adapter/serialPort.d.ts.map +1 -1
- package/dist/adapter/serialPort.js +16 -23
- package/dist/adapter/serialPort.js.map +1 -1
- package/dist/adapter/z-stack/adapter/zStackAdapter.d.ts.map +1 -1
- package/dist/adapter/z-stack/adapter/zStackAdapter.js +12 -18
- package/dist/adapter/z-stack/adapter/zStackAdapter.js.map +1 -1
- package/dist/controller/model/device.d.ts.map +1 -1
- package/dist/controller/model/device.js +3 -1
- package/dist/controller/model/device.js.map +1 -1
- package/dist/zcl/definition/cluster.d.ts.map +1 -1
- package/dist/zcl/definition/cluster.js +17 -7
- package/dist/zcl/definition/cluster.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,91 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.36.0](https://github.com/Koenkk/zigbee-herdsman/compare/v0.35.3...v0.36.0) (2024-03-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* EZSP: Network restore from backup ([#950](https://github.com/Koenkk/zigbee-herdsman/issues/950)) ([1260ff1](https://github.com/Koenkk/zigbee-herdsman/commit/1260ff16e1c4f805480dd444f04afc4959d71a4e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Ember: comments/logging cleanups. ([#952](https://github.com/Koenkk/zigbee-herdsman/issues/952)) ([52a0ff2](https://github.com/Koenkk/zigbee-herdsman/commit/52a0ff2a5e98699535c812a3cfd68ac7b0ea3b40))
|
|
14
|
+
|
|
15
|
+
## [0.35.3](https://github.com/Koenkk/zigbee-herdsman/compare/v0.35.2...v0.35.3) (2024-03-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* Cleanup SerialPort async wrappers ([#949](https://github.com/Koenkk/zigbee-herdsman/issues/949)) ([cbd68df](https://github.com/Koenkk/zigbee-herdsman/commit/cbd68dfc3c195ae2158a06277497714e7252924e))
|
|
21
|
+
* Ember: Drastically lower default requests & callbacks processing delay & use existing setting for customization. ([#951](https://github.com/Koenkk/zigbee-herdsman/issues/951)) ([810266a](https://github.com/Koenkk/zigbee-herdsman/commit/810266a34c00c4c44d27ee51c4dfc10dd7f38649))
|
|
22
|
+
* **ignore:** update dependencies ([#947](https://github.com/Koenkk/zigbee-herdsman/issues/947)) ([795c944](https://github.com/Koenkk/zigbee-herdsman/commit/795c9446783e7ecd06a1d03e912e09a9e5b01228))
|
|
23
|
+
|
|
24
|
+
## [0.35.2](https://github.com/Koenkk/zigbee-herdsman/compare/v0.35.1...v0.35.2) (2024-03-02)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* Ember: skip port re-init on reset retry ([#945](https://github.com/Koenkk/zigbee-herdsman/issues/945)) ([2a3a98b](https://github.com/Koenkk/zigbee-herdsman/commit/2a3a98beea9b3314dbb5fd976e3a6234b2bb264e))
|
|
30
|
+
|
|
31
|
+
## [0.35.1](https://github.com/Koenkk/zigbee-herdsman/compare/v0.35.0...v0.35.1) (2024-03-01)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* Refactor names to follow convention in SchneiderSwitch cluster ([#942](https://github.com/Koenkk/zigbee-herdsman/issues/942)) ([91190b2](https://github.com/Koenkk/zigbee-herdsman/commit/91190b2c42f6738e326221f5e10348561df84864))
|
|
37
|
+
|
|
38
|
+
## [0.35.0](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.9...v0.35.0) (2024-02-29)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* Add manuSpecificSchneiderFanSwitchConfiguration ([#937](https://github.com/Koenkk/zigbee-herdsman/issues/937)) ([adcfd61](https://github.com/Koenkk/zigbee-herdsman/commit/adcfd61699833ac1aba9ffde62e441a11ac5e60c))
|
|
44
|
+
|
|
45
|
+
## [0.34.9](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.8...v0.34.9) (2024-02-27)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* EZSP: fix pairing via routers not possible ([#938](https://github.com/Koenkk/zigbee-herdsman/issues/938)) ([b004cf8](https://github.com/Koenkk/zigbee-herdsman/commit/b004cf827da04eb78e7658776bd2726289797b16))
|
|
51
|
+
|
|
52
|
+
## [0.34.8](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.7...v0.34.8) (2024-02-26)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* Ember: port init/close logic cleanup. ([#935](https://github.com/Koenkk/zigbee-herdsman/issues/935)) ([c11d356](https://github.com/Koenkk/zigbee-herdsman/commit/c11d356f618a65aa4ba1a8df35ab5d238ba20029))
|
|
58
|
+
|
|
59
|
+
## [0.34.7](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.6...v0.34.7) (2024-02-25)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* Ember: reworked errors in ASH protocol ([#932](https://github.com/Koenkk/zigbee-herdsman/issues/932)) ([bf070cd](https://github.com/Koenkk/zigbee-herdsman/commit/bf070cd7614cbe16900d387901848e16aa62136b))
|
|
65
|
+
|
|
66
|
+
## [0.34.6](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.5...v0.34.6) (2024-02-25)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* **ignore:** Add `DISABLE_TUYA_DEFAULT_RESPONSE` option ([c6ff266](https://github.com/Koenkk/zigbee-herdsman/commit/c6ff266f66c47d6b46745040eaaa973cd7a84407))
|
|
72
|
+
* **ignore:** Remove DISABLE_ASSOC_GET ([4ed739b](https://github.com/Koenkk/zigbee-herdsman/commit/4ed739bc1a45d58207607feeb06fb1f3d530a1e5))
|
|
73
|
+
|
|
74
|
+
## [0.34.5](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.4...v0.34.5) (2024-02-25)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* Ember: fixed OTA response matching ([#928](https://github.com/Koenkk/zigbee-herdsman/issues/928)) ([01dbe18](https://github.com/Koenkk/zigbee-herdsman/commit/01dbe1868537e3637c16682d587f8d37871ab739))
|
|
80
|
+
* **ignore:** update dependencies ([#929](https://github.com/Koenkk/zigbee-herdsman/issues/929)) ([7e99154](https://github.com/Koenkk/zigbee-herdsman/commit/7e99154e0c592d4dcbe9d17bc6b87eb0952088f3))
|
|
81
|
+
|
|
82
|
+
## [0.34.4](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.3...v0.34.4) (2024-02-23)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
* Ember: Fix install code CRC validation. ([#926](https://github.com/Koenkk/zigbee-herdsman/issues/926)) ([79478eb](https://github.com/Koenkk/zigbee-herdsman/commit/79478ebbeee8190c4b7ff1541a9ab29a0965227a))
|
|
88
|
+
|
|
3
89
|
## [0.34.3](https://github.com/Koenkk/zigbee-herdsman/compare/v0.34.2...v0.34.3) (2024-02-22)
|
|
4
90
|
|
|
5
91
|
|
|
@@ -35,12 +35,12 @@ export declare class EmberAdapter extends Adapter {
|
|
|
35
35
|
private concentratorType;
|
|
36
36
|
private readonly ezsp;
|
|
37
37
|
private version;
|
|
38
|
-
private requestQueue;
|
|
39
|
-
private oneWaitress;
|
|
38
|
+
private readonly requestQueue;
|
|
39
|
+
private readonly oneWaitress;
|
|
40
40
|
/** Periodically retrieve counters then clear them. */
|
|
41
41
|
private watchdogCountersHandle;
|
|
42
42
|
/** Hold ZDO request in process. */
|
|
43
|
-
private zdoRequestBuffalo;
|
|
43
|
+
private readonly zdoRequestBuffalo;
|
|
44
44
|
/** Sequence number used for ZDO requests. static uint8_t */
|
|
45
45
|
private zdoRequestSequence;
|
|
46
46
|
/** Default radius used for broadcast ZDO requests. uint8_t */
|
|
@@ -540,40 +540,26 @@ export declare class EmberAdapter extends Adapter {
|
|
|
540
540
|
private emberSimpleDescriptorRequest;
|
|
541
541
|
/**
|
|
542
542
|
* ZDO
|
|
543
|
-
*
|
|
544
|
-
* contents from the specified node.
|
|
543
|
+
* Common logic used by `emberBindRequest` & `emberUnbindRequest`.
|
|
545
544
|
*
|
|
546
|
-
* @param target The node on which the binding will be removed.
|
|
547
|
-
* @param source The source EUI64 in the binding entry.
|
|
548
|
-
* @param sourceEndpoint The source endpoint in the binding entry.
|
|
549
|
-
* @param clusterId The cluster ID in the binding entry.
|
|
550
|
-
* @param type The type of binding, either ::UNICAST_BINDING,
|
|
551
|
-
* ::MULTICAST_BINDING, or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
552
|
-
* ::UNICAST_MANY_TO_ONE_BINDING is an Ember-specific extension
|
|
553
|
-
* and should be used only when the target is an Ember device.
|
|
554
|
-
* @param destination The destination EUI64 in the binding entry for the
|
|
555
|
-
* ::UNICAST_BINDING or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
556
|
-
* @param groupAddress The group address for the ::MULTICAST_BINDING.
|
|
557
|
-
* @param destinationEndpoint The destination endpoint in the binding entry for
|
|
558
|
-
* the ::UNICAST_BINDING or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
559
|
-
* @param options The options to use when sending the request. See
|
|
560
|
-
* emberSendUnicast() for a description.
|
|
561
|
-
*
|
|
562
|
-
* @return An ::EmberStatus value.
|
|
563
|
-
* - ::EMBER_SUCCESS
|
|
564
|
-
* - ::EMBER_NO_BUFFERS
|
|
565
|
-
* _ ::EMBER_NETWORK_DOWN
|
|
566
|
-
* - ::EMBER_NETWORK_BUSY
|
|
567
545
|
* @param target
|
|
568
546
|
* @param bindClusterId
|
|
569
547
|
* @param source
|
|
570
|
-
* @param sourceEndpoint
|
|
571
|
-
* @param clusterId
|
|
572
|
-
* @param type
|
|
548
|
+
* @param sourceEndpoint
|
|
549
|
+
* @param clusterId
|
|
550
|
+
* @param type
|
|
573
551
|
* @param destination
|
|
574
|
-
* @param groupAddress
|
|
575
|
-
* @param destinationEndpoint
|
|
552
|
+
* @param groupAddress
|
|
553
|
+
* @param destinationEndpoint
|
|
576
554
|
* @param options
|
|
555
|
+
*
|
|
556
|
+
* @returns An ::EmberStatus value.
|
|
557
|
+
* - ::EMBER_SUCCESS
|
|
558
|
+
* - ::EMBER_NO_BUFFERS
|
|
559
|
+
* - ::EMBER_NETWORK_DOWN
|
|
560
|
+
* - ::EMBER_NETWORK_BUSY
|
|
561
|
+
* @returns APS frame created for the request
|
|
562
|
+
* @returns The tag used on the message.
|
|
577
563
|
*/
|
|
578
564
|
private emberSendZigDevBindRequest;
|
|
579
565
|
/**
|
|
@@ -597,8 +583,13 @@ export declare class EmberAdapter extends Adapter {
|
|
|
597
583
|
* @param options The options to use when sending the request. See
|
|
598
584
|
* emberSendUnicast() for a description.
|
|
599
585
|
*
|
|
600
|
-
* @
|
|
601
|
-
*
|
|
586
|
+
* @returns An ::EmberStatus value.
|
|
587
|
+
* - ::EMBER_SUCCESS
|
|
588
|
+
* - ::EMBER_NO_BUFFERS
|
|
589
|
+
* - ::EMBER_NETWORK_DOWN
|
|
590
|
+
* - ::EMBER_NETWORK_BUSY
|
|
591
|
+
* @returns APS frame created for the request
|
|
592
|
+
* @returns The tag used on the message.
|
|
602
593
|
*/
|
|
603
594
|
private emberBindRequest;
|
|
604
595
|
/**
|
|
@@ -622,11 +613,13 @@ export declare class EmberAdapter extends Adapter {
|
|
|
622
613
|
* @param options The options to use when sending the request. See
|
|
623
614
|
* emberSendUnicast() for a description.
|
|
624
615
|
*
|
|
625
|
-
* @
|
|
616
|
+
* @returns An ::EmberStatus value.
|
|
626
617
|
* - ::EMBER_SUCCESS
|
|
627
618
|
* - ::EMBER_NO_BUFFERS
|
|
628
|
-
*
|
|
619
|
+
* - ::EMBER_NETWORK_DOWN
|
|
629
620
|
* - ::EMBER_NETWORK_BUSY
|
|
621
|
+
* @returns APS frame created for the request
|
|
622
|
+
* @returns The tag used on the message.
|
|
630
623
|
*/
|
|
631
624
|
private emberUnbindRequest;
|
|
632
625
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emberAdapter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/ember/adapter/emberAdapter.ts"],"names":[],"mappings":";AAOA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAC,MAAM,EAAuB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAa,MAAM,cAAc,CAAC;AAExE,OAAO,EAMH,cAAc,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,GAAG,OAAO,CAAC,IAAI,CAAC;IA4D9F,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BlD,8BAA8B,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwCtF,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAmE3F,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BpD,OAAO,CAAC,iBAAiB;CAS5B"}
|
|
@@ -250,12 +250,11 @@ class EmberAdapter extends __1.Adapter {
|
|
|
250
250
|
this.stackConfig = socketPortUtils_1.default.isTcpPath(serialPortOptions.path) ? 'zigbeed' : 'default';
|
|
251
251
|
// TODO config
|
|
252
252
|
this.concentratorType = consts_2.EMBER_HIGH_RAM_CONCENTRATOR;
|
|
253
|
-
|
|
254
|
-
this.requestQueue = new requestQueue_1.EmberRequestQueue(
|
|
253
|
+
const delay = (typeof this.adapterOptions.delay === 'number') ? Math.min(Math.max(this.adapterOptions.delay, 5), 60) : 5;
|
|
254
|
+
this.requestQueue = new requestQueue_1.EmberRequestQueue(delay);
|
|
255
255
|
this.oneWaitress = new oneWaitress_1.EmberOneWaitress();
|
|
256
256
|
this.zdoRequestBuffalo = new buffalo_1.EzspBuffalo(Buffer.alloc(consts_1.EZSP_MAX_FRAME_LENGTH));
|
|
257
|
-
|
|
258
|
-
this.ezsp = new ezsp_1.Ezsp(60, serialPortOptions);
|
|
257
|
+
this.ezsp = new ezsp_1.Ezsp(delay, serialPortOptions);
|
|
259
258
|
this.ezsp.on(ezsp_1.EzspEvents.STACK_STATUS, this.onStackStatus.bind(this));
|
|
260
259
|
this.ezsp.on(ezsp_1.EzspEvents.MESSAGE_SENT_DELIVERY_FAILED, this.onMessageSentDeliveryFailed.bind(this));
|
|
261
260
|
this.ezsp.on(ezsp_1.EzspEvents.ZDO_RESPONSE, this.onZDOResponse.bind(this));
|
|
@@ -1759,40 +1758,26 @@ class EmberAdapter extends __1.Adapter {
|
|
|
1759
1758
|
}
|
|
1760
1759
|
/**
|
|
1761
1760
|
* ZDO
|
|
1762
|
-
*
|
|
1763
|
-
* contents from the specified node.
|
|
1761
|
+
* Common logic used by `emberBindRequest` & `emberUnbindRequest`.
|
|
1764
1762
|
*
|
|
1765
|
-
* @param target The node on which the binding will be removed.
|
|
1766
|
-
* @param source The source EUI64 in the binding entry.
|
|
1767
|
-
* @param sourceEndpoint The source endpoint in the binding entry.
|
|
1768
|
-
* @param clusterId The cluster ID in the binding entry.
|
|
1769
|
-
* @param type The type of binding, either ::UNICAST_BINDING,
|
|
1770
|
-
* ::MULTICAST_BINDING, or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
1771
|
-
* ::UNICAST_MANY_TO_ONE_BINDING is an Ember-specific extension
|
|
1772
|
-
* and should be used only when the target is an Ember device.
|
|
1773
|
-
* @param destination The destination EUI64 in the binding entry for the
|
|
1774
|
-
* ::UNICAST_BINDING or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
1775
|
-
* @param groupAddress The group address for the ::MULTICAST_BINDING.
|
|
1776
|
-
* @param destinationEndpoint The destination endpoint in the binding entry for
|
|
1777
|
-
* the ::UNICAST_BINDING or ::UNICAST_MANY_TO_ONE_BINDING.
|
|
1778
|
-
* @param options The options to use when sending the request. See
|
|
1779
|
-
* emberSendUnicast() for a description.
|
|
1780
|
-
*
|
|
1781
|
-
* @return An ::EmberStatus value.
|
|
1782
|
-
* - ::EMBER_SUCCESS
|
|
1783
|
-
* - ::EMBER_NO_BUFFERS
|
|
1784
|
-
* _ ::EMBER_NETWORK_DOWN
|
|
1785
|
-
* - ::EMBER_NETWORK_BUSY
|
|
1786
1763
|
* @param target
|
|
1787
1764
|
* @param bindClusterId
|
|
1788
1765
|
* @param source
|
|
1789
|
-
* @param sourceEndpoint
|
|
1790
|
-
* @param clusterId
|
|
1791
|
-
* @param type
|
|
1766
|
+
* @param sourceEndpoint
|
|
1767
|
+
* @param clusterId
|
|
1768
|
+
* @param type
|
|
1792
1769
|
* @param destination
|
|
1793
|
-
* @param groupAddress
|
|
1794
|
-
* @param destinationEndpoint
|
|
1770
|
+
* @param groupAddress
|
|
1771
|
+
* @param destinationEndpoint
|
|
1795
1772
|
* @param options
|
|
1773
|
+
*
|
|
1774
|
+
* @returns An ::EmberStatus value.
|
|
1775
|
+
* - ::EMBER_SUCCESS
|
|
1776
|
+
* - ::EMBER_NO_BUFFERS
|
|
1777
|
+
* - ::EMBER_NETWORK_DOWN
|
|
1778
|
+
* - ::EMBER_NETWORK_BUSY
|
|
1779
|
+
* @returns APS frame created for the request
|
|
1780
|
+
* @returns The tag used on the message.
|
|
1796
1781
|
*/
|
|
1797
1782
|
async emberSendZigDevBindRequest(target, bindClusterId, source, sourceEndpoint, clusterId, type, destination, groupAddress, destinationEndpoint, options) {
|
|
1798
1783
|
this.zdoRequestBuffalo.setPosition(zdo_1.ZDO_MESSAGE_OVERHEAD);
|
|
@@ -1834,8 +1819,13 @@ class EmberAdapter extends __1.Adapter {
|
|
|
1834
1819
|
* @param options The options to use when sending the request. See
|
|
1835
1820
|
* emberSendUnicast() for a description.
|
|
1836
1821
|
*
|
|
1837
|
-
* @
|
|
1838
|
-
*
|
|
1822
|
+
* @returns An ::EmberStatus value.
|
|
1823
|
+
* - ::EMBER_SUCCESS
|
|
1824
|
+
* - ::EMBER_NO_BUFFERS
|
|
1825
|
+
* - ::EMBER_NETWORK_DOWN
|
|
1826
|
+
* - ::EMBER_NETWORK_BUSY
|
|
1827
|
+
* @returns APS frame created for the request
|
|
1828
|
+
* @returns The tag used on the message.
|
|
1839
1829
|
*/
|
|
1840
1830
|
async emberBindRequest(target, source, sourceEndpoint, clusterId, type, destination, groupAddress, destinationEndpoint, options) {
|
|
1841
1831
|
debug(`~~~> [ZDO BIND target=${target} source=${source} sourceEndpoint=${sourceEndpoint} clusterId=${clusterId} type=${type} `
|
|
@@ -1863,11 +1853,13 @@ class EmberAdapter extends __1.Adapter {
|
|
|
1863
1853
|
* @param options The options to use when sending the request. See
|
|
1864
1854
|
* emberSendUnicast() for a description.
|
|
1865
1855
|
*
|
|
1866
|
-
* @
|
|
1856
|
+
* @returns An ::EmberStatus value.
|
|
1867
1857
|
* - ::EMBER_SUCCESS
|
|
1868
1858
|
* - ::EMBER_NO_BUFFERS
|
|
1869
|
-
*
|
|
1859
|
+
* - ::EMBER_NETWORK_DOWN
|
|
1870
1860
|
* - ::EMBER_NETWORK_BUSY
|
|
1861
|
+
* @returns APS frame created for the request
|
|
1862
|
+
* @returns The tag used on the message.
|
|
1871
1863
|
*/
|
|
1872
1864
|
async emberUnbindRequest(target, source, sourceEndpoint, clusterId, type, destination, groupAddress, destinationEndpoint, options) {
|
|
1873
1865
|
debug(`~~~> [ZDO UNBIND target=${target} source=${source} sourceEndpoint=${sourceEndpoint} clusterId=${clusterId} type=${type} `
|
|
@@ -2254,19 +2246,12 @@ class EmberAdapter extends __1.Adapter {
|
|
|
2254
2246
|
if (!key) {
|
|
2255
2247
|
throw new Error(`[ADD INSTALL CODE] Failed for "${ieeeAddress}"; no code given.`);
|
|
2256
2248
|
}
|
|
2257
|
-
|
|
2258
|
-
for (const validCodeSize of consts_2.EMBER_INSTALL_CODE_SIZES) {
|
|
2259
|
-
if (key.length === validCodeSize) {
|
|
2260
|
-
validInstallCodeSize = true;
|
|
2261
|
-
break;
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
if (!validInstallCodeSize) {
|
|
2249
|
+
if (consts_2.EMBER_INSTALL_CODE_SIZES.indexOf(key.length) === -1) {
|
|
2265
2250
|
throw new Error(`[ADD INSTALL CODE] Failed for "${ieeeAddress}"; invalid code size.`);
|
|
2266
2251
|
}
|
|
2267
|
-
// Reverse the bits in a byte
|
|
2252
|
+
// Reverse the bits in a byte (uint8_t)
|
|
2268
2253
|
const reverse = (b) => {
|
|
2269
|
-
return ((b * 0x0802 & 0x22110) | (b * 0x8020 & 0x88440)) * 0x10101 >> 16;
|
|
2254
|
+
return (((b * 0x0802 & 0x22110) | (b * 0x8020 & 0x88440)) * 0x10101 >> 16) & 0xFF;
|
|
2270
2255
|
};
|
|
2271
2256
|
let crc = 0xFFFF; // uint16_t
|
|
2272
2257
|
// Compute the CRC and verify that it matches.
|
|
@@ -2274,7 +2259,7 @@ class EmberAdapter extends __1.Adapter {
|
|
|
2274
2259
|
for (let index = 0; index < (key.length - consts_2.EMBER_INSTALL_CODE_CRC_SIZE); index++) {
|
|
2275
2260
|
crc = (0, math_1.halCommonCrc16)(reverse(key[index]), crc);
|
|
2276
2261
|
}
|
|
2277
|
-
crc = ~(0, math_1.highLowToInt)(reverse((0, math_1.lowByte)(crc)), reverse((0, math_1.highByte)(crc)));
|
|
2262
|
+
crc = (~(0, math_1.highLowToInt)(reverse((0, math_1.lowByte)(crc)), reverse((0, math_1.highByte)(crc)))) & 0xFFFF;
|
|
2278
2263
|
if (key[key.length - consts_2.EMBER_INSTALL_CODE_CRC_SIZE] !== (0, math_1.lowByte)(crc) || key[key.length - consts_2.EMBER_INSTALL_CODE_CRC_SIZE + 1] !== (0, math_1.highByte)(crc)) {
|
|
2279
2264
|
throw new Error(`[ADD INSTALL CODE] Failed for "${ieeeAddress}"; invalid code CRC.`);
|
|
2280
2265
|
}
|
|
@@ -2303,19 +2288,21 @@ class EmberAdapter extends __1.Adapter {
|
|
|
2303
2288
|
}
|
|
2304
2289
|
/** WARNING: Adapter impl. Starts timer immediately upon returning */
|
|
2305
2290
|
waitFor(networkAddress, endpoint, frameType, direction, transactionSequenceNumber, clusterID, commandIdentifier, timeout) {
|
|
2291
|
+
const sourceEndpointInfo = endpoints_1.FIXED_ENDPOINTS[0];
|
|
2306
2292
|
const waiter = this.oneWaitress.waitFor({
|
|
2307
2293
|
target: networkAddress,
|
|
2308
2294
|
apsFrame: {
|
|
2309
2295
|
clusterId: clusterID,
|
|
2310
|
-
profileId:
|
|
2296
|
+
profileId: sourceEndpointInfo.profileId, // XXX: only used by OTA upstream
|
|
2311
2297
|
sequence: 0, // set by stack
|
|
2312
|
-
sourceEndpoint: endpoint,
|
|
2313
|
-
destinationEndpoint:
|
|
2298
|
+
sourceEndpoint: sourceEndpointInfo.endpoint,
|
|
2299
|
+
destinationEndpoint: endpoint,
|
|
2314
2300
|
groupId: 0,
|
|
2315
2301
|
options: enums_2.EmberApsOption.NONE,
|
|
2316
2302
|
},
|
|
2317
2303
|
zclSequence: transactionSequenceNumber,
|
|
2318
|
-
|
|
2304
|
+
commandIdentifier,
|
|
2305
|
+
}, timeout || DEFAULT_ZCL_REQUEST_TIMEOUT * 3); // XXX: since this is used by OTA...
|
|
2319
2306
|
return {
|
|
2320
2307
|
cancel: () => this.oneWaitress.remove(waiter.id),
|
|
2321
2308
|
promise: waiter.start().promise,
|
|
@@ -2763,6 +2750,7 @@ class EmberAdapter extends __1.Adapter {
|
|
|
2763
2750
|
target: networkAddress,
|
|
2764
2751
|
apsFrame,
|
|
2765
2752
|
zclSequence: zclFrame.Header.transactionSequenceNumber,
|
|
2753
|
+
commandIdentifier: commandResponseId,
|
|
2766
2754
|
}, timeout || DEFAULT_ZCL_REQUEST_TIMEOUT));
|
|
2767
2755
|
resolve(result);
|
|
2768
2756
|
}
|
|
@@ -2945,6 +2933,7 @@ class EmberAdapter extends __1.Adapter {
|
|
|
2945
2933
|
target: null,
|
|
2946
2934
|
apsFrame: apsFrame,
|
|
2947
2935
|
zclSequence: zclFrame.Header.transactionSequenceNumber,
|
|
2936
|
+
commandIdentifier: command.response,
|
|
2948
2937
|
}, timeout || DEFAULT_ZCL_REQUEST_TIMEOUT * 2)); // XXX: touchlink timeout?
|
|
2949
2938
|
resolve(result);
|
|
2950
2939
|
return enums_2.EmberStatus.SUCCESS;
|