zigbee-clusters 2.6.0 → 2.7.2
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/AGENTS.md +451 -0
- package/README.md +22 -0
- package/index.d.ts +1009 -272
- package/lib/clusters/doorLock.js +614 -2
- package/lib/clusters/metering.js +245 -9
- package/lib/clusters/occupancySensing.js +49 -13
- package/lib/clusters/windowCovering.js +58 -23
- package/package.json +4 -1
- package/scripts/generate-types.js +360 -0
package/lib/clusters/metering.js
CHANGED
|
@@ -4,14 +4,250 @@ const Cluster = require('../Cluster');
|
|
|
4
4
|
const { ZCLDataTypes } = require('../zclTypes');
|
|
5
5
|
|
|
6
6
|
const ATTRIBUTES = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
// Reading Information Set (0x0000 - 0x000F)
|
|
8
|
+
currentSummationDelivered: { id: 0x0000, type: ZCLDataTypes.uint48 }, // Mandatory
|
|
9
|
+
currentSummationReceived: { id: 0x0001, type: ZCLDataTypes.uint48 }, // Optional
|
|
10
|
+
currentMaxDemandDelivered: { id: 0x0002, type: ZCLDataTypes.uint48 }, // Optional
|
|
11
|
+
currentMaxDemandReceived: { id: 0x0003, type: ZCLDataTypes.uint48 }, // Optional
|
|
12
|
+
dftSummation: { id: 0x0004, type: ZCLDataTypes.uint48 }, // Optional
|
|
13
|
+
dailyFreezeTime: { id: 0x0005, type: ZCLDataTypes.uint16 }, // Optional
|
|
14
|
+
powerFactor: { id: 0x0006, type: ZCLDataTypes.int8 }, // Optional
|
|
15
|
+
readingSnapShotTime: { id: 0x0007, type: ZCLDataTypes.uint32 }, // Optional
|
|
16
|
+
currentMaxDemandDeliveredTime: { id: 0x0008, type: ZCLDataTypes.uint32 }, // Optional
|
|
17
|
+
currentMaxDemandReceivedTime: { id: 0x0009, type: ZCLDataTypes.uint32 }, // Optional
|
|
18
|
+
defaultUpdatePeriod: { id: 0x000A, type: ZCLDataTypes.uint8 }, // 10, Optional
|
|
19
|
+
fastPollUpdatePeriod: { id: 0x000B, type: ZCLDataTypes.uint8 }, // 11, Optional
|
|
20
|
+
currentBlockPeriodConsumptionDelivered: { id: 0x000C, type: ZCLDataTypes.uint48 }, // 12, Optional
|
|
21
|
+
dailyConsumptionTarget: { id: 0x000D, type: ZCLDataTypes.uint24 }, // 13, Optional
|
|
22
|
+
currentBlock: { id: 0x000E, type: ZCLDataTypes.enum8 }, // 14, Optional
|
|
23
|
+
profileIntervalPeriod: { id: 0x000F, type: ZCLDataTypes.enum8 }, // 15, Optional
|
|
24
|
+
|
|
25
|
+
// Summation TOU Information Set (0x0100 - 0x01FF)
|
|
26
|
+
currentTier1SummationDelivered: { id: 0x0100, type: ZCLDataTypes.uint48 }, // 256, Optional
|
|
27
|
+
currentTier1SummationReceived: { id: 0x0101, type: ZCLDataTypes.uint48 }, // 257, Optional
|
|
28
|
+
currentTier2SummationDelivered: { id: 0x0102, type: ZCLDataTypes.uint48 }, // 258, Optional
|
|
29
|
+
currentTier2SummationReceived: { id: 0x0103, type: ZCLDataTypes.uint48 }, // 259, Optional
|
|
30
|
+
currentTier3SummationDelivered: { id: 0x0104, type: ZCLDataTypes.uint48 }, // 260, Optional
|
|
31
|
+
currentTier3SummationReceived: { id: 0x0105, type: ZCLDataTypes.uint48 }, // 261, Optional
|
|
32
|
+
currentTier4SummationDelivered: { id: 0x0106, type: ZCLDataTypes.uint48 }, // 262, Optional
|
|
33
|
+
currentTier4SummationReceived: { id: 0x0107, type: ZCLDataTypes.uint48 }, // 263, Optional
|
|
34
|
+
|
|
35
|
+
// Meter Status (0x0200 - 0x02FF)
|
|
36
|
+
status: { id: 0x0200, type: ZCLDataTypes.map8 }, // 512, Optional
|
|
37
|
+
remainingBatteryLife: { id: 0x0201, type: ZCLDataTypes.uint8 }, // 513, Optional
|
|
38
|
+
hoursInOperation: { id: 0x0202, type: ZCLDataTypes.uint24 }, // 514, Optional
|
|
39
|
+
hoursInFault: { id: 0x0203, type: ZCLDataTypes.uint24 }, // 515, Optional
|
|
40
|
+
extendedStatus: { id: 0x0204, type: ZCLDataTypes.map64 }, // 516, Optional
|
|
41
|
+
|
|
42
|
+
// Formatting Set (0x0300 - 0x03FF)
|
|
43
|
+
unitOfMeasure: { id: 0x0300, type: ZCLDataTypes.enum8 }, // 768, Mandatory
|
|
44
|
+
multiplier: { id: 0x0301, type: ZCLDataTypes.uint24 }, // 769, Optional
|
|
45
|
+
divisor: { id: 0x0302, type: ZCLDataTypes.uint24 }, // 770, Optional
|
|
46
|
+
summationFormatting: { id: 0x0303, type: ZCLDataTypes.map8 }, // 771, Mandatory
|
|
47
|
+
demandFormatting: { id: 0x0304, type: ZCLDataTypes.map8 }, // 772, Optional
|
|
48
|
+
historicalConsumptionFormatting: { id: 0x0305, type: ZCLDataTypes.map8 }, // 773, Optional
|
|
49
|
+
meteringDeviceType: { id: 0x0306, type: ZCLDataTypes.map8 }, // 774, Mandatory
|
|
50
|
+
siteId: { id: 0x0307, type: ZCLDataTypes.octstr }, // 775, Optional
|
|
51
|
+
meterSerialNumber: { id: 0x0308, type: ZCLDataTypes.octstr }, // 776, Optional
|
|
52
|
+
energyCarrierUnitOfMeasure: { id: 0x0309, type: ZCLDataTypes.enum8 }, // 777, Optional
|
|
53
|
+
energyCarrierSummationFormatting: { id: 0x030A, type: ZCLDataTypes.map8 }, // 778, Optional
|
|
54
|
+
energyCarrierDemandFormatting: { id: 0x030B, type: ZCLDataTypes.map8 }, // 779, Optional
|
|
55
|
+
temperatureUnitOfMeasure: { id: 0x030C, type: ZCLDataTypes.enum8 }, // 780, Optional
|
|
56
|
+
temperatureFormatting: { id: 0x030D, type: ZCLDataTypes.map8 }, // 781, Optional
|
|
57
|
+
moduleSerialNumber: { id: 0x030E, type: ZCLDataTypes.octstr }, // 782, Optional
|
|
58
|
+
operatingTariffLabelDelivered: { id: 0x030F, type: ZCLDataTypes.octstr }, // 783, Optional
|
|
59
|
+
operatingTariffLabelReceived: { id: 0x0310, type: ZCLDataTypes.octstr }, // 784, Optional
|
|
60
|
+
customerIdNumber: { id: 0x0311, type: ZCLDataTypes.octstr }, // 785, Optional
|
|
61
|
+
alternativeUnitOfMeasure: { id: 0x0312, type: ZCLDataTypes.enum8 }, // 786, Optional
|
|
62
|
+
alternativeDemandFormatting: { id: 0x0313, type: ZCLDataTypes.map8 }, // 787, Optional
|
|
63
|
+
alternativeConsumptionFormatting: { id: 0x0314, type: ZCLDataTypes.map8 }, // 788, Optional
|
|
64
|
+
|
|
65
|
+
// Historical Consumption (0x0400 - 0x04FF)
|
|
66
|
+
instantaneousDemand: { id: 0x0400, type: ZCLDataTypes.int24 }, // 1024, Optional
|
|
67
|
+
currentDayConsumptionDelivered: { id: 0x0401, type: ZCLDataTypes.uint24 }, // 1025, Optional
|
|
68
|
+
currentDayConsumptionReceived: { id: 0x0402, type: ZCLDataTypes.uint24 }, // 1026, Optional
|
|
69
|
+
previousDayConsumptionDelivered: { id: 0x0403, type: ZCLDataTypes.uint24 }, // 1027, Optional
|
|
70
|
+
previousDayConsumptionReceived: { id: 0x0404, type: ZCLDataTypes.uint24 }, // 1028, Optional
|
|
71
|
+
currentPartialProfileIntervalStartTimeDelivered: { // Optional
|
|
72
|
+
id: 0x0405, // 1029
|
|
73
|
+
type: ZCLDataTypes.uint32,
|
|
74
|
+
},
|
|
75
|
+
currentPartialProfileIntervalStartTimeReceived: { // Optional
|
|
76
|
+
id: 0x0406, // 1030
|
|
77
|
+
type: ZCLDataTypes.uint32,
|
|
78
|
+
},
|
|
79
|
+
currentPartialProfileIntervalValueDelivered: { // Optional
|
|
80
|
+
id: 0x0407, // 1031
|
|
81
|
+
type: ZCLDataTypes.uint24,
|
|
82
|
+
},
|
|
83
|
+
currentPartialProfileIntervalValueReceived: { // Optional
|
|
84
|
+
id: 0x0408, // 1032
|
|
85
|
+
type: ZCLDataTypes.uint24,
|
|
86
|
+
},
|
|
87
|
+
currentDayMaxPressure: { id: 0x0409, type: ZCLDataTypes.uint48 }, // 1033, Optional
|
|
88
|
+
currentDayMinPressure: { id: 0x040A, type: ZCLDataTypes.uint48 }, // 1034, Optional
|
|
89
|
+
previousDayMaxPressure: { id: 0x040B, type: ZCLDataTypes.uint48 }, // 1035, Optional
|
|
90
|
+
previousDayMinPressure: { id: 0x040C, type: ZCLDataTypes.uint48 }, // 1036, Optional
|
|
91
|
+
currentDayMaxDemand: { id: 0x040D, type: ZCLDataTypes.int24 }, // 1037, Optional
|
|
92
|
+
previousDayMaxDemand: { id: 0x040E, type: ZCLDataTypes.int24 }, // 1038, Optional
|
|
93
|
+
currentMonthMaxDemand: { id: 0x040F, type: ZCLDataTypes.int24 }, // 1039, Optional
|
|
94
|
+
currentYearMaxDemand: { id: 0x0410, type: ZCLDataTypes.int24 }, // 1040, Optional
|
|
95
|
+
currentDayMaxEnergyCarrierDemand: { id: 0x0411, type: ZCLDataTypes.int24 }, // 1041, Optional
|
|
96
|
+
previousDayMaxEnergyCarrierDemand: { id: 0x0412, type: ZCLDataTypes.int24 }, // 1042, Optional
|
|
97
|
+
currentMonthMaxEnergyCarrierDemand: { id: 0x0413, type: ZCLDataTypes.int24 }, // 1043, Optional
|
|
98
|
+
currentMonthMinEnergyCarrierDemand: { id: 0x0414, type: ZCLDataTypes.int24 }, // 1044, Optional
|
|
99
|
+
currentYearMaxEnergyCarrierDemand: { id: 0x0415, type: ZCLDataTypes.int24 }, // 1045, Optional
|
|
100
|
+
currentYearMinEnergyCarrierDemand: { id: 0x0416, type: ZCLDataTypes.int24 }, // 1046, Optional
|
|
101
|
+
|
|
102
|
+
// Load Profile Configuration (0x0500 - 0x05FF)
|
|
103
|
+
maxNumberOfPeriodsDelivered: { id: 0x0500, type: ZCLDataTypes.uint8 }, // 1280, Optional
|
|
104
|
+
|
|
105
|
+
// Supply Limit (0x0600 - 0x06FF)
|
|
106
|
+
currentDemandDelivered: { id: 0x0600, type: ZCLDataTypes.uint24 }, // 1536, Optional
|
|
107
|
+
demandLimit: { id: 0x0601, type: ZCLDataTypes.uint24 }, // 1537, Optional
|
|
108
|
+
demandIntegrationPeriod: { id: 0x0602, type: ZCLDataTypes.uint8 }, // 1538, Optional
|
|
109
|
+
numberOfDemandSubintervals: { id: 0x0603, type: ZCLDataTypes.uint8 }, // 1539, Optional
|
|
110
|
+
demandLimitArmDuration: { id: 0x0604, type: ZCLDataTypes.uint16 }, // 1540, Optional
|
|
111
|
+
|
|
112
|
+
// Block Information Delivered (0x0700 - 0x07FF)
|
|
113
|
+
// All attributes in this section are Optional
|
|
114
|
+
currentNoTierBlock1SummationDelivered: { id: 0x0700, type: ZCLDataTypes.uint48 },
|
|
115
|
+
currentNoTierBlock2SummationDelivered: { id: 0x0701, type: ZCLDataTypes.uint48 },
|
|
116
|
+
currentNoTierBlock3SummationDelivered: { id: 0x0702, type: ZCLDataTypes.uint48 },
|
|
117
|
+
currentNoTierBlock4SummationDelivered: { id: 0x0703, type: ZCLDataTypes.uint48 },
|
|
118
|
+
currentNoTierBlock5SummationDelivered: { id: 0x0704, type: ZCLDataTypes.uint48 },
|
|
119
|
+
currentNoTierBlock6SummationDelivered: { id: 0x0705, type: ZCLDataTypes.uint48 },
|
|
120
|
+
currentNoTierBlock7SummationDelivered: { id: 0x0706, type: ZCLDataTypes.uint48 },
|
|
121
|
+
currentNoTierBlock8SummationDelivered: { id: 0x0707, type: ZCLDataTypes.uint48 },
|
|
122
|
+
currentNoTierBlock9SummationDelivered: { id: 0x0708, type: ZCLDataTypes.uint48 },
|
|
123
|
+
currentNoTierBlock10SummationDelivered: { id: 0x0709, type: ZCLDataTypes.uint48 },
|
|
124
|
+
currentNoTierBlock11SummationDelivered: { id: 0x070A, type: ZCLDataTypes.uint48 },
|
|
125
|
+
currentNoTierBlock12SummationDelivered: { id: 0x070B, type: ZCLDataTypes.uint48 },
|
|
126
|
+
currentNoTierBlock13SummationDelivered: { id: 0x070C, type: ZCLDataTypes.uint48 },
|
|
127
|
+
currentNoTierBlock14SummationDelivered: { id: 0x070D, type: ZCLDataTypes.uint48 },
|
|
128
|
+
currentNoTierBlock15SummationDelivered: { id: 0x070E, type: ZCLDataTypes.uint48 },
|
|
129
|
+
currentNoTierBlock16SummationDelivered: { id: 0x070F, type: ZCLDataTypes.uint48 },
|
|
130
|
+
currentTier1Block1SummationDelivered: { id: 0x0710, type: ZCLDataTypes.uint48 },
|
|
131
|
+
currentTier1Block2SummationDelivered: { id: 0x0711, type: ZCLDataTypes.uint48 },
|
|
132
|
+
currentTier1Block3SummationDelivered: { id: 0x0712, type: ZCLDataTypes.uint48 },
|
|
133
|
+
currentTier1Block4SummationDelivered: { id: 0x0713, type: ZCLDataTypes.uint48 },
|
|
134
|
+
currentTier1Block5SummationDelivered: { id: 0x0714, type: ZCLDataTypes.uint48 },
|
|
135
|
+
currentTier1Block6SummationDelivered: { id: 0x0715, type: ZCLDataTypes.uint48 },
|
|
136
|
+
currentTier1Block7SummationDelivered: { id: 0x0716, type: ZCLDataTypes.uint48 },
|
|
137
|
+
currentTier1Block8SummationDelivered: { id: 0x0717, type: ZCLDataTypes.uint48 },
|
|
138
|
+
currentTier1Block9SummationDelivered: { id: 0x0718, type: ZCLDataTypes.uint48 },
|
|
139
|
+
currentTier1Block10SummationDelivered: { id: 0x0719, type: ZCLDataTypes.uint48 },
|
|
140
|
+
currentTier1Block11SummationDelivered: { id: 0x071A, type: ZCLDataTypes.uint48 },
|
|
141
|
+
currentTier1Block12SummationDelivered: { id: 0x071B, type: ZCLDataTypes.uint48 },
|
|
142
|
+
currentTier1Block13SummationDelivered: { id: 0x071C, type: ZCLDataTypes.uint48 },
|
|
143
|
+
currentTier1Block14SummationDelivered: { id: 0x071D, type: ZCLDataTypes.uint48 },
|
|
144
|
+
currentTier1Block15SummationDelivered: { id: 0x071E, type: ZCLDataTypes.uint48 },
|
|
145
|
+
currentTier1Block16SummationDelivered: { id: 0x071F, type: ZCLDataTypes.uint48 },
|
|
146
|
+
currentTier2Block1SummationDelivered: { id: 0x0720, type: ZCLDataTypes.uint48 },
|
|
147
|
+
currentTier2Block2SummationDelivered: { id: 0x0721, type: ZCLDataTypes.uint48 },
|
|
148
|
+
currentTier2Block3SummationDelivered: { id: 0x0722, type: ZCLDataTypes.uint48 },
|
|
149
|
+
currentTier2Block4SummationDelivered: { id: 0x0723, type: ZCLDataTypes.uint48 },
|
|
150
|
+
currentTier2Block5SummationDelivered: { id: 0x0724, type: ZCLDataTypes.uint48 },
|
|
151
|
+
currentTier2Block6SummationDelivered: { id: 0x0725, type: ZCLDataTypes.uint48 },
|
|
152
|
+
currentTier2Block7SummationDelivered: { id: 0x0726, type: ZCLDataTypes.uint48 },
|
|
153
|
+
currentTier2Block8SummationDelivered: { id: 0x0727, type: ZCLDataTypes.uint48 },
|
|
154
|
+
currentTier2Block9SummationDelivered: { id: 0x0728, type: ZCLDataTypes.uint48 },
|
|
155
|
+
currentTier2Block10SummationDelivered: { id: 0x0729, type: ZCLDataTypes.uint48 },
|
|
156
|
+
currentTier2Block11SummationDelivered: { id: 0x072A, type: ZCLDataTypes.uint48 },
|
|
157
|
+
currentTier2Block12SummationDelivered: { id: 0x072B, type: ZCLDataTypes.uint48 },
|
|
158
|
+
currentTier2Block13SummationDelivered: { id: 0x072C, type: ZCLDataTypes.uint48 },
|
|
159
|
+
currentTier2Block14SummationDelivered: { id: 0x072D, type: ZCLDataTypes.uint48 },
|
|
160
|
+
currentTier2Block15SummationDelivered: { id: 0x072E, type: ZCLDataTypes.uint48 },
|
|
161
|
+
currentTier2Block16SummationDelivered: { id: 0x072F, type: ZCLDataTypes.uint48 },
|
|
162
|
+
currentTier3Block1SummationDelivered: { id: 0x0730, type: ZCLDataTypes.uint48 },
|
|
163
|
+
currentTier3Block2SummationDelivered: { id: 0x0731, type: ZCLDataTypes.uint48 },
|
|
164
|
+
currentTier3Block3SummationDelivered: { id: 0x0732, type: ZCLDataTypes.uint48 },
|
|
165
|
+
currentTier3Block4SummationDelivered: { id: 0x0733, type: ZCLDataTypes.uint48 },
|
|
166
|
+
currentTier3Block5SummationDelivered: { id: 0x0734, type: ZCLDataTypes.uint48 },
|
|
167
|
+
currentTier3Block6SummationDelivered: { id: 0x0735, type: ZCLDataTypes.uint48 },
|
|
168
|
+
currentTier3Block7SummationDelivered: { id: 0x0736, type: ZCLDataTypes.uint48 },
|
|
169
|
+
currentTier3Block8SummationDelivered: { id: 0x0737, type: ZCLDataTypes.uint48 },
|
|
170
|
+
currentTier3Block9SummationDelivered: { id: 0x0738, type: ZCLDataTypes.uint48 },
|
|
171
|
+
currentTier3Block10SummationDelivered: { id: 0x0739, type: ZCLDataTypes.uint48 },
|
|
172
|
+
currentTier3Block11SummationDelivered: { id: 0x073A, type: ZCLDataTypes.uint48 },
|
|
173
|
+
currentTier3Block12SummationDelivered: { id: 0x073B, type: ZCLDataTypes.uint48 },
|
|
174
|
+
currentTier3Block13SummationDelivered: { id: 0x073C, type: ZCLDataTypes.uint48 },
|
|
175
|
+
currentTier3Block14SummationDelivered: { id: 0x073D, type: ZCLDataTypes.uint48 },
|
|
176
|
+
currentTier3Block15SummationDelivered: { id: 0x073E, type: ZCLDataTypes.uint48 },
|
|
177
|
+
currentTier3Block16SummationDelivered: { id: 0x073F, type: ZCLDataTypes.uint48 },
|
|
178
|
+
currentTier4Block1SummationDelivered: { id: 0x0740, type: ZCLDataTypes.uint48 },
|
|
179
|
+
currentTier4Block2SummationDelivered: { id: 0x0741, type: ZCLDataTypes.uint48 },
|
|
180
|
+
currentTier4Block3SummationDelivered: { id: 0x0742, type: ZCLDataTypes.uint48 },
|
|
181
|
+
currentTier4Block4SummationDelivered: { id: 0x0743, type: ZCLDataTypes.uint48 },
|
|
182
|
+
currentTier4Block5SummationDelivered: { id: 0x0744, type: ZCLDataTypes.uint48 },
|
|
183
|
+
currentTier4Block6SummationDelivered: { id: 0x0745, type: ZCLDataTypes.uint48 },
|
|
184
|
+
currentTier4Block7SummationDelivered: { id: 0x0746, type: ZCLDataTypes.uint48 },
|
|
185
|
+
currentTier4Block8SummationDelivered: { id: 0x0747, type: ZCLDataTypes.uint48 },
|
|
186
|
+
currentTier4Block9SummationDelivered: { id: 0x0748, type: ZCLDataTypes.uint48 },
|
|
187
|
+
currentTier4Block10SummationDelivered: { id: 0x0749, type: ZCLDataTypes.uint48 },
|
|
188
|
+
currentTier4Block11SummationDelivered: { id: 0x074A, type: ZCLDataTypes.uint48 },
|
|
189
|
+
currentTier4Block12SummationDelivered: { id: 0x074B, type: ZCLDataTypes.uint48 },
|
|
190
|
+
currentTier4Block13SummationDelivered: { id: 0x074C, type: ZCLDataTypes.uint48 },
|
|
191
|
+
currentTier4Block14SummationDelivered: { id: 0x074D, type: ZCLDataTypes.uint48 },
|
|
192
|
+
currentTier4Block15SummationDelivered: { id: 0x074E, type: ZCLDataTypes.uint48 },
|
|
193
|
+
currentTier4Block16SummationDelivered: { id: 0x074F, type: ZCLDataTypes.uint48 },
|
|
194
|
+
|
|
195
|
+
// Alarms (0x0800 - 0x08FF)
|
|
196
|
+
genericAlarmMask: { id: 0x0800, type: ZCLDataTypes.map16 }, // 2048, Optional
|
|
197
|
+
electricityAlarmMask: { id: 0x0801, type: ZCLDataTypes.map32 }, // 2049, Optional
|
|
198
|
+
genericFlowPressureAlarmMask: { id: 0x0802, type: ZCLDataTypes.map16 }, // 2050, Optional
|
|
199
|
+
waterSpecificAlarmMask: { id: 0x0803, type: ZCLDataTypes.map16 }, // 2051, Optional
|
|
200
|
+
heatAndCoolingSpecificAlarmMask: { id: 0x0804, type: ZCLDataTypes.map16 }, // 2052, Optional
|
|
201
|
+
gasSpecificAlarmMask: { id: 0x0805, type: ZCLDataTypes.map16 }, // 2053, Optional
|
|
202
|
+
extendedGenericAlarmMask: { id: 0x0806, type: ZCLDataTypes.map48 }, // 2054, Optional
|
|
203
|
+
manufacturerAlarmMask: { id: 0x0807, type: ZCLDataTypes.map16 }, // 2055, Optional
|
|
204
|
+
|
|
205
|
+
// Block Information Received (0x0900 - 0x09FF)
|
|
206
|
+
// All attributes in this section are Optional
|
|
207
|
+
currentNoTierBlock1SummationReceived: { id: 0x0900, type: ZCLDataTypes.uint48 },
|
|
208
|
+
currentNoTierBlock2SummationReceived: { id: 0x0901, type: ZCLDataTypes.uint48 },
|
|
209
|
+
currentNoTierBlock3SummationReceived: { id: 0x0902, type: ZCLDataTypes.uint48 },
|
|
210
|
+
currentNoTierBlock4SummationReceived: { id: 0x0903, type: ZCLDataTypes.uint48 },
|
|
211
|
+
currentNoTierBlock5SummationReceived: { id: 0x0904, type: ZCLDataTypes.uint48 },
|
|
212
|
+
currentNoTierBlock6SummationReceived: { id: 0x0905, type: ZCLDataTypes.uint48 },
|
|
213
|
+
currentNoTierBlock7SummationReceived: { id: 0x0906, type: ZCLDataTypes.uint48 },
|
|
214
|
+
currentNoTierBlock8SummationReceived: { id: 0x0907, type: ZCLDataTypes.uint48 },
|
|
215
|
+
currentNoTierBlock9SummationReceived: { id: 0x0908, type: ZCLDataTypes.uint48 },
|
|
216
|
+
currentNoTierBlock10SummationReceived: { id: 0x0909, type: ZCLDataTypes.uint48 },
|
|
217
|
+
currentNoTierBlock11SummationReceived: { id: 0x090A, type: ZCLDataTypes.uint48 },
|
|
218
|
+
currentNoTierBlock12SummationReceived: { id: 0x090B, type: ZCLDataTypes.uint48 },
|
|
219
|
+
currentNoTierBlock13SummationReceived: { id: 0x090C, type: ZCLDataTypes.uint48 },
|
|
220
|
+
currentNoTierBlock14SummationReceived: { id: 0x090D, type: ZCLDataTypes.uint48 },
|
|
221
|
+
currentNoTierBlock15SummationReceived: { id: 0x090E, type: ZCLDataTypes.uint48 },
|
|
222
|
+
currentNoTierBlock16SummationReceived: { id: 0x090F, type: ZCLDataTypes.uint48 },
|
|
223
|
+
|
|
224
|
+
// Meter Billing (0x0A00 - 0x0AFF)
|
|
225
|
+
billToDateDelivered: { id: 0x0A00, type: ZCLDataTypes.uint32 }, // 2560, Optional
|
|
226
|
+
billToDateTimeStampDelivered: { id: 0x0A01, type: ZCLDataTypes.uint32 }, // 2561, Optional
|
|
227
|
+
projectedBillDelivered: { id: 0x0A02, type: ZCLDataTypes.uint32 }, // 2562, Optional
|
|
228
|
+
projectedBillTimeStampDelivered: { id: 0x0A03, type: ZCLDataTypes.uint32 }, // 2563, Optional
|
|
229
|
+
billDeliveredTrailingDigit: { id: 0x0A04, type: ZCLDataTypes.map8 }, // 2564, Optional
|
|
230
|
+
billToDateReceived: { id: 0x0A10, type: ZCLDataTypes.uint32 }, // 2576, Optional
|
|
231
|
+
billToDateTimeStampReceived: { id: 0x0A11, type: ZCLDataTypes.uint32 }, // 2577, Optional
|
|
232
|
+
projectedBillReceived: { id: 0x0A12, type: ZCLDataTypes.uint32 }, // 2578, Optional
|
|
233
|
+
projectedBillTimeStampReceived: { id: 0x0A13, type: ZCLDataTypes.uint32 }, // 2579, Optional
|
|
234
|
+
billReceivedTrailingDigit: { id: 0x0A14, type: ZCLDataTypes.map8 }, // 2580, Optional
|
|
235
|
+
|
|
236
|
+
// Supply Control (0x0B00 - 0x0BFF)
|
|
237
|
+
proposedChangeSupplyImplementationTime: { // Optional
|
|
238
|
+
id: 0x0B00, // 2816
|
|
239
|
+
type: ZCLDataTypes.uint32,
|
|
240
|
+
},
|
|
241
|
+
proposedChangeSupplyStatus: { id: 0x0B01, type: ZCLDataTypes.enum8 }, // 2817, Optional
|
|
242
|
+
uncontrolledFlowThreshold: { id: 0x0B10, type: ZCLDataTypes.uint16 }, // 2832, Optional
|
|
243
|
+
uncontrolledFlowThresholdUnitOfMeasure: { // Optional
|
|
244
|
+
id: 0x0B11, // 2833
|
|
245
|
+
type: ZCLDataTypes.enum8,
|
|
246
|
+
},
|
|
247
|
+
uncontrolledFlowMultiplier: { id: 0x0B12, type: ZCLDataTypes.uint16 }, // 2834, Optional
|
|
248
|
+
uncontrolledFlowDivisor: { id: 0x0B13, type: ZCLDataTypes.uint16 }, // 2835, Optional
|
|
249
|
+
flowStabilisationPeriod: { id: 0x0B14, type: ZCLDataTypes.uint8 }, // 2836, Optional
|
|
250
|
+
flowMeasurementPeriod: { id: 0x0B15, type: ZCLDataTypes.uint16 }, // 2837, Optional
|
|
15
251
|
};
|
|
16
252
|
|
|
17
253
|
const COMMANDS = {};
|
|
@@ -19,7 +255,7 @@ const COMMANDS = {};
|
|
|
19
255
|
class MeteringCluster extends Cluster {
|
|
20
256
|
|
|
21
257
|
static get ID() {
|
|
22
|
-
return
|
|
258
|
+
return 0x0702; // 1794
|
|
23
259
|
}
|
|
24
260
|
|
|
25
261
|
static get NAME() {
|
|
@@ -4,21 +4,57 @@ const Cluster = require('../Cluster');
|
|
|
4
4
|
const { ZCLDataTypes } = require('../zclTypes');
|
|
5
5
|
|
|
6
6
|
const ATTRIBUTES = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Occupancy Sensor Information (0x0000 - 0x000F)
|
|
8
|
+
occupancy: { id: 0x0000, type: ZCLDataTypes.map8('occupied') }, // Mandatory
|
|
9
|
+
occupancySensorType: { // Mandatory
|
|
10
|
+
id: 0x0001,
|
|
10
11
|
type: ZCLDataTypes.enum8({
|
|
11
|
-
pir: 0,
|
|
12
|
-
ultrasonic: 1,
|
|
13
|
-
pirAndUltrasonic: 2,
|
|
12
|
+
pir: 0,
|
|
13
|
+
ultrasonic: 1,
|
|
14
|
+
pirAndUltrasonic: 2,
|
|
15
|
+
physicalContact: 3,
|
|
14
16
|
}),
|
|
15
17
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
occupancySensorTypeBitmap: { // Mandatory
|
|
19
|
+
id: 0x0002,
|
|
20
|
+
type: ZCLDataTypes.map8('pir', 'ultrasonic', 'physicalContact'),
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// PIR Configuration (0x0010 - 0x001F)
|
|
24
|
+
pirOccupiedToUnoccupiedDelay: { id: 0x0010, type: ZCLDataTypes.uint16 }, // 16, Conditional¹
|
|
25
|
+
pirUnoccupiedToOccupiedDelay: { id: 0x0011, type: ZCLDataTypes.uint16 }, // 17, Conditional¹
|
|
26
|
+
pirUnoccupiedToOccupiedThreshold: { id: 0x0012, type: ZCLDataTypes.uint8 }, // 18, Conditional¹
|
|
27
|
+
// ¹ PIR sensor type supported
|
|
28
|
+
|
|
29
|
+
// Ultrasonic Configuration (0x0020 - 0x002F)
|
|
30
|
+
ultrasonicOccupiedToUnoccupiedDelay: { // 32, Conditional²
|
|
31
|
+
id: 0x0020,
|
|
32
|
+
type: ZCLDataTypes.uint16,
|
|
33
|
+
},
|
|
34
|
+
ultrasonicUnoccupiedToOccupiedDelay: { // 33, Conditional²
|
|
35
|
+
id: 0x0021,
|
|
36
|
+
type: ZCLDataTypes.uint16,
|
|
37
|
+
},
|
|
38
|
+
ultrasonicUnoccupiedToOccupiedThreshold: { // 34, Conditional²
|
|
39
|
+
id: 0x0022,
|
|
40
|
+
type: ZCLDataTypes.uint8,
|
|
41
|
+
},
|
|
42
|
+
// ² Ultrasonic sensor type supported
|
|
43
|
+
|
|
44
|
+
// Physical Contact Configuration (0x0030 - 0x003F)
|
|
45
|
+
physicalContactOccupiedToUnoccupiedDelay: { // 48, Conditional³
|
|
46
|
+
id: 0x0030,
|
|
47
|
+
type: ZCLDataTypes.uint16,
|
|
48
|
+
},
|
|
49
|
+
physicalContactUnoccupiedToOccupiedDelay: { // 49, Conditional³
|
|
50
|
+
id: 0x0031,
|
|
51
|
+
type: ZCLDataTypes.uint16,
|
|
52
|
+
},
|
|
53
|
+
physicalContactUnoccupiedToOccupiedThreshold: { // 50, Conditional³
|
|
54
|
+
id: 0x0032,
|
|
55
|
+
type: ZCLDataTypes.uint8,
|
|
56
|
+
},
|
|
57
|
+
// ³ Physical Contact sensor type supported
|
|
22
58
|
};
|
|
23
59
|
|
|
24
60
|
const COMMANDS = {};
|
|
@@ -26,7 +62,7 @@ const COMMANDS = {};
|
|
|
26
62
|
class OccupancySensing extends Cluster {
|
|
27
63
|
|
|
28
64
|
static get ID() {
|
|
29
|
-
return
|
|
65
|
+
return 0x0406; // 1030
|
|
30
66
|
}
|
|
31
67
|
|
|
32
68
|
static get NAME() {
|
|
@@ -4,8 +4,9 @@ const Cluster = require('../Cluster');
|
|
|
4
4
|
const { ZCLDataTypes } = require('../zclTypes');
|
|
5
5
|
|
|
6
6
|
const ATTRIBUTES = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
// Window Covering Information (0x0000 - 0x000F)
|
|
8
|
+
windowCoveringType: { // Mandatory
|
|
9
|
+
id: 0x0000,
|
|
9
10
|
type: ZCLDataTypes.enum8({
|
|
10
11
|
rollershade: 0,
|
|
11
12
|
rollershade2Motor: 1,
|
|
@@ -19,41 +20,75 @@ const ATTRIBUTES = {
|
|
|
19
20
|
projectorScreen: 9,
|
|
20
21
|
}),
|
|
21
22
|
},
|
|
22
|
-
physicalClosedLimitLift: { id:
|
|
23
|
-
physicalClosedLimitTilt: { id:
|
|
24
|
-
currentPositionLift: { id:
|
|
25
|
-
currentPositionTilt: { id:
|
|
26
|
-
numberofActuationsLift: { id:
|
|
27
|
-
numberofActuationsTilt: { id:
|
|
28
|
-
configStatus: {
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
physicalClosedLimitLift: { id: 0x0001, type: ZCLDataTypes.uint16 }, // Optional
|
|
24
|
+
physicalClosedLimitTilt: { id: 0x0002, type: ZCLDataTypes.uint16 }, // Optional
|
|
25
|
+
currentPositionLift: { id: 0x0003, type: ZCLDataTypes.uint16 }, // Optional
|
|
26
|
+
currentPositionTilt: { id: 0x0004, type: ZCLDataTypes.uint16 }, // Optional
|
|
27
|
+
numberofActuationsLift: { id: 0x0005, type: ZCLDataTypes.uint16 }, // Optional
|
|
28
|
+
numberofActuationsTilt: { id: 0x0006, type: ZCLDataTypes.uint16 }, // Optional
|
|
29
|
+
configStatus: { // Mandatory
|
|
30
|
+
id: 0x0007,
|
|
31
|
+
type: ZCLDataTypes.map8(
|
|
32
|
+
'operational',
|
|
33
|
+
'online',
|
|
34
|
+
'reversalLiftCommands',
|
|
35
|
+
'controlLift',
|
|
36
|
+
'controlTilt',
|
|
37
|
+
'encoderLift',
|
|
38
|
+
'encoderTilt',
|
|
39
|
+
'reserved',
|
|
40
|
+
),
|
|
41
|
+
},
|
|
42
|
+
currentPositionLiftPercentage: { id: 0x0008, type: ZCLDataTypes.uint8 }, // Optional
|
|
43
|
+
currentPositionTiltPercentage: { id: 0x0009, type: ZCLDataTypes.uint8 }, // Optional
|
|
44
|
+
|
|
45
|
+
// Settings (0x0010 - 0x001F)
|
|
46
|
+
installedOpenLimitLift: { id: 0x0010, type: ZCLDataTypes.uint16 }, // 16, Conditional¹
|
|
47
|
+
installedClosedLimitLift: { id: 0x0011, type: ZCLDataTypes.uint16 }, // 17, Conditional¹
|
|
48
|
+
installedOpenLimitTilt: { id: 0x0012, type: ZCLDataTypes.uint16 }, // 18, Conditional¹
|
|
49
|
+
installedClosedLimitTilt: { id: 0x0013, type: ZCLDataTypes.uint16 }, // 19, Conditional¹
|
|
50
|
+
// ¹ Closed Loop control and Lift/Tilt actions supported
|
|
51
|
+
velocityLift: { id: 0x0014, type: ZCLDataTypes.uint16 }, // 20, Optional
|
|
52
|
+
accelerationTimeLift: { id: 0x0015, type: ZCLDataTypes.uint16 }, // 21, Optional
|
|
53
|
+
decelerationTimeLift: { id: 0x0016, type: ZCLDataTypes.uint16 }, // 22, Optional
|
|
54
|
+
mode: { // Mandatory
|
|
55
|
+
id: 0x0017, // 23
|
|
56
|
+
type: ZCLDataTypes.map8(
|
|
57
|
+
'motorDirectionReversed',
|
|
58
|
+
'calibrationMode',
|
|
59
|
+
'maintenanceMode',
|
|
60
|
+
'ledFeedback',
|
|
61
|
+
),
|
|
62
|
+
},
|
|
63
|
+
intermediateSetpointsLift: { id: 0x0018, type: ZCLDataTypes.octstr }, // 24, Optional
|
|
64
|
+
intermediateSetpointsTilt: { id: 0x0019, type: ZCLDataTypes.octstr }, // 25, Optional
|
|
31
65
|
};
|
|
32
66
|
|
|
33
67
|
const COMMANDS = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
68
|
+
// --- Client to Server Commands ---
|
|
69
|
+
upOpen: { id: 0x0000 }, // Mandatory
|
|
70
|
+
downClose: { id: 0x0001 }, // Mandatory
|
|
71
|
+
stop: { id: 0x0002 }, // Mandatory
|
|
72
|
+
goToLiftValue: { // Optional
|
|
73
|
+
id: 0x0004,
|
|
39
74
|
args: {
|
|
40
75
|
liftValue: ZCLDataTypes.uint16,
|
|
41
76
|
},
|
|
42
77
|
},
|
|
43
|
-
goToLiftPercentage: {
|
|
44
|
-
id:
|
|
78
|
+
goToLiftPercentage: { // Optional
|
|
79
|
+
id: 0x0005,
|
|
45
80
|
args: {
|
|
46
81
|
percentageLiftValue: ZCLDataTypes.uint8,
|
|
47
82
|
},
|
|
48
83
|
},
|
|
49
|
-
goToTiltValue: {
|
|
50
|
-
id:
|
|
84
|
+
goToTiltValue: { // Optional
|
|
85
|
+
id: 0x0007,
|
|
51
86
|
args: {
|
|
52
87
|
tiltValue: ZCLDataTypes.uint16,
|
|
53
88
|
},
|
|
54
89
|
},
|
|
55
|
-
goToTiltPercentage: {
|
|
56
|
-
id:
|
|
90
|
+
goToTiltPercentage: { // Optional
|
|
91
|
+
id: 0x0008,
|
|
57
92
|
args: {
|
|
58
93
|
percentageTiltValue: ZCLDataTypes.uint8,
|
|
59
94
|
},
|
|
@@ -63,7 +98,7 @@ const COMMANDS = {
|
|
|
63
98
|
class WindowCovering extends Cluster {
|
|
64
99
|
|
|
65
100
|
static get ID() {
|
|
66
|
-
return
|
|
101
|
+
return 0x0102; // 258
|
|
67
102
|
}
|
|
68
103
|
|
|
69
104
|
static get NAME() {
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-clusters",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "Zigbee Cluster Library for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "mocha --reporter list",
|
|
9
9
|
"lint": "eslint .",
|
|
10
|
+
"generate-types": "node scripts/generate-types.js",
|
|
10
11
|
"serve": "concurrently \"serve build/\" \"npm run build:watch\"",
|
|
11
12
|
"build": "jsdoc --configure ./docs/jsdoc.json",
|
|
12
13
|
"build:clean": "rm -rf ./build",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"homepage": "https://github.com/athombv/node-zigbee-clusters#readme",
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@athombv/jsdoc-template": "^1.6.1",
|
|
36
|
+
"@types/node": "^25.0.10",
|
|
35
37
|
"@types/sinon": "^17.0.3",
|
|
36
38
|
"concurrently": "^5.2.0",
|
|
37
39
|
"eslint": "^6.8.0",
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
"mocha": "^10.1.0",
|
|
42
44
|
"serve": "^14.0.1",
|
|
43
45
|
"sinon": "^19.0.2",
|
|
46
|
+
"typescript": "^5.9.3",
|
|
44
47
|
"watch": "^1.0.2"
|
|
45
48
|
},
|
|
46
49
|
"dependencies": {
|