Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "athom"
}
}
Comment on lines 1 to +3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change

4,802 changes: 2,865 additions & 1,937 deletions index.d.ts

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions lib/clusters/metering.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const ATTRIBUTES = {
fastPollUpdatePeriod: { id: 0x000B, type: ZCLDataTypes.uint8 }, // 11, Optional
currentBlockPeriodConsumptionDelivered: { id: 0x000C, type: ZCLDataTypes.uint48 }, // 12, Optional
dailyConsumptionTarget: { id: 0x000D, type: ZCLDataTypes.uint24 }, // 13, Optional
currentBlock: { id: 0x000E, type: ZCLDataTypes.enum8 }, // 14, Optional
profileIntervalPeriod: { id: 0x000F, type: ZCLDataTypes.enum8 }, // 15, Optional
currentBlock: { id: 0x000E, type: ZCLDataTypes.enum8({/* TODO fix */}) }, // 14, Optional
profileIntervalPeriod: { id: 0x000F, type: ZCLDataTypes.enum8({/* TODO fix */}) }, // 15, Optional

// Summation TOU Information Set (0x0100 - 0x01FF)
currentTier1SummationDelivered: { id: 0x0100, type: ZCLDataTypes.uint48 }, // 256, Optional
Expand Down Expand Up @@ -52,7 +52,7 @@ const ATTRIBUTES = {
// extendedStatus: { id: 0x0204, type: ZCLDataTypes.map64() }, // 516, Optional

// Formatting Set (0x0300 - 0x03FF)
unitOfMeasure: { id: 0x0300, type: ZCLDataTypes.enum8 }, // 768, Mandatory
unitOfMeasure: { id: 0x0300, type: ZCLDataTypes.enum8({/* TODO fix */}) }, // 768, Mandatory
multiplier: { id: 0x0301, type: ZCLDataTypes.uint24 }, // 769, Optional
divisor: { id: 0x0302, type: ZCLDataTypes.uint24 }, // 770, Optional
// TODO: map8 packed fields — bits 0-2: right digits, 3-6: left digits, 7: suppress zeros
Expand All @@ -63,18 +63,21 @@ const ATTRIBUTES = {
// meteringDeviceType: { id: 0x0306, type: ZCLDataTypes.map8() }, // 774, Mandatory
siteId: { id: 0x0307, type: ZCLDataTypes.octstr }, // 775, Optional
meterSerialNumber: { id: 0x0308, type: ZCLDataTypes.octstr }, // 776, Optional
energyCarrierUnitOfMeasure: { id: 0x0309, type: ZCLDataTypes.enum8 }, // 777, Optional
/* 777, Optional */
energyCarrierUnitOfMeasure: { id: 0x0309, type: ZCLDataTypes.enum8({/* TODO fix */}) },
// TODO: map8 packed fields — bits 0-2: right digits, 3-6: left digits, 7: suppress zeros
// energyCarrierSummationFormatting: { id: 0x030A, type: ZCLDataTypes.map8() }, // 778, Optional
// energyCarrierDemandFormatting: { id: 0x030B, type: ZCLDataTypes.map8() }, // 779, Optional
temperatureUnitOfMeasure: { id: 0x030C, type: ZCLDataTypes.enum8 }, // 780, Optional
/* 780, Optional */
temperatureUnitOfMeasure: { id: 0x030C, type: ZCLDataTypes.enum8({/* TODO fix */}) },
// TODO: map8 packed fields — bits 0-2: right digits, 3-6: left digits, 7: suppress zeros
// temperatureFormatting: { id: 0x030D, type: ZCLDataTypes.map8() }, // 781, Optional
moduleSerialNumber: { id: 0x030E, type: ZCLDataTypes.octstr }, // 782, Optional
operatingTariffLabelDelivered: { id: 0x030F, type: ZCLDataTypes.octstr }, // 783, Optional
operatingTariffLabelReceived: { id: 0x0310, type: ZCLDataTypes.octstr }, // 784, Optional
customerIdNumber: { id: 0x0311, type: ZCLDataTypes.octstr }, // 785, Optional
alternativeUnitOfMeasure: { id: 0x0312, type: ZCLDataTypes.enum8 }, // 786, Optional
/* 786, Optional */
alternativeUnitOfMeasure: { id: 0x0312, type: ZCLDataTypes.enum8({/* TODO fix */}) },
// TODO: map8 packed fields — bits 0-2: right digits, 3-6: left digits, 7: suppress zeros
// alternativeDemandFormatting: { id: 0x0313, type: ZCLDataTypes.map8() }, // 787, Optional
// alternativeConsumptionFormatting: { id: 0x0314, type: ZCLDataTypes.map8() }, // 788, Optional
Expand Down Expand Up @@ -258,11 +261,12 @@ const ATTRIBUTES = {
id: 0x0B00, // 2816
type: ZCLDataTypes.uint32,
},
proposedChangeSupplyStatus: { id: 0x0B01, type: ZCLDataTypes.enum8 }, // 2817, Optional
/* 2817, Optional */
proposedChangeSupplyStatus: { id: 0x0B01, type: ZCLDataTypes.enum8({/* TODO fix */}) },
uncontrolledFlowThreshold: { id: 0x0B10, type: ZCLDataTypes.uint16 }, // 2832, Optional
uncontrolledFlowThresholdUnitOfMeasure: { // Optional
id: 0x0B11, // 2833
type: ZCLDataTypes.enum8,
type: ZCLDataTypes.enum8({/* TODO fix */}),
},
uncontrolledFlowMultiplier: { id: 0x0B12, type: ZCLDataTypes.uint16 }, // 2834, Optional
uncontrolledFlowDivisor: { id: 0x0B13, type: ZCLDataTypes.uint16 }, // 2835, Optional
Expand Down
Loading
Loading