zigbee-clusters 2.3.0 → 2.4.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/index.d.ts +6 -0
- package/lib/clusters/pollControl.js +26 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -276,6 +276,12 @@ interface MeteringCluster extends ZCLNodeCluster {}
|
|
|
276
276
|
|
|
277
277
|
interface ElectricalMeasurementCluster extends ZCLNodeCluster {}
|
|
278
278
|
|
|
279
|
+
interface PollControlCluster extends ZCLNodeCluster {
|
|
280
|
+
fastPollStop(): Promise<void>;
|
|
281
|
+
setLongPollInterval(opts: { newLongPollInterval: number }): Promise<void>;
|
|
282
|
+
setShortPollInterval(opts: { newShortPollInterval: number }): Promise<void>;
|
|
283
|
+
}
|
|
284
|
+
|
|
279
285
|
type ZCLNodeEndpoint = {
|
|
280
286
|
clusters: {
|
|
281
287
|
onOff?: OnOffCluster;
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const { ZCLDataTypes } = require('../zclTypes');
|
|
3
4
|
const Cluster = require('../Cluster');
|
|
4
5
|
|
|
5
|
-
const ATTRIBUTES = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const ATTRIBUTES = {
|
|
7
|
+
checkInInterval: { id: 0, type: ZCLDataTypes.uint32 },
|
|
8
|
+
longPollInterval: { id: 1, type: ZCLDataTypes.uint32 },
|
|
9
|
+
shortPollInterval: { id: 2, type: ZCLDataTypes.uint16 },
|
|
10
|
+
fastPollTimeout: { id: 3, type: ZCLDataTypes.uint16 },
|
|
11
|
+
checkInIntervalMin: { id: 4, type: ZCLDataTypes.uint32 },
|
|
12
|
+
longPollIntervalMin: { id: 5, type: ZCLDataTypes.uint32 },
|
|
13
|
+
fastPollTimeoutMax: { id: 6, type: ZCLDataTypes.uint16 },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const COMMANDS = {
|
|
17
|
+
fastPollStop: { id: 1 },
|
|
18
|
+
setLongPollInterval: {
|
|
19
|
+
id: 2,
|
|
20
|
+
args: {
|
|
21
|
+
newLongPollInterval: ZCLDataTypes.uint32,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
setShortPollInterval: {
|
|
25
|
+
id: 3,
|
|
26
|
+
args: {
|
|
27
|
+
newShortPollInterval: ZCLDataTypes.uint16,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
8
31
|
|
|
9
32
|
class PollControlCluster extends Cluster {
|
|
10
33
|
|