diff --git a/scripts/check-clusters-changes.ts b/scripts/check-clusters-changes.ts new file mode 100644 index 0000000000..cff6d00946 --- /dev/null +++ b/scripts/check-clusters-changes.ts @@ -0,0 +1,328 @@ +/** + * Usage: + * tsx scripts/check-zcl-clusters-changes.ts + */ + +import fs from "node:fs/promises"; +import path from "node:path"; +import {fileURLToPath, pathToFileURL} from "node:url"; +import {BuffaloZclDataType, DataType} from "../src/zspec/zcl/definition/enums"; +import type {ClusterDefinition, ClusterName} from "../src/zspec/zcl/definition/tstype"; + +// #region Types + +type Loggable = string | number | undefined; + +type ChangeType = "added" | "removed" | "changed"; + +type Change = { + type: ChangeType; + path: Loggable[]; + from?: Loggable; + to?: Loggable; +}; + +// #endregion + +// #region Config + +const SCRIPT_DIR = fileURLToPath(new URL(".", import.meta.url)); +const LOG_FILE = path.resolve(SCRIPT_DIR, "clusters-changes.log"); +const CURRENT_FILE = path.resolve(SCRIPT_DIR, "../src/zspec/zcl/definition/cluster.ts"); + +// #endregion + +// #region Helpers + +/** + * Creates a map from a name to an ID for a given record. + */ +function createIdMap(record: Readonly>): Map { + const map = new Map(); + + for (const name in record) { + map.set(name, record[name].ID); + } + + return map; +} + +/** + * Creates a reverse map from an ID to a name for a given record. + */ +function createReverseIdMap(record: Readonly>): Map { + const map = new Map(); + + for (const name in record) { + map.set(record[name].ID, name); + } + + return map; +} + +function toHex(value: number, pad: number): string { + return `0x${value.toString(16).padStart(pad, "0")}`; +} + +/** + * Formats a log entry for display. + */ +function formatChange(change: Change): string { + const path = change.path.join(" > "); + const hexTo = typeof change.to === "number" ? ` (${toHex(change.to, 4)})` : ""; + const hexFrom = typeof change.from === "number" ? ` (${toHex(change.from, 4)})` : ""; + + switch (change.type) { + case "added": { + return `[ADDED] ${path}${change.to ? `: ${change.to}${hexTo}` : ""}`; + } + case "removed": { + return `[REMOVED] ${path}: ${change.from}${hexFrom}`; + } + case "changed": { + return `[CHANGED] ${path}: ${change.from}${hexFrom} -> ${change.to}${hexTo}`; + } + } +} + +// #endregion + +// #region Comparison logic + +class ClusterComparator { + readonly #changes: Change[] = []; + + /** + * Compares two records (like `attributes`, `commands`, etc.) + */ + #compareRecords( + oldRecord: Readonly> | undefined, + newRecord: Readonly> | undefined, + currentPath: Loggable[], + ): void { + oldRecord ??= {}; + newRecord ??= {}; + + const oldIdMap = createIdMap(oldRecord); + const newIdMap = createIdMap(newRecord); + // const oldReverseIdMap = createReverseIdMap(oldRecord); + const newReverseIdMap = createReverseIdMap(newRecord); + + // Check for removed and changed items + for (const oldName of oldIdMap.keys()) { + // biome-ignore lint/style/noNonNullAssertion: loop + const oldId = oldIdMap.get(oldName)!; + const oldItem = oldRecord[oldName]; + + if (!newIdMap.has(oldName)) { + const newNameForOldId = newReverseIdMap.get(oldId); + + if (newNameForOldId) { + // Renamed item + this.#changes.push({ + type: "changed", + path: [...currentPath, "name", oldId], + from: oldName, + to: newNameForOldId, + }); + + // Continue comparison with the new name + this.#compareItems(oldItem, newRecord[newNameForOldId], [...currentPath, newNameForOldId]); + } else { + // Removed item + this.#changes.push({type: "removed", path: [...currentPath, oldName], from: oldId}); + } + } else { + // Item exists in both, compare details + this.#compareItems(oldItem, newRecord[oldName], [...currentPath, oldName]); + } + } + + // Check for added items + for (const newName of newIdMap.keys()) { + if (!oldIdMap.has(newName)) { + // biome-ignore lint/style/noNonNullAssertion: checked above + const newId = newIdMap.get(newName)!; + + // if (!oldReverseIdMap.has(newId)) { + // Added item + this.#changes.push({type: "added", path: [...currentPath, newName], to: newId}); + // } + } + } + } + + /** + * Compares two individual items (e.g., a specific attribute or command). + */ + // biome-ignore lint/suspicious/noExplicitAny: dynamic + #compareItems(oldItem: any, newItem: any, currentPath: Loggable[]): void { + // Check ID change + if (oldItem.ID !== newItem.ID) { + this.#changes.push({type: "changed", path: [...currentPath, "ID"], from: oldItem.ID, to: newItem.ID}); + } + + // Check type change (for attributes) + if ("type" in oldItem && "type" in newItem && oldItem.type !== newItem.type) { + this.#changes.push({ + type: "changed", + path: [...currentPath, "type"], + from: DataType[oldItem.type] ?? BuffaloZclDataType[oldItem.type], + to: DataType[newItem.type] ?? BuffaloZclDataType[newItem.type], + }); + } + + // Check parameters (for commands) + if ("parameters" in oldItem || "parameters" in newItem) { + this.#compareParameters(oldItem.parameters, newItem.parameters, currentPath); + } + } + + /** + * Compares the `parameters` array of two commands. + */ + #compareParameters( + oldParams: readonly {name: string; type: number}[] | undefined, + newParams: readonly {name: string; type: number}[] | undefined, + currentPath: Loggable[], + ): void { + oldParams ??= []; + newParams ??= []; + + const oldParamsMap = new Map(oldParams.map((p) => [p.name, p])); + const newParamsMap = new Map(newParams.map((p) => [p.name, p])); + + for (const [oldName, oldParam] of oldParamsMap) { + const newParam = newParamsMap.get(oldName); + const paramPath = [...currentPath, "parameters", oldName]; + + if (newParam) { + // Parameter exists in both, check type + if (oldParam.type !== newParam.type) { + this.#changes.push({ + type: "changed", + path: [...paramPath, "type"], + from: DataType[oldParam.type] ?? BuffaloZclDataType[oldParam.type], + to: DataType[newParam.type] ?? BuffaloZclDataType[newParam.type], + }); + } + } else { + // Parameter removed + this.#changes.push({type: "removed", path: paramPath}); + } + } + + for (const newName of newParamsMap.keys()) { + if (!oldParamsMap.has(newName)) { + // Parameter added + this.#changes.push({type: "added", path: [...currentPath, "parameters", newName]}); + } + } + } + + /** + * Runs the full comparison between two `Clusters` definitions. + */ + public run( + oldClusters: Readonly>>, + newClusters: Readonly>>, + ): Change[] { + this.#changes.length = 0; + const rootPath: Loggable[] = ["Clusters"]; + + this.#compareRecords(oldClusters, newClusters, rootPath); + + // After the main comparison based on names, check for deeper changes in matching clusters + for (const clusterName in newClusters) { + if (clusterName in oldClusters) { + const oldCluster = oldClusters[clusterName as ClusterName]; + const newCluster = newClusters[clusterName as ClusterName]; + const clusterPath = [...rootPath, clusterName]; + + // Attributes + this.#compareRecords(oldCluster.attributes, newCluster.attributes, [...clusterPath, "attributes"]); + + // Commands + this.#compareRecords(oldCluster.commands, newCluster.commands, [...clusterPath, "commands"]); + + // Command Responses + this.#compareRecords(oldCluster.commandsResponse, newCluster.commandsResponse, [...clusterPath, "commandsResponse"]); + } + } + + return this.#changes; + } +} + +// #endregion + +// #region Main + +async function main(): Promise { + console.log("Starting ZCL cluster definition comparison..."); + + const oldFilePathArg = process.argv[2]; + + if (!oldFilePathArg) { + console.error("ERROR: Missing required argument."); + console.error("Usage: tsx scripts/check-zcl-clusters-changes.ts "); + process.exit(1); + } + + const oldFilePath = path.resolve(process.cwd(), oldFilePathArg); + + try { + await fs.access(oldFilePath); + } catch { + console.error(`ERROR: Old file not found at: ${oldFilePath}`); + process.exit(1); + } + + // Dynamically import both files using file:// URLs to ensure Windows compatibility + const {Clusters: newClusters} = await import(pathToFileURL(CURRENT_FILE).href); + const {Clusters: oldClusters} = await import(pathToFileURL(oldFilePath).href); + + // Perform comparison + const comparator = new ClusterComparator(); + const changes = comparator.run(oldClusters, newClusters); + + // Output results + if (changes.length === 0) { + const message = "No changes detected between the two cluster definition files."; + console.log(message); + await fs.writeFile(LOG_FILE, `${message}\n`, "utf8"); + return; + } + + const logHeader = `Found ${changes.length} changes.\n`; + + const formattedChanges: string[] = []; + + for (const change of changes) { + if (change.type !== "added") { + formattedChanges.push(formatChange(change)); + } + } + + formattedChanges.push(""); + + for (const change of changes) { + if (change.type === "added") { + formattedChanges.push(formatChange(change)); + } + } + + const logContent = [logHeader, ...formattedChanges].join("\n"); + + await fs.writeFile(LOG_FILE, logContent, "utf8"); + + console.log(`\nComparison complete. Found ${changes.length} changes.`); + console.log(`See the full report in: ${LOG_FILE}`); +} + +main().catch((error) => { + console.error("An unexpected error occurred:", error); + process.exit(1); +}); + +// #endregion diff --git a/scripts/clusters-changes.log b/scripts/clusters-changes.log new file mode 100644 index 0000000000..7cd5b34877 --- /dev/null +++ b/scripts/clusters-changes.log @@ -0,0 +1,584 @@ +Found 582 changes. + +[REMOVED] Clusters > pm1Measurement: 1068 (0x042c) +[REMOVED] Clusters > pm10Measurement: 1069 (0x042d) +[CHANGED] Clusters > name > 1559: piRetailTunnel -> retailTunnel +[CHANGED] Clusters > name > 1796: tunneling -> seTunneling +[CHANGED] Clusters > name > 2817: haMeterIdentification -> seMeterIdentification +[CHANGED] Clusters > genBasic > attributes > name > 8: appProfileVersion -> genericDeviceClass +[REMOVED] Clusters > genIdentify > attributes > identifyCommissionState: 1 (0x0001) +[CHANGED] Clusters > genIdentify > commands > triggerEffect > parameters > effectid > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genIdentify > commands > triggerEffect > parameters > effectvariant > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genGroups > commandsResponse > addRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genGroups > commandsResponse > viewRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genGroups > commandsResponse > removeRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commands > copy > parameters > mode > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genScenes > commandsResponse > addRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > viewRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > removeRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > removeAllRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > storeRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > getSceneMembershipRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > enhancedAddRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > enhancedViewRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genScenes > commandsResponse > copyRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOnOff > commands > offWithEffect > parameters > effectid > type: UINT8 -> ENUM8 +[REMOVED] Clusters > genOnOffSwitchCfg > attributes > switchMultiFunction: 2 (0x0002) +[CHANGED] Clusters > genLevelCtrl > attributes > defaultMoveRate > type: UINT16 -> UINT8 +[CHANGED] Clusters > genLevelCtrl > commands > move > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genLevelCtrl > commands > step > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genLevelCtrl > commands > moveWithOnOff > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genLevelCtrl > commands > stepWithOnOff > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genAlarms > commands > reset > parameters > alarmcode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genAlarms > commands > reset > parameters > clusterid > type: UINT16 -> CLUSTER_ID +[CHANGED] Clusters > genAlarms > commandsResponse > alarm > parameters > alarmcode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genAlarms > commandsResponse > alarm > parameters > clusterid > type: UINT16 -> CLUSTER_ID +[CHANGED] Clusters > genAlarms > commandsResponse > getRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genAlarms > commandsResponse > getRsp > parameters > alarmcode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genAlarms > commandsResponse > getRsp > parameters > clusterid > type: UINT16 -> CLUSTER_ID +[REMOVED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coord1: undefined +[REMOVED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coord2: undefined +[REMOVED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coord3: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coord1: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coord2: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coord3: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coord1: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coord2: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coord3: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coord1: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coord2: undefined +[REMOVED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coord3: undefined +[CHANGED] Clusters > genCommissioning > attributes > name > 65: concentratorRus -> concentratorRadius +[CHANGED] Clusters > genCommissioning > commands > restartDevice > parameters > options > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genCommissioning > commands > saveStartupParams > parameters > options > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genCommissioning > commands > restoreStartupParams > parameters > options > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genCommissioning > commands > resetStartupParams > parameters > options > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genCommissioning > commandsResponse > restartDeviceRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genCommissioning > commandsResponse > saveStartupParamsRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genCommissioning > commandsResponse > restoreStartupParamsRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genCommissioning > commandsResponse > resetStartupParamsRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOta > commands > queryNextImageRequest > parameters > fieldControl > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genOta > commands > imageBlockRequest > parameters > fieldControl > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genOta > commands > imagePageRequest > parameters > fieldControl > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > genOta > commands > upgradeEndRequest > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOta > commandsResponse > imageNotify > parameters > payloadType > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOta > commandsResponse > queryNextImageResponse > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOta > commandsResponse > imageBlockResponse > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > genOta > commandsResponse > upgradeEndResponse > parameters > currentTime > type: UINT32 -> UTC +[CHANGED] Clusters > genOta > commandsResponse > upgradeEndResponse > parameters > upgradeTime > type: UINT32 -> UTC +[CHANGED] Clusters > genOta > commandsResponse > queryDeviceSpecificFileResponse > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresShadeCfg > attributes > mode > ID: 18 (0x0012) -> 17 (0x0011) +[CHANGED] Clusters > closuresDoorLock > attributes > lockType > ID: 38 (0x0026) -> 1 (0x0001) +[CHANGED] Clusters > closuresDoorLock > attributes > lockType > type: BITMAP16 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > attributes > operatingMode > type: UINT32 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > attributes > zigbeeSecurityLevel > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commands > lockDoor > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commands > unlockDoor > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commands > toggleDoor > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commands > unlockWithTimeout > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commands > setPinCode > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commands > setPinCode > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commands > setWeekDaySchedule > parameters > daysmask > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > closuresDoorLock > commands > setHolidaySchedule > parameters > opermodelduringholiday > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commands > setUserType > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commands > setRfidCode > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commands > setRfidCode > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commandsResponse > lockDoorRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > unlockDoorRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > toggleDoorRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > unlockWithTimeoutRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getLogRecordRsp > parameters > eventtype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getLogRecordRsp > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getPinCodeRsp > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getPinCodeRsp > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getWeekDayScheduleRsp > parameters > daysmask > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getYearDayScheduleRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getHolidayScheduleRsp > parameters > opermodelduringholiday > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getUserTypeRsp > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getRfidCodeRsp > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > getRfidCodeRsp > parameters > pincodevalue > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > closuresDoorLock > commandsResponse > operationEventNotification > parameters > data > type: UINT8 -> CHAR_STR +[CHANGED] Clusters > closuresDoorLock > commandsResponse > programmingEventNotification > parameters > usertype > type: UINT8 -> ENUM8 +[CHANGED] Clusters > closuresDoorLock > commandsResponse > programmingEventNotification > parameters > data > type: UINT8 -> CHAR_STR +[CHANGED] Clusters > hvacThermostat > commands > setpointRaiseLower > parameters > mode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > hvacThermostat > commands > setWeeklySchedule > parameters > dayofweek > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commands > setWeeklySchedule > parameters > mode > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commands > getWeeklySchedule > parameters > daystoreturn > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commands > getWeeklySchedule > parameters > modetoreturn > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commandsResponse > getWeeklyScheduleRsp > parameters > dayofweek > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commandsResponse > getWeeklyScheduleRsp > parameters > mode > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commandsResponse > getRelayStatusLogRsp > parameters > relaystatus > type: UINT16 -> BITMAP8 +[CHANGED] Clusters > hvacThermostat > commandsResponse > getRelayStatusLogRsp > parameters > localtemp > type: UINT16 -> INT16 +[CHANGED] Clusters > hvacThermostat > commandsResponse > getRelayStatusLogRsp > parameters > setpoint > type: UINT16 -> INT16 +[CHANGED] Clusters > lightingColorCtrl > attributes > colorCapabilities > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > lightingColorCtrl > commands > moveToHue > parameters > direction > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > moveHue > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > stepHue > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > moveSaturation > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > stepSaturation > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > enhancedMoveToHue > parameters > direction > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > enhancedMoveHue > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > enhancedStepHue > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > colorLoopSet > parameters > updateflags > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > lightingColorCtrl > commands > colorLoopSet > parameters > action > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > colorLoopSet > parameters > direction > type: UINT8 -> ENUM8 +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > bits: undefined +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > bytee: undefined +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > action: undefined +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > direction: undefined +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > time: undefined +[REMOVED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > starthue: undefined +[CHANGED] Clusters > lightingColorCtrl > commands > moveColorTemp > parameters > movemode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > lightingColorCtrl > commands > stepColorTemp > parameters > stepmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasZone > commands > enrollRsp > parameters > enrollrspcode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasZone > commandsResponse > statusChangeNotification > parameters > zonestatus > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasZone > commandsResponse > statusChangeNotification > parameters > extendedstatus > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > ssIasZone > commandsResponse > enrollReq > parameters > zonetype > type: UINT16 -> ENUM16 +[CHANGED] Clusters > ssIasAce > commands > arm > parameters > armmode > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commands > getZoneStatus > parameters > zonestatusmaskflag > type: UINT8 -> BOOLEAN +[CHANGED] Clusters > ssIasAce > commands > getZoneStatus > parameters > zonestatusmask > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > armRsp > parameters > armnotification > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection0 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection1 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection2 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection3 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection4 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection5 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection6 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection7 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection8 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection9 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection10 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection11 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection12 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection13 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection14 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneIDMapRsp > parameters > zoneidmapsection15 > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneInfoRsp > parameters > zonetype > type: UINT16 -> ENUM16 +[CHANGED] Clusters > ssIasAce > commandsResponse > zoneStatusChanged > parameters > zonestatus > type: UINT16 -> ENUM16 +[CHANGED] Clusters > ssIasAce > commandsResponse > zoneStatusChanged > parameters > audiblenotif > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > panelStatusChanged > parameters > panelstatus > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > panelStatusChanged > parameters > audiblenotif > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > panelStatusChanged > parameters > alarmstatus > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > getPanelStatusRsp > parameters > panelstatus > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > getPanelStatusRsp > parameters > audiblenotif > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > getPanelStatusRsp > parameters > alarmstatus > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasAce > commandsResponse > getZoneStatusRsp > parameters > zonestatuscomplete > type: UINT8 -> BOOLEAN +[CHANGED] Clusters > ssIasWd > commands > startWarning > parameters > startwarninginfo > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > ssIasWd > commands > startWarning > parameters > strobelevel > type: UINT8 -> ENUM8 +[CHANGED] Clusters > ssIasWd > commands > squawk > parameters > squawkinfo > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > piGenericTunnel > commands > matchProtocolAddr > parameters > protocoladdr > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > piGenericTunnel > commandsResponse > matchProtocolAddrRsp > parameters > protocoladdr > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > piGenericTunnel > commandsResponse > advertiseProtocolAddr > parameters > protocoladdr > type: CHAR_STR -> OCTET_STR +[CHANGED] Clusters > piBacnetProtocolTunnel > commands > transferNpdu > parameters > npdu > type: UINT8 -> LIST_UINT8 +[REMOVED] Clusters > piAnalogOutputReg > attributes > updateInterval: 118 (0x0076) +[CHANGED] Clusters > piMultistateInputReg > attributes > name > 75: objectId -> objectIdentifier +[CHANGED] Clusters > piMultistateInputExt > attributes > name > 6: alarmValue -> alarmValues +[CHANGED] Clusters > piMultistateInputExt > attributes > alarmValues > type: UINT16 -> SET +[CHANGED] Clusters > piMultistateInputExt > attributes > faultValues > type: UINT16 -> SET +[CHANGED] Clusters > piMultistateOutputReg > attributes > name > 75: objectId -> objectIdentifier +[CHANGED] Clusters > piMultistateValueReg > attributes > name > 75: objectId -> objectIdentifier +[CHANGED] Clusters > piMultistateValueExt > attributes > name > 6: alarmValue -> alarmValues +[CHANGED] Clusters > piMultistateValueExt > attributes > alarmValues > type: UINT16 -> SET +[CHANGED] Clusters > piMultistateValueExt > attributes > faultValues > type: UINT16 -> SET +[CHANGED] Clusters > pi11073ProtocolTunnel > commands > name > 1: connectReq -> connectRequest +[CHANGED] Clusters > pi11073ProtocolTunnel > commands > name > 2: disconnectReq -> disconnectRequest +[CHANGED] Clusters > pi11073ProtocolTunnel > commands > name > 3: connectStatusNoti -> connectStatusNotification +[REMOVED] Clusters > seMetering > attributes > intervalReadReportingPeriod: 16 (0x0010) +[CHANGED] Clusters > seMetering > attributes > currentBlockReceived > type: UINT48 -> ENUM8 +[CHANGED] Clusters > seMetering > attributes > name > 783: operatingTariffLevel -> operatingTariffLevelDelivered +[CHANGED] Clusters > seMetering > attributes > name > 1025: currentdayConsumpDelivered -> currentDayConsumpDelivered +[CHANGED] Clusters > seMetering > attributes > name > 1026: currentdayConsumpReceived -> currentDayConsumpReceived +[CHANGED] Clusters > seMetering > attributes > name > 1027: previousdayConsumpDelivered -> previousDayConsumpDelivered +[CHANGED] Clusters > seMetering > attributes > name > 1028: previousdayConsumpReceived -> previousDayConsumpReceived +[CHANGED] Clusters > seMetering > attributes > name > 1041: currentdayMaxEnergyCarrDemand -> currentDayMaxEnergyCarrDemand +[CHANGED] Clusters > seMetering > attributes > name > 1042: previousdayMaxEnergyCarrDemand -> previousDayMaxEnergyCarrDemand +[CHANGED] Clusters > seMetering > attributes > name > 2560: billToDate -> billToDateDelivered +[CHANGED] Clusters > seMetering > attributes > name > 2561: billToDateTimeStamp -> billToDateTimeStampDelivered +[CHANGED] Clusters > seMetering > attributes > name > 2562: projectedBill -> projectedBillDelivered +[CHANGED] Clusters > seMetering > attributes > name > 2563: projectedBillTimeStamp -> projectedBillTimeStampDelivered +[CHANGED] Clusters > seMetering > commands > name > 1: reqMirror -> requestMirrorRsp +[CHANGED] Clusters > seMetering > commands > name > 2: mirrorRem -> mirrorRemoved +[CHANGED] Clusters > seMetering > commands > name > 3: reqFastPollMode -> requestFastPollMode +[CHANGED] Clusters > seMetering > commands > getSnapshot > ID: 4 (0x0004) -> 6 (0x0006) +[CHANGED] Clusters > seMetering > commands > name > 6: mirrorReportAttrRsp -> getSnapshot +[CHANGED] Clusters > seMetering > commandsResponse > name > 1: reqMirrorRsp -> requestMirror +[CHANGED] Clusters > seMetering > commandsResponse > name > 2: mirrorRemRsp -> removeMirror +[CHANGED] Clusters > seMetering > commandsResponse > name > 3: reqFastPollModeRsp -> requestFastPollModeRsp +[CHANGED] Clusters > seMetering > commandsResponse > name > 4: getSnapshotRsp -> scheduleSnapshotRsp +[CHANGED] Clusters > haApplianceStatistics > commandsResponse > logNotification > parameters > timestamp > type: UINT32 -> UTC +[CHANGED] Clusters > haApplianceStatistics > commandsResponse > logRsp > parameters > timestamp > type: UINT32 -> UTC +[CHANGED] Clusters > haElectricalMeasurement > commands > getMeasurementProfile > parameters > attrId > type: UINT16 -> ATTR_ID +[CHANGED] Clusters > haElectricalMeasurement > commands > getMeasurementProfile > parameters > starttime > type: UINT32 -> UTC +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getProfileInfoRsp > parameters > profileintervalperiod > type: UINT8 -> ENUM8 +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getMeasurementProfileRsp > parameters > starttime > type: UINT32 -> UTC +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getMeasurementProfileRsp > parameters > status > type: UINT8 -> ENUM8 +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getMeasurementProfileRsp > parameters > profileintervalperiod > type: UINT8 -> ENUM8 +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getMeasurementProfileRsp > parameters > attrId > type: UINT16 -> ATTR_ID +[CHANGED] Clusters > haElectricalMeasurement > commandsResponse > getMeasurementProfileRsp > parameters > intervals > type: LIST_UINT8 -> BUFFER +[CHANGED] Clusters > touchlink > commandsResponse > scanResponse > parameters > zigbeeInformation > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > touchlink > commandsResponse > scanResponse > parameters > touchlinkInformation > type: UINT8 -> BITMAP8 +[CHANGED] Clusters > touchlink > commandsResponse > scanResponse > parameters > keyBitmask > type: UINT16 -> BITMAP16 +[CHANGED] Clusters > touchlink > commandsResponse > networkStart > parameters > status > type: ENUM8 -> UINT8 +[CHANGED] Clusters > touchlink > commandsResponse > networkJoinRouter > parameters > status > type: ENUM8 -> UINT8 +[CHANGED] Clusters > touchlink > commandsResponse > networkJoinEndDevice > parameters > status > type: ENUM8 -> UINT8 + +[ADDED] Clusters > piPartition: 22 (0x0016) +[ADDED] Clusters > powerProfile: 26 (0x001a) +[ADDED] Clusters > haApplianceControl: 27 (0x001b) +[ADDED] Clusters > pulseWidthModulation: 28 (0x001c) +[ADDED] Clusters > keepAlive: 37 (0x0025) +[ADDED] Clusters > retailTunnel: 1559 (0x0617) +[ADDED] Clusters > seTunneling: 1796 (0x0704) +[ADDED] Clusters > seMeterIdentification: 2817 (0x0b01) +[ADDED] Clusters > genBasic > attributes > genericDeviceClass: 8 (0x0008) +[ADDED] Clusters > genPowerCfg > attributes > battery2Voltage: 64 (0x0040) +[ADDED] Clusters > genPowerCfg > attributes > battery2PercentageRemaining: 65 (0x0041) +[ADDED] Clusters > genPowerCfg > attributes > battery2Manufacturer: 80 (0x0050) +[ADDED] Clusters > genPowerCfg > attributes > battery2Size: 81 (0x0051) +[ADDED] Clusters > genPowerCfg > attributes > battery2AHrRating: 82 (0x0052) +[ADDED] Clusters > genPowerCfg > attributes > battery2Quantity: 83 (0x0053) +[ADDED] Clusters > genPowerCfg > attributes > battery2RatedVoltage: 84 (0x0054) +[ADDED] Clusters > genPowerCfg > attributes > battery2AlarmMask: 85 (0x0055) +[ADDED] Clusters > genPowerCfg > attributes > battery2VoltageMinThreshold: 86 (0x0056) +[ADDED] Clusters > genPowerCfg > attributes > battery2VoltageThreshold1: 87 (0x0057) +[ADDED] Clusters > genPowerCfg > attributes > battery2VoltageThreshold2: 88 (0x0058) +[ADDED] Clusters > genPowerCfg > attributes > battery2VoltageThreshold3: 89 (0x0059) +[ADDED] Clusters > genPowerCfg > attributes > battery2PercentageMinThreshold: 90 (0x005a) +[ADDED] Clusters > genPowerCfg > attributes > battery2PercentageThreshold1: 91 (0x005b) +[ADDED] Clusters > genPowerCfg > attributes > battery2PercentageThreshold2: 92 (0x005c) +[ADDED] Clusters > genPowerCfg > attributes > battery2PercentageThreshold3: 93 (0x005d) +[ADDED] Clusters > genPowerCfg > attributes > battery2AlarmState: 94 (0x005e) +[ADDED] Clusters > genPowerCfg > attributes > battery3Voltage: 96 (0x0060) +[ADDED] Clusters > genPowerCfg > attributes > battery3PercentageRemaining: 97 (0x0061) +[ADDED] Clusters > genPowerCfg > attributes > battery3Manufacturer: 112 (0x0070) +[ADDED] Clusters > genPowerCfg > attributes > battery3Size: 113 (0x0071) +[ADDED] Clusters > genPowerCfg > attributes > battery3AHrRating: 114 (0x0072) +[ADDED] Clusters > genPowerCfg > attributes > battery3Quantity: 115 (0x0073) +[ADDED] Clusters > genPowerCfg > attributes > battery3RatedVoltage: 116 (0x0074) +[ADDED] Clusters > genPowerCfg > attributes > battery3AlarmMask: 117 (0x0075) +[ADDED] Clusters > genPowerCfg > attributes > battery3VoltageMinThreshold: 118 (0x0076) +[ADDED] Clusters > genPowerCfg > attributes > battery3VoltageThreshold1: 119 (0x0077) +[ADDED] Clusters > genPowerCfg > attributes > battery3VoltageThreshold2: 120 (0x0078) +[ADDED] Clusters > genPowerCfg > attributes > battery3VoltageThreshold3: 121 (0x0079) +[ADDED] Clusters > genPowerCfg > attributes > battery3PercentageMinThreshold: 122 (0x007a) +[ADDED] Clusters > genPowerCfg > attributes > battery3PercentageThreshold1: 123 (0x007b) +[ADDED] Clusters > genPowerCfg > attributes > battery3PercentageThreshold2: 124 (0x007c) +[ADDED] Clusters > genPowerCfg > attributes > battery3PercentageThreshold3: 125 (0x007d) +[ADDED] Clusters > genPowerCfg > attributes > battery3AlarmState: 126 (0x007e) +[ADDED] Clusters > genScenes > commands > recall > parameters > transitionTime +[ADDED] Clusters > genLevelCtrl > attributes > currentFrequency: 4 (0x0004) +[ADDED] Clusters > genLevelCtrl > attributes > minFrequency: 5 (0x0005) +[ADDED] Clusters > genLevelCtrl > attributes > maxFrequency: 6 (0x0006) +[ADDED] Clusters > genLevelCtrl > commands > moveToLevel > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > moveToLevel > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > move > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > move > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > step > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > step > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > stop > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > stop > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > moveToLevelWithOnOff > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > moveToLevelWithOnOff > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > moveWithOnOff > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > moveWithOnOff > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > stepWithOnOff > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > stepWithOnOff > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > stopWithOnOff > parameters > optionsMask +[ADDED] Clusters > genLevelCtrl > commands > stopWithOnOff > parameters > optionsOverride +[ADDED] Clusters > genLevelCtrl > commands > moveToClosestFrequency: 8 (0x0008) +[ADDED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coordinate1 +[ADDED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coordinate2 +[ADDED] Clusters > genRssiLocation > commands > setAbsolute > parameters > coordinate3 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coordinate1 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coordinate2 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataResponse > parameters > coordinate3 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coordinate1 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coordinate2 +[ADDED] Clusters > genRssiLocation > commandsResponse > locationDataNotification > parameters > coordinate3 +[ADDED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coordinate1 +[ADDED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coordinate2 +[ADDED] Clusters > genRssiLocation > commandsResponse > compactLocationDataNotification > parameters > coordinate3 +[ADDED] Clusters > genCommissioning > attributes > concentratorRadius: 65 (0x0041) +[ADDED] Clusters > genOta > attributes > upgradeActivationPolicy: 11 (0x000b) +[ADDED] Clusters > genOta > attributes > upgradeTimeoutPolicy: 12 (0x000c) +[ADDED] Clusters > greenPower > attributes > gpsMaxSinkTableEntries +[ADDED] Clusters > greenPower > attributes > sinkTable: 1 (0x0001) +[ADDED] Clusters > greenPower > attributes > gpsCommunicationMode: 2 (0x0002) +[ADDED] Clusters > greenPower > attributes > gpsCommissioningExitMode: 3 (0x0003) +[ADDED] Clusters > greenPower > attributes > gpsCommissioningWindow: 4 (0x0004) +[ADDED] Clusters > greenPower > attributes > gpsSecurityLevel: 5 (0x0005) +[ADDED] Clusters > greenPower > attributes > gpsFunctionality: 6 (0x0006) +[ADDED] Clusters > greenPower > attributes > gpsActiveFunctionality: 7 (0x0007) +[ADDED] Clusters > greenPower > attributes > gpsMaxProxyTableEntries: 16 (0x0010) +[ADDED] Clusters > greenPower > attributes > proxyTable: 17 (0x0011) +[ADDED] Clusters > greenPower > attributes > gppNotificationRetryNumber: 18 (0x0012) +[ADDED] Clusters > greenPower > attributes > gppNotificationRetryTimer: 19 (0x0013) +[ADDED] Clusters > greenPower > attributes > gppMaxSearchCounter: 20 (0x0014) +[ADDED] Clusters > greenPower > attributes > gppBlockGpdId: 21 (0x0015) +[ADDED] Clusters > greenPower > attributes > gppFunctionality: 22 (0x0016) +[ADDED] Clusters > greenPower > attributes > gppActiveFunctionality: 23 (0x0017) +[ADDED] Clusters > greenPower > attributes > gpSharedSecurityKeyType: 32 (0x0020) +[ADDED] Clusters > greenPower > attributes > gpSharedSecurityKey: 33 (0x0021) +[ADDED] Clusters > greenPower > attributes > gpLinkKey: 34 (0x0022) +[ADDED] Clusters > greenPower > commands > pairingSearch: 1 (0x0001) +[ADDED] Clusters > greenPower > commands > tunnelingStop: 3 (0x0003) +[ADDED] Clusters > greenPower > commands > sinkCommissioningMode: 4 (0x0004) +[ADDED] Clusters > greenPower > commands > translationTableUpdate: 7 (0x0007) +[ADDED] Clusters > greenPower > commands > translationTableReq: 8 (0x0008) +[ADDED] Clusters > greenPower > commands > sinkTableReq: 10 (0x000a) +[ADDED] Clusters > greenPower > commands > proxyTableRsp: 11 (0x000b) +[ADDED] Clusters > greenPower > commandsResponse > notificationResponse +[ADDED] Clusters > greenPower > commandsResponse > translationTableRsp: 8 (0x0008) +[ADDED] Clusters > greenPower > commandsResponse > sinkTableRsp: 10 (0x000a) +[ADDED] Clusters > greenPower > commandsResponse > proxyTableReq: 11 (0x000b) +[ADDED] Clusters > mobileDeviceCfg > commandsResponse > keepAliveNotification +[ADDED] Clusters > neighborCleaning > commands > purgeEntries +[ADDED] Clusters > closuresDoorLock > attributes > supportedOperatingModes: 38 (0x0026) +[ADDED] Clusters > hvacThermostat > attributes > occupiedSetback: 52 (0x0034) +[ADDED] Clusters > hvacThermostat > attributes > occupiedSetbackMin: 53 (0x0035) +[ADDED] Clusters > hvacThermostat > attributes > occupiedSetbackMax: 54 (0x0036) +[ADDED] Clusters > hvacThermostat > attributes > unoccupiedSetback: 55 (0x0037) +[ADDED] Clusters > hvacThermostat > attributes > unoccupiedSetbackMin: 56 (0x0038) +[ADDED] Clusters > hvacThermostat > attributes > unoccupiedSetbackMax: 57 (0x0039) +[ADDED] Clusters > hvacThermostat > attributes > emergencyHeatDelta: 58 (0x003a) +[ADDED] Clusters > lightingColorCtrl > commands > moveToHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveToHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > stepHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > stepHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveToSaturation > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveToSaturation > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveSaturation > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveSaturation > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > stepSaturation > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > stepSaturation > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveToHueAndSaturation > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveToHueAndSaturation > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveToColor > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveToColor > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveColor > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveColor > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > stepColor > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > stepColor > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveToColorTemp > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveToColorTemp > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveToHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveToHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > enhancedStepHue > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > enhancedStepHue > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveToHueAndSaturation > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > enhancedMoveToHueAndSaturation > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > colorLoopSet > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > colorLoopSet > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > stopMoveStep > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > moveColorTemp > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > moveColorTemp > parameters > optionsOverride +[ADDED] Clusters > lightingColorCtrl > commands > stepColorTemp > parameters > optionsMask +[ADDED] Clusters > lightingColorCtrl > commands > stepColorTemp > parameters > optionsOverride +[ADDED] Clusters > ssIasZone > commands > initTestMode > parameters > testModeDuration +[ADDED] Clusters > ssIasZone > commands > initTestMode > parameters > currentZoneSensitivityLevel +[ADDED] Clusters > ssIasZone > commandsResponse > statusChangeNotification > parameters > zoneID +[ADDED] Clusters > ssIasZone > commandsResponse > statusChangeNotification > parameters > delay +[ADDED] Clusters > ssIasAce > commands > bypass > parameters > armDisarmCode +[ADDED] Clusters > piMultistateInputReg > attributes > objectIdentifier: 75 (0x004b) +[ADDED] Clusters > piMultistateInputExt > attributes > alarmValues: 6 (0x0006) +[ADDED] Clusters > piMultistateOutputReg > attributes > objectIdentifier: 75 (0x004b) +[ADDED] Clusters > piMultistateValueReg > attributes > objectIdentifier: 75 (0x004b) +[ADDED] Clusters > piMultistateValueExt > attributes > alarmValues: 6 (0x0006) +[ADDED] Clusters > pi11073ProtocolTunnel > commands > transferApdu > parameters > apdu +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectRequest > parameters > control +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectRequest > parameters > idleTimeout +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectRequest > parameters > managerTarget +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectRequest > parameters > managerEndpoint +[ADDED] Clusters > pi11073ProtocolTunnel > commands > disconnectRequest > parameters > managerTarget +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectStatusNotification > parameters > status +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectRequest: 1 (0x0001) +[ADDED] Clusters > pi11073ProtocolTunnel > commands > disconnectRequest: 2 (0x0002) +[ADDED] Clusters > pi11073ProtocolTunnel > commands > connectStatusNotification: 3 (0x0003) +[ADDED] Clusters > piIso7818ProtocolTunnel > commands > transferApdu +[ADDED] Clusters > piIso7818ProtocolTunnel > commands > insertSmartCard: 1 (0x0001) +[ADDED] Clusters > piIso7818ProtocolTunnel > commands > extractSmartCard: 2 (0x0002) +[ADDED] Clusters > piIso7818ProtocolTunnel > commandsResponse > transferApdu +[ADDED] Clusters > seMetering > attributes > previousBlockPeriodConsumpReceived: 28 (0x001c) +[ADDED] Clusters > seMetering > attributes > lastBlockSwitchTime: 34 (0x0022) +[ADDED] Clusters > seMetering > attributes > cpp1SummationDelivered: 508 (0x01fc) +[ADDED] Clusters > seMetering > attributes > cpp2SummationDelivered: 510 (0x01fe) +[ADDED] Clusters > seMetering > attributes > remainingBattLifeInDays: 517 (0x0205) +[ADDED] Clusters > seMetering > attributes > currentMeterId: 518 (0x0206) +[ADDED] Clusters > seMetering > attributes > ambientConsumptionIndicator: 519 (0x0207) +[ADDED] Clusters > seMetering > attributes > operatingTariffLevelDelivered: 783 (0x030f) +[ADDED] Clusters > seMetering > attributes > operatingTariffLevelReceived: 784 (0x0310) +[ADDED] Clusters > seMetering > attributes > customIdNumber: 785 (0x0311) +[ADDED] Clusters > seMetering > attributes > alternativeUnitOfMeasure: 786 (0x0312) +[ADDED] Clusters > seMetering > attributes > alternativeDemandFormatting: 786 (0x0312) +[ADDED] Clusters > seMetering > attributes > alternativeConsumptionFormatting: 786 (0x0312) +[ADDED] Clusters > seMetering > attributes > currentDayConsumpDelivered: 1025 (0x0401) +[ADDED] Clusters > seMetering > attributes > currentDayConsumpReceived: 1026 (0x0402) +[ADDED] Clusters > seMetering > attributes > previousDayConsumpDelivered: 1027 (0x0403) +[ADDED] Clusters > seMetering > attributes > previousDayConsumpReceived: 1028 (0x0404) +[ADDED] Clusters > seMetering > attributes > currentDayMaxEnergyCarrDemand: 1041 (0x0411) +[ADDED] Clusters > seMetering > attributes > previousDayMaxEnergyCarrDemand: 1042 (0x0412) +[ADDED] Clusters > seMetering > attributes > previousDay2ConsumptionDelivered: 1056 (0x0420) +[ADDED] Clusters > seMetering > attributes > previousDay2ConsumptionReceived: 1057 (0x0421) +[ADDED] Clusters > seMetering > attributes > previousDay3ConsumptionDelivered: 1058 (0x0422) +[ADDED] Clusters > seMetering > attributes > previousDay3ConsumptionReceived: 1059 (0x0423) +[ADDED] Clusters > seMetering > attributes > previousDay4ConsumptionDelivered: 1060 (0x0424) +[ADDED] Clusters > seMetering > attributes > previousDay4ConsumptionReceived: 1061 (0x0425) +[ADDED] Clusters > seMetering > attributes > previousDay5ConsumptionDelivered: 1062 (0x0426) +[ADDED] Clusters > seMetering > attributes > previousDay5ConsumptionReceived: 1063 (0x0427) +[ADDED] Clusters > seMetering > attributes > previousDay6ConsumptionDelivered: 1064 (0x0428) +[ADDED] Clusters > seMetering > attributes > previousDay6ConsumptionReceived: 1056 (0x0420) +[ADDED] Clusters > seMetering > attributes > previousDay7ConsumptionDelivered: 1066 (0x042a) +[ADDED] Clusters > seMetering > attributes > previousDay7ConsumptionReceived: 1067 (0x042b) +[ADDED] Clusters > seMetering > attributes > previousDay8ConsumptionDelivered: 1068 (0x042c) +[ADDED] Clusters > seMetering > attributes > previousDay8ConsumptionReceived: 1069 (0x042d) +[ADDED] Clusters > seMetering > attributes > currentWeekConsumptionDelivered: 1072 (0x0430) +[ADDED] Clusters > seMetering > attributes > currentWeekConsumptionReceived: 1073 (0x0431) +[ADDED] Clusters > seMetering > attributes > previousWeekConsumptionDelivered: 1074 (0x0432) +[ADDED] Clusters > seMetering > attributes > previousWeekConsumptionReceived: 1075 (0x0433) +[ADDED] Clusters > seMetering > attributes > previousWeek2ConsumptionDelivered: 1076 (0x0434) +[ADDED] Clusters > seMetering > attributes > previousWeek2ConsumptionReceived: 1077 (0x0435) +[ADDED] Clusters > seMetering > attributes > previousWeek3ConsumptionDelivered: 1078 (0x0436) +[ADDED] Clusters > seMetering > attributes > previousWeek3ConsumptionReceived: 1079 (0x0437) +[ADDED] Clusters > seMetering > attributes > previousWeek4ConsumptionDelivered: 1080 (0x0438) +[ADDED] Clusters > seMetering > attributes > previousWeek4ConsumptionReceived: 1081 (0x0439) +[ADDED] Clusters > seMetering > attributes > previousWeek5ConsumptionDelivered: 1082 (0x043a) +[ADDED] Clusters > seMetering > attributes > previousWeek5ConsumptionReceived: 1083 (0x043b) +[ADDED] Clusters > seMetering > attributes > currentMonthConsumptionDelivered: 1088 (0x0440) +[ADDED] Clusters > seMetering > attributes > currentMonthConsumptionReceived: 1089 (0x0441) +[ADDED] Clusters > seMetering > attributes > previousMonthConsumptionDelivered: 1090 (0x0442) +[ADDED] Clusters > seMetering > attributes > previousMonthConsumptionReceived: 1091 (0x0443) +[ADDED] Clusters > seMetering > attributes > previousMonth2ConsumptionDelivered: 1092 (0x0444) +[ADDED] Clusters > seMetering > attributes > previousMonth2ConsumptionReceived: 1093 (0x0445) +[ADDED] Clusters > seMetering > attributes > previousMonth3ConsumptionDelivered: 1094 (0x0446) +[ADDED] Clusters > seMetering > attributes > previousMonth3ConsumptionReceived: 1095 (0x0447) +[ADDED] Clusters > seMetering > attributes > previousMonth4ConsumptionDelivered: 1096 (0x0448) +[ADDED] Clusters > seMetering > attributes > previousMonth4ConsumptionReceived: 1097 (0x0449) +[ADDED] Clusters > seMetering > attributes > previousMonth5ConsumptionDelivered: 1098 (0x044a) +[ADDED] Clusters > seMetering > attributes > previousMonth5ConsumptionReceived: 1099 (0x044b) +[ADDED] Clusters > seMetering > attributes > previousMonth6ConsumptionDelivered: 1100 (0x044c) +[ADDED] Clusters > seMetering > attributes > previousMonth6ConsumptionReceived: 1101 (0x044d) +[ADDED] Clusters > seMetering > attributes > previousMonth7ConsumptionDelivered: 1102 (0x044e) +[ADDED] Clusters > seMetering > attributes > previousMonth7ConsumptionReceived: 1103 (0x044f) +[ADDED] Clusters > seMetering > attributes > previousMonth8ConsumptionDelivered: 1104 (0x0450) +[ADDED] Clusters > seMetering > attributes > previousMonth8ConsumptionReceived: 1105 (0x0451) +[ADDED] Clusters > seMetering > attributes > previousMonth9ConsumptionDelivered: 1106 (0x0452) +[ADDED] Clusters > seMetering > attributes > previousMonth9ConsumptionReceived: 1107 (0x0453) +[ADDED] Clusters > seMetering > attributes > previousMonth10ConsumptionDelivered: 1108 (0x0454) +[ADDED] Clusters > seMetering > attributes > previousMonth10ConsumptionReceived: 1109 (0x0455) +[ADDED] Clusters > seMetering > attributes > previousMonth11ConsumptionDelivered: 1110 (0x0456) +[ADDED] Clusters > seMetering > attributes > previousMonth11ConsumptionReceived: 1111 (0x0457) +[ADDED] Clusters > seMetering > attributes > previousMonth12ConsumptionDelivered: 1112 (0x0458) +[ADDED] Clusters > seMetering > attributes > previousMonth12ConsumptionReceived: 1113 (0x0459) +[ADDED] Clusters > seMetering > attributes > previousMonth13ConsumptionDelivered: 1114 (0x045a) +[ADDED] Clusters > seMetering > attributes > previousMonth13ConsumptionReceived: 1115 (0x045b) +[ADDED] Clusters > seMetering > attributes > historicalFreezeTime: 1116 (0x045c) +[ADDED] Clusters > seMetering > attributes > loadLimitSupplyState: 1541 (0x0605) +[ADDED] Clusters > seMetering > attributes > loadLimitCounter: 1542 (0x0606) +[ADDED] Clusters > seMetering > attributes > supplyTamperState: 1543 (0x0607) +[ADDED] Clusters > seMetering > attributes > supplyDepletionState: 1544 (0x0608) +[ADDED] Clusters > seMetering > attributes > supplyUncontrolledFlowState: 1545 (0x0609) +[ADDED] Clusters > seMetering > attributes > billToDateDelivered: 2560 (0x0a00) +[ADDED] Clusters > seMetering > attributes > billToDateTimeStampDelivered: 2561 (0x0a01) +[ADDED] Clusters > seMetering > attributes > projectedBillDelivered: 2562 (0x0a02) +[ADDED] Clusters > seMetering > attributes > projectedBillTimeStampDelivered: 2563 (0x0a03) +[ADDED] Clusters > seMetering > attributes > billDeliveredTrailingDigit: 2564 (0x0a04) +[ADDED] Clusters > seMetering > attributes > billToDateReceived: 2576 (0x0a10) +[ADDED] Clusters > seMetering > attributes > billToDateTimeStampReceived: 2577 (0x0a11) +[ADDED] Clusters > seMetering > attributes > projectedBillReceived: 2578 (0x0a12) +[ADDED] Clusters > seMetering > attributes > projectedBillTimeStampReceived: 2579 (0x0a13) +[ADDED] Clusters > seMetering > attributes > billReceivedTrailingDigit: 2580 (0x0a14) +[ADDED] Clusters > seMetering > commands > getProfile > parameters > intervalChannel +[ADDED] Clusters > seMetering > commands > getProfile > parameters > endTime +[ADDED] Clusters > seMetering > commands > getProfile > parameters > numberOfPeriods +[ADDED] Clusters > seMetering > commands > requestMirrorRsp > parameters > endpointId +[ADDED] Clusters > seMetering > commands > mirrorRemoved > parameters > removedEndpointId +[ADDED] Clusters > seMetering > commands > requestFastPollMode > parameters > fastPollUpdatePeriod +[ADDED] Clusters > seMetering > commands > requestFastPollMode > parameters > duration +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > earliestStartTime +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > latestEndTime +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > offset +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > cause +[ADDED] Clusters > seMetering > commands > takeSnapshot > parameters > cause +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > earliestStartTime +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > latestEndTime +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > offset +[ADDED] Clusters > seMetering > commands > getSnapshot > parameters > cause +[ADDED] Clusters > seMetering > commands > requestMirrorRsp: 1 (0x0001) +[ADDED] Clusters > seMetering > commands > mirrorRemoved: 2 (0x0002) +[ADDED] Clusters > seMetering > commands > requestFastPollMode: 3 (0x0003) +[ADDED] Clusters > seMetering > commands > schneduleSnapshot: 4 (0x0004) +[ADDED] Clusters > seMetering > commands > startSampling: 7 (0x0007) +[ADDED] Clusters > seMetering > commands > getSampledData: 8 (0x0008) +[ADDED] Clusters > seMetering > commands > mirrorReportAttributeRsp: 9 (0x0009) +[ADDED] Clusters > seMetering > commands > resetLoadLimitCounter: 10 (0x000a) +[ADDED] Clusters > seMetering > commands > changeSupply: 11 (0x000b) +[ADDED] Clusters > seMetering > commands > localChangeSupply: 12 (0x000c) +[ADDED] Clusters > seMetering > commands > setSupplyStatus: 13 (0x000d) +[ADDED] Clusters > seMetering > commands > setUncontrolledFlowThreshold: 14 (0x000e) +[ADDED] Clusters > seMetering > commandsResponse > getProfileRsp > parameters > endTime +[ADDED] Clusters > seMetering > commandsResponse > getProfileRsp > parameters > status +[ADDED] Clusters > seMetering > commandsResponse > getProfileRsp > parameters > profileIntervalPeriod +[ADDED] Clusters > seMetering > commandsResponse > getProfileRsp > parameters > numberOfPeriodsDelivered +[ADDED] Clusters > seMetering > commandsResponse > getProfileRsp > parameters > intervals +[ADDED] Clusters > seMetering > commandsResponse > requestFastPollModeRsp > parameters > appliedUpdatePeriod +[ADDED] Clusters > seMetering > commandsResponse > requestFastPollModeRsp > parameters > fastPollModeEndTime +[ADDED] Clusters > seMetering > commandsResponse > scheduleSnapshotRsp > parameters > issuerEventId +[ADDED] Clusters > seMetering > commandsResponse > requestMirror: 1 (0x0001) +[ADDED] Clusters > seMetering > commandsResponse > removeMirror: 2 (0x0002) +[ADDED] Clusters > seMetering > commandsResponse > requestFastPollModeRsp: 3 (0x0003) +[ADDED] Clusters > seMetering > commandsResponse > scheduleSnapshotRsp: 4 (0x0004) +[ADDED] Clusters > seMetering > commandsResponse > takeSnapshotRsp: 5 (0x0005) +[ADDED] Clusters > seMetering > commandsResponse > publishSnapshot: 6 (0x0006) +[ADDED] Clusters > seMetering > commandsResponse > getSampledDataRsp: 7 (0x0007) +[ADDED] Clusters > seMetering > commandsResponse > configureMirror: 8 (0x0008) +[ADDED] Clusters > seMetering > commandsResponse > configureNotificationScheme: 9 (0x0009) +[ADDED] Clusters > seMetering > commandsResponse > configureNotificationFlag: 10 (0x000a) +[ADDED] Clusters > seMetering > commandsResponse > getNotifiedMessage: 11 (0x000b) +[ADDED] Clusters > seMetering > commandsResponse > supplyStatusRsp: 12 (0x000c) +[ADDED] Clusters > seMetering > commandsResponse > startSamplingRsp: 13 (0x000d) +[ADDED] Clusters > telecommunicationsInformation > commands > requestInfo +[ADDED] Clusters > telecommunicationsInformation > commands > pushInfoResponse: 1 (0x0001) +[ADDED] Clusters > telecommunicationsInformation > commands > sendPreference: 2 (0x0002) +[ADDED] Clusters > telecommunicationsInformation > commands > requestPreferenceRsp: 3 (0x0003) +[ADDED] Clusters > telecommunicationsInformation > commands > update: 4 (0x0004) +[ADDED] Clusters > telecommunicationsInformation > commands > delete: 5 (0x0005) +[ADDED] Clusters > telecommunicationsInformation > commands > configureNodeDescription: 6 (0x0006) +[ADDED] Clusters > telecommunicationsInformation > commands > configureDeliveryEnable: 7 (0x0007) +[ADDED] Clusters > telecommunicationsInformation > commands > configurePushInfoTimer: 8 (0x0008) +[ADDED] Clusters > telecommunicationsInformation > commands > configureSetRootId: 9 (0x0009) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > requestInfoRsp +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > pushInfo: 1 (0x0001) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > sendPreferenceRsp: 2 (0x0002) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > serverRequestPreference: 3 (0x0003) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > requestPreferenceConfirmation: 4 (0x0004) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > updateRsp: 5 (0x0005) +[ADDED] Clusters > telecommunicationsInformation > commandsResponse > deleteRsp: 6 (0x0006) +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commands > establishmentRequest +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commands > voiceTransmission +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commands > voiceTransmissionCompletion +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commands > controlResponse +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commandsResponse > establishmentRsp +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commandsResponse > voiceTransmissionRsp: 1 (0x0001) +[ADDED] Clusters > telecommunicationsVoiceOverZigbee > commandsResponse > control: 2 (0x0002) +[ADDED] Clusters > telecommunicationsChatting > commands > joinChatReq +[ADDED] Clusters > telecommunicationsChatting > commands > leaveChatReq: 1 (0x0001) +[ADDED] Clusters > telecommunicationsChatting > commands > searchChatReq: 2 (0x0002) +[ADDED] Clusters > telecommunicationsChatting > commands > switchCharmanRsp: 3 (0x0003) +[ADDED] Clusters > telecommunicationsChatting > commands > startChatReq: 4 (0x0004) +[ADDED] Clusters > telecommunicationsChatting > commands > chatMessage: 5 (0x0005) +[ADDED] Clusters > telecommunicationsChatting > commands > getNodeInfoReq: 6 (0x0006) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > startChatRsp +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > joinChatRsp: 1 (0x0001) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > userLeft: 2 (0x0002) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > userJoined: 3 (0x0003) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > searchChatRsp: 4 (0x0004) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > switchChairmanReq: 5 (0x0005) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > switchChairmanConfirm: 6 (0x0006) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > switchChairmanNotification: 7 (0x0007) +[ADDED] Clusters > telecommunicationsChatting > commandsResponse > getNodeInfoRsp: 8 (0x0008) \ No newline at end of file diff --git a/src/zspec/zcl/definition/clusters-typegen.ts b/scripts/clusters-typegen.ts similarity index 91% rename from src/zspec/zcl/definition/clusters-typegen.ts rename to scripts/clusters-typegen.ts index 3989e1f5af..2212ff6900 100644 --- a/src/zspec/zcl/definition/clusters-typegen.ts +++ b/scripts/clusters-typegen.ts @@ -1,24 +1,15 @@ -/* v8 ignore start */ /** - * How to run: - * ```bash - * npm i -g ts-node - * ts-node ./src/zspec/zcl/definition/clusters-typegen.ts && pnpm run check:w - * ``` - * or with compiled: - * ```bash - * pnpm run prepack - * node ./dist/zspec/zcl/definition/clusters-typegen.js && pnpm run check:w - * ``` + * Usage: + * tsx scripts/clusters-typegen.ts && pnpm run check:w */ import {writeFileSync} from "node:fs"; import ts from "typescript"; -import {isFoundationDiscoverRsp} from "../utils"; -import {Clusters} from "./cluster"; -import {BuffaloZclDataType, DataType} from "./enums"; -import {Foundation, type FoundationCommandName, type FoundationDefinition} from "./foundation"; -import {ManufacturerCode} from "./manufacturerCode"; -import type {AttributeDefinition, ClusterName, CommandDefinition, ParameterDefinition} from "./tstype"; +import {Clusters} from "../src/zspec/zcl/definition/cluster"; +import {BuffaloZclDataType, DataType} from "../src/zspec/zcl/definition/enums"; +import {Foundation, type FoundationCommandName, type FoundationDefinition} from "../src/zspec/zcl/definition/foundation"; +import {ManufacturerCode} from "../src/zspec/zcl/definition/manufacturerCode"; +import type {AttributeDefinition, ClusterName, CommandDefinition, ParameterDefinition} from "../src/zspec/zcl/definition/tstype"; +import {isFoundationDiscoverRsp} from "../src/zspec/zcl/utils"; const FILENAME = "clusters-types.ts"; @@ -33,7 +24,7 @@ const emptyObject = ts.factory.createTypeReferenceNode("Record", [ const namedImports = ts.factory.createImportDeclaration( undefined, ts.factory.createImportClause( - true, + ts.SyntaxKind.TypeKeyword, undefined, ts.factory.createNamedImports([ // sorted by name @@ -153,9 +144,23 @@ const getTypeFromDataType = (dataType: DataType | BuffaloZclDataType): ts.TypeNo } }; +const getPropertyStr = (key: string, val: unknown, padId = 4) => { + let valStr = `${val}`; + + if (key === "ID") { + valStr = `0x${Number(val).toString(16).padStart(padId, "0")}`; + } else if (key === "type") { + valStr = `${DataType[val as number] ?? BuffaloZclDataType[val as number]}`; + } else if (key === "manufacturerCode") { + valStr = `${ManufacturerCode[val as number]}(0x${Number(val).toString(16).padStart(4, "0")})`; + } + + return valStr; +}; + const getConditionStr = (conditions: ParameterDefinition["conditions"]): string | undefined => { if (conditions) { - let str = ", Conditions: ["; + let str = "conditions=["; for (const condition of conditions) { str += `{${condition.type}`; @@ -191,12 +196,14 @@ const addAttributes = (attributes: Readonly): ts.TypeNode ts.addSyntheticLeadingComment( element, ts.SyntaxKind.MultiLineCommentTrivia, - `* Type: ${DataType[parameter.type] ?? BuffaloZclDataType[parameter.type]}${conditionComment ?? ""} `, + `* Type: ${DataType[parameter.type] ?? BuffaloZclDataType[parameter.type]}${conditionComment ? ` ${conditionComment}` : ""} `, true, ); } diff --git a/scripts/utils.ts b/scripts/utils.ts new file mode 100644 index 0000000000..f3cca3d5d6 --- /dev/null +++ b/scripts/utils.ts @@ -0,0 +1,88 @@ +/** + * Scores a string against a pattern for fuzzy matching. + * + * The score is higher for more accurate matches. A score of 0 indicates no match. + * + * Scoring logic: + * - A bonus is awarded for each matched character. + * - A bonus is awarded for consecutive matched characters (a "combo"). + * - A large bonus is given if a character matches the beginning of a word (e.g., 'U' in "someUtils" or 's' in "some_utils"). + * - A bonus is given for matching character case. + * - A penalty is applied for each character in the target string that is skipped. + * + * @param pattern The pattern to search for (e.g., "mtHandS"). + * @param str The string to score against the pattern (e.g., "moveToHueAndSaturation"). + * @returns The match score, or 0 if there is no match. + */ +export function fuzzyMatch(pattern: string, str: string): number { + if (pattern.length === 0) { + return 1; // Or some other value indicating a trivial match + } + + if (str.length === 0) { + return 0; + } + + let score = 0; + let patternIndex = 0; + let strIndex = 0; + let lastMatchIndex = -1; + let inCombo = false; + + const SCORE_MATCH = 10; + const SCORE_COMBO = 15; + const SCORE_WORD_START = 20; + const SCORE_CASE_MATCH = 5; + const PENALTY_SKIP = -1; + + while (strIndex < str.length && patternIndex < pattern.length) { + const patternChar = pattern[patternIndex]; + const strChar = str[strIndex]; + + if (patternChar.toLowerCase() === strChar.toLowerCase()) { + score += SCORE_MATCH; + + // Bonus for case-sensitive match + if (patternChar === strChar) { + score += SCORE_CASE_MATCH; + } + + // Bonus for being a word start + const prevStrChar = strIndex > 0 ? str[strIndex - 1] : " "; + const isWordStart = + (prevStrChar === "_" || prevStrChar === " " || (prevStrChar.toLowerCase() === prevStrChar && strChar.toUpperCase() === strChar)) && + strChar.toLowerCase() !== strChar; + if (isWordStart) { + score += SCORE_WORD_START; + } + + // Bonus for consecutive matches + if (lastMatchIndex === strIndex - 1) { + if (inCombo) { + score += SCORE_COMBO; + } else { + inCombo = true; + } + } else { + inCombo = false; + } + + lastMatchIndex = strIndex; + patternIndex += 1; + } else { + score += PENALTY_SKIP; + } + + strIndex += 1; + } + + // If the entire pattern was not found, it's not a match. + if (patternIndex !== pattern.length) { + return 0; + } + + // Normalize score against the length of the string to penalize longer, less-specific matches. + const finalScore = score / str.length; + + return finalScore > 0 ? finalScore : 0; +} diff --git a/scripts/zap-update-clusters-report.json b/scripts/zap-update-clusters-report.json new file mode 100644 index 0000000000..fd491df439 --- /dev/null +++ b/scripts/zap-update-clusters-report.json @@ -0,0 +1,303 @@ +{ + "scannedClusters": [ + "0x0000 Basic", + "0x0001 PowerConfiguration", + "0x0002 DeviceTemperatureConfiguration", + "0x0003 Identify", + "0x0004 Groups", + "0x0005 Scenes", + "0x0006 OnOff", + "0x0008 Level", + "0x0009 Alarms", + "0x000a Time", + "0x0b05 Diagnostics", + "0x0020 PollControl", + "0x0400 IlluminanceMeasurement", + "0x0401 IlluminanceLevelSensing", + "0x0402 TemperatureMeasurement", + "0x0403 PressureMeasurement", + "0x0404 FlowMeasurement", + "0x0405 RelativityHumidity", + "0x0406 OccupancySensing", + "0x0b04 ElectricalMeasurement", + "0x040a ElectricalConductivityMeasurement", + "0x0409 PhMeasurement", + "0x040b WindSpeedMeasurement", + "0x0300 ColorControl", + "0x0301 BallastConfiguration", + "0x0200 PumpConfigurationAndControl", + "0x0201 Thermostat", + "0x0202 FanControl", + "0x0203 DehumidificationControl", + "0x0204 ThermostatUserInterfaceConfiguration", + "0x0100 ShadeConfiguration", + "0x0101 DoorLock", + "0x0102 WindowCovering", + "0x0103 BarrierControl", + "0x0500 IASZone", + "0x0501 IASACE", + "0x0502 IASWD", + "0x0015 Commissioning", + "0x1000 TouchlinkCommissioning", + "0x0019 OTAUpgrade", + "0x040c CarbonMonoxide" + ], + "changedClusters": [ + "0x0000 Basic", + "0x0001 PowerConfiguration", + "0x0002 DeviceTemperatureConfiguration", + "0x0003 Identify", + "0x0004 Groups", + "0x0005 Scenes", + "0x0006 OnOff", + "0x0008 Level", + "0x0009 Alarms", + "0x000a Time", + "0x0015 Commissioning", + "0x0019 OTAUpgrade", + "0x0020 PollControl", + "0x0100 ShadeConfiguration", + "0x0101 DoorLock", + "0x0102 WindowCovering", + "0x0103 BarrierControl", + "0x0200 PumpConfigurationAndControl", + "0x0201 Thermostat", + "0x0202 FanControl", + "0x0203 DehumidificationControl", + "0x0204 ThermostatUserInterfaceConfiguration", + "0x0300 ColorControl", + "0x0301 BallastConfiguration", + "0x0400 IlluminanceMeasurement", + "0x0401 IlluminanceLevelSensing", + "0x0402 TemperatureMeasurement", + "0x0403 PressureMeasurement", + "0x0404 FlowMeasurement", + "0x0405 RelativityHumidity", + "0x0406 OccupancySensing", + "0x0409 PhMeasurement", + "0x040a ElectricalConductivityMeasurement", + "0x040b WindSpeedMeasurement", + "0x040c CarbonMonoxide", + "0x0500 IASZone", + "0x0501 IASACE", + "0x0502 IASWD", + "0x0b04 ElectricalMeasurement", + "0x0b05 Diagnostics", + "0x1000 TouchlinkCommissioning" + ], + "addedAttributes": [ + "0x0040 battery2Voltage", + "0x0041 battery2PercentageRemaining", + "0x0050 battery2Manufacturer", + "0x0051 battery2Size", + "0x0052 battery2AHrRating", + "0x0053 battery2Quantity", + "0x0054 battery2RatedVoltage", + "0x0055 battery2AlarmMask", + "0x0056 battery2VoltageMinThreshold", + "0x0057 battery2VoltageThreshold1", + "0x0058 battery2VoltageThreshold2", + "0x0059 battery2VoltageThreshold3", + "0x005a battery2PercentageMinThreshold", + "0x005b battery2PercentageThreshold1", + "0x005c battery2PercentageThreshold2", + "0x005d battery2PercentageThreshold3", + "0x005e battery2AlarmState", + "0x0060 battery3Voltage", + "0x0061 battery3PercentageRemaining", + "0x0070 battery3Manufacturer", + "0x0071 battery3Size", + "0x0072 battery3AHrRating", + "0x0073 battery3Quantity", + "0x0074 battery3RatedVoltage", + "0x0075 battery3AlarmMask", + "0x0076 battery3VoltageMinThreshold", + "0x0077 battery3VoltageThreshold1", + "0x0078 battery3VoltageThreshold2", + "0x0079 battery3VoltageThreshold3", + "0x007a battery3PercentageMinThreshold", + "0x007b battery3PercentageThreshold1", + "0x007c battery3PercentageThreshold2", + "0x007d battery3PercentageThreshold3", + "0x007e battery3AlarmState", + "0x0004 currentFrequency", + "0x0005 minFrequency", + "0x0006 maxFrequency", + "0x000b upgradeActivationPolicy", + "0x000c upgradeTimeoutPolicy", + "0x0034 occupiedSetback", + "0x0035 occupiedSetbackMin", + "0x0036 occupiedSetbackMax", + "0x0037 unoccupiedSetback", + "0x0038 unoccupiedSetbackMin", + "0x0039 unoccupiedSetbackMax", + "0x003a emergencyHeatDelta" + ], + "addedCommands": ["0x08 moveToClosestFrequency", "0x01 fastPollStop", "0x02 setLongPollInterval", "0x03 setShortPollInterval"], + "addedParameters": [ + "0x05 recallScene > transitionTime", + "0x00 moveToLevel > optionsMask", + "0x00 moveToLevel > optionsOverride", + "0x01 move > optionsMask", + "0x01 move > optionsOverride", + "0x02 step > optionsMask", + "0x02 step > optionsOverride", + "0x03 stop > optionsMask", + "0x03 stop > optionsOverride", + "0x04 moveToLevelWithOnOff > optionsMask", + "0x04 moveToLevelWithOnOff > optionsOverride", + "0x05 moveWithOnOff > optionsMask", + "0x05 moveWithOnOff > optionsOverride", + "0x06 stepWithOnOff > optionsMask", + "0x06 stepWithOnOff > optionsOverride", + "0x07 stopWithOnOff > optionsMask", + "0x07 stopWithOnOff > optionsOverride", + "0x08 moveToClosestFrequency > frequency", + "0x00 checkInResponse > startFastPolling", + "0x00 checkInResponse > fastPollTimeout", + "0x02 setLongPollInterval > newLongPollInterval", + "0x03 setShortPollInterval > newShortPollInterval", + "0x00 moveToHue > optionsMask", + "0x00 moveToHue > optionsOverride", + "0x01 moveHue > optionsMask", + "0x01 moveHue > optionsOverride", + "0x02 stepHue > optionsMask", + "0x02 stepHue > optionsOverride", + "0x03 moveToSaturation > optionsMask", + "0x03 moveToSaturation > optionsOverride", + "0x04 moveSaturation > optionsMask", + "0x04 moveSaturation > optionsOverride", + "0x05 stepSaturation > optionsMask", + "0x05 stepSaturation > optionsOverride", + "0x06 moveToHueAndSaturation > optionsMask", + "0x06 moveToHueAndSaturation > optionsOverride", + "0x07 moveToColor > optionsMask", + "0x07 moveToColor > optionsOverride", + "0x08 moveColor > optionsMask", + "0x08 moveColor > optionsOverride", + "0x09 stepColor > optionsMask", + "0x09 stepColor > optionsOverride", + "0x0a moveToColorTemperature > optionsMask", + "0x0a moveToColorTemperature > optionsOverride", + "0x40 enhancedMoveToHue > optionsMask", + "0x40 enhancedMoveToHue > optionsOverride", + "0x41 enhancedMoveHue > optionsMask", + "0x41 enhancedMoveHue > optionsOverride", + "0x42 enhancedStepHue > optionsMask", + "0x42 enhancedStepHue > optionsOverride", + "0x43 enhancedMoveToHueAndSaturation > optionsMask", + "0x43 enhancedMoveToHueAndSaturation > optionsOverride", + "0x44 colorLoopSet > optionsMask", + "0x44 colorLoopSet > optionsOverride", + "0x4b moveColorTemperature > optionsMask", + "0x4b moveColorTemperature > optionsOverride", + "0x4c stepColorTemperature > optionsMask", + "0x4c stepColorTemperature > optionsOverride", + "0x02 initiateTestMode > testModeDuration", + "0x02 initiateTestMode > currentZoneSensitivityLevel", + "0x00 zoneStatusChangeNotification > zoneID", + "0x00 zoneStatusChangeNotification > delay", + "0x01 bypass > armDisarmCode", + "0x00 getProfileInfoResponse > profileCount", + "0x00 getProfileInfoResponse > profileIntervalPeriod", + "0x00 getProfileInfoResponse > maxNumberOfIntervals", + "0x00 getProfileInfoResponse > listOfAttributes", + "0x01 getMeasurementProfileResponse > numberOfIntervalsDelivered", + "0x01 getMeasurementProfileResponse > attributeId", + "0x01 getMeasurementProfileResponse > intervals", + "0x03 deviceInformationResponse > deviceInformationRecordList", + "0x41 getGroupIdentifiersResponse > groupInformationRecordList", + "0x42 getEndpointListResponse > endpointInformationRecordList" + ], + "unknownTypes": ["tldeviceinformationrecord", "tlgroupinformationrecord", "tlendpointinformationrecord"], + "xmlClustersMissingFromTs": [], + "tsClustersMissingFromXml": [ + "0x0007", + "0x000b", + "0x000c", + "0x000d", + "0x000e", + "0x000f", + "0x0010", + "0x0011", + "0x0012", + "0x0013", + "0x0014", + "0x0021", + "0x0022", + "0x0023", + "0x0024", + "0x0407", + "0x0408", + "0x040d", + "0x040e", + "0x040f", + "0x0410", + "0x0411", + "0x0412", + "0x0413", + "0x0414", + "0x0415", + "0x0416", + "0x0417", + "0x0418", + "0x0419", + "0x041a", + "0x041b", + "0x041c", + "0x041d", + "0x041e", + "0x041f", + "0x0420", + "0x0421", + "0x0422", + "0x0423", + "0x0424", + "0x0425", + "0x0426", + "0x0427", + "0x0428", + "0x0429", + "0x042a", + "0x042b", + "0x042c", + "0x042d", + "0x0600", + "0x0601", + "0x0602", + "0x0603", + "0x0604", + "0x0605", + "0x0606", + "0x0607", + "0x0608", + "0x0609", + "0x060a", + "0x060b", + "0x060c", + "0x060d", + "0x060e", + "0x060f", + "0x0610", + "0x0611", + "0x0612", + "0x0613", + "0x0614", + "0x0615", + "0x0617", + "0x0702", + "0x0704", + "0x0900", + "0x0904", + "0x0905", + "0x0b00", + "0x0b01", + "0x0b02", + "0x0b03", + "0x6601", + "0x6602", + "0x6603" + ], + "warnings": [], + "errors": [] +} diff --git a/scripts/zap-update-clusters.ts b/scripts/zap-update-clusters.ts new file mode 100644 index 0000000000..66dcb3c480 --- /dev/null +++ b/scripts/zap-update-clusters.ts @@ -0,0 +1,1520 @@ +/** + * Script: Update cluster.ts with data from ZCL XML files. + * + * Goals: + * - Parse XML cluster definition files (Basic.xml, Time.xml, ElectricalMeasurement.xml, etc.) + * - Respect XSD-described structure (cluster.xsd, type.xsd) + * - Map definitions (with inheritsFrom chains) to base ZCL primitive types + * - Merge new attributes/commands into existing cluster definitions in src/zspec/zcl/definition/cluster.ts + * - Do NOT overwrite existing attributes (comparison by numeric ID) + * - Do NOT overwrite existing command parameters at existing indices (only append missing tail params) + * - Add missing commands (decide placement: commands vs commandsResponse) + * - Preserve existing formatting of cluster.ts as much as possible + * + * Requirements: + * pnpm i xml2js @types/xml2js + * + * Usage: + * tsx scripts/zap-update-clusters.ts ../zap/zcl-builtin/dotdot + */ + +import {promises as fs} from "node:fs"; +import path from "node:path"; +import process from "node:process"; +import ts from "typescript"; +import {parseStringPromise} from "xml2js"; +// biome-ignore lint/correctness/noUnusedImports: reference names (not executed in script context, but helps validation if compiled in-project) +import {BuffaloZclDataType, DataType} from "../src/zspec/zcl/definition/enums.js"; +import {fuzzyMatch} from "./utils.js"; +import {applyXmlOverrides, parseOverrides} from "./zap-xml-clusters-overrides.js"; +import type { + XMLAttributeDefinition, + XMLCluster, + XMLClusterSide, + XMLCommandDefinition, + XMLFieldDefinition, + XMLRoot, + XMLTypeType, +} from "./zap-xml-types.js"; + +// #region Type Definitions + +interface ParsedXMLClusterData { + id: number; + name: string; + attributes: ParsedXMLAttribute[]; + serverCommands: ParsedXMLCommand[]; + clientCommands: ParsedXMLCommand[]; +} + +interface ParsedXMLAttribute { + id: number; + name: string; + dataTypeExpr: string; + meta?: XMLAttributeDefinition; + client?: boolean; +} + +interface ParsedXMLCommand { + id: number; + name: string; + isResponse: boolean; + parameters: ParsedXMLCommandParameter[]; + meta?: XMLCommandDefinition; + client?: boolean; +} + +interface ParsedXMLCommandParameter { + name: string; + dataTypeExpr: string; + meta?: XMLFieldDefinition; + isLength?: boolean; +} + +interface ValidationRecord { + warnings: string[]; + errors: string[]; + unknownTypes: Set; + addedAttributes: string[]; + addedCommands: string[]; + addedParameters: string[]; + scannedClusters: string[]; + changedClusters: string[]; + xmlClustersMissingFromTs: Map; + tsClustersMissingFromXml: string[]; +} + +// #endregion + +// #region Helpers + +function parseAttributeOrCommandId(hexId: string): number { + const clean = hexId.trim().toLowerCase(); + + return Number.parseInt(clean, 16); +} + +function normalizeAttributeOrCommandName(name: string): string { + if (!name) { + return name; + } + + const first = name[0].toLowerCase(); + + return `${first}${name.slice(1)}`.replace(/[^A-Za-z0-9]/g, ""); +} + +function findBestFuzzyAttrMatch( + refName: string, + candidates: ParsedXMLAttribute[], + existingTsNames: Map, + factory: ts.NodeFactory, +): ts.StringLiteral | undefined { + if (candidates.length === 0) { + return undefined; + } + + let bestMatch: {score: number; attribute: ParsedXMLAttribute | undefined} = {score: -1, attribute: undefined}; + const normalizedRefName = normalizeAttributeOrCommandName(refName); + + for (const candidate of candidates) { + const score = fuzzyMatch(normalizedRefName, candidate.name); + + if (score > bestMatch.score) { + bestMatch = {score, attribute: candidate}; + } + } + + if (bestMatch.attribute && bestMatch.score > 0.7) { + // If a match is found, check if it has a corresponding name in the existing TS file. + // If so, use that name. Otherwise, fall back to the normalized XML name. + const tsName = existingTsNames.get(bestMatch.attribute.id); + const finalName = tsName || bestMatch.attribute.name; + + return factory.createStringLiteral(finalName); + } + + return undefined; +} + +function findBestFuzzyParamMatch( + refName: string, + candidates: ParsedXMLCommandParameter[], + existingTsParamNames: Map, + factory: ts.NodeFactory, +): ts.StringLiteral | undefined { + if (candidates.length === 0) { + return undefined; + } + + let bestMatch: {score: number; parameter: ParsedXMLCommandParameter | undefined} = {score: -1, parameter: undefined}; + const normalizedRefName = normalizeAttributeOrCommandName(refName); + + for (const candidate of candidates) { + const score = fuzzyMatch(normalizedRefName, candidate.name); + + if (score > bestMatch.score) { + bestMatch = {score, parameter: candidate}; + } + } + + if (bestMatch.parameter && bestMatch.score > 0.7) { + // If a match is found, check if it has a corresponding name in the existing TS file. + // If so, use that name. Otherwise, fall back to the normalized XML name. + const tsName = existingTsParamNames.get(bestMatch.parameter.name); + const finalName = tsName || bestMatch.parameter.name; + + return factory.createStringLiteral(finalName); + } + + return undefined; +} + +// #endregion + +// #region XML processing + +async function collectFromLibrary(libraryFile: string): Promise<{includeFiles: string[]; libraryTypes: XMLTypeType[]}> { + const txt = await fs.readFile(libraryFile, "utf8"); + + const parsed = (await parseStringPromise(txt, { + explicitArray: true, + preserveChildrenOrder: true, + mergeAttrs: false, + explicitRoot: true, + })) as XMLRoot; + + const includeFiles: string[] = []; + const libraryTypes: XMLTypeType[] = []; + const libs = parsed["zcl:library"]; + + if (libs) { + const libsArray = Array.isArray(libs) ? libs : [libs]; + + for (const lib of libsArray) { + if (lib["type:type"]) { + for (const t of lib["type:type"]) { + libraryTypes.push(t); + } + } + + if (lib["xi:include"]) { + const baseDir = path.dirname(libraryFile); + + for (const inc of lib["xi:include"]) { + const parse = inc.$.parse; + const href = inc.$.href; + + if (parse === "xml" && href.toLowerCase().endsWith(".xml")) { + const full = path.resolve(baseDir, href); + includeFiles.push(full); + } + } + } + } + } + + return {includeFiles, libraryTypes}; +} + +async function parseXMLClusters(file: string): Promise { + const text = await fs.readFile(file, "utf8"); + + const parsed = (await parseStringPromise(text, { + explicitArray: true, + preserveChildrenOrder: true, + mergeAttrs: false, + explicitRoot: true, + })) as XMLRoot; + + const clusters: XMLCluster[] = []; + const baseClusters = parsed["zcl:cluster"]; + // const derivedClusters = parsed["zcl:derivedCluster"]; + + if (baseClusters) { + if (Array.isArray(baseClusters)) { + clusters.push(...baseClusters); + } else { + clusters.push(baseClusters); + } + } + + // if (derivedClusters) { + // if (Array.isArray(derivedClusters)) { + // clusters.push(...derivedClusters); + // } else { + // clusters.push(derivedClusters); + // } + // } + + return clusters; +} + +function processClusterSide( + side: XMLClusterSide | undefined, + isClient: boolean, + resolver: TypeResolver, + validation: ValidationRecord, +): {attributes: ParsedXMLAttribute[]; commands: ParsedXMLCommand[]} { + const attributes: ParsedXMLAttribute[] = []; + const commands: ParsedXMLCommand[] = []; + + if (!side) { + return {attributes, commands}; + } + + if (side.attributes && side.attributes.length > 0) { + const attrs = side.attributes[0].attribute; + + if (attrs) { + for (const a of attrs) { + if (!a?.$?.id) { + continue; + } + + const attrId = parseAttributeOrCommandId(a.$.id); + const attrTypeShortRaw = a.$.type.trim().toLowerCase(); + const baseShort = resolver.resolve(attrTypeShortRaw); + const mappedDataType = mapZclTypeToDataType(baseShort); + + if (mappedDataType === "DataType.UNKNOWN" && attrTypeShortRaw !== "unk") { + validation.unknownTypes.add(attrTypeShortRaw); + } + + const attrName = normalizeAttributeOrCommandName(a.$.name); + const attribute: ParsedXMLAttribute = {id: attrId, name: attrName, dataTypeExpr: mappedDataType, meta: a}; + + if (isClient) { + attribute.client = true; + } + + attributes.push(attribute); + } + } + } + + if (side.commands && side.commands.length > 0) { + const cmds = side.commands[0].command; + + if (cmds) { + for (const cmd of cmds) { + if (!cmd?.$?.id) { + continue; + } + + const cmdId = parseAttributeOrCommandId(cmd.$.id); + const cmdNameRaw = cmd.$.name; + const cmdName = normalizeAttributeOrCommandName(cmdNameRaw); + const parameters: ParsedXMLCommandParameter[] = []; + + if (cmd.fields && cmd.fields.length > 0) { + const fields = cmd.fields[0].field; + + if (fields) { + for (const [paramIndex, fld] of fields.entries()) { + const paramName = normalizeAttributeOrCommandName(fld.$.name); + const typeShortRaw = fld.$.type.trim().toLowerCase(); + const baseShort = resolver.resolve(typeShortRaw); + let mapped = mapZclTypeToDataType(baseShort); + const arrayFlag = fld.$.array === "true"; + + if (mapped === "DataType.UNKNOWN" && typeShortRaw !== "unk") { + validation.unknownTypes.add(typeShortRaw); + } + + if (arrayFlag && !fld.$.arrayLengthSize && !fld.$.arrayLengthField) { + // This field represents an array with an implicit count. + // Create the count parameter. + parameters.push({ + name: `${paramName}Count`, + dataTypeExpr: "DataType.UINT8", // The implicit count is usually UINT8 + meta: fld, // Carry over meta for context, but it's for the count + isLength: true, + }); + + // Now, create the actual array parameter. + mapped = mapToBuffaloZclDataType(mapped); + + parameters.push({ + name: paramName, + dataTypeExpr: mapped, + meta: fld, + }); + } else { + // Original logic for non-arrays or arrays with explicit length fields. + if (arrayFlag) { + mapped = mapToBuffaloZclDataType(mapped); + } + + parameters.push({ + name: paramName || `param${paramIndex}`, + dataTypeExpr: mapped, + meta: fld, + }); + } + } + } + } + + const command: ParsedXMLCommand = {id: cmdId, name: cmdName, isResponse: isClient, parameters, meta: cmd}; + + if (isClient) { + command.client = true; + } + + commands.push(command); + } + } + } + + return {attributes, commands}; +} + +function parseClustersFromXML(list: XMLCluster[], globalResolver: TypeResolver, validation: ValidationRecord): ParsedXMLClusterData[] { + const out: ParsedXMLClusterData[] = []; + + for (const cluster of list) { + const idHex = cluster.$.id; + + if (!idHex) { + continue; + } + + // Create a new resolver for this specific cluster, with the global resolver as its parent. + const clusterResolver = new TypeResolver(globalResolver); + + // Add only this cluster's local types to it. + clusterResolver.add(cluster["type:type"]); + + const idNum = parseAttributeOrCommandId(idHex); + const idHexStr = `0x${idNum.toString(16).padStart(4, "0")}`; + const name = cluster.$.name; + + validation.scannedClusters.push(`${idHexStr} ${name}`); + validation.xmlClustersMissingFromTs.set(idHexStr, `${idHexStr} ${name}`); + + // Process the cluster using its own scoped resolver. + const serverData = processClusterSide(cluster.server?.[0], false, clusterResolver, validation); + const clientData = processClusterSide(cluster.client?.[0], true, clusterResolver, validation); + + out.push({ + id: idNum, + name, + attributes: [...serverData.attributes, ...clientData.attributes], + serverCommands: serverData.commands, + clientCommands: clientData.commands, + }); + } + + return out; +} + +// #endregion + +// #region Mapping types + +class TypeResolver { + #map: Map; + #parent?: TypeResolver; + + constructor(parent?: TypeResolver) { + this.#map = new Map(); + this.#parent = parent; + } + + add(types: XMLTypeType[] | undefined): void { + if (!types) { + return; + } + + for (const t of types) { + const short = t.$.short.trim().toLowerCase(); + const inheritsFrom = t.$.inheritsFrom ? t.$.inheritsFrom.trim().toLowerCase() : undefined; + + if (!this.#map.has(short)) { + this.#map.set(short, inheritsFrom); + } + } + } + + resolve(short: string): string { + if (this.#map.has(short)) { + return this.#map.get(short) ?? short; + } + + return this.#parent?.resolve(short) ?? "unk"; + } +} + +function mapZclTypeToDataType(base: string): string { + const t = base.toLowerCase(); + + if (t === "data8") return "DataType.DATA8"; + if (t === "data16") return "DataType.DATA16"; + if (t === "data24") return "DataType.DATA24"; + if (t === "data32") return "DataType.DATA32"; + if (t === "data40") return "DataType.DATA40"; + if (t === "data48") return "DataType.DATA48"; + if (t === "data56") return "DataType.DATA56"; + if (t === "data64") return "DataType.DATA64"; + + if (t === "bool") return "DataType.BOOLEAN"; + + if (t === "map8") return "DataType.BITMAP8"; + if (t === "map16") return "DataType.BITMAP16"; + if (t === "map24") return "DataType.BITMAP24"; + if (t === "map32") return "DataType.BITMAP32"; + if (t === "map40") return "DataType.BITMAP40"; + if (t === "map48") return "DataType.BITMAP48"; + if (t === "map56") return "DataType.BITMAP56"; + if (t === "map64") return "DataType.BITMAP64"; + + if (t === "uint8") return "DataType.UINT8"; + if (t === "uint16") return "DataType.UINT16"; + if (t === "uint24") return "DataType.UINT24"; + if (t === "uint32") return "DataType.UINT32"; + if (t === "uint40") return "DataType.UINT40"; + if (t === "uint48") return "DataType.UINT48"; + if (t === "uint56") return "DataType.UINT56"; + if (t === "uint64") return "DataType.UINT64"; + + if (t === "int8") return "DataType.INT8"; + if (t === "int16") return "DataType.INT16"; + if (t === "int24") return "DataType.INT24"; + if (t === "int32") return "DataType.INT32"; + if (t === "int40") return "DataType.INT40"; + if (t === "int48") return "DataType.INT48"; + if (t === "int56") return "DataType.INT56"; + if (t === "int64") return "DataType.INT64"; + + if (t === "enum8") return "DataType.ENUM8"; + if (t === "enum16") return "DataType.ENUM16"; + + if (t === "semi") return "DataType.SEMI_PREC"; + if (t === "single") return "DataType.SINGLE_PREC"; + if (t === "double") return "DataType.DOUBLE_PREC"; + + if (t === "octstr") return "DataType.OCTET_STR"; + if (t === "string") return "DataType.CHAR_STR"; + if (t === "octstr16") return "DataType.LONG_OCTET_STR"; + if (t === "string16") return "DataType.LONG_CHAR_STR"; + + if (t === "array") return "DataType.ARRAY"; + if (t === "struct") return "DataType.STRUCT"; + + if (t === "set") return "DataType.SET"; + if (t === "bag") return "DataType.BAG"; + + if (t === "tod") return "DataType.TOD"; + if (t === "date") return "DataType.DATE"; + if (t === "utc") return "DataType.UTC"; + + if (t === "clusterid") return "DataType.CLUSTER_ID"; + if (t === "attribid") return "DataType.ATTR_ID"; + if (t === "bacoid") return "DataType.BAC_OID"; + + if (t === "eui64") return "DataType.IEEE_ADDR"; + if (t === "key128") return "DataType.SEC_KEY"; + + if (t === "unk") return "DataType.UNKNOWN"; + if (t === "zcltype") return "DataType.ZCLTYPE"; + if (t === "attributereportingstatus") return "DataType.ENUM8"; + if (t === "zclstatus") return "DataType.ENUM8"; + if (t === "profileintervalperiod") return "DataType.ENUM8"; + if (t === "iaszonetype") return "DataType.ENUM16"; + if (t === "iaszonestatus") return "DataType.BITMAP16"; + + if (t === "sextensionfieldsetlist") return "BuffaloZclDataType.EXTENSION_FIELD_SETS"; + if (t === "transitiontype") return "BuffaloZclDataType.LIST_THERMO_TRANSITIONS"; + if (t === "iasacezonestatusrecord") return "BuffaloZclDataType.LIST_ZONEINFO"; + + return "DataType.UNKNOWN"; +} + +function isNumericDataType(dataTypeExpr: string): boolean { + switch (dataTypeExpr) { + case "DataType.DATA8": + case "DataType.DATA16": + case "DataType.DATA24": + case "DataType.DATA32": + case "DataType.DATA40": + case "DataType.DATA48": + case "DataType.DATA56": + case "DataType.DATA64": + case "DataType.BOOLEAN": + case "DataType.BITMAP8": + case "DataType.BITMAP16": + case "DataType.BITMAP24": + case "DataType.BITMAP32": + case "DataType.BITMAP40": + case "DataType.BITMAP48": + case "DataType.BITMAP56": + case "DataType.BITMAP64": + case "DataType.UINT8": + case "DataType.UINT16": + case "DataType.UINT24": + case "DataType.UINT32": + case "DataType.UINT40": + case "DataType.UINT48": + case "DataType.UINT56": + case "DataType.UINT64": + case "DataType.INT8": + case "DataType.INT16": + case "DataType.INT24": + case "DataType.INT32": + case "DataType.INT40": + case "DataType.INT48": + case "DataType.INT56": + case "DataType.INT64": + case "DataType.ENUM8": + case "DataType.ENUM16": + case "DataType.SEMI_PREC": + case "DataType.SINGLE_PREC": + case "DataType.DOUBLE_PREC": + case "DataType.CLUSTER_ID": + case "DataType.ATTR_ID": + case "DataType.BAC_OID": + case "DataType.UTC": + return true; + default: + return false; + } +} + +function mapToBuffaloZclDataType(base: string): string { + if (base === "DataType.UINT8") return "BuffaloZclDataType.LIST_UINT8"; + if (base === "DataType.UINT16") return "BuffaloZclDataType.LIST_UINT16"; + if (base === "DataType.UINT24") return "BuffaloZclDataType.LIST_UINT24"; + if (base === "DataType.UINT32") return "BuffaloZclDataType.LIST_UINT32"; + if (base.startsWith("DataType")) return "BuffaloZclDataType.BUFFER"; + + return base; +} + +// #endregion + +// #region AST Transformer + +const findProperty = (obj: ts.ObjectLiteralExpression, name: string): ts.PropertyAssignment | undefined => { + for (const p of obj.properties) { + if (ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.text === name) { + return p; + } + } + + return undefined; +}; + +const extractNumericId = (node: ts.Node): number | undefined => { + if (!ts.isPropertyAssignment(node)) { + return undefined; + } + + if (!ts.isObjectLiteralExpression(node.initializer)) { + return undefined; + } + + const idProp = findProperty(node.initializer, "ID"); + + if (!idProp) { + return undefined; + } + + const initializer = idProp.initializer; + + if (ts.isNumericLiteral(initializer)) { + const text = initializer.text; + + return text.startsWith("0x") ? Number.parseInt(text, 16) : Number(text); + } + + if (ts.isPrefixUnaryExpression(initializer) && ts.isNumericLiteral(initializer.operand)) { + const text = initializer.operand.text; + const num = text.startsWith("0x") ? Number.parseInt(text, 16) : Number(text); + + return -num; + } + + return undefined; +}; + +function createSafeNumericLiteral(value: string | number, factory: ts.NodeFactory): ts.Expression { + const num = Number(value); + + if (Number.isNaN(num)) { + // Fallback for invalid numbers, though this case should be rare. + return factory.createNumericLiteral(0); + } + + if (num < 0) { + return factory.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, factory.createNumericLiteral(Math.abs(num))); + } + + return factory.createNumericLiteral(num); +} + +function getExistingTsAttributeNames(attributesProp: ts.PropertyAssignment | undefined): Map { + const existingTsNames = new Map(); + + if (!attributesProp || !ts.isObjectLiteralExpression(attributesProp.initializer)) { + return existingTsNames; + } + + for (const attr of attributesProp.initializer.properties) { + if (ts.isPropertyAssignment(attr)) { + const id = extractNumericId(attr); + + if (id !== undefined && ts.isIdentifier(attr.name) && !existingTsNames.has(id)) { + existingTsNames.set(id, attr.name.text); + } + } + } + + return existingTsNames; +} + +function createUpdateTransformer( + xmlClusterData: Map, + validation: ValidationRecord, +): ts.TransformerFactory { + return (context) => { + const factory = context.factory; + + const visitor: ts.Visitor = (node) => { + if ( + ts.isVariableDeclaration(node) && + ts.isIdentifier(node.name) && + node.name.text === "Clusters" && + node.initializer && + ts.isObjectLiteralExpression(node.initializer) + ) { + const tsClusterIds = new Set(); + const newClusterProps: ts.ObjectLiteralElementLike[] = []; + + for (const prop of node.initializer.properties) { + if (!ts.isPropertyAssignment(prop) || !ts.isObjectLiteralExpression(prop.initializer)) { + newClusterProps.push(prop); + + continue; + } + + const clusterId = extractNumericId(prop); + + if (clusterId !== undefined) { + tsClusterIds.add(clusterId); + } else { + newClusterProps.push(prop); + + continue; + } + + const xmlCluster = xmlClusterData.get(clusterId); + + if (!xmlCluster) { + newClusterProps.push(prop); + + continue; + } + + const clusterIdHexStr = `0x${clusterId.toString(16).padStart(4, "0")}`; + + validation.xmlClustersMissingFromTs.delete(clusterIdHexStr); // Found it + + let changed = false; + const newSubProps: ts.ObjectLiteralElementLike[] = []; + const subPropsMap = new Map(); + + for (const subProp of prop.initializer.properties) { + if (ts.isPropertyAssignment(subProp) && ts.isIdentifier(subProp.name)) { + subPropsMap.set(subProp.name.text, subProp); + } + } + + const attributesProp = subPropsMap.get("attributes"); + const existingTsAttributeNames = getExistingTsAttributeNames(attributesProp); + + for (const subProp of prop.initializer.properties) { + if (!ts.isPropertyAssignment(subProp) || !ts.isIdentifier(subProp.name)) { + newSubProps.push(subProp); + + continue; + } + + if (!ts.isObjectLiteralExpression(subProp.initializer)) { + newSubProps.push(subProp); + + continue; + } + + const subPropName = subProp.name.text; + let updatedProp: ts.PropertyAssignment | undefined; + + if (subPropName === "attributes") { + updatedProp = updateAttributes(subProp, xmlCluster.attributes, factory, validation); + } else if (subPropName === "commands") { + updatedProp = updateCommands( + subProp, + xmlCluster.serverCommands, + xmlCluster.attributes, + existingTsAttributeNames, + false, + factory, + validation, + ); + } else if (subPropName === "commandsResponse") { + updatedProp = updateCommands( + subProp, + xmlCluster.clientCommands, + xmlCluster.attributes, + existingTsAttributeNames, + true, + factory, + validation, + ); + } + + if (updatedProp && updatedProp !== subProp) { + changed = true; + + newSubProps.push(updatedProp); + } else { + newSubProps.push(subProp); + } + } + + if (changed) { + validation.changedClusters.push(`${clusterIdHexStr} ${xmlCluster.name}`); + const updatedInitializer = factory.updateObjectLiteralExpression(prop.initializer, newSubProps); + const updatedProperty = factory.updatePropertyAssignment(prop, prop.name, updatedInitializer); + + newClusterProps.push(updatedProperty); + } else { + newClusterProps.push(prop); + } + } + + // Populate clusters present in TS but not in XML + for (const id of tsClusterIds) { + if (!xmlClusterData.has(id) && id <= 0x7fff /* std cluster */) { + validation.tsClustersMissingFromXml.push(`0x${id.toString(16).padStart(4, "0")}`); + } + } + + const updatedInitializer = factory.updateObjectLiteralExpression(node.initializer, newClusterProps); + + return factory.updateVariableDeclaration(node, node.name, node.exclamationToken, node.type, updatedInitializer); + } + + return ts.visitEachChild(node, visitor, context); + }; + + return (sourceFile) => ts.visitNode(sourceFile, visitor) as ts.SourceFile; + }; +} + +function createHexIdTransformer(): ts.TransformerFactory { + return (context) => { + const factory = context.factory; + const visitor: ts.Visitor = (node) => { + if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name) && node.name.text === "ID" && ts.isNumericLiteral(node.initializer)) { + const num = Number(node.initializer.text); + + if (!Number.isNaN(num) && !node.initializer.text.startsWith("0x")) { + let pad = 4; // Default to 4 for clusters and attributes + let current: ts.Node = node.parent; + + // Traverse up to find if the ID is inside a `commands` or `commandsResponse` block. + while (current?.parent) { + if (ts.isPropertyAssignment(current.parent) && ts.isIdentifier(current.parent.name)) { + const parentName = current.parent.name.text; + + if (parentName === "commands" || parentName === "commandsResponse") { + pad = 2; + break; + } + } + + current = current.parent; + } + + const hex = `0x${num.toString(16).padStart(pad, "0")}`; + + return factory.updatePropertyAssignment(node, node.name, factory.createNumericLiteral(hex)); + } + } + + return ts.visitEachChild(node, visitor, context); + }; + + return (sourceFile) => ts.visitNode(sourceFile, visitor) as ts.SourceFile; + }; +} + +function updateAttributes( + attributesProp: ts.PropertyAssignment, + xmlAttributes: ParsedXMLAttribute[], + factory: ts.NodeFactory, + validation: ValidationRecord, +): ts.PropertyAssignment { + const initializer = attributesProp.initializer as ts.ObjectLiteralExpression; + const existingTsAttributes = new Map(); + const existingTsNames = new Map(); + + for (const attr of initializer.properties) { + if (ts.isPropertyAssignment(attr)) { + const id = extractNumericId(attr); + + if (id !== undefined) { + if (!existingTsAttributes.has(id)) { + existingTsAttributes.set(id, []); + } + + // biome-ignore lint/style/noNonNullAssertion: set above if not exist + existingTsAttributes.get(id)!.push(attr); + + if (ts.isIdentifier(attr.name) && !existingTsNames.has(id)) { + existingTsNames.set(id, attr.name.text); + } + } + } + } + + const finalAttributes: ts.PropertyAssignment[] = []; + const processedTsNodes = new Set(); + + for (const xmlAttr of xmlAttributes) { + const existingNodesWithId = existingTsAttributes.get(xmlAttr.id) || []; + let existingAttrNode: ts.PropertyAssignment | undefined; + + for (const node of existingNodesWithId) { + const initializer = node.initializer as ts.ObjectLiteralExpression; + const manuCodeProp = findProperty(initializer, "manufacturerCode"); + + if (!manuCodeProp) { + existingAttrNode = node; + + break; + } + } + + const attributeName = existingAttrNode ? (existingAttrNode.name as ts.Identifier) : factory.createIdentifier(xmlAttr.name); + const existingProps = + existingAttrNode && ts.isObjectLiteralExpression(existingAttrNode.initializer) ? [...existingAttrNode.initializer.properties] : []; + const existingPropNames = new Set(); + + for (const p of existingProps) { + if (p.name && ts.isIdentifier(p.name)) { + existingPropNames.add(p.name.text); + } + } + + const propsToAdd: ts.PropertyAssignment[] = []; + + // Unified logic to build required properties + if (xmlAttr.meta) { + const meta = xmlAttr.meta.$; + + if (xmlAttr.client && !existingPropNames.has("client")) { + propsToAdd.push(factory.createPropertyAssignment("client", factory.createTrue())); + } + + if (meta.readable === "false" && !existingPropNames.has("read")) { + propsToAdd.push(factory.createPropertyAssignment("read", factory.createFalse())); + } + + if (meta.writable === "true" && !existingPropNames.has("write")) { + propsToAdd.push(factory.createPropertyAssignment("write", factory.createTrue())); + } + + if (meta.writeOptional === "true" && !existingPropNames.has("writeOptional")) { + propsToAdd.push(factory.createPropertyAssignment("writeOptional", factory.createTrue())); + } + + if (meta.reportRequired === "true" && !existingPropNames.has("report")) { + propsToAdd.push(factory.createPropertyAssignment("report", factory.createTrue())); + } + + if (meta.sceneRequired === "true" && !existingPropNames.has("scene")) { + propsToAdd.push(factory.createPropertyAssignment("scene", factory.createTrue())); + } + + if (meta.required === "true" && !existingPropNames.has("required")) { + propsToAdd.push(factory.createPropertyAssignment("required", factory.createTrue())); + } + + if (meta.min && !existingPropNames.has("min")) { + // skip when too long for number format (not especially useful anyway for these types) + if (xmlAttr.dataTypeExpr !== "DataType.IEEE_ADDR" && xmlAttr.dataTypeExpr !== "DataType.SEC_KEY") { + propsToAdd.push(factory.createPropertyAssignment("min", createSafeNumericLiteral(meta.min, factory))); + } + } + + if (meta.max && !existingPropNames.has("max")) { + // skip when too long for number format (not especially useful anyway for these types) + if (xmlAttr.dataTypeExpr !== "DataType.IEEE_ADDR" && xmlAttr.dataTypeExpr !== "DataType.SEC_KEY") { + propsToAdd.push(factory.createPropertyAssignment("max", createSafeNumericLiteral(meta.max, factory))); + } + } + + if (meta.default != null && !existingPropNames.has("default")) { + if (isNumericDataType(xmlAttr.dataTypeExpr)) { + propsToAdd.push(factory.createPropertyAssignment("default", createSafeNumericLiteral(meta.default, factory))); + } else { + propsToAdd.push(factory.createPropertyAssignment("default", factory.createStringLiteral(meta.default))); + } + } + + if (meta.defaultRef && !existingPropNames.has("defaultRef")) { + const otherAttributes = xmlAttributes.filter((a) => a.id !== xmlAttr.id); + const matched = findBestFuzzyAttrMatch(meta.defaultRef, otherAttributes, existingTsNames, factory); + + if (!matched) { + console.log(`\x1b[31mCould not find match for attribute ${meta.defaultRef}.\x1b[0m`); + } + + propsToAdd.push( + factory.createPropertyAssignment( + "defaultRef", + matched ?? factory.createStringLiteral(normalizeAttributeOrCommandName(meta.defaultRef)), + ), + ); + } + } + + if (xmlAttr.meta?.restriction?.[0]) { + const restriction = xmlAttr.meta.restriction[0]; + const otherAttributes = xmlAttributes.filter((a) => a.id !== xmlAttr.id); + const restrictionFacets: {name: string; value: string | {name: string; value: string}[] | undefined; isRef?: boolean}[] = [ + {name: "length", value: restriction["type:length"]?.[0]?.$?.value}, + {name: "minLen", value: restriction["type:minLength"]?.[0]?.$?.value}, + {name: "maxLen", value: restriction["type:maxLength"]?.[0]?.$?.value}, + {name: "minExcl", value: restriction["type:minExclusive"]?.[0]?.$?.value}, + {name: "min", value: restriction["type:minInclusive"]?.[0]?.$?.value}, + {name: "maxExcl", value: restriction["type:maxExclusive"]?.[0]?.$?.value}, + {name: "max", value: restriction["type:maxInclusive"]?.[0]?.$?.value}, + {name: "minRef", value: restriction["type:minInclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "minExclRef", value: restriction["type:minExclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "maxRef", value: restriction["type:maxInclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "maxExclRef", value: restriction["type:maxExclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "special", value: restriction["type:special"]?.map((s) => s.$)}, + ]; + + for (const facet of restrictionFacets) { + if (facet.value && !existingPropNames.has(facet.name)) { + if (facet.name === "special" && Array.isArray(facet.value)) { + const specialArray = factory.createArrayLiteralExpression( + facet.value.map((s) => + factory.createArrayLiteralExpression([factory.createStringLiteral(s.name), factory.createStringLiteral(s.value)]), + ), + true, + ); + + propsToAdd.push(factory.createPropertyAssignment(facet.name, specialArray)); + } else if (typeof facet.value === "string") { + if (facet.isRef) { + const matched = findBestFuzzyAttrMatch(facet.value, otherAttributes, existingTsNames, factory); + + if (!matched) { + console.log(`\x1b[31mCould not find match for attribute ${facet.value}.\x1b[0m`); + } + + propsToAdd.push( + factory.createPropertyAssignment( + facet.name, + matched ?? factory.createStringLiteral(normalizeAttributeOrCommandName(facet.value)), + ), + ); + } else { + if (facet.name === "minLength" && facet.value === "0") { + continue; + } + + propsToAdd.push(factory.createPropertyAssignment(facet.name, createSafeNumericLiteral(facet.value, factory))); + } + } + } + } + } + + let finalNode: ts.PropertyAssignment; + + if (existingAttrNode) { + processedTsNodes.add(existingAttrNode); + const finalProps = [...existingProps, ...propsToAdd]; + const finalInitializer = factory.updateObjectLiteralExpression(existingAttrNode.initializer as ts.ObjectLiteralExpression, finalProps); + finalNode = factory.updatePropertyAssignment(existingAttrNode, attributeName, finalInitializer); + } else { + validation.addedAttributes.push(`0x${xmlAttr.id.toString(16).padStart(4, "0")} ${xmlAttr.name}`); + const typeIdentifierParts = xmlAttr.dataTypeExpr.split("."); + const typeIdentifier = + typeIdentifierParts.length > 1 + ? factory.createPropertyAccessExpression(factory.createIdentifier(typeIdentifierParts[0]), typeIdentifierParts[1]) + : factory.createIdentifier(xmlAttr.dataTypeExpr); + const finalProps = [ + factory.createPropertyAssignment("ID", factory.createNumericLiteral(String(xmlAttr.id))), + factory.createPropertyAssignment("type", typeIdentifier), + ...propsToAdd, + ]; + const finalInitializer = factory.createObjectLiteralExpression(finalProps, true); + finalNode = factory.createPropertyAssignment(attributeName, finalInitializer); + } + + finalAttributes.push(finalNode); + } + + // Add back any TS-only attributes that were not processed + for (const nodes of existingTsAttributes.values()) { + for (const node of nodes) { + if (!processedTsNodes.has(node)) { + finalAttributes.push(node); + } + } + } + + finalAttributes.sort((a, b) => { + const idA = extractNumericId(a) ?? -1; + const idB = extractNumericId(b) ?? -1; + + if (idA !== idB) { + return idA - idB; + } + + // If IDs are the same, check for manufacturerCode to sort standard attributes first + const initA = a.initializer as ts.ObjectLiteralExpression; + const initB = b.initializer as ts.ObjectLiteralExpression; + const hasManuA = findProperty(initA, "manufacturerCode") !== undefined; + const hasManuB = findProperty(initB, "manufacturerCode") !== undefined; + + if (hasManuA && !hasManuB) { + return 1; + } + + if (!hasManuA && hasManuB) { + return -1; + } + + return 0; + }); + + const updatedInitializer = factory.updateObjectLiteralExpression(initializer, finalAttributes); + + return factory.updatePropertyAssignment(attributesProp, attributesProp.name, updatedInitializer); +} + +function updateCommands( + commandsProp: ts.PropertyAssignment, + xmlCommands: ParsedXMLCommand[], + xmlAttributes: ParsedXMLAttribute[], + existingTsAttributeNames: Map, + isResponse: boolean, + factory: ts.NodeFactory, + validation: ValidationRecord, +): ts.PropertyAssignment { + const initializer = commandsProp.initializer as ts.ObjectLiteralExpression; + const existingCommandIds = new Map(); + + for (const cmd of initializer.properties) { + if (ts.isPropertyAssignment(cmd)) { + const id = extractNumericId(cmd); + + if (id !== undefined) { + if (!existingCommandIds.has(id)) { + existingCommandIds.set(id, []); + } + + // biome-ignore lint/style/noNonNullAssertion: set above if not exist + existingCommandIds.get(id)!.push(cmd); + } + } + } + + const finalCommands: ts.PropertyAssignment[] = []; + const xmlCommandsForScope: ParsedXMLCommand[] = []; + + for (const cmd of xmlCommands) { + if (cmd.isResponse === isResponse) { + xmlCommandsForScope.push(cmd); + } + } + + const processedTsNodes = new Set(); + + for (const xmlCmd of xmlCommandsForScope) { + const existingCmdNodes = existingCommandIds.get(xmlCmd.id); + let existingCmdNode: ts.PropertyAssignment | undefined; + + if (existingCmdNodes) { + if (existingCmdNodes.length === 1) { + existingCmdNode = existingCmdNodes[0]; + } else if (existingCmdNodes.length > 1) { + let bestMatch: {score: number; node: ts.PropertyAssignment | undefined} = {score: -1, node: undefined}; + + for (const node of existingCmdNodes) { + const nodeName = ts.isIdentifier(node.name) ? node.name.text : ""; + const score = fuzzyMatch(xmlCmd.name, nodeName); + + if (score > bestMatch.score) { + bestMatch = {score, node}; + } + } + + existingCmdNode = bestMatch.node; + } + } + + const commandName = existingCmdNode ? existingCmdNode.name : factory.createIdentifier(xmlCmd.name); + const existingCmdProps = + existingCmdNode && ts.isObjectLiteralExpression(existingCmdNode.initializer) ? [...existingCmdNode.initializer.properties] : []; + const existingCmdPropNames = new Set(); + + for (const p of existingCmdProps) { + if (p.name && ts.isIdentifier(p.name)) { + existingCmdPropNames.add(p.name.text); + } + } + + // --- Unified Parameter Logic --- + const paramsProp = existingCmdNode ? findProperty(existingCmdNode.initializer as ts.ObjectLiteralExpression, "parameters") : undefined; + const existingParamsArray: ts.ObjectLiteralExpression[] = []; + const existingTsParamNames = new Map(); // Map from normalized XML name to TS name + + if (paramsProp && ts.isArrayLiteralExpression(paramsProp.initializer)) { + for (const [i, el] of paramsProp.initializer.elements.entries()) { + if (ts.isObjectLiteralExpression(el)) { + existingParamsArray.push(el); + const nameProp = findProperty(el, "name"); + + if (nameProp && ts.isStringLiteral(nameProp.initializer) && xmlCmd.parameters[i]) { + existingTsParamNames.set(xmlCmd.parameters[i].name, nameProp.initializer.text); + } + } + } + } + + const newParams: ts.ObjectLiteralExpression[] = []; + const maxParams = Math.max(xmlCmd.parameters.length, existingParamsArray.length); + + for (let i = 0; i < maxParams; i++) { + const xmlParam = xmlCmd.parameters[i]; + const existingParamExpr = existingParamsArray[i]; + + if (!xmlParam && existingParamExpr) { + newParams.push(existingParamExpr); + + continue; + } + + if (!xmlParam) { + continue; + } + + const existingParamProps = existingParamExpr ? [...existingParamExpr.properties] : []; + const existingParamPropNames = new Set(existingParamProps.flatMap((p) => (p.name && ts.isIdentifier(p.name) ? [p.name.text] : []))); + const paramPropsToAdd: ts.PropertyAssignment[] = []; + const otherParams = xmlCmd.parameters.filter((_p, index) => index !== i); + + // Add name/type if missing + if (!existingParamPropNames.has("name")) { + paramPropsToAdd.push(factory.createPropertyAssignment("name", factory.createStringLiteral(xmlParam.name))); + } + + if (!existingParamPropNames.has("type")) { + const typeIdentifierParts = xmlParam.dataTypeExpr.split("."); + const typeIdentifier = + typeIdentifierParts.length > 1 + ? factory.createPropertyAccessExpression(factory.createIdentifier(typeIdentifierParts[0]), typeIdentifierParts[1]) + : factory.createIdentifier(xmlParam.dataTypeExpr); + + paramPropsToAdd.push(factory.createPropertyAssignment("type", typeIdentifier)); + } + + // Add metadata + if (xmlParam.meta?.$.arrayLengthSize && !existingParamPropNames.has("arrayLengthSize")) { + paramPropsToAdd.push( + factory.createPropertyAssignment("arrayLengthSize", factory.createNumericLiteral(xmlParam.meta.$.arrayLengthSize)), + ); + } + + if (xmlParam.meta?.$.arrayLengthField && !existingParamPropNames.has("arrayLengthField")) { + const matched = findBestFuzzyParamMatch(xmlParam.meta.$.arrayLengthField, otherParams, existingTsParamNames, factory); + + if (!matched) { + console.log(`\x1b[31mCould not find match for parameter ${xmlParam.meta.$.arrayLengthField}.\x1b[0m`); + } + + paramPropsToAdd.push( + factory.createPropertyAssignment( + "arrayLengthField", + matched ?? factory.createStringLiteral(normalizeAttributeOrCommandName(xmlParam.meta.$.arrayLengthField)), + ), + ); + } + + // Add all restrictions ("..Count" params don't have metas) + if (xmlParam.meta?.restriction?.[0] && !xmlParam.isLength) { + const restriction = xmlParam.meta.restriction[0]; + const restrictionFacets: {name: string; value: string | {name: string; value: string}[] | undefined; isRef?: boolean}[] = [ + {name: "length", value: restriction["type:length"]?.[0]?.$?.value}, + {name: "minLen", value: restriction["type:minLength"]?.[0]?.$?.value}, + {name: "maxLen", value: restriction["type:maxLength"]?.[0]?.$?.value}, + {name: "minExcl", value: restriction["type:minExclusive"]?.[0]?.$?.value}, + {name: "min", value: restriction["type:minInclusive"]?.[0]?.$?.value}, + {name: "maxExcl", value: restriction["type:maxExclusive"]?.[0]?.$?.value}, + {name: "max", value: restriction["type:maxInclusive"]?.[0]?.$?.value}, + {name: "minRef", value: restriction["type:minInclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "minExclRef", value: restriction["type:minExclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "maxRef", value: restriction["type:maxInclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "maxExclRef", value: restriction["type:maxExclusiveRef"]?.[0]?.$?.ref, isRef: true}, + {name: "special", value: restriction["type:special"]?.map((s) => s.$)}, + ]; + + for (const facet of restrictionFacets) { + if (facet.value && !existingParamPropNames.has(facet.name)) { + if (facet.name === "special" && Array.isArray(facet.value)) { + const specialArray = factory.createArrayLiteralExpression( + facet.value.map((s) => + factory.createArrayLiteralExpression([factory.createStringLiteral(s.name), factory.createStringLiteral(s.value)]), + ), + true, + ); + paramPropsToAdd.push(factory.createPropertyAssignment(facet.name, specialArray)); + } else if (typeof facet.value === "string") { + if (facet.isRef) { + let matched = findBestFuzzyAttrMatch(facet.value, xmlAttributes, existingTsAttributeNames, factory); + + if (!matched) { + matched = findBestFuzzyParamMatch(facet.value, otherParams, existingTsParamNames, factory); + } + + if (!matched) { + console.log(`\x1b[31mCould not find match for ref ${facet.value}.\x1b[0m`); + } + + paramPropsToAdd.push( + factory.createPropertyAssignment( + facet.name, + matched ?? factory.createStringLiteral(normalizeAttributeOrCommandName(facet.value)), + ), + ); + } else { + // a few entries are in hex form like "fd", this is obviously flawed, entries that are too complex should be overriden instead + if (facet.value.match(/^[0-9]+$/)) { + paramPropsToAdd.push( + factory.createPropertyAssignment(facet.name, createSafeNumericLiteral(facet.value, factory)), + ); + } else if (facet.value.match(/^[0-9a-fA-F]+$/)) { + console.log(`\x1b[33mWriting ${JSON.stringify(facet)} as hex number\x1b[0m`); + paramPropsToAdd.push( + factory.createPropertyAssignment(facet.name, createSafeNumericLiteral(`0x${facet.value}`, factory)), + ); + } + } + } + } + } + } + + if (existingParamExpr) { + newParams.push(factory.updateObjectLiteralExpression(existingParamExpr, [...existingParamProps, ...paramPropsToAdd])); + } else { + validation.addedParameters.push(`0x${xmlCmd.id.toString(16).padStart(2, "0")} ${xmlCmd.name} > ${xmlParam.name}`); + newParams.push(factory.createObjectLiteralExpression(paramPropsToAdd, true)); + } + } + // --- End Unified Parameter Logic --- + + const cmdPropsToAdd: ts.PropertyAssignment[] = []; + + cmdPropsToAdd.push(factory.createPropertyAssignment("parameters", factory.createArrayLiteralExpression(newParams, true))); + + if (xmlCmd.meta?.$.required === "true" && !existingCmdPropNames.has("required")) { + cmdPropsToAdd.push(factory.createPropertyAssignment("required", factory.createTrue())); + } + + let finalNode: ts.PropertyAssignment; + + if (existingCmdNode) { + processedTsNodes.add(existingCmdNode); + + const finalProps = [...existingCmdProps]; + + for (const propToAdd of cmdPropsToAdd) { + const propName = (propToAdd.name as ts.Identifier).text; + const existingIndex = finalProps.findIndex((p) => ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.text === propName); + + if (existingIndex !== -1) { + finalProps[existingIndex] = propToAdd; + } else { + finalProps.push(propToAdd); + } + } + + const finalInitializer = factory.updateObjectLiteralExpression(existingCmdNode.initializer as ts.ObjectLiteralExpression, finalProps); + finalNode = factory.updatePropertyAssignment(existingCmdNode, commandName, finalInitializer); + } else { + const hexId = `0x${xmlCmd.id.toString(16).padStart(2, "0")}`; + + validation.addedCommands.push(`${hexId} ${xmlCmd.name}`); + + const finalProps = [factory.createPropertyAssignment("ID", factory.createNumericLiteral(hexId)), ...cmdPropsToAdd]; + const finalInitializer = factory.createObjectLiteralExpression(finalProps, true); + finalNode = factory.createPropertyAssignment(commandName, finalInitializer); + } + + finalCommands.push(finalNode); + } + + // Add back any TS-only commands + for (const tsOnlyCmds of existingCommandIds.values()) { + for (const tsOnlyCmd of tsOnlyCmds) { + if (!processedTsNodes.has(tsOnlyCmd)) { + finalCommands.push(tsOnlyCmd); + } + } + } + + finalCommands.sort((a, b) => { + const idA = extractNumericId(a) ?? -1; + const idB = extractNumericId(b) ?? -1; + + return idA - idB; + }); + + const updatedInitializer = factory.updateObjectLiteralExpression(initializer, finalCommands); + + return factory.updatePropertyAssignment(commandsProp, commandsProp.name, updatedInitializer); +} + +// #endregion + +// #region Main + +async function main(): Promise { + const args = process.argv.slice(2); + + if (args.length !== 1) { + throw new Error("Usage: tsx scripts/zap-update-clusters.ts "); + } + + const xmlPath = args[0]; + const clusterFile = "src/zspec/zcl/definition/cluster.ts"; + const overridesFile = "scripts/zap-xml-clusters-overrides-data.ts"; + const validation: ValidationRecord = { + warnings: [], + errors: [], + unknownTypes: new Set(), + addedAttributes: [], + addedCommands: [], + addedParameters: [], + scannedClusters: [], + changedClusters: [], + xmlClustersMissingFromTs: new Map(), + tsClustersMissingFromXml: [], + }; + const allXmlClusters: XMLCluster[] = []; + + const globalResolver = new TypeResolver(); + const libraryPath = path.join(xmlPath, "library.xml"); + + try { + // Collect all data and types first. + const {includeFiles, libraryTypes} = await collectFromLibrary(libraryPath); + + globalResolver.add(libraryTypes); // Populate the global resolver. + + for (const f of includeFiles) { + if (!f.toLowerCase().endsWith(".xml")) { + continue; + } + try { + const clusters = await parseXMLClusters(f); + allXmlClusters.push(...clusters); + } catch (e) { + validation.errors.push(`Failed parsing XML ${f}: ${(e as Error).message}`); + } + } + } catch (e) { + throw new Error(`Unable to process library file at ${libraryPath}: ${(e as Error).message}`); + } + + const overridesFileContent = await fs.readFile(overridesFile, "utf8"); + const overridesSourceFile = ts.createSourceFile(overridesFile, overridesFileContent, ts.ScriptTarget.Latest, true); + const overrides = parseOverrides(overridesSourceFile); + + applyXmlOverrides(allXmlClusters, overrides); + + // Pass the prepared globalResolver to the parsing function. + const parsedData = parseClustersFromXML(allXmlClusters, globalResolver, validation); + const xmlClusterDataMap = new Map(); + + for (const d of parsedData) { + const existing = xmlClusterDataMap.get(d.id); + + if (existing) { + // This is a derived cluster, merge its data with the base cluster. + existing.attributes.push(...d.attributes); + existing.serverCommands.push(...d.serverCommands); + existing.clientCommands.push(...d.clientCommands); + } else { + xmlClusterDataMap.set(d.id, d); + } + } + + const clusterFileContent = await fs.readFile(clusterFile, "utf8"); + const sourceFile = ts.createSourceFile(clusterFile, clusterFileContent, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS); + const updateTransformer = createUpdateTransformer(xmlClusterDataMap, validation); + const hexTransformer = createHexIdTransformer(); + const result1 = ts.transform(sourceFile, [updateTransformer]); + const updatedSourceFile = result1.transformed[0]; + const result3 = ts.transform(updatedSourceFile, [hexTransformer]); + const finalSourceFile = result3.transformed[0]; + const printer = ts.createPrinter({newLine: ts.NewLineKind.LineFeed, removeComments: false}); + let newContent = printer.printFile(finalSourceFile); + // help biome re-format + newContent = newContent.replaceAll("{\n ID:", "{ID:"); + newContent = newContent.replaceAll("{\n name:", "{name:"); + + await fs.writeFile(clusterFile, newContent, "utf8"); + + console.log( + `Successfully updated ${clusterFile}. Changes: ${validation.changedClusters} clusters, ${validation.addedAttributes} attributes, ${validation.addedCommands} commands, ${validation.addedParameters} parameters.`, + ); + + if (validation.warnings.length > 0) { + console.log("Warnings:"); + + for (const w of validation.warnings) { + console.log(` - ${w}`); + } + } + + if (validation.errors.length > 0) { + console.log("Errors:"); + + for (const e of validation.errors) { + console.log(` - ${e}`); + } + } + + const report = { + scannedClusters: validation.scannedClusters, + changedClusters: validation.changedClusters, + addedAttributes: validation.addedAttributes, + addedCommands: validation.addedCommands, + addedParameters: validation.addedParameters, + unknownTypes: Array.from(validation.unknownTypes.values()), + xmlClustersMissingFromTs: Array.from(validation.xmlClustersMissingFromTs.values()), + tsClustersMissingFromXml: validation.tsClustersMissingFromXml, + warnings: validation.warnings, + errors: validation.errors, + }; + + await fs.writeFile("scripts/zap-update-clusters-report.json", JSON.stringify(report, null, 2), "utf8"); +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); + +// #endregion diff --git a/scripts/zap-update-types.ts b/scripts/zap-update-types.ts new file mode 100644 index 0000000000..fefa8be636 --- /dev/null +++ b/scripts/zap-update-types.ts @@ -0,0 +1,707 @@ +/** + * Script: Generate enums and interfaces from ZCL XML data type definitions. + * + * Goals: + * - Parse XML cluster definition files (library.xml and its includes). + * - Respect XSD-described structure (type.xsd). + * - For with , create a TS enum. + * - For with , create a TS enum (for flags). + * - For with , create a TS interface. + * - Parse inline type definitions within attributes and command fields. + * - Write the generated code to a new file. + * + * Requirements: + * pnpm i xml2js @types/xml2js + * + * Usage: + * tsx scripts/zap-update-types.ts ../zap/zcl-builtin/dotdot + */ + +import {promises as fs} from "node:fs"; +import path from "node:path"; +import process from "node:process"; +import ts from "typescript"; +import {parseStringPromise} from "xml2js"; +import type {XMLAttr, XMLBitmapDefinition, XMLClusterSide, XMLEnumeration, XMLRestriction, XMLRoot, XMLSequence, XMLTypeType} from "./zap-xml-types"; + +// #region Type Definitions + +interface ParsedXMLTypeType extends XMLTypeType { + clusterName?: string; +} + +interface ParsedType { + name: string; + node: ts.EnumDeclaration | ts.InterfaceDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; +} + +// #endregion + +// #region Helpers + +const NUMBER_TO_WORD: Record = { + "0": "Zero", + "1": "One", + "2": "Two", + "3": "Three", + "4": "Four", + "5": "Five", + "6": "Six", + "7": "Seven", + "8": "Eight", + "9": "Nine", +}; + +const NAME_OVERRIDES: Record = { + CCColorOptions: "ColorControlColorOptions", + CCDirection: "ColorControlDirection", + CCMoveMode: "ColorControlMoveMode", + CCStepMode: "ColorControlStepMode", + CCColorLoopDirection: "ColorControlColorLoopDirection", +}; + +/** + * Converts a string to PascalCase. + * Handles various delimiters like spaces, hyphens, and underscores. + * Sanitizes names that start with a number. + * @param str The input string. + * @returns The PascalCased string. + */ +function pascalCase(str: string): string { + if (!str) { + return ""; + } + + let sanitized = str.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[^0-9a-zA-Z]/g, " "); + const firstChar = sanitized.charAt(0); + + if (NUMBER_TO_WORD[firstChar]) { + sanitized = `${NUMBER_TO_WORD[firstChar]}${sanitized.slice(1)}`; + } + + return sanitized + .trim() + .split(" ") + .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) + .join(""); +} + +/** Only uppercase first char after sanitized */ +function simplePascalCase(str: string): string { + if (!str) { + return ""; + } + + const override = NAME_OVERRIDES[str]; + + if (override) { + return override; + } + + const sanitized = str.replace(/[^0-9a-zA-Z]/g, ""); + + return `${sanitized.charAt(0).toUpperCase()}${sanitized.slice(1)}`; +} + +/** + * Converts a string to camelCase. + * @param str The input string. + * @returns The camelCased string. + */ +function camelCase(str: string): string { + if (!str) { + return ""; + } + + const pascal = simplePascalCase(str); + + return pascal.charAt(0).toLowerCase() + pascal.slice(1); +} + +/** + * Converts a hex or decimal string to a 0x-prefixed hex string. + * @param value The input string (e.g., "01", "ff", "255"). + * @param pad4 If true pad to 4-digit instead of 2. + * @returns The formatted hex string (e.g., "0x01", "0xFF"). + */ +function toHex(value: string, pad4 = false): string { + if (!value) { + return "0x00"; + } + + const num = Number.parseInt(value, 16); + + if (Number.isNaN(num)) { + return "0x00"; + } + + return `0x${num.toString(16).padStart(pad4 ? 4 : 2, "0")}`; +} + +// #endregion + +// #region XML Parsing and Type Collection + +const createSyntheticType = ( + clusterName: string, + name: string, + parent: XMLAttr<{type: string}> & {restriction?: XMLRestriction[]; bitmap?: XMLBitmapDefinition[]}, +): ParsedXMLTypeType | undefined => { + if (parent.restriction || parent.bitmap) { + return { + // biome-ignore lint/style/useNamingConvention: API + $: {id: "", name: name, short: name, inheritsFrom: parent.$.type}, + clusterName: clusterName, + restriction: parent.restriction, + bitmap: parent.bitmap, + }; + } + + return undefined; +}; + +async function collectAllTypes(startFile: string): Promise { + const allTypes: ParsedXMLTypeType[] = []; + const visitedFiles = new Set(); + const filesToProcess: string[] = [startFile]; + + const processSide = (clusterName: string, side: XMLClusterSide | undefined) => { + if (!side) { + return; + } + + if (side.attributes) { + for (const attr of side.attributes[0].attribute) { + const synthetic = createSyntheticType(clusterName, attr.$.name, attr); + + if (synthetic) { + allTypes.push(synthetic); + } + } + } + + if (side.commands) { + for (const cmd of side.commands[0].command) { + if (cmd.fields) { + for (const field of cmd.fields[0].field) { + const synthetic = createSyntheticType(clusterName, field.$.name, field); + + if (synthetic) { + allTypes.push(synthetic); + } + } + } + } + } + }; + + while (filesToProcess.length > 0) { + const currentFile = filesToProcess.shift(); + + if (!currentFile || visitedFiles.has(currentFile)) { + continue; + } + + visitedFiles.add(currentFile); + + try { + const xmlContent = await fs.readFile(currentFile, "utf-8"); + const parsed = (await parseStringPromise(xmlContent, { + explicitArray: true, + mergeAttrs: false, + explicitRoot: true, + })) as XMLRoot; + const libraries = parsed["zcl:library"]; + const global = parsed["zcl:global"]; + const clusters = parsed["zcl:cluster"]; + + if (libraries) { + for (const lib of Array.isArray(libraries) ? libraries : [libraries]) { + if (lib["type:type"]) { + allTypes.push(...lib["type:type"]); + } + + if (lib["xi:include"]) { + const baseDir = path.dirname(currentFile); + + for (const include of lib["xi:include"]) { + if (include.$.href && include.$.parse === "xml") { + filesToProcess.push(path.resolve(baseDir, include.$.href)); + } + } + } + } + } + + if (global) { + for (const lib of Array.isArray(global) ? global : [global]) { + if (lib["type:type"]) { + allTypes.push(...lib["type:type"]); + } + } + } + + if (clusters) { + for (const cluster of Array.isArray(clusters) ? clusters : [clusters]) { + if (cluster["type:type"]) { + for (const type of cluster["type:type"]) { + allTypes.push({...type, clusterName: cluster.$.name}); + } + } + + if (cluster.server) { + processSide(cluster.$.name, cluster.server[0]); + } + + if (cluster.client) { + processSide(cluster.$.name, cluster.client[0]); + } + } + } + } catch (error) { + console.error(`Error processing file ${currentFile}:`, error); + } + } + + return allTypes; +} + +class TypeResolver { + #typesByShort = new Map(); + + add(types: ParsedXMLTypeType[]): void { + for (const type of types) { + const short = type.$.short.toLowerCase(); + + if (!this.#typesByShort.has(short)) { + this.#typesByShort.set(short, type); + } + } + } + + resolve(short: string, factory: ts.NodeFactory): ts.TypeNode { + const type = this.#typesByShort.get(short.toLowerCase()); + + if (type?.$.inheritsFrom && !type.restriction?.some((r) => r["type:sequence"])) { + return this.resolve(type.$.inheritsFrom, factory); + } + + switch (short.toLowerCase()) { + case "data8": + case "data16": + case "data24": + case "data32": + case "data40": + case "data48": + case "data56": + case "data64": + case "bool": + case "map8": + case "map16": + case "map24": + case "map32": + case "map40": + case "map48": + case "map56": + case "map64": + case "uint8": + case "uint16": + case "uint24": + case "uint32": + case "uint40": + case "uint48": + case "uint56": + case "uint64": + case "int8": + case "int16": + case "int24": + case "int32": + case "int40": + case "int48": + case "int56": + case "int64": + case "enum8": + case "enum16": + case "semi": + case "single": + case "double": + case "utc": + case "clusterid": + case "attribid": + case "bacoid": + return factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword); + + case "octstr": + case "string": + case "octstr16": + case "string16": + return factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword); + + case "array": + case "set": + case "bag": + return factory.createArrayTypeNode(factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword)); + + case "eui64": + return factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword); + case "key128": + return factory.createTypeReferenceNode("Buffer"); + + default: + if (type && type.$.short !== "unk") { + return factory.createTypeReferenceNode(simplePascalCase(type.$.short)); + } + + return factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword); + } + } +} + +// #endregion + +// #region AST Generation + +function addComments(_factory: ts.NodeFactory, node: ts.Node, type: ParsedXMLTypeType, noType = false): void { + const comments: string[] = []; + + if (type.clusterName) { + comments.push(`@cluster ${type.clusterName}`); + } + + if (type.$.inheritsFrom && !noType) { + comments.push(`@type ${type.$.inheritsFrom}`); + } + + if (comments.length > 0) { + const commentText = `*\n * ${comments.join("\n * ")}\n `; + + ts.addSyntheticLeadingComment(node, ts.SyntaxKind.MultiLineCommentTrivia, commentText, true); + } +} + +function createEnumFromEnumeration(factory: ts.NodeFactory, type: ParsedXMLTypeType, enumerations: XMLEnumeration[]): ts.EnumDeclaration { + const memberNames = new Map(); + const members: ts.EnumMember[] = []; + + for (const e of enumerations) { + let memberName = pascalCase(e.$.name); + const count = memberNames.get(memberName); + + if (count !== undefined) { + memberNames.set(memberName, count + 1); + + memberName = `${memberName}${count + 1}`; + } else { + memberNames.set(memberName, 1); + } + + const memberValue = factory.createNumericLiteral(toHex(e.$.value, type.$.inheritsFrom?.endsWith("16"))); + + members.push(factory.createEnumMember(memberName, memberValue)); + } + + const enumDeclaration = factory.createEnumDeclaration( + [factory.createToken(ts.SyntaxKind.ExportKeyword)], + simplePascalCase(type.$.short), + members, + ); + + addComments(factory, enumDeclaration, type); + + return enumDeclaration; +} + +function createEnumFromBitmap(factory: ts.NodeFactory, type: ParsedXMLTypeType, bitmap: XMLBitmapDefinition, shiftRight = false): ts.EnumDeclaration { + const memberNames = new Map(); + const members: ts.EnumMember[] = []; + + for (const e of bitmap.element) { + if (shiftRight && !e.$.shiftRight) { + continue; + } + + let memberName = pascalCase(e.$.name); + const count = memberNames.get(memberName); + + if (count !== undefined) { + memberNames.set(memberName, count + 1); + + memberName = `${memberName}${count + 1}`; + } else { + memberNames.set(memberName, 1); + } + + const memberValue = factory.createNumericLiteral( + // biome-ignore lint/style/noNonNullAssertion: valid from top of loop + toHex(shiftRight ? e.$.shiftRight! : e.$.mask, !shiftRight && type.$.inheritsFrom?.endsWith("16")), + ); + + members.push(factory.createEnumMember(memberName, memberValue)); + } + + const enumDeclaration = factory.createEnumDeclaration( + [factory.createToken(ts.SyntaxKind.ExportKeyword)], + simplePascalCase( + shiftRight + ? type.$.short.endsWith("ShiftRight") + ? type.$.short + : `${type.$.short.endsWith("Mask") ? type.$.short.slice(0, -4) : type.$.short}ShiftRight` + : type.$.short.endsWith("Mask") + ? type.$.short + : `${type.$.short}Mask`, + ), + members, + ); + + addComments(factory, enumDeclaration, type, shiftRight); + + return enumDeclaration; +} + +function createInterfaceFromSequence( + factory: ts.NodeFactory, + type: ParsedXMLTypeType, + sequence: XMLSequence, + resolver: TypeResolver, +): ts.InterfaceDeclaration { + const memberNames = new Map(); + const members: ts.PropertySignature[] = []; + + for (const f of sequence.field) { + let propertyName = camelCase(f.$.name); + const count = memberNames.get(propertyName); + + if (count !== undefined) { + memberNames.set(propertyName, count + 1); + + propertyName = `${propertyName}${count + 1}`; + } else { + memberNames.set(propertyName, 1); + } + + const propertyType = resolver.resolve(f.$.type, factory); + + members.push( + factory.createPropertySignature( + undefined, + propertyName, + f.$.presentIf ? factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, + propertyType, + ), + ); + } + + const interfaceDeclaration = factory.createInterfaceDeclaration( + [factory.createToken(ts.SyntaxKind.ExportKeyword)], + simplePascalCase(type.$.short), + undefined, + undefined, + members, + ); + + addComments(factory, interfaceDeclaration, type); + + return interfaceDeclaration; +} + +function createSafeNumericLiteral(value: string | number, bigInt: boolean, factory: ts.NodeFactory): ts.Expression { + if (bigInt) { + const num = BigInt(value); + const str = String(value); + + return factory.createBigIntLiteral({base10Value: num < 0 ? str.slice(1) : str, negative: num < 0}); + } + + const num = Number(value); + + if (num < 0) { + return factory.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, factory.createNumericLiteral(Math.abs(num))); + } + + return factory.createNumericLiteral(num); +} + +function createZclTypeInvalidConstants( + factory: ts.NodeFactory, + types: ParsedXMLTypeType[], +): [byName: ts.VariableStatement, byType: ts.VariableStatement] | undefined { + const zclType = types.find((t) => t.$.short === "zclType"); + + if (!zclType?.restriction?.[0]?.["type:enumeration"]) { + return undefined; + } + + const zclTypeEnumMap = new Map(zclType.restriction[0]["type:enumeration"].map((e) => [e.$.name, e.$.value])); + const byNameProperties: ts.PropertyAssignment[] = []; + const byTypeProperties: ts.PropertyAssignment[] = []; + + for (const type of types) { + const invalidValue = type.restriction?.[0]?.["type:invalid"]?.[0]?.$?.value; + const typeId = zclTypeEnumMap.get(type.$.short); + + if (invalidValue && typeId) { + const name = pascalCase(type.$.short); + const invalidValueLiteral = createSafeNumericLiteral(invalidValue, name.endsWith("56") || name.endsWith("64"), factory); + + byNameProperties.push(factory.createPropertyAssignment(factory.createIdentifier(name), invalidValueLiteral)); + + const byTypeProp = factory.createPropertyAssignment(factory.createNumericLiteral(Number.parseInt(typeId, 16)), invalidValueLiteral); + const commentText = `* ${name} `; + + ts.addSyntheticLeadingComment(byTypeProp, ts.SyntaxKind.MultiLineCommentTrivia, commentText, true); + byTypeProperties.push(byTypeProp); + } + } + + const invalidVal = factory.createUnionTypeNode([ + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createKeywordTypeNode(ts.SyntaxKind.BigIntKeyword), + ]); + const byNameCommentText = "* ZCL non-values by type name (key of `ZclType`). "; + const byNameConst = factory.createVariableStatement( + [factory.createToken(ts.SyntaxKind.ExportKeyword)], + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + "ZCL_TYPE_INVALID_BY_TYPE_NAME", + undefined, + factory.createTypeReferenceNode("Readonly", [ + factory.createTypeReferenceNode("Record", [factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), invalidVal]), + ]), + factory.createObjectLiteralExpression(byNameProperties, true), + ), + ], + ts.NodeFlags.Const, + ), + ); + const byTypeCommentText = "* ZCL non-values by type ID (value of `ZclType`). "; + const byTypeConst = factory.createVariableStatement( + [factory.createToken(ts.SyntaxKind.ExportKeyword)], + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + "ZCL_TYPE_INVALID_BY_TYPE", + undefined, + factory.createTypeReferenceNode("Readonly", [ + factory.createTypeReferenceNode("Record", [factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), invalidVal]), + ]), + factory.createObjectLiteralExpression(byTypeProperties, true), + ), + ], + ts.NodeFlags.Const, + ), + ); + + ts.addSyntheticLeadingComment(byNameConst, ts.SyntaxKind.MultiLineCommentTrivia, byNameCommentText, true); + ts.addSyntheticLeadingComment(byTypeConst, ts.SyntaxKind.MultiLineCommentTrivia, byTypeCommentText, true); + + return [byNameConst, byTypeConst]; +} + +function processTypes(factory: ts.NodeFactory, types: ParsedXMLTypeType[], resolver: TypeResolver): ParsedType[] { + const processed: ParsedType[] = []; + const processedNames = new Set(); + + for (const type of types) { + const name = simplePascalCase(type.$.short); + + if (processedNames.has(name)) { + continue; + } + + const restriction = type.restriction?.[0]; + const bitmap = type.bitmap?.[0]; + + if (restriction?.["type:enumeration"]) { + const createdNode = createEnumFromEnumeration(factory, type, restriction["type:enumeration"]); + + if (createdNode.members.length > 0) { + processed.push({name, node: createdNode}); + processedNames.add(name); + } + } else if (bitmap?.element) { + const createdNode = createEnumFromBitmap(factory, type, bitmap); + + if (createdNode.members.length > 0) { + processed.push({name: `${name}Mask`, node: createdNode}); + processedNames.add(name); + } + + const createdNodeShiftRight = createEnumFromBitmap(factory, type, bitmap, true); + + if (createdNodeShiftRight.members.length > 0) { + processed.push({name: `${name}ShiftRight`, node: createdNodeShiftRight}); + processedNames.add(name); + } + } else if (restriction?.["type:sequence"]) { + const createdNode = createInterfaceFromSequence(factory, type, restriction["type:sequence"][0], resolver); + + if (createdNode.members.length > 0) { + processed.push({name, node: createdNode}); + processedNames.add(name); + } + } + } + + const zclTypeInvalidConsts = createZclTypeInvalidConstants(factory, types); + + if (zclTypeInvalidConsts) { + processed.push({name: "ZCL_TYPE_INVALID_BY_TYPE_NAME", node: zclTypeInvalidConsts[0]}); + processed.push({name: "ZCL_TYPE_INVALID_BY_TYPE", node: zclTypeInvalidConsts[1]}); + } + + return processed; +} + +// #endregion + +// #region Main + +async function main(): Promise { + const args = process.argv.slice(2); + + if (args.length !== 1) { + throw new Error("Usage: tsx scripts/zap-update-types.ts "); + } + + const xmlPath = args[0]; + const libraryFile = path.join(xmlPath, "library.xml"); + const outputFile = "src/zspec/zcl/definition/datatypes.ts"; + + console.log(`Starting type generation from ${libraryFile}...`); + + const allTypes = await collectAllTypes(libraryFile); + + if (allTypes.length === 0) { + console.log("No types found to process."); + + return; + } + + const resolver = new TypeResolver(); + + resolver.add(allTypes); + + const factory = ts.factory; + const processedTypes = processTypes(factory, allTypes, resolver); + const nodesToPrint = processedTypes.map((p) => p.node); + const sourceFile = ts.createSourceFile(outputFile, "", ts.ScriptTarget.Latest, false, ts.ScriptKind.TS); + const printer = ts.createPrinter({newLine: ts.NewLineKind.LineFeed, removeComments: false}); + const content = nodesToPrint.map((node) => printer.printNode(ts.EmitHint.Unspecified, node, sourceFile)).join("\n\n"); + const fileHeader = `/** + * This file was automatically generated by scripts/zap-update-types.ts. Do NOT edit manually. + * + * ZCL data type definitions. + */\n\n`; + + await fs.writeFile(outputFile, `${fileHeader + content}\n`, "utf8"); + + console.log(`Successfully generated ${processedTypes.length} types to ${outputFile}.`); +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); + +// #endregion diff --git a/scripts/zap-xml-clusters-overrides-data.ts b/scripts/zap-xml-clusters-overrides-data.ts new file mode 100644 index 0000000000..53c44cb22a --- /dev/null +++ b/scripts/zap-xml-clusters-overrides-data.ts @@ -0,0 +1,52 @@ +import type {XmlOverride} from "./zap-xml-clusters-overrides.js"; + +/** + * This file contains overrides for the raw XML data before it is parsed into the ZCL format. + * Use this to correct errors in the source XML files. + */ +export const OVERRIDES: XmlOverride[] = [ + { + clusterId: 0x0102, // Closures + attributes: [ + // Original incorrect ID for "InstalledOpenLimitLift" + {id: 0x0100, new: {id: "0010"}}, + // Original incorrect ID for "InstalledClosedLimitLift" + {id: 0x0101, new: {id: "0011"}}, + // Original incorrect ID for "InstalledOpenLimitTilt" + {id: 0x0102, new: {id: "0012"}}, + // Original incorrect ID for "InstalledClosedLimitTilt" + {id: 0x0103, new: {id: "0013"}}, + // Original incorrect ID for "VelocityLift" + {id: 0x0104, new: {id: "0014"}}, + // Original incorrect ID for "AccelerationTimeLift" + {id: 0x0105, new: {id: "0015"}}, + // Original incorrect ID for "DecelerationTimeLift" + {id: 0x0106, new: {id: "0016"}}, + // Original incorrect ID for "Mode" + {id: 0x0107, new: {id: "0017"}}, + // Original incorrect ID for "IntermediateSetpointsLift" + {id: 0x0108, new: {id: "0018"}}, + // Original incorrect ID for "IntermediateSetpointsTilt" + {id: 0x0109, new: {id: "0019"}}, + ], + }, + // { + // clusterId: 0x0005, // Scenes + // commands: [ + // { + // id: 0x06, + // parameters: [ + // { + // name: "Capacity", + // restrictions: [ + // { + // type: "type:maxInclusive", + // new: {value: "253"}, // Original as "fd" (most entries are number strings, so have to correct this) + // }, + // ], + // }, + // ], + // }, + // ], + // }, +]; diff --git a/scripts/zap-xml-clusters-overrides.ts b/scripts/zap-xml-clusters-overrides.ts new file mode 100644 index 0000000000..85a3e4c543 --- /dev/null +++ b/scripts/zap-xml-clusters-overrides.ts @@ -0,0 +1,400 @@ +import ts from "typescript"; +import type {XMLAttributeDefinition, XMLCluster, XMLCommandDefinition, XMLFieldDefinition, XMLRestriction} from "./zap-update-clusters.js"; + +type RestrictionOverride = { + type: string; + index?: number; + new: Record; +}; + +type CommandParameterOverride = { + name: string; + new?: Partial; + restrictions?: RestrictionOverride[]; +}; + +type AttributeOverride = { + id: number; + new?: Partial; + restrictions?: RestrictionOverride[]; +}; + +type CommandOverride = { + id: number; + new?: Partial; + parameters?: CommandParameterOverride[]; +}; + +export type XmlOverride = { + clusterId: number; + attributes?: AttributeOverride[]; + commands?: CommandOverride[]; +}; + +function getObjectLiteralProperties(node: ts.ObjectLiteralExpression): Map { + const props = new Map(); + + for (const prop of node.properties) { + if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) { + props.set(prop.name.text, prop.initializer); + } + } + + return props; +} + +// biome-ignore lint/suspicious/noExplicitAny: generic +function expressionToValue(expr: ts.Expression | undefined): any { + if (!expr) { + return undefined; + } + + if (ts.isStringLiteral(expr)) { + return expr.text; + } + + if (ts.isNumericLiteral(expr)) { + const text = expr.text; + return text.startsWith("0x") ? Number.parseInt(text, 16) : Number(text); + } + + if (expr.kind === ts.SyntaxKind.TrueKeyword) { + return true; + } + + if (expr.kind === ts.SyntaxKind.FalseKeyword) { + return false; + } + + return undefined; +} + +function parseRestrictionOverrides(restrictionsProp: ts.Expression | undefined): RestrictionOverride[] | undefined { + if (!restrictionsProp || !ts.isArrayLiteralExpression(restrictionsProp)) { + return undefined; + } + + const restrictions: RestrictionOverride[] = []; + + for (const r of restrictionsProp.elements) { + if (ts.isObjectLiteralExpression(r)) { + const rProps = getObjectLiteralProperties(r); + const rTypeExpr = rProps.get("type"); + const rNewExpr = rProps.get("new"); + + if (rTypeExpr && rNewExpr && ts.isObjectLiteralExpression(rNewExpr)) { + const rType = expressionToValue(rTypeExpr); + const rIndex = expressionToValue(rProps.get("index")); + const newValues: Record = {}; + + for (const [key, val] of getObjectLiteralProperties(rNewExpr).entries()) { + newValues[key] = expressionToValue(val); + } + + restrictions.push({type: rType, index: rIndex, new: newValues}); + } + } + } + + return restrictions.length > 0 ? restrictions : undefined; +} + +export function parseOverrides(sourceFile: ts.SourceFile): XmlOverride[] { + const overrides: XmlOverride[] = []; + let overridesVariable: ts.VariableDeclaration | undefined; + + ts.forEachChild(sourceFile, (node) => { + if (ts.isVariableStatement(node)) { + for (const decl of node.declarationList.declarations) { + if (ts.isIdentifier(decl.name) && decl.name.text === "OVERRIDES") { + overridesVariable = decl; + + break; + } + } + } + }); + + if (overridesVariable?.initializer && ts.isArrayLiteralExpression(overridesVariable.initializer)) { + for (const element of overridesVariable.initializer.elements) { + if (ts.isObjectLiteralExpression(element)) { + const props = getObjectLiteralProperties(element); + const clusterIdExpr = props.get("clusterId"); + + if (!clusterIdExpr) { + continue; + } + + const clusterId = expressionToValue(clusterIdExpr); + + if (clusterId === undefined) { + continue; + } + + const override: XmlOverride = {clusterId}; + const attributesProp = props.get("attributes"); + + if (attributesProp && ts.isArrayLiteralExpression(attributesProp)) { + override.attributes = []; + + for (const attrElement of attributesProp.elements) { + if (ts.isObjectLiteralExpression(attrElement)) { + const attrProps = getObjectLiteralProperties(attrElement); + const idExpr = attrProps.get("id"); + + if (!idExpr) { + continue; + } + + const id = expressionToValue(idExpr); + const attrOverride: AttributeOverride = {id}; + const newPropsExpr = attrProps.get("new"); + + if (newPropsExpr && ts.isObjectLiteralExpression(newPropsExpr)) { + const newValues: Partial = {}; + + for (const [key, val] of getObjectLiteralProperties(newPropsExpr).entries()) { + newValues[key as keyof typeof newValues] = expressionToValue(val); + } + + attrOverride.new = newValues; + } + + attrOverride.restrictions = parseRestrictionOverrides(attrProps.get("restrictions")); + + if (Object.keys(attrOverride).length > 1) { + override.attributes.push(attrOverride); + } + } + } + } + + const commandsProp = props.get("commands"); + + if (commandsProp && ts.isArrayLiteralExpression(commandsProp)) { + override.commands = []; + + for (const cmdElement of commandsProp.elements) { + if (ts.isObjectLiteralExpression(cmdElement)) { + const cmdProps = getObjectLiteralProperties(cmdElement); + const idExpr = cmdProps.get("id"); + + if (!idExpr) { + continue; + } + + const id = expressionToValue(idExpr); + const cmdOverride: CommandOverride = {id}; + const newPropsExpr = cmdProps.get("new"); + + if (newPropsExpr && ts.isObjectLiteralExpression(newPropsExpr)) { + const newValues: Partial = {}; + + for (const [key, val] of getObjectLiteralProperties(newPropsExpr).entries()) { + newValues[key as keyof typeof newValues] = expressionToValue(val); + } + + cmdOverride.new = newValues; + } + + const paramsProp = cmdProps.get("parameters"); + + if (paramsProp && ts.isArrayLiteralExpression(paramsProp)) { + cmdOverride.parameters = []; + + for (const p of paramsProp.elements) { + if (ts.isObjectLiteralExpression(p)) { + const pProps = getObjectLiteralProperties(p); + const pNameExpr = pProps.get("name"); + + if (!pNameExpr) { + continue; + } + + const pName = expressionToValue(pNameExpr); + const pOverride: CommandParameterOverride = {name: pName}; + const pNewExpr = pProps.get("new"); + + if (pNewExpr && ts.isObjectLiteralExpression(pNewExpr)) { + const newValues: Partial = {}; + + for (const [key, val] of getObjectLiteralProperties(pNewExpr).entries()) { + newValues[key as keyof typeof newValues] = expressionToValue(val); + } + + pOverride.new = newValues; + } + + pOverride.restrictions = parseRestrictionOverrides(pProps.get("restrictions")); + + if (Object.keys(pOverride).length > 1) { + cmdOverride.parameters.push(pOverride); + } + } + } + } + + if (Object.keys(cmdOverride).length > 1) { + override.commands.push(cmdOverride); + } + } + } + } + + overrides.push(override); + } + } + } + + return overrides; +} + +export function applyXmlOverrides(clusters: XMLCluster[], overrides: XmlOverride[]): void { + if (overrides.length === 0) { + return; + } + + const overridesByCluster = new Map(); + + for (const override of overrides) { + overridesByCluster.set(override.clusterId, override); + } + + const applyRestrictionOverrides = ( + target: {restriction?: XMLRestriction[]}, + restrictions: RestrictionOverride[] | undefined, + logPrefix: string, + ): void => { + if (!restrictions) { + return; + } + + // 1. Ensure the base restriction object exists. + if (!target.restriction) { + target.restriction = [{}]; + } + + // biome-ignore lint/style/noNonNullAssertion: set above + const targetRestriction = target.restriction[0]!; + + for (const r of restrictions) { + const key = r.type as keyof XMLRestriction; + + // 2. Reflect on the target to see if the restriction key (e.g., "type:maxInclusive") already exists. + if (Object.hasOwn(targetRestriction, key)) { + // The restriction key exists, so we update it. + // biome-ignore lint/style/noNonNullAssertion: checked with hasOwnProperty + const existing = targetRestriction[key]!; + + if (existing.length > 1 && r.index === undefined) { + throw new Error(`${logPrefix}, restriction type '${r.type}' has multiple entries but no index was provided in override.`); + } + + const index = r.index ?? 0; + if (index >= existing.length) { + throw new Error( + `${logPrefix}, restriction type '${r.type}' override index ${index} is out of bounds for length ${existing.length}.`, + ); + } + + console.log(`${logPrefix}, restriction type '${r.type}[${index}]'`); + Object.assign(existing[index].$, r.new); + } else { + // 3. The restriction key does NOT exist, so we create it. + // This is a type-safe way to create the property with the correct structure. + console.log(`${logPrefix}, restriction type '${r.type}': creating new`); + targetRestriction[key] = [ + { + // The 'new' object from the override becomes the content of the '$' property. + // biome-ignore lint/style/useNamingConvention: API + $: r.new, + }, + // biome-ignore lint/suspicious/noExplicitAny: dynamically creating a known-good structure. + ] as any; + } + } + + console.log(targetRestriction["type:maxInclusive"]); + }; + + for (const cluster of clusters) { + const clusterId = Number.parseInt(cluster.$.id, 16); + const override = overridesByCluster.get(clusterId); + + if (!override) { + continue; + } + + const sides = [ + {side: cluster.server, name: "server"}, + {side: cluster.client, name: "client"}, + ]; + + for (const {side, name} of sides) { + if (!side?.[0]) { + continue; + } + + if (override.attributes && side[0].attributes?.[0]?.attribute) { + for (const attr of side[0].attributes[0].attribute) { + const attrId = Number.parseInt(attr.$.id, 16); + const attrOverride = override.attributes.find((a) => a.id === attrId); + + if (!attrOverride) { + continue; + } + + const logPrefix = `Applying override to cluster 0x${clusterId.toString(16).padStart(4, "0")}, ${name} attribute 0x${attrId + .toString(16) + .padStart(4, "0")}`; + + if (attrOverride.new) { + console.log(`${logPrefix} (props)`); + Object.assign(attr.$, attrOverride.new); + } + + applyRestrictionOverrides(attr, attrOverride.restrictions, logPrefix); + } + } + + if (override.commands && side[0].commands?.[0]?.command) { + for (const cmd of side[0].commands[0].command) { + const cmdId = Number.parseInt(cmd.$.id, 16); + const cmdOverride = override.commands.find((c) => c.id === cmdId); + + if (!cmdOverride) { + continue; + } + + const logPrefix = `Applying override to cluster 0x${clusterId.toString(16).padStart(4, "0")}, ${name} command 0x${cmdId + .toString(16) + .padStart(2, "0")}`; + + if (cmdOverride.new) { + console.log(`${logPrefix} (props)`); + Object.assign(cmd.$, cmdOverride.new); + } + + if (cmdOverride.parameters && cmd.fields?.[0]?.field) { + for (const field of cmd.fields[0].field) { + const paramOverride = cmdOverride.parameters.find((p) => p.name === field.$.name); + + if (!paramOverride) { + continue; + } + + const paramLogPrefix = `${logPrefix}, parameter '${paramOverride.name}'`; + + if (paramOverride.new) { + console.log(`${paramLogPrefix} (props)`); + Object.assign(field.$, paramOverride.new); + } + + applyRestrictionOverrides(field, paramOverride.restrictions, paramLogPrefix); + } + } + } + } + } + } +} diff --git a/scripts/zap-xml-types.ts b/scripts/zap-xml-types.ts new file mode 100644 index 0000000000..f8e4fd43a2 --- /dev/null +++ b/scripts/zap-xml-types.ts @@ -0,0 +1,146 @@ +export interface XMLAttr { + // biome-ignore lint/style/useNamingConvention: API + $: T; +} + +export interface XMLEnumeration extends XMLAttr<{name: string; value: string}> {} + +export interface XMLBitmapDefinition { + element: XMLBitmapElement[]; +} + +export interface XMLBitmapElement extends XMLAttr<{name: string; mask: string; shiftRight?: string}> {} + +export interface XMLSequence { + field: XMLSequenceField[]; +} + +export interface XMLSequenceField + extends XMLAttr<{ + name: string; + type: string; + presentIf?: string; + }> {} + +export interface XMLTypeType + extends XMLAttr<{ + id: string; + name: string; + short: string; + inheritsFrom?: string; + discrete?: string; + }> { + restriction?: XMLRestriction[]; + bitmap?: XMLBitmapDefinition[]; +} + +export interface XMLLibrary { + "xi:include"?: XMLAttr<{href: string; parse?: string}>[]; + "type:type"?: XMLTypeType[]; +} + +export interface XMLGlobal { + "type:type"?: XMLTypeType[]; + attributes?: {attribute: XMLAttributeDefinition[]}[]; + commands?: {command: XMLCommandDefinition[]}[]; +} + +export interface XMLRestriction { + "type:length"?: XMLAttr<{value: string}>[]; + "type:minLength"?: XMLAttr<{value: string}>[]; + "type:maxLength"?: XMLAttr<{value: string}>[]; + "type:minExclusive"?: XMLAttr<{value: string}>[]; + "type:minInclusive"?: XMLAttr<{value: string}>[]; + "type:maxExclusive"?: XMLAttr<{value: string}>[]; + "type:maxInclusive"?: XMLAttr<{value: string}>[]; + "type:minInclusiveRef"?: XMLAttr<{ref: string}>[]; + "type:minExclusiveRef"?: XMLAttr<{ref: string}>[]; + "type:maxInclusiveRef"?: XMLAttr<{ref: string}>[]; + "type:maxExclusiveRef"?: XMLAttr<{ref: string}>[]; + "type:special"?: XMLAttr<{name: string; value: string}>[]; + /** only used for `type:type` (data type non-value) */ + "type:invalid"?: XMLAttr<{value: string}>[]; + /** for types gen */ + "type:enumeration"?: XMLEnumeration[]; + "type:sequence"?: XMLSequence[]; +} + +export interface XMLAttributeDefinition + extends XMLAttr<{ + id: string; + name: string; + type: string; + readable?: string; // default="true" + writable?: string; // default="false" + writeOptional?: string; // default="false" + writableIf?: string; // DependencyExpression + reportRequired?: string; // default="false" + sceneRequired?: string; // default="false" + required?: string; // default="false" + requiredIf?: string; // DependencyExpression + min?: string; // default="0" + max?: string; + default?: string; + defaultRef?: string; // NamedElement + deprecated?: string; // default="false" + }> { + restriction?: XMLRestriction[]; + bitmap?: XMLBitmapDefinition[]; +} + +export interface XMLFieldDefinition + extends XMLAttr<{ + name: string; + type: string; + array?: string; + arrayLengthSize?: string; + arrayLengthField?: string; + presentIf?: string; + deprecated?: string; + }> { + restriction?: XMLRestriction[]; + bitmap?: XMLBitmapDefinition[]; +} + +export interface XMLCommandDefinition + extends XMLAttr<{ + id: string; + name: string; + required?: string; // default="false" + requiredIf?: string; // DependencyExpression + deprecated?: string; // default="false" + }> { + fields?: {field: XMLFieldDefinition[]}[]; +} + +export interface XMLClusterSide { + attributes?: {attribute: XMLAttributeDefinition[]}[]; + commands?: {command: XMLCommandDefinition[]}[]; +} + +export interface XMLCluster + extends XMLAttr<{ + id: string; + revision: string; + name: string; + manufacturer?: string; + }> { + classification: XMLAttr<{role?: string; picsCode: string; primaryTransaction?: string}>[]; + server?: XMLClusterSide[]; + client?: XMLClusterSide[]; + "type:type"?: XMLTypeType[]; +} + +export interface XMLDerivedCluster extends XMLCluster { + // biome-ignore lint/style/useNamingConvention: API + $: { + inheritsFrom: string; + } & XMLCluster["$"]; +} + +export interface XMLRoot { + "zcl:cluster"?: XMLCluster | XMLCluster[]; + "zcl:derivedCluster"?: XMLDerivedCluster | XMLDerivedCluster[]; + "zcl:library"?: XMLLibrary | XMLLibrary[]; + "zcl:global"?: XMLGlobal | XMLGlobal[]; +} diff --git a/src/adapter/ember/adapter/endpoints.ts b/src/adapter/ember/adapter/endpoints.ts index 1eec432955..05f4597f43 100644 --- a/src/adapter/ember/adapter/endpoints.ts +++ b/src/adapter/ember/adapter/endpoints.ts @@ -58,7 +58,7 @@ export const FIXED_ENDPOINTS: readonly FixedEndpointInfo[] = [ Clusters.msOccupancySensing.ID, // 0x0406,// Occupancy Sensing Clusters.ssIasZone.ID, // 0x0500,// IAS Zone Clusters.seMetering.ID, // 0x0702,// Simple Metering - Clusters.haMeterIdentification.ID, // 0x0B01,// Meter Identification + Clusters.seMeterIdentification.ID, // 0x0B01,// Meter Identification Clusters.haApplianceStatistics.ID, // 0x0B03,// Appliance Statistics Clusters.haElectricalMeasurement.ID, // 0x0B04,// Electrical Measurement Clusters.touchlink.ID, // 0x1000, // touchlink diff --git a/src/controller/helpers/zclFrameConverter.ts b/src/controller/helpers/zclFrameConverter.ts index de0bf395dc..fe0e75b1ef 100644 --- a/src/controller/helpers/zclFrameConverter.ts +++ b/src/controller/helpers/zclFrameConverter.ts @@ -26,7 +26,15 @@ function attributeKeyValue; @@ -38,7 +46,9 @@ function attributeList(frame: Zcl.Frame, deviceManufacturerID: number | undefine // TODO: remove this type once Zcl.Frame is typed for (const item of frame.payload as TFoundation["read"]) { - payload.push(cluster.getAttribute(item.attrId)?.name ?? item.attrId); + const attribute = cluster.getAttribute(item.attrId); + + payload.push(attribute?.name ?? item.attrId); } return payload; diff --git a/src/controller/model/endpoint.ts b/src/controller/model/endpoint.ts index 104fe549a4..11d11ee539 100644 --- a/src/controller/model/endpoint.ts +++ b/src/controller/model/endpoint.ts @@ -253,6 +253,22 @@ export class Endpoint extends ZigbeeEntity { } } + // Migrate cluster renames from https://github.com/Koenkk/zigbee-herdsman/pull/1503 @deprecated 3.0 + /* v8 ignore start */ + if (record.clusters.piRetailTunnel) { + record.clusters.retailTunnel = record.clusters.piRetailTunnel; + delete record.clusters.piRetailTunnel; + } + if (record.clusters.tunneling) { + record.clusters.seTunneling = record.clusters.tunneling; + delete record.clusters.tunneling; + } + if (record.clusters.haMeterIdentification) { + record.clusters.seMeterIdentification = record.clusters.haMeterIdentification; + delete record.clusters.haMeterIdentification; + } + /* v8 ignore stop */ + return new Endpoint( record.epId, record.profId, @@ -453,6 +469,8 @@ export class Endpoint extends ZigbeeEntity { const cluster = this.getCluster(clusterKey, undefined, options?.manufacturerCode); const payload: TFoundation["report"] = []; + // TODO: handle `attr.report !== true` + for (const nameOrID in attributes) { const attribute = cluster.getAttribute(nameOrID); @@ -489,7 +507,10 @@ export class Endpoint extends ZigbeeEntity { const attribute = cluster.getAttribute(nameOrID); if (attribute) { - payload.push({attrId: attribute.ID, attrData: attributes[nameOrID], dataType: attribute.type}); + // TODO: handle `attr.writeOptional !== true` + const attrData = Zcl.Utils.processAttributeWrite(attribute, attributes[nameOrID]); + + payload.push({attrId: attribute.ID, attrData, dataType: attribute.type}); } else if (!Number.isNaN(Number(nameOrID))) { const value = attributes[nameOrID]; @@ -558,6 +579,8 @@ export class Endpoint extends ZigbeeEntity { ); const payload: TFoundation["read"] = []; + // TODO: handle `attr.required !== true` => should not throw + for (const attribute of attributes) { if (typeof attribute === "number") { payload.push({attrId: attribute}); @@ -565,6 +588,7 @@ export class Endpoint extends ZigbeeEntity { const attr = cluster.getAttribute(attribute); if (attr) { + Zcl.Utils.processAttributePreRead(attr); payload.push({attrId: attr.ID}); } else { logger.warning(`Ignoring unknown attribute ${attribute} in cluster ${cluster.name}`, NS); diff --git a/src/controller/model/group.ts b/src/controller/model/group.ts index 1cde1552ce..7c47dcd9a5 100644 --- a/src/controller/model/group.ts +++ b/src/controller/model/group.ts @@ -271,7 +271,9 @@ export class Group extends ZigbeeEntity { const attribute = cluster.getAttribute(nameOrID); if (attribute) { - payload.push({attrId: attribute.ID, attrData: attributes[nameOrID], dataType: attribute.type}); + const attrData = Zcl.Utils.processAttributeWrite(attribute, attributes[nameOrID]); + + payload.push({attrId: attribute.ID, attrData, dataType: attribute.type}); } else if (!Number.isNaN(Number(nameOrID))) { const value = attributes[nameOrID]; @@ -320,6 +322,8 @@ export class Group extends ZigbeeEntity { const optionsWithDefaults = this.getOptionsWithDefaults(options, Zcl.Direction.CLIENT_TO_SERVER, cluster.manufacturerCode); const payload: TFoundation["read"] = []; + // TODO: handle `attr.required !== true` => should not throw + for (const attribute of attributes) { if (typeof attribute === "number") { payload.push({attrId: attribute}); @@ -327,6 +331,7 @@ export class Group extends ZigbeeEntity { const attr = cluster.getAttribute(attribute); if (attr) { + Zcl.Utils.processAttributePreRead(attr); payload.push({attrId: attr.ID}); } else { logger.warning(`Ignoring unknown attribute ${attribute} in cluster ${cluster.name}`, NS); diff --git a/src/zspec/zcl/buffaloZcl.ts b/src/zspec/zcl/buffaloZcl.ts index 7c26ec4854..49f7c83876 100644 --- a/src/zspec/zcl/buffaloZcl.ts +++ b/src/zspec/zcl/buffaloZcl.ts @@ -1,6 +1,7 @@ import {Buffalo} from "../../buffalo"; import {logger} from "../../utils/logger"; import {isNumberArray} from "../../utils/utils"; +import {ZCL_TYPE_INVALID_BY_TYPE, ZclType} from "./definition/datatypes"; import {BuffaloZclDataType, DataType, StructuredIndicatorType} from "./definition/enums"; import type { BuffaloZclOptions, @@ -26,6 +27,9 @@ import * as Utils from "./utils"; const NS = "zh:zcl:buffalo"; +const UINT8_NON_VALUE = ZCL_TYPE_INVALID_BY_TYPE[ZclType.Uint8] as number; +const UINT16_NON_VALUE = ZCL_TYPE_INVALID_BY_TYPE[ZclType.Uint16] as number; + const SEC_KEY_LENGTH = 16; const EXTENSION_FIELD_SETS_DATA_TYPE: {[key: number]: DataType[]} = { @@ -35,197 +39,34 @@ const EXTENSION_FIELD_SETS_DATA_TYPE: {[key: number]: DataType[]} = { 768: [DataType.UINT16, DataType.UINT16, DataType.UINT16, DataType.UINT8, DataType.UINT8, DataType.UINT8, DataType.UINT16, DataType.UINT16], }; -// UINT8_TMP_FIX: temporary return 0xff instead of Number.NaN -// Will be replaced by https://github.com/Koenkk/zigbee-herdsman/pull/1503 -// https://github.com/Koenkk/zigbee-herdsman/issues/1498 -// https://github.com/Koenkk/zigbee-herdsman/pull/1510 - export class BuffaloZcl extends Buffalo { - private writeZclUInt8(value: number): void { - this.writeUInt8(value); - // See UINT8_TMP_FIX - // this.writeUInt8(Number.isNaN(value) ? 0xff : value); - } - - private readZclUInt8(): number { + private readLengthUInt8(): number { const value = this.readUInt8(); - return value; - - // See UINT8_TMP_FIX - // return value === 0xff ? Number.NaN : value; + return value === UINT8_NON_VALUE ? Number.NaN : value; } - private writeZclUInt16(value: number): void { - this.writeUInt16(Number.isNaN(value) ? 0xffff : value); - } - - private readZclUInt16(): number { + private readLengthUInt16(): number { const value = this.readUInt16(); - return value === 0xffff ? Number.NaN : value; - } - - private writeZclUInt24(value: number): void { - this.writeUInt24(Number.isNaN(value) ? 0xffffff : value); - } - - private readZclUInt24(): number { - const value = this.readUInt24(); - - return value === 0xffffff ? Number.NaN : value; - } - - private writeZclUInt32(value: number): void { - this.writeUInt32(Number.isNaN(value) ? 0xffffffff : value); - } - - private readZclUInt32(): number { - const value = this.readUInt32(); - - return value === 0xffffffff ? Number.NaN : value; - } - - private writeZclUInt40(value: number): void { - this.writeUInt40(Number.isNaN(value) ? 0xffffffffff : value); - } - - private readZclUInt40(): number { - const value = this.readUInt40(); - - return value === 0xffffffffff ? Number.NaN : value; - } - - private writeZclUInt48(value: number): void { - this.writeUInt48(Number.isNaN(value) ? 0xffffffffffff : value); - } - - private readZclUInt48(): number { - const value = this.readUInt48(); - - return value === 0xffffffffffff ? Number.NaN : value; - } - - private writeZclUInt56(value: bigint | undefined): void { - this.writeUInt56(value === undefined ? 0xffffffffffffffn : value); - } - - private readZclUInt56(): bigint | undefined { - const value = this.readUInt56(); - - return value === 0xffffffffffffffn ? undefined : value; - } - - private writeZclUInt64(value: bigint | undefined): void { - this.writeUInt64(value === undefined ? 0xffffffffffffffffn : value); - } - - private readZclUInt64(): bigint | undefined { - const value = this.readUInt64(); - - return value === 0xffffffffffffffffn ? undefined : value; - } - - private writeZclInt8(value: number): void { - this.writeInt8(Number.isNaN(value) ? -0x80 : value); - } - - private readZclInt8(): number { - const value = this.readInt8(); - - return value === -0x80 ? Number.NaN : value; - } - - private writeZclInt16(value: number): void { - this.writeInt16(Number.isNaN(value) ? -0x8000 : value); - } - - private readZclInt16(): number { - const value = this.readInt16(); - - return value === -0x8000 ? Number.NaN : value; - } - - private writeZclInt24(value: number): void { - this.writeInt24(Number.isNaN(value) ? -0x800000 : value); - } - - private readZclInt24(): number { - const value = this.readInt24(); - - return value === -0x800000 ? Number.NaN : value; - } - - private writeZclInt32(value: number): void { - this.writeInt32(Number.isNaN(value) ? -0x80000000 : value); - } - - private readZclInt32(): number { - const value = this.readInt32(); - - return value === -0x80000000 ? Number.NaN : value; - } - - private writeZclInt40(value: number): void { - this.writeInt40(Number.isNaN(value) ? -0x8000000000 : value); - } - - private readZclInt40(): number { - const value = this.readInt40(); - - return value === -0x8000000000 ? Number.NaN : value; - } - - private writeZclInt48(value: number): void { - this.writeInt48(Number.isNaN(value) ? -0x800000000000 : value); - } - - private readZclInt48(): number { - const value = this.readInt48(); - - return value === -0x800000000000 ? Number.NaN : value; - } - - private writeZclInt56(value: bigint | undefined): void { - this.writeInt56(value === undefined ? -0x80000000000000n : value); - } - - private readZclInt56(): bigint | undefined { - const value = this.readInt56(); - - return value === -0x80000000000000n ? undefined : value; - } - - private writeZclInt64(value: bigint | undefined): void { - this.writeInt64(value === undefined ? -0x8000000000000000n : value); - } - - private readZclInt64(): bigint | undefined { - const value = this.readInt64(); - - return value === -0x8000000000000000n ? undefined : value; + return value === UINT16_NON_VALUE ? Number.NaN : value; } private writeOctetStr(value?: number[]): void { if (value) { this.writeUInt8(value.length); this.writeBuffer(value, value.length); - /* v8 ignore start */ } else { - // ignore because of UINT8_TMP_FIX - this.writeUInt8(0xff); // non-value + this.writeUInt8(UINT8_NON_VALUE); } - /* v8 ignore stop */ } private readOctetStr(): Buffer { - const length = this.readZclUInt8(); - - // See UINT8_TMP_FIX - return length < 0xff ? this.readBuffer(length) : Buffer.from([]); // non-value - // return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length); + const length = this.readLengthUInt8(); + return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length); } + // TODO: support read/write with specific `length` from attribute metadata (CHAR_STR & LONG_CHAR_STR) private writeCharStr(value?: string | number[]): void { // In case of an empty string, send 0 length, from the spec: // "Setting this sub-field to 0x00 represents a character string with no character data (an “empty string”). Setting @@ -239,16 +80,14 @@ export class BuffaloZcl extends Buffalo { this.writeBuffer(value, value.length); } } else { - this.writeUInt8(0xff); // non-value + this.writeUInt8(UINT8_NON_VALUE); } } private readCharStr(): string { - const length = this.readZclUInt8(); + const length = this.readLengthUInt8(); - // See UINT8_TMP_FIX - return length < 0xff ? this.readUtf8String(length) : ""; // non-value - // return Number.isNaN(length) ? "" : this.readUtf8String(length); + return Number.isNaN(length) ? "" : this.readUtf8String(length); } private writeLongOctetStr(value?: number[]): void { @@ -256,12 +95,12 @@ export class BuffaloZcl extends Buffalo { this.writeUInt16(value.length); this.writeBuffer(value, value.length); } else { - this.writeUInt16(0xffff); // non-value + this.writeUInt16(UINT16_NON_VALUE); } } private readLongOctetStr(): Buffer { - const length = this.readZclUInt16(); + const length = this.readLengthUInt16(); return Number.isNaN(length) ? Buffer.from([]) : this.readBuffer(length); } @@ -274,12 +113,12 @@ export class BuffaloZcl extends Buffalo { this.writeUInt16(Buffer.byteLength(value, "utf8")); this.writeUtf8String(value); } else { - this.writeUInt16(0xffff); // non-value + this.writeUInt16(UINT16_NON_VALUE); } } private readLongCharStr(): string { - const length = this.readZclUInt16(); + const length = this.readLengthUInt16(); return Number.isNaN(length) ? "" : this.readUtf8String(length); } @@ -294,15 +133,16 @@ export class BuffaloZcl extends Buffalo { } } else { this.writeUInt8(DataType.NO_DATA); // XXX: correct value? - this.writeUInt16(0xffff); // non-value + this.writeUInt16(UINT16_NON_VALUE); } } + // TODO: support read [] with specific length (`arrayLengthSize` & `arrayLengthField`) from parameter metadata private readArray(): unknown[] { const values: unknown[] = []; const elementType = this.readUInt8(); - const numberOfElements = this.readZclUInt16(); + const numberOfElements = this.readLengthUInt16(); if (!Number.isNaN(numberOfElements)) { // not non-value @@ -324,13 +164,13 @@ export class BuffaloZcl extends Buffalo { this.write(v.elmType, v.elmVal, {}); } } else { - this.writeUInt16(0xffff); // non-value + this.writeUInt16(UINT16_NON_VALUE); } } private readStruct(): Struct[] { const values: Struct[] = []; - const numberOfElements = this.readZclUInt16(); + const numberOfElements = this.readLengthUInt16(); if (!Number.isNaN(numberOfElements)) { // not non-value @@ -345,17 +185,17 @@ export class BuffaloZcl extends Buffalo { } private writeToD(value: ZclTimeOfDay): void { - this.writeUInt8(value.hours == null || Number.isNaN(value.hours) ? 0xff : value.hours); - this.writeUInt8(value.minutes == null || Number.isNaN(value.minutes) ? 0xff : value.minutes); - this.writeUInt8(value.seconds == null || Number.isNaN(value.seconds) ? 0xff : value.seconds); - this.writeUInt8(value.hundredths == null || Number.isNaN(value.hundredths) ? 0xff : value.hundredths); + this.writeUInt8(value.hours == null || Number.isNaN(value.hours) ? UINT8_NON_VALUE : value.hours); + this.writeUInt8(value.minutes == null || Number.isNaN(value.minutes) ? UINT8_NON_VALUE : value.minutes); + this.writeUInt8(value.seconds == null || Number.isNaN(value.seconds) ? UINT8_NON_VALUE : value.seconds); + this.writeUInt8(value.hundredths == null || Number.isNaN(value.hundredths) ? UINT8_NON_VALUE : value.hundredths); } private readToD(): ZclTimeOfDay { - const hours = this.readZclUInt8(); - const minutes = this.readZclUInt8(); - const seconds = this.readZclUInt8(); - const hundredths = this.readZclUInt8(); + const hours = this.readLengthUInt8(); + const minutes = this.readLengthUInt8(); + const seconds = this.readLengthUInt8(); + const hundredths = this.readLengthUInt8(); return { hours, @@ -366,17 +206,17 @@ export class BuffaloZcl extends Buffalo { } private writeDate(value: ZclDate): void { - this.writeUInt8(value.year == null || Number.isNaN(value.year) ? 0xff : value.year - 1900); - this.writeUInt8(value.month == null || Number.isNaN(value.month) ? 0xff : value.month); - this.writeUInt8(value.dayOfMonth == null || Number.isNaN(value.dayOfMonth) ? 0xff : value.dayOfMonth); - this.writeUInt8(value.dayOfWeek == null || Number.isNaN(value.dayOfWeek) ? 0xff : value.dayOfWeek); + this.writeUInt8(value.year == null || Number.isNaN(value.year) ? UINT8_NON_VALUE : value.year - 1900); + this.writeUInt8(value.month == null || Number.isNaN(value.month) ? UINT8_NON_VALUE : value.month); + this.writeUInt8(value.dayOfMonth == null || Number.isNaN(value.dayOfMonth) ? UINT8_NON_VALUE : value.dayOfMonth); + this.writeUInt8(value.dayOfWeek == null || Number.isNaN(value.dayOfWeek) ? UINT8_NON_VALUE : value.dayOfWeek); } private readDate(): ZclDate { - const year = this.readZclUInt8(); - const month = this.readZclUInt8(); - const dayOfMonth = this.readZclUInt8(); - const dayOfWeek = this.readZclUInt8(); + const year = this.readLengthUInt8(); + const month = this.readLengthUInt8(); + const dayOfMonth = this.readLengthUInt8(); + const dayOfWeek = this.readLengthUInt8(); return { year: year + 1900, // remains NaN if year is NaN @@ -447,11 +287,11 @@ export class BuffaloZcl extends Buffalo { this.writeUInt16(entry.transitionTime); if (entry.heatSetpoint != null) { - this.writeUInt16(entry.heatSetpoint); + this.writeInt16(entry.heatSetpoint); } if (entry.coolSetpoint != null) { - this.writeUInt16(entry.coolSetpoint); + this.writeInt16(entry.coolSetpoint); } } } @@ -471,11 +311,11 @@ export class BuffaloZcl extends Buffalo { }; if (heat) { - entry.heatSetpoint = this.readUInt16(); + entry.heatSetpoint = this.readInt16(); } if (cool) { - entry.coolSetpoint = this.readUInt16(); + entry.coolSetpoint = this.readInt16(); } result.push(entry); @@ -785,7 +625,7 @@ export class BuffaloZcl extends Buffalo { const length = this.readUInt8(); const value: Record = {}; - if (length === 0xff) { + if (length === UINT8_NON_VALUE) { return value; } @@ -818,7 +658,7 @@ export class BuffaloZcl extends Buffalo { case DataType.BITMAP8: case DataType.UINT8: case DataType.ENUM8: { - this.writeZclUInt8(value); + this.writeUInt8(value); break; } case DataType.DATA16: @@ -827,13 +667,13 @@ export class BuffaloZcl extends Buffalo { case DataType.ENUM16: case DataType.CLUSTER_ID: case DataType.ATTR_ID: { - this.writeZclUInt16(value); + this.writeUInt16(value); break; } case DataType.DATA24: case DataType.BITMAP24: case DataType.UINT24: { - this.writeZclUInt24(value); + this.writeUInt24(value); break; } case DataType.DATA32: @@ -841,63 +681,63 @@ export class BuffaloZcl extends Buffalo { case DataType.UINT32: case DataType.UTC: case DataType.BAC_OID: { - this.writeZclUInt32(value); + this.writeUInt32(value); break; } case DataType.DATA40: case DataType.BITMAP40: case DataType.UINT40: { - this.writeZclUInt40(value); + this.writeUInt40(value); break; } case DataType.DATA48: case DataType.BITMAP48: case DataType.UINT48: { - this.writeZclUInt48(value); + this.writeUInt48(value); break; } case DataType.DATA56: case DataType.BITMAP56: case DataType.UINT56: { - this.writeZclUInt56(value); + this.writeUInt56(value); break; } case DataType.DATA64: case DataType.BITMAP64: case DataType.UINT64: { - this.writeZclUInt64(value); + this.writeUInt64(value); break; } case DataType.INT8: { - this.writeZclInt8(value); + this.writeInt8(value); break; } case DataType.INT16: { - this.writeZclInt16(value); + this.writeInt16(value); break; } case DataType.INT24: { - this.writeZclInt24(value); + this.writeInt24(value); break; } case DataType.INT32: { - this.writeZclInt32(value); + this.writeInt32(value); break; } case DataType.INT40: { - this.writeZclInt40(value); + this.writeInt40(value); break; } case DataType.INT48: { - this.writeZclInt48(value); + this.writeInt48(value); break; } case DataType.INT56: { - this.writeZclInt56(value); + this.writeInt56(value); break; } case DataType.INT64: { - this.writeZclInt64(value); + this.writeInt64(value); break; } // case DataType.SEMI_PREC: { @@ -1047,7 +887,7 @@ export class BuffaloZcl extends Buffalo { case DataType.BITMAP8: case DataType.UINT8: case DataType.ENUM8: { - return this.readZclUInt8(); + return this.readUInt8(); } case DataType.DATA16: case DataType.BITMAP16: @@ -1055,63 +895,63 @@ export class BuffaloZcl extends Buffalo { case DataType.ENUM16: case DataType.CLUSTER_ID: case DataType.ATTR_ID: { - return this.readZclUInt16(); + return this.readUInt16(); } case DataType.DATA24: case DataType.BITMAP24: case DataType.UINT24: { - return this.readZclUInt24(); + return this.readUInt24(); } case DataType.DATA32: case DataType.BITMAP32: case DataType.UINT32: case DataType.UTC: case DataType.BAC_OID: { - return this.readZclUInt32(); + return this.readUInt32(); } case DataType.DATA40: case DataType.BITMAP40: case DataType.UINT40: { - return this.readZclUInt40(); + return this.readUInt40(); } case DataType.DATA48: case DataType.BITMAP48: case DataType.UINT48: { - return this.readZclUInt48(); + return this.readUInt48(); } case DataType.DATA56: case DataType.BITMAP56: case DataType.UINT56: { - return this.readZclUInt56(); + return this.readUInt56(); } case DataType.DATA64: case DataType.BITMAP64: case DataType.UINT64: { - return this.readZclUInt64(); + return this.readUInt64(); } case DataType.INT8: { - return this.readZclInt8(); + return this.readInt8(); } case DataType.INT16: { - return this.readZclInt16(); + return this.readInt16(); } case DataType.INT24: { - return this.readZclInt24(); + return this.readInt24(); } case DataType.INT32: { - return this.readZclInt32(); + return this.readInt32(); } case DataType.INT40: { - return this.readZclInt40(); + return this.readInt40(); } case DataType.INT48: { - return this.readZclInt48(); + return this.readInt48(); } case DataType.INT56: { - return this.readZclInt56(); + return this.readInt56(); } case DataType.INT64: { - return this.readZclInt64(); + return this.readInt64(); } // case DataType.SEMI_PREC: { // // https://tc39.es/proposal-float16array/ diff --git a/src/zspec/zcl/definition/cluster.ts b/src/zspec/zcl/definition/cluster.ts index f290d16dbf..c191cf8854 100644 --- a/src/zspec/zcl/definition/cluster.ts +++ b/src/zspec/zcl/definition/cluster.ts @@ -5,224 +5,245 @@ import type {ClusterDefinition, ClusterName} from "./tstype"; export const Clusters: Readonly>> = { genBasic: { - ID: 0, - attributes: { - zclVersion: {ID: 0, type: DataType.UINT8}, - appVersion: {ID: 1, type: DataType.UINT8}, - stackVersion: {ID: 2, type: DataType.UINT8}, - hwVersion: {ID: 3, type: DataType.UINT8}, - manufacturerName: {ID: 4, type: DataType.CHAR_STR}, - modelId: {ID: 5, type: DataType.CHAR_STR}, - dateCode: {ID: 6, type: DataType.CHAR_STR}, - powerSource: {ID: 7, type: DataType.ENUM8}, - appProfileVersion: {ID: 8, type: DataType.ENUM8}, - genericDeviceType: {ID: 9, type: DataType.ENUM8}, - productCode: {ID: 10, type: DataType.OCTET_STR}, - productUrl: {ID: 11, type: DataType.CHAR_STR}, - manufacturerVersionDetails: {ID: 12, type: DataType.CHAR_STR}, - serialNumber: {ID: 13, type: DataType.CHAR_STR}, - productLabel: {ID: 14, type: DataType.CHAR_STR}, - locationDesc: {ID: 16, type: DataType.CHAR_STR}, - physicalEnv: {ID: 17, type: DataType.ENUM8}, - deviceEnabled: {ID: 18, type: DataType.BOOLEAN}, - alarmMask: {ID: 19, type: DataType.BITMAP8}, - disableLocalConfig: {ID: 20, type: DataType.BITMAP8}, - swBuildId: {ID: 0x4000, type: DataType.CHAR_STR}, - schneiderMeterRadioPower: {ID: 0xe200, type: DataType.INT8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, + ID: 0x0000, + attributes: { + zclVersion: {ID: 0x0000, type: DataType.UINT8, required: true, max: 0xff, default: 8}, + appVersion: {ID: 0x0001, type: DataType.UINT8, max: 0xff, default: 0}, + stackVersion: {ID: 0x0002, type: DataType.UINT8, max: 0xff, default: 0}, + hwVersion: {ID: 0x0003, type: DataType.UINT8, max: 0xff, default: 0}, + manufacturerName: {ID: 0x0004, type: DataType.CHAR_STR, default: "", maxLen: 32}, + modelId: {ID: 0x0005, type: DataType.CHAR_STR, default: "", maxLen: 32}, + dateCode: {ID: 0x0006, type: DataType.CHAR_STR, default: "", maxLen: 16}, + powerSource: {ID: 0x0007, type: DataType.ENUM8, required: true, default: 0xff}, + genericDeviceClass: {ID: 0x0008, type: DataType.ENUM8, default: 0xff}, + genericDeviceType: {ID: 0x0009, type: DataType.ENUM8, default: 0xff}, + productCode: {ID: 0x000a, type: DataType.OCTET_STR, default: ""}, + productUrl: {ID: 0x000b, type: DataType.CHAR_STR, default: ""}, + manufacturerVersionDetails: {ID: 0x000c, type: DataType.CHAR_STR, default: ""}, + serialNumber: {ID: 0x000d, type: DataType.CHAR_STR, default: ""}, + productLabel: {ID: 0x000e, type: DataType.CHAR_STR, default: ""}, + locationDesc: {ID: 0x0010, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + physicalEnv: {ID: 0x0011, type: DataType.ENUM8, write: true, default: 0}, + deviceEnabled: {ID: 0x0012, type: DataType.BOOLEAN, write: true, default: 1}, + alarmMask: {ID: 0x0013, type: DataType.BITMAP8, write: true, default: 0}, + disableLocalConfig: {ID: 0x0014, type: DataType.BITMAP8, write: true, default: 0}, + swBuildId: {ID: 0x4000, type: DataType.CHAR_STR, default: "", maxLen: 16}, + // custom + schneiderMeterRadioPower: { + ID: 0xe200, + type: DataType.INT8, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -128, + max: 127, + }, }, commands: { - resetFactDefault: { - ID: 0, - parameters: [], - }, - tuyaSetup: { - ID: 0xf0, - parameters: [], - }, + resetFactDefault: {ID: 0x00, parameters: []}, + // custom + tuyaSetup: {ID: 0xf0, parameters: []}, }, commandsResponse: {}, }, genPowerCfg: { - ID: 1, - attributes: { - mainsVoltage: {ID: 0, type: DataType.UINT16}, - mainsFrequency: {ID: 1, type: DataType.UINT8}, - mainsAlarmMask: {ID: 16, type: DataType.BITMAP8}, - mainsVoltMinThres: {ID: 17, type: DataType.UINT16}, - mainsVoltMaxThres: {ID: 18, type: DataType.UINT16}, - mainsVoltageDwellTripPoint: {ID: 19, type: DataType.UINT16}, - batteryVoltage: {ID: 32, type: DataType.UINT8}, - batteryPercentageRemaining: {ID: 33, type: DataType.UINT8}, - batteryManufacturer: {ID: 48, type: DataType.CHAR_STR}, - batterySize: {ID: 49, type: DataType.ENUM8}, - batteryAHrRating: {ID: 50, type: DataType.UINT16}, - batteryQuantity: {ID: 51, type: DataType.UINT8}, - batteryRatedVoltage: {ID: 52, type: DataType.UINT8}, - batteryAlarmMask: {ID: 53, type: DataType.BITMAP8}, - batteryVoltMinThres: {ID: 54, type: DataType.UINT8}, - batteryVoltThres1: {ID: 55, type: DataType.UINT8}, - batteryVoltThres2: {ID: 56, type: DataType.UINT8}, - batteryVoltThres3: {ID: 57, type: DataType.UINT8}, - batteryPercentMinThres: {ID: 58, type: DataType.UINT8}, - batteryPercentThres1: {ID: 59, type: DataType.UINT8}, - batteryPercentThres2: {ID: 60, type: DataType.UINT8}, - batteryPercentThres3: {ID: 61, type: DataType.UINT8}, - batteryAlarmState: {ID: 62, type: DataType.BITMAP32}, + ID: 0x0001, + attributes: { + mainsVoltage: {ID: 0x0000, type: DataType.UINT16, max: 0xffff}, + mainsFrequency: {ID: 0x0001, type: DataType.UINT8, max: 0xff}, + mainsAlarmMask: {ID: 0x0010, type: DataType.BITMAP8, write: true, default: 0}, + mainsVoltMinThres: {ID: 0x0011, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + mainsVoltMaxThres: {ID: 0x0012, type: DataType.UINT16, write: true, max: 0xffff, default: 0xffff}, + mainsVoltageDwellTripPoint: {ID: 0x0013, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + batteryVoltage: {ID: 0x0020, type: DataType.UINT8, max: 0xff}, + batteryPercentageRemaining: {ID: 0x0021, type: DataType.UINT8, report: true, max: 0xff, default: 0}, + batteryManufacturer: {ID: 0x0030, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + batterySize: {ID: 0x0031, type: DataType.ENUM8, write: true, default: 0xff}, + batteryAHrRating: {ID: 0x0032, type: DataType.UINT16, write: true, max: 0xffff}, + batteryQuantity: {ID: 0x0033, type: DataType.UINT8, write: true, max: 0xff}, + batteryRatedVoltage: {ID: 0x0034, type: DataType.UINT8, write: true, max: 0xff}, + batteryAlarmMask: {ID: 0x0035, type: DataType.BITMAP8, write: true, default: 0}, + batteryVoltMinThres: {ID: 0x0036, type: DataType.UINT8, write: true, max: 0xff, default: 0}, + batteryVoltThres1: {ID: 0x0037, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryVoltThres2: {ID: 0x0038, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryVoltThres3: {ID: 0x0039, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryPercentMinThres: {ID: 0x003a, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryPercentThres1: {ID: 0x003b, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryPercentThres2: {ID: 0x003c, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryPercentThres3: {ID: 0x003d, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + batteryAlarmState: {ID: 0x003e, type: DataType.BITMAP32, report: true, default: 0}, + battery2Voltage: {ID: 0x0040, type: DataType.UINT8, max: 0xff}, + battery2PercentageRemaining: {ID: 0x0041, type: DataType.UINT8, report: true, max: 0xff, default: 0}, + battery2Manufacturer: {ID: 0x0050, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + battery2Size: {ID: 0x0051, type: DataType.ENUM8, write: true, default: 0xff}, + battery2AHrRating: {ID: 0x0052, type: DataType.UINT16, write: true, max: 0xffff}, + battery2Quantity: {ID: 0x0053, type: DataType.UINT8, write: true, max: 0xff}, + battery2RatedVoltage: {ID: 0x0054, type: DataType.UINT8, write: true, max: 0xff}, + battery2AlarmMask: {ID: 0x0055, type: DataType.BITMAP8, write: true, default: 0}, + battery2VoltageMinThreshold: {ID: 0x0056, type: DataType.UINT8, write: true, max: 0xff, default: 0}, + battery2VoltageThreshold1: {ID: 0x0057, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2VoltageThreshold2: {ID: 0x0058, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2VoltageThreshold3: {ID: 0x0059, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2PercentageMinThreshold: {ID: 0x005a, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2PercentageThreshold1: {ID: 0x005b, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2PercentageThreshold2: {ID: 0x005c, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2PercentageThreshold3: {ID: 0x005d, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery2AlarmState: {ID: 0x005e, type: DataType.BITMAP32, report: true, default: 0}, + battery3Voltage: {ID: 0x0060, type: DataType.UINT8, max: 0xff}, + battery3PercentageRemaining: {ID: 0x0061, type: DataType.UINT8, report: true, max: 0xff, default: 0}, + battery3Manufacturer: {ID: 0x0070, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + battery3Size: {ID: 0x0071, type: DataType.ENUM8, write: true, default: 0xff}, + battery3AHrRating: {ID: 0x0072, type: DataType.UINT16, write: true, max: 0xffff}, + battery3Quantity: {ID: 0x0073, type: DataType.UINT8, write: true, max: 0xff}, + battery3RatedVoltage: {ID: 0x0074, type: DataType.UINT8, write: true, max: 0xff}, + battery3AlarmMask: {ID: 0x0075, type: DataType.BITMAP8, write: true, default: 0}, + battery3VoltageMinThreshold: {ID: 0x0076, type: DataType.UINT8, write: true, max: 0xff, default: 0}, + battery3VoltageThreshold1: {ID: 0x0077, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3VoltageThreshold2: {ID: 0x0078, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3VoltageThreshold3: {ID: 0x0079, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3PercentageMinThreshold: {ID: 0x007a, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3PercentageThreshold1: {ID: 0x007b, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3PercentageThreshold2: {ID: 0x007c, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3PercentageThreshold3: {ID: 0x007d, type: DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0}, + battery3AlarmState: {ID: 0x007e, type: DataType.BITMAP32, report: true, default: 0}, }, commands: {}, commandsResponse: {}, }, genDeviceTempCfg: { - ID: 2, - attributes: { - currentTemperature: {ID: 0, type: DataType.INT16}, - minTempExperienced: {ID: 1, type: DataType.INT16}, - maxTempExperienced: {ID: 2, type: DataType.INT16}, - overTempTotalDwell: {ID: 3, type: DataType.UINT16}, - devTempAlarmMask: {ID: 16, type: DataType.BITMAP8}, - lowTempThres: {ID: 17, type: DataType.INT16}, - highTempThres: {ID: 18, type: DataType.INT16}, - lowTempDwellTripPoint: {ID: 19, type: DataType.UINT24}, - highTempDwellTripPoint: {ID: 20, type: DataType.UINT24}, + ID: 0x0002, + attributes: { + currentTemperature: {ID: 0x0000, type: DataType.INT16, required: true, min: -200, max: 200}, + minTempExperienced: {ID: 0x0001, type: DataType.INT16, min: -200, max: 200}, + maxTempExperienced: {ID: 0x0002, type: DataType.INT16, min: -200, max: 200}, + overTempTotalDwell: {ID: 0x0003, type: DataType.UINT16, max: 0xffff, default: 0}, + devTempAlarmMask: {ID: 0x0010, type: DataType.BITMAP8, write: true, default: 0}, + lowTempThres: {ID: 0x0011, type: DataType.INT16, write: true, min: -200, max: 200}, + highTempThres: {ID: 0x0012, type: DataType.INT16, write: true, min: -200, max: 200}, + lowTempDwellTripPoint: {ID: 0x0013, type: DataType.UINT24, write: true, max: 0xffffff}, + highTempDwellTripPoint: {ID: 0x0014, type: DataType.UINT24, write: true, max: 0xffffff}, }, commands: {}, commandsResponse: {}, }, genIdentify: { - ID: 3, + ID: 0x0003, attributes: { - identifyTime: {ID: 0, type: DataType.UINT16}, - identifyCommissionState: {ID: 1, type: DataType.UNKNOWN}, + identifyTime: {ID: 0x0000, type: DataType.UINT16, write: true, required: true, max: 0xffff, default: 0}, }, commands: { - identify: { - ID: 0, - parameters: [{name: "identifytime", type: DataType.UINT16}], - }, - identifyQuery: { - ID: 1, - parameters: [], - }, - ezmodeInvoke: { - ID: 2, - parameters: [{name: "action", type: DataType.UINT8}], - }, - updateCommissionState: { - ID: 3, + identify: {ID: 0x00, parameters: [{name: "identifytime", type: DataType.UINT16}], required: true}, + identifyQuery: {ID: 0x01, parameters: [], required: true}, + triggerEffect: { + ID: 0x40, parameters: [ - {name: "action", type: DataType.UINT8}, - {name: "commstatemask", type: DataType.UINT8}, + {name: "effectid", type: DataType.ENUM8}, + {name: "effectvariant", type: DataType.ENUM8}, ], }, - triggerEffect: { - ID: 64, + // custom + ezmodeInvoke: {ID: 0x02, parameters: [{name: "action", type: DataType.UINT8, max: 0xff}]}, + updateCommissionState: { + ID: 0x03, parameters: [ - {name: "effectid", type: DataType.UINT8}, - {name: "effectvariant", type: DataType.UINT8}, + {name: "action", type: DataType.UINT8, max: 0xff}, + {name: "commstatemask", type: DataType.UINT8, max: 0xff}, ], }, }, commandsResponse: { - identifyQueryRsp: { - ID: 0, - parameters: [{name: "timeout", type: DataType.UINT16}], - }, + identifyQueryRsp: {ID: 0x00, parameters: [{name: "timeout", type: DataType.UINT16, max: 0xffff}], required: true}, }, }, + /** Note: an end device being "sleepy" makes everything optional, even if marked mandatory */ genGroups: { - ID: 4, + ID: 0x0004, attributes: { - nameSupport: {ID: 0, type: DataType.BITMAP8}, + nameSupport: {ID: 0x0000, type: DataType.BITMAP8, required: true, default: 0}, }, commands: { add: { - ID: 0, + ID: 0x00, response: 0, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "groupname", type: DataType.CHAR_STR}, ], + required: true, }, - view: { - ID: 1, - response: 1, - parameters: [{name: "groupid", type: DataType.UINT16}], - }, + view: {ID: 0x01, response: 1, parameters: [{name: "groupid", type: DataType.UINT16}], required: true}, getMembership: { - ID: 2, + ID: 0x02, response: 2, parameters: [ {name: "groupcount", type: DataType.UINT8}, {name: "grouplist", type: BuffaloZclDataType.LIST_UINT16}, ], + required: true, }, - remove: { - ID: 3, - response: 3, - parameters: [{name: "groupid", type: DataType.UINT16}], - }, - removeAll: { - ID: 4, - parameters: [], - }, + remove: {ID: 0x03, response: 3, parameters: [{name: "groupid", type: DataType.UINT16}], required: true}, + removeAll: {ID: 0x04, parameters: [], required: true}, addIfIdentifying: { - ID: 5, + ID: 0x05, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "groupname", type: DataType.CHAR_STR}, ], + required: true, }, - miboxerSetZones: { - ID: 0xf0, - parameters: [{name: "zones", type: BuffaloZclDataType.LIST_MIBOXER_ZONES}], - }, + // custom + miboxerSetZones: {ID: 0xf0, parameters: [{name: "zones", type: BuffaloZclDataType.LIST_MIBOXER_ZONES}]}, }, commandsResponse: { addRsp: { - ID: 0, + ID: 0x00, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, ], + required: true, }, viewRsp: { - ID: 1, + ID: 0x01, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, {name: "groupname", type: DataType.CHAR_STR}, ], + required: true, }, getMembershipRsp: { - ID: 2, + ID: 0x02, parameters: [ {name: "capacity", type: DataType.UINT8}, {name: "groupcount", type: DataType.UINT8}, {name: "grouplist", type: BuffaloZclDataType.LIST_UINT16}, ], + required: true, }, removeRsp: { - ID: 3, + ID: 0x03, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, ], + required: true, }, }, }, + /** Note: an end device being "sleepy" makes everything optional, even if marked mandatory */ genScenes: { - ID: 5, + ID: 0x0005, attributes: { - count: {ID: 0, type: DataType.UINT8}, - currentScene: {ID: 1, type: DataType.UINT8}, - currentGroup: {ID: 2, type: DataType.UINT16}, - sceneValid: {ID: 3, type: DataType.BOOLEAN}, - nameSupport: {ID: 4, type: DataType.BITMAP8}, - lastCfgBy: {ID: 5, type: DataType.IEEE_ADDR}, + count: {ID: 0x0000, type: DataType.UINT8, required: true, max: 0xff, default: 0}, + currentScene: {ID: 0x0001, type: DataType.UINT8, required: true, max: 0xff, default: 0}, + currentGroup: {ID: 0x0002, type: DataType.UINT16, required: true, max: 0xfff7, default: 0}, + sceneValid: {ID: 0x0003, type: DataType.BOOLEAN, required: true, default: 0}, + nameSupport: {ID: 0x0004, type: DataType.BITMAP8, required: true, default: 0}, + lastCfgBy: {ID: 0x0005, type: DataType.IEEE_ADDR, special: [["UnknownOrNotConfigured", "ffffffffffffffff"]]}, }, commands: { add: { - ID: 0, + ID: 0x00, response: 0, parameters: [ {name: "groupid", type: DataType.UINT16}, @@ -231,50 +252,48 @@ export const Clusters: Readonly> {name: "scenename", type: DataType.CHAR_STR}, {name: "extensionfieldsets", type: BuffaloZclDataType.EXTENSION_FIELD_SETS}, ], + required: true, }, view: { - ID: 1, + ID: 0x01, response: 1, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, ], + required: true, }, remove: { - ID: 2, + ID: 0x02, response: 2, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, ], + required: true, }, - removeAll: { - ID: 3, - response: 3, - parameters: [{name: "groupid", type: DataType.UINT16}], - }, + removeAll: {ID: 0x03, response: 3, parameters: [{name: "groupid", type: DataType.UINT16}], required: true}, store: { - ID: 4, + ID: 0x04, response: 4, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, ], + required: true, }, recall: { - ID: 5, + ID: 0x05, parameters: [ {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, + {name: "transitionTime", type: DataType.UINT16}, ], + required: true, }, - getSceneMembership: { - ID: 6, - response: 6, - parameters: [{name: "groupid", type: DataType.UINT16}], - }, + getSceneMembership: {ID: 0x06, response: 6, parameters: [{name: "groupid", type: DataType.UINT16}], required: true}, enhancedAdd: { - ID: 64, + ID: 0x40, response: 64, parameters: [ {name: "groupid", type: DataType.UINT16}, @@ -285,7 +304,7 @@ export const Clusters: Readonly> ], }, enhancedView: { - ID: 65, + ID: 0x41, response: 65, parameters: [ {name: "groupid", type: DataType.UINT16}, @@ -293,45 +312,41 @@ export const Clusters: Readonly> ], }, copy: { - ID: 66, + ID: 0x42, response: 66, parameters: [ - {name: "mode", type: DataType.UINT8}, + {name: "mode", type: DataType.BITMAP8}, {name: "groupidfrom", type: DataType.UINT16}, {name: "sceneidfrom", type: DataType.UINT8}, {name: "groupidto", type: DataType.UINT16}, {name: "sceneidto", type: DataType.UINT8}, ], }, + // custom tradfriArrowSingle: { - ID: 7, + ID: 0x07, parameters: [ - {name: "value", type: DataType.UINT16}, - {name: "value2", type: DataType.UINT16}, + {name: "value", type: DataType.UINT16, max: 0xffff}, + {name: "value2", type: DataType.UINT16, max: 0xffff}, ], }, - tradfriArrowHold: { - ID: 8, - parameters: [{name: "value", type: DataType.UINT16}], - }, - tradfriArrowRelease: { - ID: 9, - parameters: [{name: "value", type: DataType.UINT16}], - }, + tradfriArrowHold: {ID: 0x08, parameters: [{name: "value", type: DataType.UINT16, max: 0xffff}]}, + tradfriArrowRelease: {ID: 0x09, parameters: [{name: "value", type: DataType.UINT16, max: 0xffff}]}, }, commandsResponse: { addRsp: { - ID: 0, + ID: 0x00, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupId", type: DataType.UINT16}, {name: "sceneId", type: DataType.UINT8}, ], + required: true, }, viewRsp: { - ID: 1, + ID: 0x01, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, { @@ -350,35 +365,49 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, ], + required: true, }, removeRsp: { - ID: 2, + ID: 0x02, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, ], + required: true, }, removeAllRsp: { - ID: 3, + ID: 0x03, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, ], + required: true, }, storeRsp: { - ID: 4, + ID: 0x04, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, ], + required: true, }, getSceneMembershipRsp: { - ID: 6, + ID: 0x06, parameters: [ - {name: "status", type: DataType.UINT8}, - {name: "capacity", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, + { + name: "capacity", + type: DataType.UINT8, + min: 1, + max: 0xff, + special: [ + ["NoFurtherScenesMayBeAdded", "00"], + ["AtLeastOneFurtherSceneMayBeAdded", "fe"], + ["Unknown", "ff"], + ], + }, {name: "groupid", type: DataType.UINT16}, { name: "scenecount", @@ -391,19 +420,20 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, ], + required: true, }, enhancedAddRsp: { - ID: 64, + ID: 0x40, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupId", type: DataType.UINT16}, {name: "sceneId", type: DataType.UINT8}, ], }, enhancedViewRsp: { - ID: 65, + ID: 0x41, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupid", type: DataType.UINT16}, {name: "sceneid", type: DataType.UINT8}, { @@ -424,9 +454,9 @@ export const Clusters: Readonly> ], }, copyRsp: { - ID: 66, + ID: 0x42, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "groupidfrom", type: DataType.UINT16}, {name: "sceneidfrom", type: DataType.UINT8}, ], @@ -434,268 +464,339 @@ export const Clusters: Readonly> }, }, genOnOff: { - ID: 6, - attributes: { - onOff: {ID: 0, type: DataType.BOOLEAN}, - globalSceneCtrl: {ID: 16384, type: DataType.BOOLEAN}, - onTime: {ID: 16385, type: DataType.UINT16}, - offWaitTime: {ID: 16386, type: DataType.UINT16}, - startUpOnOff: {ID: 16387, type: DataType.ENUM8}, - tuyaBacklightSwitch: {ID: 0x5000, type: DataType.ENUM8}, - tuyaBacklightMode: {ID: 0x8001, type: DataType.ENUM8}, - moesStartUpOnOff: {ID: 0x8002, type: DataType.ENUM8}, - tuyaOperationMode: {ID: 0x8004, type: DataType.ENUM8}, - elkoPreWarningTime: {ID: 0xe000, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoOnTimeReload: {ID: 0xe001, type: DataType.UINT32, manufacturerCode: ManufacturerCode.ADEO}, - elkoOnTimeReloadOptions: {ID: 0xe002, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO}, - nodonTransitionTime: {ID: 0x0001, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NODON}, + ID: 0x0006, + attributes: { + onOff: {ID: 0x0000, type: DataType.BOOLEAN, report: true, scene: true, required: true, default: 0}, + globalSceneCtrl: {ID: 0x4000, type: DataType.BOOLEAN, default: 1}, + onTime: {ID: 0x4001, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + offWaitTime: {ID: 0x4002, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + startUpOnOff: {ID: 0x4003, type: DataType.ENUM8, write: true, max: 0xff, special: [["SetToPreviousValue", "ff"]]}, + // custom + nodonTransitionTime: {ID: 0x0001, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NODON, write: true, max: 0xffff}, + tuyaBacklightSwitch: {ID: 0x5000, type: DataType.ENUM8, write: true, max: 0xff}, + tuyaBacklightMode: {ID: 0x8001, type: DataType.ENUM8, write: true, max: 0xff}, + moesStartUpOnOff: {ID: 0x8002, type: DataType.ENUM8, write: true, max: 0xff}, + tuyaOperationMode: {ID: 0x8004, type: DataType.ENUM8, write: true, max: 0xff}, + elkoPreWarningTime: {ID: 0xe000, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoOnTimeReload: {ID: 0xe001, type: DataType.UINT32, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffffffff}, + elkoOnTimeReloadOptions: {ID: 0xe002, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO, write: true}, }, commands: { - off: { - ID: 0, - parameters: [], - }, - on: { - ID: 1, - parameters: [], - }, - toggle: { - ID: 2, - parameters: [], - }, + off: {ID: 0x00, parameters: [], required: true}, + on: {ID: 0x01, parameters: [], required: true}, + toggle: {ID: 0x02, parameters: [], required: true}, offWithEffect: { - ID: 64, + ID: 0x40, parameters: [ - {name: "effectid", type: DataType.UINT8}, + {name: "effectid", type: DataType.ENUM8}, {name: "effectvariant", type: DataType.UINT8}, ], }, - onWithRecallGlobalScene: { - ID: 65, - parameters: [], - }, + onWithRecallGlobalScene: {ID: 0x41, parameters: []}, onWithTimedOff: { - ID: 66, + ID: 0x42, parameters: [ {name: "ctrlbits", type: DataType.UINT8}, {name: "ontime", type: DataType.UINT16}, {name: "offwaittime", type: DataType.UINT16}, ], }, + // custom + tuyaAction2: {ID: 0xfc, parameters: [{name: "value", type: DataType.UINT8, max: 0xff}]}, tuyaAction: { ID: 0xfd, parameters: [ - {name: "value", type: DataType.UINT8}, + {name: "value", type: DataType.UINT8, max: 0xff}, {name: "data", type: BuffaloZclDataType.BUFFER}, ], }, - tuyaAction2: { - ID: 0xfc, - parameters: [{name: "value", type: DataType.UINT8}], - }, }, commandsResponse: {}, }, genOnOffSwitchCfg: { - ID: 7, + ID: 0x0007, attributes: { - switchType: {ID: 0, type: DataType.ENUM8}, - switchMultiFunction: {ID: 2, type: DataType.UNKNOWN}, - switchActions: {ID: 16, type: DataType.ENUM8}, + switchType: {ID: 0x0000, type: DataType.ENUM8, required: true, min: 0x00, max: 0x02}, + switchActions: {ID: 0x0010, type: DataType.ENUM8, required: true, write: true, min: 0, max: 2}, }, commands: {}, commandsResponse: {}, }, genLevelCtrl: { - ID: 8, - attributes: { - currentLevel: {ID: 0, type: DataType.UINT8}, - remainingTime: {ID: 1, type: DataType.UINT16}, - minLevel: {ID: 2, type: DataType.UINT8}, - maxLevel: {ID: 3, type: DataType.UINT8}, - options: {ID: 15, type: DataType.BITMAP8}, - onOffTransitionTime: {ID: 16, type: DataType.UINT16}, - onLevel: {ID: 17, type: DataType.UINT8}, - onTransitionTime: {ID: 18, type: DataType.UINT16}, - offTransitionTime: {ID: 19, type: DataType.UINT16}, - defaultMoveRate: {ID: 20, type: DataType.UINT16}, - startUpCurrentLevel: {ID: 16384, type: DataType.UINT8}, - elkoStartUpCurrentLevel: {ID: 0x4000, type: DataType.UINT8, manufacturerCode: ManufacturerCode.ADEO}, + ID: 0x0008, + attributes: { + currentLevel: { + ID: 0x0000, + type: DataType.UINT8, + report: true, + scene: true, + required: true, + default: 0xff, + // for genLevelCtrlForLighting: + // min: 1, + // max: 0xfe, + }, + remainingTime: {ID: 0x0001, type: DataType.UINT16, max: 0xffff, default: 0}, + minLevel: {ID: 0x0002, type: DataType.UINT8, default: 0}, + maxLevel: {ID: 0x0003, type: DataType.UINT8, max: 0xff, default: 0xff}, + currentFrequency: {ID: 0x0004, type: DataType.UINT16, report: true, default: 0}, + minFrequency: {ID: 0x0005, type: DataType.UINT16, default: 0}, + maxFrequency: {ID: 0x0006, type: DataType.UINT16, max: 0xffff, default: 0}, + options: {ID: 0x000f, type: DataType.BITMAP8, write: true, default: 0}, + onOffTransitionTime: {ID: 0x0010, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + onLevel: {ID: 0x0011, type: DataType.UINT8, write: true, default: 0xff}, + onTransitionTime: {ID: 0x0012, type: DataType.UINT16, write: true, max: 0xfffe, default: 0xffff}, + offTransitionTime: {ID: 0x0013, type: DataType.UINT16, write: true, max: 0xfffe, default: 0xffff}, + defaultMoveRate: {ID: 0x0014, type: DataType.UINT8, write: true, max: 0xfe}, + startUpCurrentLevel: { + ID: 0x4000, + type: DataType.UINT8, + write: true, + max: 0xff, + special: [ + ["MinimumDeviceValuePermitted", "00"], + ["SetToPreviousValue", "ff"], + ], + }, + // custom + // TODO: needed? + elkoStartUpCurrentLevel: {ID: 0x4000, type: DataType.UINT8, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xff}, }, commands: { moveToLevel: { - ID: 0, + ID: 0x00, parameters: [ {name: "level", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, move: { - ID: 1, + ID: 0x01, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, step: { - ID: 2, + ID: 0x02, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, stop: { - ID: 3, - parameters: [], + ID: 0x03, + parameters: [ + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, }, moveToLevelWithOnOff: { - ID: 4, + ID: 0x04, parameters: [ {name: "level", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, moveWithOnOff: { - ID: 5, + ID: 0x05, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, stepWithOnOff: { - ID: 6, + ID: 0x06, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + required: true, }, stopWithOnOff: { - ID: 7, - parameters: [], + ID: 0x07, + parameters: [ + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, }, + // only `required: true` if `currentFrequency` attribute supported + moveToClosestFrequency: {ID: 0x08, parameters: [{name: "frequency", type: DataType.UINT16}]}, + // custom moveToLevelTuya: { - ID: 240, + ID: 0xf0, parameters: [ - {name: "level", type: DataType.UINT16}, - {name: "transtime", type: DataType.UINT16}, + {name: "level", type: DataType.UINT16, max: 0xffff}, + {name: "transtime", type: DataType.UINT16, max: 0xffff}, ], }, }, commandsResponse: {}, }, genAlarms: { - ID: 9, + ID: 0x0009, attributes: { - alarmCount: {ID: 0, type: DataType.UINT16}, + alarmCount: {ID: 0x0000, type: DataType.UINT16, max: 0xffff, default: 0}, }, commands: { reset: { - ID: 0, + ID: 0x00, parameters: [ - {name: "alarmcode", type: DataType.UINT8}, - {name: "clusterid", type: DataType.UINT16}, + {name: "alarmcode", type: DataType.ENUM8}, + {name: "clusterid", type: DataType.CLUSTER_ID}, ], + required: true, }, - resetAll: { - ID: 1, - parameters: [], - }, - getAlarm: { - ID: 2, - parameters: [], - }, - resetLog: { - ID: 3, - parameters: [], - }, - publishEventLog: { - ID: 4, - parameters: [], - }, + resetAll: {ID: 0x01, parameters: [], required: true}, + getAlarm: {ID: 0x02, parameters: []}, + resetLog: {ID: 0x03, parameters: []}, + // custom + publishEventLog: {ID: 0x04, parameters: []}, }, commandsResponse: { alarm: { - ID: 0, + ID: 0x00, parameters: [ - {name: "alarmcode", type: DataType.UINT8}, - {name: "clusterid", type: DataType.UINT16}, + {name: "alarmcode", type: DataType.ENUM8}, + {name: "clusterid", type: DataType.CLUSTER_ID}, ], + required: true, }, getRsp: { - ID: 1, + ID: 0x01, parameters: [ - {name: "status", type: DataType.UINT8}, - {name: "alarmcode", type: DataType.UINT8}, - {name: "clusterid", type: DataType.UINT16}, - {name: "timestamp", type: DataType.UINT32}, + {name: "status", type: DataType.ENUM8}, + { + name: "alarmcode", + type: DataType.ENUM8, + conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + }, + { + name: "clusterid", + type: DataType.CLUSTER_ID, + conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + }, + { + name: "timestamp", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + }, ], }, - getEventLog: { - ID: 2, - parameters: [], - }, + // custom + getEventLog: {ID: 0x02, parameters: []}, }, }, genTime: { - ID: 10, - attributes: { - time: {ID: 0, type: DataType.UTC}, - timeStatus: {ID: 1, type: DataType.BITMAP8}, - timeZone: {ID: 2, type: DataType.INT32}, - dstStart: {ID: 3, type: DataType.UINT32}, - dstEnd: {ID: 4, type: DataType.UINT32}, - dstShift: {ID: 5, type: DataType.INT32}, - standardTime: {ID: 6, type: DataType.UINT32}, - localTime: {ID: 7, type: DataType.UINT32}, - lastSetTime: {ID: 8, type: DataType.UTC}, - validUntilTime: {ID: 9, type: DataType.UTC}, + ID: 0x000a, + attributes: { + time: {ID: 0x0000, type: DataType.UTC, write: true, required: true, max: 0xfffffffe, default: 0xffffffff}, + timeStatus: {ID: 0x0001, type: DataType.BITMAP8, write: true, required: true, default: 0}, + timeZone: {ID: 0x0002, type: DataType.INT32, write: true, min: -86400, max: 86400, default: 0}, + dstStart: {ID: 0x0003, type: DataType.UINT32, write: true, max: 0xfffffffe, default: 0xffffffff}, + dstEnd: {ID: 0x0004, type: DataType.UINT32, write: true, max: 0xfffffffe, default: 0xffffffff}, + dstShift: {ID: 0x0005, type: DataType.INT32, write: true, min: -86400, max: 86400, default: 0}, + standardTime: {ID: 0x0006, type: DataType.UINT32, max: 0xfffffffe, default: 0xffffffff}, + localTime: {ID: 0x0007, type: DataType.UINT32, max: 0xfffffffe, default: 0xffffffff}, + lastSetTime: {ID: 0x0008, type: DataType.UTC, default: 0xffffffff}, + validUntilTime: {ID: 0x0009, type: DataType.UTC, write: true, default: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genRssiLocation: { - ID: 11, - attributes: { - /** read/write | [2: coordinator system, 1: 2-D, 1: absolute] */ - type: {ID: 0, type: DataType.DATA8}, - /** read/write | @see LocationMethod */ - method: {ID: 1, type: DataType.ENUM8}, - age: {ID: 2, type: DataType.UINT16}, - /** 0x00..0x64 i.e. zero..complete confidence */ - qualityMeasure: {ID: 3, type: DataType.UINT8}, - numOfDevices: {ID: 4, type: DataType.UINT8}, - /** read/write | -0x8000..0x7fff */ - coordinate1: {ID: 16, type: DataType.INT16}, - /** read/write | -0x8000..0x7fff */ - coordinate2: {ID: 17, type: DataType.INT16}, - /** read/write | -0x8000..0x7fff | optional */ - coordinate3: {ID: 18, type: DataType.INT16}, - /** read/write | -0x8000..0x7fff */ - power: {ID: 19, type: DataType.INT16}, - /** read/write | 0x0000..0xffff */ - pathLossExponent: {ID: 20, type: DataType.UINT16}, - /** read/write | 0x0000..0xffff | optional */ - reportingPeriod: {ID: 21, type: DataType.UINT16}, - /** read/write | 0x0000..0xffff | optional */ - calcPeriod: {ID: 22, type: DataType.UINT16}, - /** read/write | 0x01..0xff */ - numRSSIMeasurements: {ID: 23, type: DataType.UINT8}, + ID: 0x000b, + attributes: { + /** [2: coordinator system, 1: 2-D, 1: absolute] */ + type: {ID: 0x0000, type: DataType.DATA8, required: true, write: true}, + method: {ID: 0x0001, type: DataType.ENUM8, required: true, write: true}, + age: {ID: 0x0002, type: DataType.UINT16, max: 0xffff}, + qualityMeasure: {ID: 0x0003, type: DataType.UINT8, max: 100}, + numOfDevices: {ID: 0x0004, type: DataType.UINT8, max: 0xff}, + coordinate1: {ID: 0x0010, type: DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff}, + coordinate2: {ID: 0x0011, type: DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff}, + coordinate3: {ID: 0x0012, type: DataType.INT16, write: true, min: -0x8000, max: 0x7fff}, + power: {ID: 0x0013, type: DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff}, + pathLossExponent: {ID: 0x0014, type: DataType.UINT16, required: true, write: true}, + reportingPeriod: {ID: 0x0015, type: DataType.UINT16, write: true, max: 0xffff}, + calcPeriod: {ID: 0x0016, type: DataType.UINT16, write: true, max: 0xffff}, + numRSSIMeasurements: {ID: 0x0017, type: DataType.UINT8, required: true, write: true, min: 0x01, max: 0xff}, }, commands: { setAbsolute: { - ID: 0, + ID: 0x00, parameters: [ - {name: "coord1", type: DataType.INT16}, - {name: "coord2", type: DataType.INT16}, - {name: "coord3", type: DataType.INT16}, + {name: "coordinate1", type: DataType.INT16}, + {name: "coordinate2", type: DataType.INT16}, + {name: "coordinate3", type: DataType.INT16}, {name: "power", type: DataType.INT16}, {name: "pathLossExponent", type: DataType.UINT16}, ], + required: true, }, setDeviceConfig: { - ID: 1, + ID: 0x01, parameters: [ {name: "power", type: DataType.INT16}, {name: "pathLossExponent", type: DataType.UINT16}, @@ -703,13 +804,11 @@ export const Clusters: Readonly> {name: "numRssiMeasurements", type: DataType.UINT8}, {name: "reportingPeriod", type: DataType.UINT16}, ], + required: true, }, - getDeviceConfig: { - ID: 2, - parameters: [{name: "targetAddr", type: DataType.IEEE_ADDR}], - }, + getDeviceConfig: {ID: 0x02, parameters: [{name: "targetAddr", type: DataType.IEEE_ADDR}], required: true}, getLocationData: { - ID: 3, + ID: 0x03, parameters: [ /** [3: reserved, 1: compactResponse, 1: broadcastResponse, 1: broadcastIndicator, 1: recalculate, 1: absoluteOnly] */ {name: "info", type: DataType.BITMAP8}, @@ -720,9 +819,10 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.BITMASK_SET, param: "info", mask: 0b100, reversed: true}], }, ], + required: true, }, rssiResponse: { - ID: 4, + ID: 0x04, parameters: [ {name: "replyingDevice", type: DataType.IEEE_ADDR}, {name: "x", type: DataType.INT16}, @@ -733,7 +833,7 @@ export const Clusters: Readonly> ], }, sendPings: { - ID: 5, + ID: 0x05, parameters: [ {name: "targetAddr", type: DataType.IEEE_ADDR}, {name: "numRssiMeasurements", type: DataType.UINT8}, @@ -741,7 +841,7 @@ export const Clusters: Readonly> ], }, anchorNodeAnnounce: { - ID: 6, + ID: 0x06, parameters: [ {name: "anchorNodeAddr", type: DataType.IEEE_ADDR}, {name: "x", type: DataType.INT16}, @@ -752,7 +852,7 @@ export const Clusters: Readonly> }, commandsResponse: { deviceConfigResponse: { - ID: 0, + ID: 0x00, parameters: [ {name: "status", type: DataType.ENUM8}, { @@ -781,9 +881,10 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, ], + required: true, }, locationDataResponse: { - ID: 1, + ID: 0x01, parameters: [ {name: "status", type: DataType.ENUM8}, { @@ -792,17 +893,17 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, { - name: "coord1", + name: "coordinate1", type: DataType.INT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, { - name: "coord2", + name: "coordinate2", type: DataType.INT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, { - name: "coord3", + name: "coordinate3", type: DataType.INT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, @@ -832,15 +933,16 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, ], + required: true, }, locationDataNotification: { - ID: 2, + ID: 0x02, parameters: [ {name: "type", type: DataType.DATA8}, - {name: "coord1", type: DataType.INT16}, - {name: "coord2", type: DataType.INT16}, + {name: "coordinate1", type: DataType.INT16}, + {name: "coordinate2", type: DataType.INT16}, { - name: "coord3", + name: "coordinate3", type: DataType.INT16, conditions: [{type: ParameterCondition.BITMASK_SET, param: "type", mask: 0b10, reversed: true}], }, @@ -864,13 +966,13 @@ export const Clusters: Readonly> ], }, compactLocationDataNotification: { - ID: 3, + ID: 0x03, parameters: [ {name: "type", type: DataType.DATA8}, - {name: "coord1", type: DataType.INT16}, - {name: "coord2", type: DataType.INT16}, + {name: "coordinate1", type: DataType.INT16}, + {name: "coordinate2", type: DataType.INT16}, { - name: "coord3", + name: "coordinate3", type: DataType.INT16, conditions: [{type: ParameterCondition.BITMASK_SET, param: "type", mask: 0b10, reversed: true}], }, @@ -885,22 +987,17 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true}], }, ], + required: true, }, - rssiPing: { - ID: 4, - parameters: [{name: "type", type: DataType.DATA8}], - }, - rssiRequest: { - ID: 5, - parameters: [], - }, + rssiPing: {ID: 0x04, parameters: [{name: "type", type: DataType.DATA8}], required: true}, + rssiRequest: {ID: 0x05, parameters: []}, reportRssiMeasurements: { - ID: 6, + ID: 0x06, parameters: [ {name: "measuringDeviceAddr", type: DataType.IEEE_ADDR}, {name: "numNeighbors", type: DataType.UINT8}, // TODO: needs special Buffalo read(/write) - // {name: "neighborInfo", type: DataType.ARRAY}, + // {name: "neighborInfo", type: DataType.LIST_NEIGHBORS_INFO}, // {name: "neighbor", type: DataType.IEEE_ADDR}, // {name: "x", type: DataType.INT16}, // {name: "y", type: DataType.INT16}, @@ -909,269 +1006,409 @@ export const Clusters: Readonly> // {name: "numRssiMeasurements", type: DataType.UINT8}, ], }, - requestOwnLocation: { - ID: 7, - parameters: [{name: "blindNodeAddr", type: DataType.IEEE_ADDR}], - }, + requestOwnLocation: {ID: 0x07, parameters: [{name: "blindNodeAddr", type: DataType.IEEE_ADDR}]}, }, }, genAnalogInput: { - ID: 12, - attributes: { - description: {ID: 28, type: DataType.CHAR_STR}, - maxPresentValue: {ID: 65, type: DataType.SINGLE_PREC}, - minPresentValue: {ID: 69, type: DataType.SINGLE_PREC}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.SINGLE_PREC}, - reliability: {ID: 103, type: DataType.ENUM8}, - resolution: {ID: 106, type: DataType.SINGLE_PREC}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - engineeringUnits: {ID: 117, type: DataType.ENUM16}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x000c, + attributes: { + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + maxPresentValue: {ID: 0x0041, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + minPresentValue: {ID: 0x0045, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.SINGLE_PREC, required: true, write: true, report: true}, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + resolution: {ID: 0x006a, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, report: true, max: 0x0f, default: 0}, + engineeringUnits: {ID: 0x0075, type: DataType.ENUM16, write: true, writeOptional: true, max: 0xffff}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genAnalogOutput: { - ID: 13, - attributes: { - description: {ID: 28, type: DataType.CHAR_STR}, - maxPresentValue: {ID: 65, type: DataType.SINGLE_PREC}, - minPresentValue: {ID: 69, type: DataType.SINGLE_PREC}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.SINGLE_PREC}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.SINGLE_PREC}, - resolution: {ID: 106, type: DataType.SINGLE_PREC}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - engineeringUnits: {ID: 117, type: DataType.ENUM16}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x000d, + attributes: { + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + maxPresentValue: {ID: 0x0041, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + minPresentValue: {ID: 0x0045, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.SINGLE_PREC, required: true, write: true, report: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_ANALOG_PRIORITY + write: true, + // default: [[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + relinquishDefault: {ID: 0x0068, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + resolution: {ID: 0x006a, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, report: true, max: 0x0f, default: 0}, + engineeringUnits: {ID: 0x0075, type: DataType.ENUM16, write: true, writeOptional: true, max: 0xffff}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genAnalogValue: { - ID: 14, - attributes: { - description: {ID: 28, type: DataType.CHAR_STR}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.SINGLE_PREC}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.SINGLE_PREC}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - engineeringUnits: {ID: 117, type: DataType.ENUM16}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x000e, + attributes: { + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.SINGLE_PREC, required: true, write: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_ANALOG_PRIORITY + write: true, + // default: [[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + relinquishDefault: {ID: 0x0068, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + engineeringUnits: {ID: 0x0075, type: DataType.ENUM16, write: true, writeOptional: true, max: 0xffff}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genBinaryInput: { - ID: 15, - attributes: { - activeText: {ID: 4, type: DataType.CHAR_STR}, - description: {ID: 28, type: DataType.CHAR_STR}, - inactiveText: {ID: 46, type: DataType.CHAR_STR}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - polarity: {ID: 84, type: DataType.ENUM8}, - presentValue: {ID: 85, type: DataType.BOOLEAN}, - reliability: {ID: 103, type: DataType.ENUM8}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x000f, + attributes: { + activeText: {ID: 0x0004, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + inactiveText: {ID: 0x002e, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + polarity: {ID: 0x0054, type: DataType.ENUM8, default: 0}, + presentValue: {ID: 0x0055, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true}, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genBinaryOutput: { - ID: 16, - attributes: { - activeText: {ID: 4, type: DataType.CHAR_STR}, - description: {ID: 28, type: DataType.CHAR_STR}, - inactiveText: {ID: 46, type: DataType.CHAR_STR}, - minimumOffTime: {ID: 66, type: DataType.UINT32}, - minimumOnTime: {ID: 67, type: DataType.UINT32}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - polarity: {ID: 84, type: DataType.ENUM8}, - presentValue: {ID: 85, type: DataType.BOOLEAN}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.BOOLEAN}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x0010, + attributes: { + activeText: {ID: 0x0004, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + inactiveText: {ID: 0x002e, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + minimumOffTime: {ID: 0x0042, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + minimumOnTime: {ID: 0x0043, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, writeOptional: true, write: true, default: 0}, + polarity: {ID: 0x0054, type: DataType.ENUM8, default: 0}, + presentValue: {ID: 0x0055, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY + write: true, + // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true}, + relinquishDefault: {ID: 0x0068, type: DataType.BOOLEAN, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genBinaryValue: { - ID: 17, - attributes: { - activeText: {ID: 4, type: DataType.CHAR_STR}, - description: {ID: 28, type: DataType.CHAR_STR}, - inactiveText: {ID: 46, type: DataType.CHAR_STR}, - minimumOffTime: {ID: 66, type: DataType.UINT32}, - minimumOnTime: {ID: 67, type: DataType.UINT32}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.BOOLEAN}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.BOOLEAN}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x0011, + attributes: { + activeText: {ID: 0x0004, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + inactiveText: {ID: 0x002e, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + minimumOffTime: {ID: 0x0042, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + minimumOnTime: {ID: 0x0043, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, writeOptional: true, write: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.BOOLEAN, required: true, writeOptional: true, write: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY + write: true, + // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true}, + relinquishDefault: {ID: 0x0068, type: DataType.BOOLEAN, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genMultistateInput: { - ID: 18, + ID: 0x0012, attributes: { - stateText: {ID: 14, type: DataType.ARRAY}, - description: {ID: 28, type: DataType.CHAR_STR}, - numberOfStates: {ID: 74, type: DataType.UINT16}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.UINT16}, - reliability: {ID: 103, type: DataType.ENUM8}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + stateText: {ID: 0x000e, type: DataType.ARRAY, write: true, writeOptional: true /*default: null*/}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + numberOfStates: {ID: 0x004a, type: DataType.UINT16, required: true, write: true, writeOptional: true, min: 1, max: 0xffff, default: 0}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.UINT16, required: true, write: true, writeOptional: true}, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genMultistateOutput: { - ID: 19, - attributes: { - stateText: {ID: 14, type: DataType.ARRAY}, - description: {ID: 28, type: DataType.CHAR_STR}, - numberOfStates: {ID: 74, type: DataType.UINT16}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.UINT16}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.UINT16}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x0013, + attributes: { + stateText: {ID: 0x000e, type: DataType.ARRAY, write: true, writeOptional: true /*default: null*/}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + numberOfStates: {ID: 0x004a, type: DataType.UINT16, required: true, write: true, writeOptional: true, min: 1, max: 0xffff, default: 0}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.UINT16, required: true, write: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY + write: true, + // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + relinquishDefault: {ID: 0x0068, type: DataType.UINT16, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genMultistateValue: { - ID: 20, - attributes: { - stateText: {ID: 14, type: DataType.ARRAY}, - description: {ID: 28, type: DataType.CHAR_STR}, - numberOfStates: {ID: 74, type: DataType.UINT16}, - outOfService: {ID: 81, type: DataType.BOOLEAN}, - presentValue: {ID: 85, type: DataType.UINT16}, - priorityArray: {ID: 87, type: DataType.ARRAY}, - reliability: {ID: 103, type: DataType.ENUM8}, - relinquishDefault: {ID: 104, type: DataType.UINT16}, - statusFlags: {ID: 111, type: DataType.BITMAP8}, - applicationType: {ID: 256, type: DataType.UINT32}, + ID: 0x0014, + attributes: { + stateText: {ID: 0x000e, type: DataType.ARRAY, write: true, writeOptional: true /*default: null*/}, + description: {ID: 0x001c, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, + numberOfStates: {ID: 0x004a, type: DataType.UINT16, required: true, write: true, writeOptional: true, min: 1, max: 0xffff, default: 0}, + outOfService: {ID: 0x0051, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0}, + presentValue: {ID: 0x0055, type: DataType.UINT16, required: true, write: true}, + priorityArray: { + ID: 0x0057, + type: DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY + write: true, + // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]], + }, + reliability: {ID: 0x0067, type: DataType.ENUM8, write: true, writeOptional: true, default: 0x00}, + relinquishDefault: {ID: 0x0068, type: DataType.UINT16, write: true, writeOptional: true}, + statusFlags: {ID: 0x006f, type: DataType.BITMAP8, required: true, max: 0x0f, default: 0}, + applicationType: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff}, }, commands: {}, commandsResponse: {}, }, genCommissioning: { - ID: 21, - attributes: { - shortress: {ID: 0, type: DataType.UINT16}, - extendedPANId: {ID: 1, type: DataType.IEEE_ADDR}, - panId: {ID: 2, type: DataType.UINT16}, - channelmask: {ID: 3, type: DataType.BITMAP32}, - protocolVersion: {ID: 4, type: DataType.UINT8}, - stackProfile: {ID: 5, type: DataType.UINT8}, - startupControl: {ID: 6, type: DataType.ENUM8}, - trustCenterress: {ID: 16, type: DataType.IEEE_ADDR}, - trustCenterMasterKey: {ID: 17, type: DataType.SEC_KEY}, - networkKey: {ID: 18, type: DataType.SEC_KEY}, - useInsecureJoin: {ID: 19, type: DataType.BOOLEAN}, - preconfiguredLinkKey: {ID: 20, type: DataType.SEC_KEY}, - networkKeySeqNum: {ID: 21, type: DataType.UINT8}, - networkKeyType: {ID: 22, type: DataType.ENUM8}, - networkManagerress: {ID: 23, type: DataType.UINT16}, - scanAttempts: {ID: 32, type: DataType.UINT8}, - timeBetweenScans: {ID: 33, type: DataType.UINT16}, - rejoinInterval: {ID: 34, type: DataType.UINT16}, - maxRejoinInterval: {ID: 35, type: DataType.UINT16}, - indirectPollRate: {ID: 48, type: DataType.UINT16}, - parentRetryThreshold: {ID: 49, type: DataType.UINT8}, - concentratorFlag: {ID: 64, type: DataType.BOOLEAN}, - concentratorRus: {ID: 65, type: DataType.UINT8}, - concentratorDiscoveryTime: {ID: 66, type: DataType.UINT8}, + ID: 0x0015, + attributes: { + shortress: {ID: 0x0000, type: DataType.UINT16, write: true, required: true, max: 0xfff7}, + extendedPANId: { + ID: 0x0001, + type: DataType.IEEE_ADDR, + write: true, + required: true, + default: "0xffffffffffffffff", + special: [["PANIdUnspecified", "ffffffffffffffff"]], + }, + panId: {ID: 0x0002, type: DataType.UINT16, write: true, required: true, max: 0xffff}, + channelmask: {ID: 0x0003, type: DataType.BITMAP32, write: true, required: true}, + protocolVersion: {ID: 0x0004, type: DataType.UINT8, write: true, required: true, min: 0x02, max: 0x02}, + stackProfile: {ID: 0x0005, type: DataType.UINT8, write: true, required: true, min: 0x01, max: 0x02}, + startupControl: {ID: 0x0006, type: DataType.ENUM8, write: true, required: true, max: 0x03}, + trustCenterress: { + ID: 0x0010, + type: DataType.IEEE_ADDR, + write: true, + required: true, + default: "0x0000000000000000", + special: [["AddressUnspecified", "0000000000000000"]], + }, + trustCenterMasterKey: {ID: 0x0011, type: DataType.SEC_KEY, write: true}, + networkKey: {ID: 0x0012, type: DataType.SEC_KEY, write: true, required: true}, + useInsecureJoin: {ID: 0x0013, type: DataType.BOOLEAN, write: true, required: true, default: 1}, + preconfiguredLinkKey: {ID: 0x0014, type: DataType.SEC_KEY, write: true, required: true}, + networkKeySeqNum: {ID: 0x0015, type: DataType.UINT8, write: true, required: true, max: 0xff, default: 0}, + networkKeyType: {ID: 0x0016, type: DataType.ENUM8, write: true, required: true}, + networkManagerress: {ID: 0x0017, type: DataType.UINT16, write: true, required: true, default: 0}, + + scanAttempts: {ID: 0x0020, type: DataType.UINT8, write: true, min: 1, max: 255, default: 5}, + timeBetweenScans: {ID: 0x0021, type: DataType.UINT16, write: true, min: 1, max: 65535, default: 100}, + rejoinInterval: {ID: 0x0022, type: DataType.UINT16, write: true, min: 1, default: 60}, + maxRejoinInterval: {ID: 0x0023, type: DataType.UINT16, write: true, min: 1, max: 65535, default: 3600}, + + indirectPollRate: {ID: 0x0030, type: DataType.UINT16, write: true, max: 65535}, + parentRetryThreshold: {ID: 0x0031, type: DataType.UINT8, max: 255}, + + concentratorFlag: {ID: 0x0040, type: DataType.BOOLEAN, write: true, default: 0}, + concentratorRadius: {ID: 0x0041, type: DataType.UINT8, write: true, max: 255, default: 15}, + concentratorDiscoveryTime: {ID: 0x0042, type: DataType.UINT8, write: true, max: 255, default: 0}, }, commands: { restartDevice: { - ID: 0, + ID: 0x00, parameters: [ - {name: "options", type: DataType.UINT8}, + /** [4: reserved, 1: immediate, 3: startup mode] */ + {name: "options", type: DataType.BITMAP8}, {name: "delay", type: DataType.UINT8}, {name: "jitter", type: DataType.UINT8}, ], + required: true, }, saveStartupParams: { - ID: 1, + ID: 0x01, parameters: [ - {name: "options", type: DataType.UINT8}, + /** reserved */ + {name: "options", type: DataType.BITMAP8}, {name: "index", type: DataType.UINT8}, ], }, restoreStartupParams: { - ID: 2, + ID: 0x02, parameters: [ - {name: "options", type: DataType.UINT8}, + /** reserved */ + {name: "options", type: DataType.BITMAP8}, {name: "index", type: DataType.UINT8}, ], }, resetStartupParams: { - ID: 3, + ID: 0x03, parameters: [ - {name: "options", type: DataType.UINT8}, + /** [5: reserved, 1: erase index, 1: reset all, 1: reset current] */ + {name: "options", type: DataType.BITMAP8}, {name: "index", type: DataType.UINT8}, ], + required: true, }, }, commandsResponse: { - restartDeviceRsp: { - ID: 0, - parameters: [{name: "status", type: DataType.UINT8}], + restartDeviceRsp: {ID: 0x00, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + saveStartupParamsRsp: {ID: 0x01, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + restoreStartupParamsRsp: {ID: 0x02, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + resetStartupParamsRsp: {ID: 0x03, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + }, + }, + piPartition: { + ID: 0x00016, + attributes: { + maximumIncomingTransferSize: {ID: 0x0000, type: DataType.UINT16, required: true, max: 0xffff, default: 0x0500}, + maximumOutgoingTransferSize: {ID: 0x0001, type: DataType.UINT16, required: true, max: 0xffff, default: 0x0500}, + partionedFrameSize: {ID: 0x0002, type: DataType.UINT8, required: true, write: true, max: 0xff, default: 0x50}, + largeFrameSize: {ID: 0x0003, type: DataType.UINT16, required: true, write: true, max: 0xffff, default: 0x0500}, + numberOfAckFrame: {ID: 0x0004, type: DataType.UINT8, required: true, write: true, max: 0xff, default: 100}, + nackTimeout: {ID: 0x0005, type: DataType.UINT16, required: true, max: 0xffff}, + interframeDelay: {ID: 0x0006, type: DataType.UINT8, required: true, write: true, max: 0xff}, + numberOfSendRetries: {ID: 0x0007, type: DataType.UINT8, required: true, max: 0xff, default: 3}, + senderTimeout: {ID: 0x0008, type: DataType.UINT16, required: true, max: 0xffff}, + receiverTimeout: {ID: 0x0009, type: DataType.UINT16, required: true, max: 0xffff}, + }, + commands: { + transferPartionedFrame: { + ID: 0x00, + parameters: [ + /** [6: reserved, 1: indicator length, 1: first block] */ + {name: "fragmentionOptions", type: DataType.BITMAP8}, + { + name: "partitionIndicator", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b10, reversed: true}], + }, + { + name: "partitionIndicator", + type: DataType.UINT16, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b10}], + }, + {name: "partitionedFrame", type: DataType.OCTET_STR}, + ], + required: true, + }, + readHandshakeParam: { + ID: 0x01, + parameters: [ + {name: "partitionedClusterId", type: DataType.CLUSTER_ID}, + {name: "attributeIds", type: BuffaloZclDataType.LIST_UINT16}, + ], + required: true, + response: 0x01, }, - saveStartupParamsRsp: { - ID: 1, - parameters: [{name: "status", type: DataType.UINT8}], + writeHandshakeParam: { + ID: 0x02, + parameters: [ + {name: "partitionedClusterId", type: DataType.CLUSTER_ID}, + // TODO: need special BuffaloZcl read/write + // {name: "attributeRecords", type: BuffaloZclDataType.LIST_WRITE_ATTR_RECORD}, + // {name: "id", type: DataType.UINT16}, + // {name: "dataType", type: DataType.DATA8}, + // {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE}, + ], + required: true, }, - restoreStartupParamsRsp: { - ID: 2, - parameters: [{name: "status", type: DataType.UINT8}], + }, + commandsResponse: { + multipleAck: { + ID: 0x0, + parameters: [ + /** [7: reserved, 1: nackId length] */ + {name: "ackOptions", type: DataType.BITMAP8}, + { + name: "firstFrameId", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1, reversed: true}], + }, + { + name: "firstFrameId", + type: DataType.UINT16, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1}], + }, + { + name: "nackId", + type: BuffaloZclDataType.LIST_UINT8, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1, reversed: true}], + }, + { + name: "nackId", + type: BuffaloZclDataType.LIST_UINT16, + conditions: [{type: ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1}], + }, + ], + required: true, }, - resetStartupParamsRsp: { - ID: 3, - parameters: [{name: "status", type: DataType.UINT8}], + readHandshakeParamResponse: { + ID: 0x01, + parameters: [ + {name: "partitionedClusterId", type: DataType.CLUSTER_ID}, + // TODO: need special BuffaloZcl read/write + // {name: "attributeRecords", type: BuffaloZclDataType.LIST_READ_ATTR_RECORD}, + // {name: "id", type: DataType.UINT16}, + // {name: "status", type: DataType.UINT16}, + // {name: "dataType", type: DataType.DATA8, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "Status", value: Status.SUCCESS}]}, + // {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "Status", value: Status.SUCCESS}]}, + ], + required: true, }, }, }, genOta: { - ID: 25, - attributes: { - upgradeServerId: {ID: 0, type: DataType.IEEE_ADDR}, - fileOffset: {ID: 1, type: DataType.UINT32}, - currentFileVersion: {ID: 2, type: DataType.UINT32}, - currentZigbeeStackVersion: {ID: 3, type: DataType.UINT16}, - downloadedFileVersion: {ID: 4, type: DataType.UINT32}, - downloadedZigbeeStackVersion: {ID: 5, type: DataType.UINT16}, - imageUpgradeStatus: {ID: 6, type: DataType.ENUM8}, - manufacturerId: {ID: 7, type: DataType.UINT16}, - imageTypeId: {ID: 8, type: DataType.UINT16}, - minimumBlockReqDelay: {ID: 9, type: DataType.UINT16}, - imageStamp: {ID: 10, type: DataType.UINT32}, + ID: 0x0019, + attributes: { + upgradeServerId: {ID: 0x0000, type: DataType.IEEE_ADDR, client: true, required: true, default: "0xffffffffffffffff"}, + fileOffset: {ID: 0x0001, type: DataType.UINT32, client: true, max: 0xffffffff, default: 0xffffffff}, + currentFileVersion: {ID: 0x0002, type: DataType.UINT32, client: true, max: 0xffffffff, default: 0xffffffff}, + currentZigbeeStackVersion: {ID: 0x0003, type: DataType.UINT16, client: true, max: 0xffff, default: 0xffff}, + downloadedFileVersion: {ID: 0x0004, type: DataType.UINT32, client: true, max: 0xffffffff, default: 0xffffffff}, + downloadedZigbeeStackVersion: {ID: 0x0005, type: DataType.UINT16, client: true, max: 0xffff, default: 0xffff}, + imageUpgradeStatus: {ID: 0x0006, type: DataType.ENUM8, client: true, required: true, max: 0xff, default: 0x00}, + manufacturerId: {ID: 0x0007, type: DataType.UINT16, client: true, max: 0xffff}, + imageTypeId: {ID: 0x0008, type: DataType.UINT16, client: true, max: 0xffff}, + minimumBlockReqDelay: {ID: 0x0009, type: DataType.UINT16, client: true, max: 0xfffe, default: 0}, + imageStamp: {ID: 0x000a, type: DataType.UINT32, client: true, max: 0xffffffff}, + upgradeActivationPolicy: {ID: 0x000b, type: DataType.ENUM8, client: true, default: 0}, + upgradeTimeoutPolicy: {ID: 0x000c, type: DataType.ENUM8, client: true, default: 0}, }, commands: { queryNextImageRequest: { - ID: 1, - response: 2, + ID: 0x01, + response: 0x02, parameters: [ - {name: "fieldControl", type: DataType.UINT8}, + {name: "fieldControl", type: DataType.BITMAP8}, {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, + {name: "imageType", type: DataType.UINT16, max: 0xffbf}, {name: "fileVersion", type: DataType.UINT32}, { name: "hardwareVersion", @@ -1179,14 +1416,15 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.BITMASK_SET, param: "fieldControl", mask: 0b1}], }, ], + required: true, }, imageBlockRequest: { - ID: 3, - response: 5, + ID: 0x03, + response: 0x05, parameters: [ - {name: "fieldControl", type: DataType.UINT8}, + {name: "fieldControl", type: DataType.BITMAP8}, {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, + {name: "imageType", type: DataType.UINT16, max: 0xffbf}, {name: "fileVersion", type: DataType.UINT32}, {name: "fileOffset", type: DataType.UINT32}, {name: "maximumDataSize", type: DataType.UINT8}, @@ -1205,14 +1443,15 @@ export const Clusters: Readonly> ], }, ], + required: true, }, imagePageRequest: { - ID: 4, - response: 5, + ID: 0x04, + response: 0x05, parameters: [ - {name: "fieldControl", type: DataType.UINT8}, + {name: "fieldControl", type: DataType.BITMAP8}, {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, + {name: "imageType", type: DataType.UINT16, max: 0xffbf}, {name: "fileVersion", type: DataType.UINT32}, {name: "fileOffset", type: DataType.UINT32}, {name: "maximumDataSize", type: DataType.UINT8}, @@ -1226,22 +1465,23 @@ export const Clusters: Readonly> ], }, upgradeEndRequest: { - ID: 6, - response: 7, + ID: 0x06, + response: 0x07, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, + {name: "imageType", type: DataType.UINT16, max: 0xffbf}, {name: "fileVersion", type: DataType.UINT32}, ], + required: true, }, queryDeviceSpecificFileRequest: { - ID: 8, - response: 9, + ID: 0x08, + response: 0x09, parameters: [ {name: "eui64", type: DataType.IEEE_ADDR}, {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, + {name: "imageType", type: DataType.UINT16, min: 0xffc0, max: 0xfffe}, {name: "fileVersion", type: DataType.UINT32}, {name: "zigbeeStackVersion", type: DataType.UINT16}, ], @@ -1249,9 +1489,9 @@ export const Clusters: Readonly> }, commandsResponse: { imageNotify: { - ID: 0, + ID: 0x00, parameters: [ - {name: "payloadType", type: DataType.UINT8}, + {name: "payloadType", type: DataType.ENUM8}, {name: "queryJitter", type: DataType.UINT8}, { name: "manufacturerCode", @@ -1262,18 +1502,20 @@ export const Clusters: Readonly> name: "imageType", type: DataType.UINT16, conditions: [{type: ParameterCondition.FIELD_GT, field: "payloadType", value: 0x01}], + max: 0xffff, }, { name: "fileVersion", type: DataType.UINT32, conditions: [{type: ParameterCondition.FIELD_GT, field: "payloadType", value: 0x02}], + max: 0xffffffff, }, ], }, queryNextImageResponse: { - ID: 2, + ID: 0x02, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, { name: "manufacturerCode", type: DataType.UINT16, @@ -1283,6 +1525,7 @@ export const Clusters: Readonly> name: "imageType", type: DataType.UINT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + max: 0xffbf, }, { name: "fileVersion", @@ -1295,12 +1538,13 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], }, ], + required: true, }, imageBlockResponse: { - ID: 5, + ID: 0x05, parameters: [ // alone if Status.ABORT - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, { name: "manufacturerCode", type: DataType.UINT16, @@ -1310,6 +1554,7 @@ export const Clusters: Readonly> name: "imageType", type: DataType.UINT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + max: 0xffbf, }, { name: "fileVersion", @@ -1347,21 +1592,23 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.WAIT_FOR_DATA}], }, ], + required: true, }, upgradeEndResponse: { - ID: 7, + ID: 0x07, parameters: [ - {name: "manufacturerCode", type: DataType.UINT16}, - {name: "imageType", type: DataType.UINT16}, - {name: "fileVersion", type: DataType.UINT32}, - {name: "currentTime", type: DataType.UINT32}, - {name: "upgradeTime", type: DataType.UINT32}, + {name: "manufacturerCode", type: DataType.UINT16, max: 0xfffff}, + {name: "imageType", type: DataType.UINT16, max: 0xfffff}, + {name: "fileVersion", type: DataType.UINT32, max: 0xfffffffff}, + {name: "currentTime", type: DataType.UTC}, + {name: "upgradeTime", type: DataType.UTC}, ], + required: true, }, queryDeviceSpecificFileResponse: { - ID: 9, + ID: 0x09, parameters: [ - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, { name: "manufacturerCode", type: DataType.UINT16, @@ -1371,6 +1618,8 @@ export const Clusters: Readonly> name: "imageType", type: DataType.UINT16, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + min: 0xffc0, + max: 0xfffe, }, { name: "fileVersion", @@ -1386,51 +1635,461 @@ export const Clusters: Readonly> }, }, }, - genPollCtrl: { - ID: 32, + powerProfile: { + ID: 0x001a, attributes: { - checkinInterval: {ID: 0, type: DataType.UINT32}, - longPollInterval: {ID: 1, type: DataType.UINT32}, - shortPollInterval: {ID: 2, type: DataType.UINT16}, - fastPollTimeout: {ID: 3, type: DataType.UINT16}, - checkinIntervalMin: {ID: 4, type: DataType.UINT32}, - longPollIntervalMin: {ID: 5, type: DataType.UINT32}, - fastPollTimeoutMax: {ID: 6, type: DataType.UINT16}, + totalProfileNum: {ID: 0x0000, type: DataType.UINT8, required: true, min: 1, max: 0xfe, default: 1}, + multipleScheduling: {ID: 0x0001, type: DataType.BOOLEAN, required: true, default: 0}, + energyFormatting: {ID: 0x0002, type: DataType.BITMAP8, required: true, default: 1}, + energyRemote: {ID: 0x0003, type: DataType.BOOLEAN, required: true, default: 0}, + scheduleMode: {ID: 0x0004, type: DataType.BITMAP8, required: true, write: true, report: true, default: 0x00}, }, commands: { - checkinRsp: { - ID: 0, + powerProfileRequest: {ID: 0x00, parameters: [{name: "powerProfileId", type: DataType.UINT8}], required: true}, + powerProfileStateRequest: {ID: 0x01, parameters: [], required: true}, + getPowerProfilePriceResponse: { + ID: 0x02, parameters: [ - {name: "startFastPolling", type: DataType.BOOLEAN}, - {name: "fastPollTimeout", type: DataType.UINT16}, + {name: "powerProfileId", type: DataType.UINT8}, + {name: "currency", type: DataType.UINT16}, + {name: "price", type: DataType.UINT32}, + {name: "priceTrailingDigit", type: DataType.UINT8}, ], + required: true, }, - fastPollStop: { - ID: 1, - parameters: [], + getOverallSchedulePriceResponse: { + ID: 0x03, + parameters: [ + {name: "currency", type: DataType.UINT16}, + {name: "price", type: DataType.UINT32}, + {name: "priceTrailingDigit", type: DataType.UINT8}, + ], + required: true, }, - setLongPollInterval: { - ID: 2, - parameters: [{name: "newLongPollInterval", type: DataType.UINT32}], + energyPhasesScheduleNotification: { + ID: 0x04, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numScheduledPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "scheduledTime", type: DataType.UINT16}, + ], + required: true, + }, + energyPhasesScheduleResponse: { + ID: 0x05, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numScheduledPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "scheduledTime", type: DataType.UINT16}, + ], + required: true, }, - setShortPollInterval: { - ID: 3, - parameters: [{name: "newShortPollInterval", type: DataType.UINT16}], + powerProfileScheduleConstraintsRequest: {ID: 0x06, parameters: [{name: "powerProfileId", type: DataType.UINT8}], required: true}, + energyPhasesScheduleStateRequest: {ID: 0x07, parameters: [{name: "powerProfileId", type: DataType.UINT8}], required: true}, + getPowerProfilePriceExtendedResponse: { + ID: 0x08, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "currency", type: DataType.UINT16}, + {name: "price", type: DataType.UINT32}, + {name: "priceTrailingDigit", type: DataType.UINT8}, + ], + required: true, }, }, commandsResponse: { - checkin: { - ID: 0, - parameters: [], + powerProfileNotification: { + ID: 0x00, + parameters: [ + {name: "totalProfileNum", type: DataType.UINT8}, + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numTransferredPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "transferredPhases", type: DataType.LIST_TRANSFERRED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "macroPhaseId", type: DataType.UINT8}, + // {name: "expectedDuration", type: DataType.UINT16}, + // {name: "peakPower", type: DataType.UINT16}, + // {name: "energy", type: DataType.UINT16}, + // {name: "maxActivationDelay", type: DataType.UINT16}, + ], + required: true, + }, + powerProfileResponse: { + ID: 0x01, + parameters: [ + {name: "totalProfileNum", type: DataType.UINT8}, + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numTransferredPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "transferredPhases", type: DataType.LIST_TRANSFERRED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "macroPhaseId", type: DataType.UINT8}, + // {name: "expectedDuration", type: DataType.UINT16}, + // {name: "peakPower", type: DataType.UINT16}, + // {name: "energy", type: DataType.UINT16}, + // {name: "maxActivationDelay", type: DataType.UINT16}, + ], + required: true, + }, + powerProfileStateResponse: { + ID: 0x02, + parameters: [ + {name: "powerProfileCount", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "powerProfiles", type: BuffaloZclDataType.LIST_POWER_PROFILE}, + // {name: "powerProfileId", type: DataType.UINT8}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "powerProfileRemoteControl", type: DataType.BOOLEAN}, + // {name: "powerProfileState", type: DataType.ENUM8}, + ], + required: true, + }, + getPowerProfilePrice: {ID: 0x03, parameters: [{name: "powerProfileId", type: DataType.UINT8}]}, + powerProfilesStateNotification: { + ID: 0x04, + parameters: [ + {name: "powerProfileCount", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "powerProfiles", type: BuffaloZclDataType.LIST_POWER_PROFILE}, + // {name: "powerProfileId", type: DataType.UINT8}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "powerProfileRemoteControl", type: DataType.BOOLEAN}, + // {name: "powerProfileState", type: DataType.ENUM8}, + ], + required: true, + }, + getOverallSchedulePrice: {ID: 0x05, parameters: []}, + energyPhasesScheduleRequest: {ID: 0x06, parameters: [{name: "powerProfileId", type: DataType.UINT8}], required: true}, + energyPhasesScheduleStateResponse: { + ID: 0x07, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numScheduledPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "scheduledTime", type: DataType.UINT16}, + ], + required: true, + }, + energyPhasesScheduleStateNotification: { + ID: 0x08, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "numScheduledPhases", type: DataType.UINT8}, + // TODO: special Buffalo write/read + // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES}, + // {name: "energyPhaseId", type: DataType.UINT8}, + // {name: "scheduledTime", type: DataType.UINT16}, + ], + required: true, + }, + powerProfileScheduleConstraintsNotification: { + ID: 0x09, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "startAfter", type: DataType.UINT16}, + {name: "stopBefore", type: DataType.UINT16}, + ], + required: true, + }, + powerProfileScheduleConstraintsResponse: { + ID: 0x0a, + parameters: [ + {name: "powerProfileId", type: DataType.UINT8}, + {name: "startAfter", type: DataType.UINT16}, + {name: "stopBefore", type: DataType.UINT16}, + ], + required: true, + }, + getPowerProfilePriceExtended: { + ID: 0x0b, + parameters: [ + {name: "options", type: DataType.BITMAP8}, + {name: "powerProfileId", type: DataType.UINT8}, + { + name: "powerProfileStartTime", + type: DataType.UINT16, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 2}], + }, + ], + }, + }, + }, + haApplianceControl: { + ID: 0x001b, + attributes: { + startTime: {ID: 0x0000, type: DataType.UINT16, required: true, report: true, max: 0xffff, default: 0}, + finishTime: {ID: 0x0001, type: DataType.UINT16, required: true, report: true, max: 0xffff, default: 0}, + remainingTime: {ID: 0x0002, type: DataType.UINT16, report: true, max: 0xffff, default: 0}, + }, + commands: { + executionOfCommand: {ID: 0x00, parameters: [{name: "commandId", type: DataType.ENUM8}]}, + signalState: {ID: 0x01, parameters: [], response: 0x00, required: true}, + writeFunctions: { + ID: 0x02, + parameters: [ + // TODO: need BuffaloZcl read/write + // {name: "functions", type: BuffaloZclDataType.LIST_FUNCTIONS}, + // {name: "id", type: DataType.UINT16}, + // {name: "dataType", type: DataType.DATA8}, + // {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE}, + ], + }, + overloadPauseResume: {ID: 0x03, parameters: []}, + overloadPause: {ID: 0x04, parameters: []}, + overloadWarning: {ID: 0x05, parameters: [{name: "warningEvent", type: DataType.ENUM8}]}, + }, + commandsResponse: { + signalStateRsp: { + ID: 0x00, + parameters: [ + {name: "applianceStatus", type: DataType.ENUM8}, + /** [4: device status 2, 4: remote enable flags] */ + {name: "remoteEnableFlagsAndDeviceStatus2", type: DataType.BITMAP8}, + { + name: "applianceStatus2", + type: DataType.UINT24, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 3}], + }, + ], + required: true, + }, + signalStateNotification: { + ID: 0x00, + parameters: [ + {name: "applianceStatus", type: DataType.ENUM8}, + /** [4: device status 2, 4: remote enable flags] */ + {name: "remoteEnableFlagsAndDeviceStatus2", type: DataType.BITMAP8}, + { + name: "applianceStatus2", + type: DataType.UINT24, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 3}], + }, + ], + required: true, + }, + }, + }, + pulseWidthModulation: { + ID: 0x001c, + attributes: { + currentLevel: {ID: 0x0000, type: DataType.UINT8, report: true, scene: true, required: true, default: 255}, + remainingTime: {ID: 0x0001, type: DataType.UINT16, max: 0xffff, default: 0}, + minLevel: {ID: 0x0002, type: DataType.UINT8, default: 0, required: true}, + maxLevel: {ID: 0x0003, type: DataType.UINT8, max: 100, default: 100, required: true}, + currentFrequency: {ID: 0x0004, type: DataType.UINT16, report: true, default: 0, required: true}, + minFrequency: {ID: 0x0005, type: DataType.UINT16, default: 0, required: true}, + maxFrequency: {ID: 0x0006, type: DataType.UINT16, max: 0xffff, default: 0, required: true}, + options: {ID: 0x000f, type: DataType.BITMAP8, write: true, default: 0}, + onOffTransitionTime: {ID: 0x0010, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + onLevel: {ID: 0x0011, type: DataType.UINT8, write: true, default: 0xff}, + onTransitionTime: {ID: 0x0012, type: DataType.UINT16, write: true, max: 0xfffe, default: 0xffff}, + offTransitionTime: {ID: 0x0013, type: DataType.UINT16, write: true, max: 0xfffe, default: 0xffff}, + defaultMoveRate: {ID: 0x0014, type: DataType.UINT8, write: true, max: 0xfe}, + startUpCurrentLevel: { + ID: 0x4000, + type: DataType.UINT8, + write: true, + max: 0xff, + special: [ + ["MinimumDeviceValuePermitted", "00"], + ["SetToPreviousValue", "ff"], + ], + }, + }, + commands: { + moveToLevel: { + ID: 0x00, + parameters: [ + {name: "level", type: DataType.UINT8}, + {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + move: { + ID: 0x01, + parameters: [ + {name: "movemode", type: DataType.UINT8}, + {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, }, + step: { + ID: 0x02, + parameters: [ + {name: "stepmode", type: DataType.UINT8}, + {name: "stepsize", type: DataType.UINT8}, + {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + stop: { + ID: 0x03, + parameters: [ + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + moveToLevelWithOnOff: { + ID: 0x04, + parameters: [ + {name: "level", type: DataType.UINT8}, + {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + moveWithOnOff: { + ID: 0x05, + parameters: [ + {name: "movemode", type: DataType.UINT8}, + {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + stepWithOnOff: { + ID: 0x06, + parameters: [ + {name: "stepmode", type: DataType.UINT8}, + {name: "stepsize", type: DataType.UINT8}, + {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + stopWithOnOff: { + ID: 0x07, + parameters: [ + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, + ], + required: true, + }, + moveToClosestFrequency: {ID: 0x08, parameters: [{name: "frequency", type: DataType.UINT16}], required: true}, + }, + commandsResponse: {}, + }, + genPollCtrl: { + ID: 0x0020, + attributes: { + checkinInterval: {ID: 0x0000, type: DataType.UINT32, write: true, required: true, max: 7208960, default: 14400}, + longPollInterval: {ID: 0x0001, type: DataType.UINT32, required: true, min: 4, max: 7208960, default: 20}, + shortPollInterval: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 0xffff, default: 2}, + fastPollTimeout: {ID: 0x0003, type: DataType.UINT16, write: true, required: true, min: 1, max: 0xffff, default: 40}, + checkinIntervalMin: {ID: 0x0004, type: DataType.UINT32, default: 0}, + longPollIntervalMin: {ID: 0x0005, type: DataType.UINT32, default: 0}, + fastPollTimeoutMax: {ID: 0x0006, type: DataType.UINT16, default: 0}, + }, + commands: { + checkinRsp: { + ID: 0x00, + parameters: [ + {name: "startFastPolling", type: DataType.BOOLEAN}, + {name: "fastPollTimeout", type: DataType.UINT16}, + ], + required: true, + }, + fastPollStop: {ID: 0x01, parameters: [], required: true}, + setLongPollInterval: {ID: 0x02, parameters: [{name: "newLongPollInterval", type: DataType.UINT32}]}, + setShortPollInterval: {ID: 0x03, parameters: [{name: "newShortPollInterval", type: DataType.UINT16}]}, + }, + commandsResponse: { + checkin: {ID: 0x00, parameters: [], required: true}, }, }, greenPower: { - ID: 33, - attributes: {}, + ID: 0x0021, + attributes: { + gpsMaxSinkTableEntries: {ID: 0x0000, type: DataType.UINT8, required: true, max: 0xff}, + sinkTable: {ID: 0x0001, type: DataType.LONG_OCTET_STR, required: true}, + /** 0b00: full unicast forward, 0b01: groupcast forward to DGroupID, 0b10: groupcast forward to pre-comm GroupID, 0b11: unicast forward */ + gpsCommunicationMode: {ID: 0x0002, type: DataType.BITMAP8, required: true, write: true, default: 0x01}, + /** [5: reserved, 1: on GP proxy commiss mode, 1: on first pairing success, 1: on commiss window expiration] */ + gpsCommissioningExitMode: {ID: 0x0003, type: DataType.BITMAP8, required: true, write: true, default: 0x02}, + gpsCommissioningWindow: {ID: 0x0004, type: DataType.UINT16, write: true, max: 65535, default: 180}, + /** [4: reserved, 1: involve TC, 1: protection with gpLinkKey, 1: minimal GPD security level] */ + gpsSecurityLevel: {ID: 0x0005, type: DataType.BITMAP8, required: true, write: true, default: 0x06}, + /** see A.3.3.2.7 of 14-0563-19 */ + gpsFunctionality: {ID: 0x0006, type: DataType.BITMAP24, required: true}, + /** see A.3.3.2.8 of 14-0563-19 */ + gpsActiveFunctionality: {ID: 0x0007, type: DataType.BITMAP24, required: true, default: 0xffffff}, + + gpsMaxProxyTableEntries: {ID: 0x0010, type: DataType.UINT8, required: true, max: 0xff, default: 0x14, client: true}, + proxyTable: {ID: 0x0011, type: DataType.LONG_OCTET_STR, required: true, default: 0, client: true}, + gppNotificationRetryNumber: {ID: 0x0012, type: DataType.UINT8, write: true, max: 5, default: 2, client: true}, + gppNotificationRetryTimer: {ID: 0x0013, type: DataType.UINT8, write: true, max: 255, default: 100, client: true}, + gppMaxSearchCounter: {ID: 0x0014, type: DataType.UINT8, write: true, max: 255, default: 10, client: true}, + gppBlockGpdId: {ID: 0x0015, type: DataType.LONG_OCTET_STR, client: true}, + gppFunctionality: {ID: 0x0016, type: DataType.BITMAP24, required: true, client: true}, + gppActiveFunctionality: {ID: 0x0017, type: DataType.BITMAP24, required: true, client: true}, + + /** 0b000: no key, 0b001: nwk key, 0b010: GP group key, 0b011: nwk key derived GP group key, 0b111: derived individual GPD key */ + gpSharedSecurityKeyType: {ID: 0x0020, type: DataType.BITMAP8, write: true, max: 0x07, default: 0}, + gpSharedSecurityKey: {ID: 0x0021, type: DataType.SEC_KEY, write: true}, + gpLinkKey: {ID: 0x0022, type: DataType.SEC_KEY, write: true /* default: "ZigBeeAlliance09" */}, + }, commands: { notification: { - ID: 0, + ID: 0x00, parameters: [ {name: "options", type: DataType.BITMAP16}, { @@ -1466,8 +2125,53 @@ export const Clusters: Readonly> }, ], }, + pairingSearch: { + ID: 0x01, + parameters: [ + {name: "options", type: DataType.BITMAP16}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + ], + }, + tunnelingStop: { + ID: 0x03, + parameters: [ + {name: "options", type: DataType.BITMAP8}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + {name: "gpdSecurityFrameCounter", type: DataType.UINT32}, + {name: "gppShortAddress", type: DataType.UINT16}, + {name: "gppGpdLink", type: DataType.BITMAP8}, + ], + }, commissioningNotification: { - ID: 4, + ID: 0x04, parameters: [ {name: "options", type: DataType.BITMAP16}, { @@ -1503,14 +2207,91 @@ export const Clusters: Readonly> {name: "mic", type: DataType.UINT32, conditions: [{type: ParameterCondition.BITMASK_SET, param: "options", mask: 0x200}]}, ], }, + sinkCommissioningMode: { + ID: 0x04, + parameters: [ + {name: "options", type: DataType.BITMAP8}, + {name: "gpmAddressForSecurity", type: DataType.UINT16, max: 0xffff /* default: 0xffff */}, + {name: "gpmAddressForPairing", type: DataType.UINT16, max: 0xffff /* default: 0xffff */}, + {name: "sinkEndpoint", type: DataType.UINT8}, + ], + }, + translationTableUpdate: { + ID: 0x07, + parameters: [ + {name: "options", type: DataType.BITMAP16}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + // TODO: need BuffaloZcl read/write (length from options bits 5..7) + // {name: "translations", type: BuffaloZclDataType.LIST_WRITE_GP_TRANSLATION_ENTRY}, + // {name: "index", type: DataType.UINT8}, + // {name: "commandId", type: DataType.UINT8}, + // {name: "endpoint", type: DataType.UINT8}, + // {name: "profile", type: DataType.UINT16}, + // {name: "cluster", type: DataType.UINT16}, + // {name: "zigbeeCommandId", type: DataType.UINT8}, + // {name: "zigbeeCommandPayloadLength", type: DataType.UINT8}, + // {name: "zigbeeCommandPayload", type: BuffaloZclDataType.LIST_UINT8}, + // {name: "additionalInfoBlockCount", type: DataType.UINT8}, + // {name: "additionalInfoBlock", type: BuffaloZclDataType.LIST_UINT8}, + ], + }, + translationTableReq: {ID: 0x08, parameters: [{name: "startIndex", type: DataType.UINT8}], response: 0x08}, + // TODO: logic too complex for current frame parsing method + // pairingConfiguration: {ID: 0x09}, + sinkTableReq: { + ID: 0x0a, + parameters: [ + {name: "options", type: DataType.BITMAP8}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + {name: "index", type: DataType.UINT8}, + ], + response: 0x0a, + }, + proxyTableRsp: { + ID: 0x0b, + parameters: [ + {name: "status", type: DataType.ENUM8}, + {name: "totalNumberNonEmptyEntries", type: DataType.UINT8}, + {name: "startIndex", type: DataType.UINT8}, + {name: "entriesCount", type: DataType.UINT8}, + // TODO: need BuffaloZcl read/write + // {name: "entries", type: BuffaloZclDataType.LIST_OCTET_STR}, + ], + }, }, commandsResponse: { - response: { - ID: 6, + notificationResponse: { + ID: 0x00, parameters: [ - {name: "options", type: DataType.UINT8}, - {name: "tempMaster", type: DataType.UINT16}, - {name: "tempMasterTx", type: DataType.BITMAP8}, + {name: "options", type: DataType.BITMAP8}, { name: "srcID", type: DataType.UINT32, @@ -1526,12 +2307,11 @@ export const Clusters: Readonly> type: DataType.UINT8, conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], }, - {name: "gpdCmd", type: DataType.UINT8}, - {name: "gpdPayload", type: BuffaloZclDataType.GPD_FRAME}, + {name: "gpdSecurityFrameCounter", type: DataType.UINT32}, ], }, pairing: { - ID: 1, + ID: 0x01, parameters: [ {name: "options", type: DataType.BITMAP24}, { @@ -1598,8 +2378,9 @@ export const Clusters: Readonly> }, ], }, + /** A.K.A. proxyCommisioningMode */ commisioningMode: { - ID: 2, + ID: 0x02, parameters: [ {name: "options", type: DataType.BITMAP8}, { @@ -1610,174 +2391,280 @@ export const Clusters: Readonly> {name: "channel", type: DataType.UINT8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "options", mask: 0x10}]}, ], }, + response: { + ID: 0x06, + parameters: [ + {name: "options", type: DataType.UINT8}, + /** A.K.A. selectedSenderShortAddress */ + {name: "tempMaster", type: DataType.UINT16}, + /** A.K.A. selectedSenderTxChannel */ + {name: "tempMasterTx", type: DataType.BITMAP8}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + {name: "gpdCmd", type: DataType.UINT8}, + {name: "gpdPayload", type: BuffaloZclDataType.GPD_FRAME}, + ], + }, + translationTableRsp: { + ID: 0x08, + parameters: [ + {name: "status", type: DataType.ENUM8}, + {name: "options", type: DataType.BITMAP8}, + {name: "totalNumberEntries", type: DataType.UINT8}, + {name: "startIndex", type: DataType.UINT8}, + {name: "entriesCount", type: DataType.UINT8}, + // TODO: need BuffaloZcl read/write + // {name: "translations", type: BuffaloZclDataType.LIST_READ_GP_TRANSLATION_ENTRY}, + // { + // name: "srcID", + // type: DataType.UINT32, + // conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + // }, + // { + // name: "gpdIEEEAddr", + // type: DataType.IEEE_ADDR, + // conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + // }, + // { + // name: "gpdEndpoint", + // type: DataType.UINT8, + // conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + // }, + // {name: "commandId", type: DataType.UINT8}, + // {name: "endpoint", type: DataType.UINT8}, + // {name: "profile", type: DataType.UINT16}, + // {name: "cluster", type: DataType.UINT16}, + // {name: "zigbeeCommandId", type: DataType.UINT8}, + // {name: "zigbeeCommandPayloadLength", type: DataType.UINT8}, + // {name: "zigbeeCommandPayload", type: BuffaloZclDataType.LIST_UINT8}, + // {name: "additionalInfoBlockCount", type: DataType.UINT8}, + // {name: "additionalInfoBlock", type: BuffaloZclDataType.LIST_UINT8}, + ], + }, + sinkTableRsp: { + ID: 0x0a, + parameters: [ + {name: "status", type: DataType.ENUM8}, + {name: "totalNumberNonEmptyEntries", type: DataType.UINT8}, + {name: "startIndex", type: DataType.UINT8}, + {name: "entriesCount", type: DataType.UINT8}, + // TODO: need BuffaloZcl read/write + // {name: "entries", type: BuffaloZclDataType.LIST_OCTET_STR}, + ], + }, + proxyTableReq: { + ID: 0x0b, + parameters: [ + {name: "options", type: DataType.BITMAP8}, + { + name: "srcID", + type: DataType.UINT32, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}], + }, + { + name: "gpdIEEEAddr", + type: DataType.IEEE_ADDR, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + { + name: "gpdEndpoint", + type: DataType.UINT8, + conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}], + }, + {name: "index", type: DataType.UINT8}, + ], + }, }, }, mobileDeviceCfg: { - ID: 34, + ID: 0x0022, attributes: { - keepAliveTime: {ID: 0, type: DataType.UINT16}, - rejoinTimeout: {ID: 1, type: DataType.UINT16}, + keepAliveTime: {ID: 0x0000, type: DataType.UINT16, required: true, write: true, min: 1, max: 65535, default: 15}, + rejoinTimeout: { + ID: 0x0001, + type: DataType.UINT16, + required: true, + write: true, + max: 0xffff, + default: 0xffff, + special: [["Never", "ffff"]], + }, }, commands: {}, - commandsResponse: {}, + commandsResponse: { + keepAliveNotification: { + ID: 0x00, + parameters: [ + {name: "keepAliveTime", type: DataType.UINT16}, + {name: "rejoinTimeout", type: DataType.UINT16}, + ], + required: true, + }, + }, }, neighborCleaning: { - ID: 35, + ID: 0x0023, attributes: { - neighborCleaningTimeout: {ID: 0, type: DataType.UINT16}, + neighborCleaningTimeout: {ID: 0x0000, type: DataType.UINT16, required: true, write: true, min: 1, max: 65535, default: 30}, + }, + commands: { + purgeEntries: {ID: 0x00, parameters: [], required: true}, }, - commands: {}, commandsResponse: {}, }, nearestGateway: { - ID: 36, + ID: 0x0024, + attributes: { + nearestGateway: {ID: 0x0000, type: DataType.UINT16, required: true, write: true, max: 0xfff8, default: 0}, + newMobileNode: {ID: 0x0001, type: DataType.UINT16, required: true, read: false, write: true, max: 0xfff8, default: 0}, + }, + commands: {}, + commandsResponse: {}, + }, + keepAlive: { + ID: 0x0025, attributes: { - nearestGateway: {ID: 0, type: DataType.UINT16}, - newMobileNode: {ID: 1, type: DataType.UINT16}, + tcKeepAliveBase: {ID: 0x0000, type: DataType.UINT8, required: true, max: 0xff, default: 0x0a}, + tcKeepAliveJitter: {ID: 0x0001, type: DataType.UINT16, required: true, max: 0xffff, default: 0x012c}, }, commands: {}, commandsResponse: {}, }, closuresShadeCfg: { - ID: 256, + ID: 0x0100, attributes: { - physicalClosedLimit: {ID: 0, type: DataType.UINT16}, - motorStepSize: {ID: 1, type: DataType.UINT8}, - status: {ID: 2, type: DataType.BITMAP8}, - losedLimit: {ID: 16, type: DataType.UINT16}, - mode: {ID: 18, type: DataType.ENUM8}, + physicalClosedLimit: {ID: 0x0000, type: DataType.UINT16, min: 1, max: 0xfffe}, + motorStepSize: {ID: 0x0001, type: DataType.UINT8, max: 0xfe}, + status: {ID: 0x0002, type: DataType.BITMAP8, write: true, required: true, default: 0}, + + losedLimit: {ID: 0x0010, type: DataType.UINT16, write: true, required: true, min: 1, max: 0xfffe, default: 1}, + mode: {ID: 0x0011, type: DataType.ENUM8, write: true, required: true, max: 0xfe, default: 0}, }, commands: {}, commandsResponse: {}, }, closuresDoorLock: { - ID: 257, - attributes: { - lockState: {ID: 0, type: DataType.ENUM8}, - lockType: {ID: 38, type: DataType.BITMAP16}, - actuatorEnabled: {ID: 2, type: DataType.BOOLEAN}, - doorState: {ID: 3, type: DataType.ENUM8}, - doorOpenEvents: {ID: 4, type: DataType.UINT32}, - doorClosedEvents: {ID: 5, type: DataType.UINT32}, - openPeriod: {ID: 6, type: DataType.UINT16}, - numOfLockRecordsSupported: {ID: 16, type: DataType.UINT16}, - numOfTotalUsersSupported: {ID: 17, type: DataType.UINT16}, - numOfPinUsersSupported: {ID: 18, type: DataType.UINT16}, - numOfRfidUsersSupported: {ID: 19, type: DataType.UINT16}, - numOfWeekDaySchedulesSupportedPerUser: {ID: 20, type: DataType.UINT8}, - numOfYearDaySchedulesSupportedPerUser: {ID: 21, type: DataType.UINT8}, - numOfHolidayScheduledsSupported: {ID: 22, type: DataType.UINT8}, - maxPinLen: {ID: 23, type: DataType.UINT8}, - minPinLen: {ID: 24, type: DataType.UINT8}, - maxRfidLen: {ID: 25, type: DataType.UINT8}, - minRfidLen: {ID: 26, type: DataType.UINT8}, - enableLogging: {ID: 32, type: DataType.BOOLEAN}, - language: {ID: 33, type: DataType.CHAR_STR}, - ledSettings: {ID: 34, type: DataType.UINT8}, - autoRelockTime: {ID: 35, type: DataType.UINT32}, - soundVolume: {ID: 36, type: DataType.UINT8}, - operatingMode: {ID: 37, type: DataType.UINT32}, - defaultConfigurationRegister: {ID: 39, type: DataType.BITMAP16}, - enableLocalProgramming: {ID: 40, type: DataType.BOOLEAN}, - enableOneTouchLocking: {ID: 41, type: DataType.BOOLEAN}, - enableInsideStatusLed: {ID: 42, type: DataType.BOOLEAN}, - enablePrivacyModeButton: {ID: 43, type: DataType.BOOLEAN}, - wrongCodeEntryLimit: {ID: 48, type: DataType.UINT8}, - userCodeTemporaryDisableTime: {ID: 49, type: DataType.UINT8}, - sendPinOta: {ID: 50, type: DataType.BOOLEAN}, - requirePinForRfOperation: {ID: 51, type: DataType.BOOLEAN}, - zigbeeSecurityLevel: {ID: 52, type: DataType.UINT8}, - alarmMask: {ID: 64, type: DataType.BITMAP16}, - keypadOperationEventMask: {ID: 65, type: DataType.BITMAP16}, - rfOperationEventMask: {ID: 66, type: DataType.BITMAP16}, - manualOperationEventMask: {ID: 67, type: DataType.BITMAP16}, - rfidOperationEventMask: {ID: 68, type: DataType.BITMAP16}, - keypadProgrammingEventMask: {ID: 69, type: DataType.BITMAP16}, - rfProgrammingEventMask: {ID: 70, type: DataType.BITMAP16}, - rfidProgrammingEventMask: {ID: 71, type: DataType.BITMAP16}, + ID: 0x0101, + attributes: { + lockState: {ID: 0x0000, type: DataType.ENUM8, report: true, required: true}, + lockType: {ID: 0x0001, type: DataType.ENUM8, required: true}, + actuatorEnabled: {ID: 0x0002, type: DataType.BOOLEAN, required: true}, + doorState: {ID: 0x0003, type: DataType.ENUM8, report: true}, + doorOpenEvents: {ID: 0x0004, type: DataType.UINT32, write: true}, + doorClosedEvents: {ID: 0x0005, type: DataType.UINT32, write: true}, + openPeriod: {ID: 0x0006, type: DataType.UINT16, write: true}, + + numOfLockRecordsSupported: {ID: 0x0010, type: DataType.UINT16, default: 0}, + numOfTotalUsersSupported: {ID: 0x0011, type: DataType.UINT16, default: 0}, + numOfPinUsersSupported: {ID: 0x0012, type: DataType.UINT16, default: 0}, + numOfRfidUsersSupported: {ID: 0x0013, type: DataType.UINT16, default: 0}, + numOfWeekDaySchedulesSupportedPerUser: {ID: 0x0014, type: DataType.UINT8, default: 0}, + numOfYearDaySchedulesSupportedPerUser: {ID: 0x0015, type: DataType.UINT8, default: 0}, + numOfHolidayScheduledsSupported: {ID: 0x0016, type: DataType.UINT8, default: 0}, + maxPinLen: {ID: 0x0017, type: DataType.UINT8, default: 8}, + minPinLen: {ID: 0x0018, type: DataType.UINT8, default: 4}, + maxRfidLen: {ID: 0x0019, type: DataType.UINT8, default: 20}, + minRfidLen: {ID: 0x001a, type: DataType.UINT8, default: 8}, + + enableLogging: {ID: 0x0020, type: DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 0}, + language: {ID: 0x0021, type: DataType.CHAR_STR, write: true, writeOptional: true, report: true, default: "", length: 2}, + ledSettings: {ID: 0x0022, type: DataType.UINT8, write: true, writeOptional: true, report: true, default: 0}, + autoRelockTime: { + ID: 0x0023, + type: DataType.UINT32, + write: true, + writeOptional: true, + report: true, + default: 0, + special: [["Disabled", "0"]], + }, + soundVolume: {ID: 0x0024, type: DataType.UINT8, write: true, writeOptional: true, report: true, default: 0}, + operatingMode: {ID: 0x0025, type: DataType.ENUM8, write: true, writeOptional: true, report: true, default: 0}, + supportedOperatingModes: {ID: 0x0026, type: DataType.BITMAP16, default: 1}, + defaultConfigurationRegister: {ID: 0x0027, type: DataType.BITMAP16, report: true, default: 0}, + enableLocalProgramming: {ID: 0x0028, type: DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 1}, + enableOneTouchLocking: {ID: 0x0029, type: DataType.BOOLEAN, write: true, report: true, default: 0}, + enableInsideStatusLed: {ID: 0x002a, type: DataType.BOOLEAN, write: true, report: true, default: 0}, + enablePrivacyModeButton: {ID: 0x002b, type: DataType.BOOLEAN, write: true, report: true, default: 0}, + + wrongCodeEntryLimit: {ID: 0x0030, type: DataType.UINT8, write: true, writeOptional: true, report: true, default: 0}, + userCodeTemporaryDisableTime: {ID: 0x0031, type: DataType.UINT8, write: true, writeOptional: true, report: true, default: 0}, + sendPinOta: {ID: 0x0032, type: DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 0}, + requirePinForRfOperation: {ID: 0x0033, type: DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 0}, + zigbeeSecurityLevel: {ID: 0x0034, type: DataType.ENUM8, report: true, default: 0}, + + alarmMask: {ID: 0x0040, type: DataType.BITMAP16, write: true, report: true, default: 0}, + keypadOperationEventMask: {ID: 0x0041, type: DataType.BITMAP16, write: true, report: true, default: 0}, + rfOperationEventMask: {ID: 0x0042, type: DataType.BITMAP16, write: true, report: true, default: 0}, + manualOperationEventMask: {ID: 0x0043, type: DataType.BITMAP16, write: true, report: true, default: 0}, + rfidOperationEventMask: {ID: 0x0044, type: DataType.BITMAP16, write: true, report: true, default: 0}, + keypadProgrammingEventMask: {ID: 0x0045, type: DataType.BITMAP16, write: true, report: true, default: 0}, + rfProgrammingEventMask: {ID: 0x0046, type: DataType.BITMAP16, write: true, report: true, default: 0}, + rfidProgrammingEventMask: {ID: 0x0047, type: DataType.BITMAP16, write: true, report: true, default: 0}, }, commands: { - lockDoor: { - ID: 0, - response: 0, - parameters: [{name: "pincodevalue", type: DataType.CHAR_STR}], - }, - unlockDoor: { - ID: 1, - response: 1, - parameters: [{name: "pincodevalue", type: DataType.CHAR_STR}], - }, - toggleDoor: { - ID: 2, - response: 2, - parameters: [{name: "pincodevalue", type: DataType.CHAR_STR}], - }, + lockDoor: {ID: 0x00, response: 0, parameters: [{name: "pincodevalue", type: DataType.OCTET_STR}], required: true}, + unlockDoor: {ID: 0x01, response: 1, parameters: [{name: "pincodevalue", type: DataType.OCTET_STR}], required: true}, + toggleDoor: {ID: 0x02, response: 2, parameters: [{name: "pincodevalue", type: DataType.OCTET_STR}]}, unlockWithTimeout: { - ID: 3, + ID: 0x03, response: 3, parameters: [ {name: "timeout", type: DataType.UINT16}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - getLogRecord: { - ID: 4, - response: 4, - parameters: [{name: "logindex", type: DataType.UINT16}], - }, + getLogRecord: {ID: 0x04, response: 4, parameters: [{name: "logindex", type: DataType.UINT16, special: [["MostRecent", "0"]]}]}, setPinCode: { - ID: 5, + ID: 0x05, response: 5, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, - {name: "usertype", type: DataType.UINT8}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "usertype", type: DataType.ENUM8}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - getPinCode: { - ID: 6, - response: 6, - parameters: [{name: "userid", type: DataType.UINT16}], - }, - clearPinCode: { - ID: 7, - response: 7, - parameters: [{name: "userid", type: DataType.UINT16}], - }, - clearAllPinCodes: { - ID: 8, - response: 8, - parameters: [], - }, + getPinCode: {ID: 0x06, response: 6, parameters: [{name: "userid", type: DataType.UINT16}]}, + clearPinCode: {ID: 0x07, response: 7, parameters: [{name: "userid", type: DataType.UINT16}]}, + clearAllPinCodes: {ID: 0x08, response: 8, parameters: []}, setUserStatus: { - ID: 9, + ID: 0x09, response: 9, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, ], }, - getUserStatus: { - ID: 10, - response: 10, - parameters: [{name: "userid", type: DataType.UINT16}], - }, + getUserStatus: {ID: 0x0a, response: 10, parameters: [{name: "userid", type: DataType.UINT16}]}, setWeekDaySchedule: { - ID: 11, + ID: 0x0b, response: 11, parameters: [ {name: "scheduleid", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, - {name: "daysmask", type: DataType.UINT8}, - {name: "starthour", type: DataType.UINT8}, - {name: "startminute", type: DataType.UINT8}, - {name: "endhour", type: DataType.UINT8}, - {name: "endminute", type: DataType.UINT8}, + {name: "daysmask", type: DataType.BITMAP8}, + {name: "starthour", type: DataType.UINT8, min: 0, max: 23}, + {name: "startminute", type: DataType.UINT8, min: 0, max: 59}, + {name: "endhour", type: DataType.UINT8, min: 0, max: 23}, + {name: "endminute", type: DataType.UINT8, min: 0, max: 59}, ], }, getWeekDaySchedule: { - ID: 12, + ID: 0x0c, response: 12, parameters: [ {name: "scheduleid", type: DataType.UINT8}, @@ -1785,7 +2672,7 @@ export const Clusters: Readonly> ], }, clearWeekDaySchedule: { - ID: 13, + ID: 0x0d, response: 13, parameters: [ {name: "scheduleid", type: DataType.UINT8}, @@ -1793,7 +2680,7 @@ export const Clusters: Readonly> ], }, setYearDaySchedule: { - ID: 14, + ID: 0x0e, response: 14, parameters: [ {name: "scheduleid", type: DataType.UINT8}, @@ -1803,7 +2690,7 @@ export const Clusters: Readonly> ], }, getYearDaySchedule: { - ID: 15, + ID: 0x0f, response: 15, parameters: [ {name: "scheduleid", type: DataType.UINT8}, @@ -1811,7 +2698,7 @@ export const Clusters: Readonly> ], }, clearYearDaySchedule: { - ID: 16, + ID: 0x10, response: 16, parameters: [ {name: "scheduleid", type: DataType.UINT8}, @@ -1819,873 +2706,1075 @@ export const Clusters: Readonly> ], }, setHolidaySchedule: { - ID: 17, + ID: 0x11, response: 17, parameters: [ {name: "holidayscheduleid", type: DataType.UINT8}, {name: "zigbeelocalstarttime", type: DataType.UINT32}, {name: "zigbeelocalendtime", type: DataType.UINT32}, - {name: "opermodelduringholiday", type: DataType.UINT8}, + {name: "opermodelduringholiday", type: DataType.ENUM8}, ], }, - getHolidaySchedule: { - ID: 18, - response: 18, - parameters: [{name: "holidayscheduleid", type: DataType.UINT8}], - }, - clearHolidaySchedule: { - ID: 19, - response: 19, - parameters: [{name: "holidayscheduleid", type: DataType.UINT8}], - }, + getHolidaySchedule: {ID: 0x12, response: 18, parameters: [{name: "holidayscheduleid", type: DataType.UINT8}]}, + clearHolidaySchedule: {ID: 0x13, response: 19, parameters: [{name: "holidayscheduleid", type: DataType.UINT8}]}, setUserType: { - ID: 20, + ID: 0x14, response: 20, parameters: [ {name: "userid", type: DataType.UINT16}, - {name: "usertype", type: DataType.UINT8}, + {name: "usertype", type: DataType.ENUM8}, ], }, - getUserType: { - ID: 21, - response: 21, - parameters: [{name: "userid", type: DataType.UINT16}], - }, + getUserType: {ID: 0x15, response: 21, parameters: [{name: "userid", type: DataType.UINT16}]}, setRfidCode: { - ID: 22, + ID: 0x16, response: 22, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, - {name: "usertype", type: DataType.UINT8}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "usertype", type: DataType.ENUM8}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - getRfidCode: { - ID: 23, - response: 23, - parameters: [{name: "userid", type: DataType.UINT16}], - }, - clearRfidCode: { - ID: 24, - response: 24, - parameters: [{name: "userid", type: DataType.UINT16}], - }, - clearAllRfidCodes: { - ID: 25, - response: 25, - parameters: [], - }, + getRfidCode: {ID: 0x17, response: 23, parameters: [{name: "userid", type: DataType.UINT16}]}, + clearRfidCode: {ID: 0x18, response: 24, parameters: [{name: "userid", type: DataType.UINT16}]}, + clearAllRfidCodes: {ID: 0x19, response: 25, parameters: []}, }, commandsResponse: { - lockDoorRsp: { - ID: 0, - parameters: [{name: "status", type: DataType.UINT8}], - }, - unlockDoorRsp: { - ID: 1, - parameters: [{name: "status", type: DataType.UINT8}], - }, - toggleDoorRsp: { - ID: 2, - parameters: [{name: "status", type: DataType.UINT8}], - }, - unlockWithTimeoutRsp: { - ID: 3, - parameters: [{name: "status", type: DataType.UINT8}], - }, + lockDoorRsp: {ID: 0x00, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + unlockDoorRsp: {ID: 0x01, parameters: [{name: "status", type: DataType.ENUM8}], required: true}, + toggleDoorRsp: {ID: 0x02, parameters: [{name: "status", type: DataType.ENUM8}]}, + unlockWithTimeoutRsp: {ID: 0x03, parameters: [{name: "status", type: DataType.ENUM8}]}, getLogRecordRsp: { - ID: 4, + ID: 0x04, parameters: [ {name: "logentryid", type: DataType.UINT16}, {name: "timestamp", type: DataType.UINT32}, - {name: "eventtype", type: DataType.UINT8}, + {name: "eventtype", type: DataType.ENUM8}, {name: "source", type: DataType.UINT8}, {name: "eventidalarmcode", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - setPinCodeRsp: { - ID: 5, - parameters: [{name: "status", type: DataType.UINT8}], - }, + setPinCodeRsp: {ID: 0x05, parameters: [{name: "status", type: DataType.UINT8}]}, getPinCodeRsp: { - ID: 6, + ID: 0x06, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, - {name: "usertype", type: DataType.UINT8}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "usertype", type: DataType.ENUM8}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - clearPinCodeRsp: { - ID: 7, - parameters: [{name: "status", type: DataType.UINT8}], - }, - clearAllPinCodesRsp: { - ID: 8, - parameters: [{name: "status", type: DataType.UINT8}], - }, - setUserStatusRsp: { - ID: 9, - parameters: [{name: "status", type: DataType.UINT8}], - }, + clearPinCodeRsp: {ID: 0x07, parameters: [{name: "status", type: DataType.UINT8}]}, + clearAllPinCodesRsp: {ID: 0x08, parameters: [{name: "status", type: DataType.UINT8}]}, + setUserStatusRsp: {ID: 0x09, parameters: [{name: "status", type: DataType.UINT8}]}, getUserStatusRsp: { - ID: 10, + ID: 0x0a, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, ], }, - setWeekDayScheduleRsp: { - ID: 11, - parameters: [{name: "status", type: DataType.UINT8}], - }, + setWeekDayScheduleRsp: {ID: 0x0b, parameters: [{name: "status", type: DataType.UINT8}]}, getWeekDayScheduleRsp: { - ID: 12, + ID: 0x0c, parameters: [ {name: "scheduleid", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, {name: "status", type: DataType.UINT8}, - {name: "daysmask", type: DataType.UINT8}, - {name: "starthour", type: DataType.UINT8}, - {name: "startminute", type: DataType.UINT8}, - {name: "endhour", type: DataType.UINT8}, - {name: "endminute", type: DataType.UINT8}, + {name: "daysmask", type: DataType.BITMAP8}, + {name: "starthour", type: DataType.UINT8, min: 0, max: 23}, + {name: "startminute", type: DataType.UINT8, min: 0, max: 59}, + {name: "endhour", type: DataType.UINT8, min: 0, max: 23}, + {name: "endminute", type: DataType.UINT8, min: 0, max: 59}, ], }, - clearWeekDayScheduleRsp: { - ID: 13, - parameters: [{name: "status", type: DataType.UINT8}], - }, - setYearDayScheduleRsp: { - ID: 14, - parameters: [{name: "status", type: DataType.UINT8}], - }, + clearWeekDayScheduleRsp: {ID: 0x0d, parameters: [{name: "status", type: DataType.UINT8}]}, + setYearDayScheduleRsp: {ID: 0x0e, parameters: [{name: "status", type: DataType.UINT8}]}, getYearDayScheduleRsp: { - ID: 15, + ID: 0x0f, parameters: [ {name: "scheduleid", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, {name: "zigbeelocalstarttime", type: DataType.UINT32}, {name: "zigbeelocalendtime", type: DataType.UINT32}, ], }, - clearYearDayScheduleRsp: { - ID: 16, - parameters: [{name: "status", type: DataType.UINT8}], - }, - setHolidayScheduleRsp: { - ID: 17, - parameters: [{name: "status", type: DataType.UINT8}], - }, + clearYearDayScheduleRsp: {ID: 0x10, parameters: [{name: "status", type: DataType.UINT8}]}, + setHolidayScheduleRsp: {ID: 0x11, parameters: [{name: "status", type: DataType.UINT8}]}, getHolidayScheduleRsp: { - ID: 18, + ID: 0x12, parameters: [ {name: "holidayscheduleid", type: DataType.UINT8}, {name: "status", type: DataType.UINT8}, {name: "zigbeelocalstarttime", type: DataType.UINT32}, {name: "zigbeelocalendtime", type: DataType.UINT32}, - {name: "opermodelduringholiday", type: DataType.UINT8}, + {name: "opermodelduringholiday", type: DataType.ENUM8}, ], }, - clearHolidayScheduleRsp: { - ID: 19, - parameters: [{name: "status", type: DataType.UINT8}], - }, - setUserTypeRsp: { - ID: 20, - parameters: [{name: "status", type: DataType.UINT8}], - }, + clearHolidayScheduleRsp: {ID: 0x13, parameters: [{name: "status", type: DataType.UINT8}]}, + setUserTypeRsp: {ID: 0x14, parameters: [{name: "status", type: DataType.UINT8}]}, getUserTypeRsp: { - ID: 21, + ID: 0x15, parameters: [ {name: "userid", type: DataType.UINT16}, - {name: "usertype", type: DataType.UINT8}, + {name: "usertype", type: DataType.ENUM8}, ], }, - setRfidCodeRsp: { - ID: 22, - parameters: [{name: "status", type: DataType.UINT8}], - }, + setRfidCodeRsp: {ID: 0x16, parameters: [{name: "status", type: DataType.UINT8}]}, getRfidCodeRsp: { - ID: 23, + ID: 0x17, parameters: [ {name: "userid", type: DataType.UINT16}, {name: "userstatus", type: DataType.UINT8}, - {name: "usertype", type: DataType.UINT8}, - {name: "pincodevalue", type: DataType.CHAR_STR}, + {name: "usertype", type: DataType.ENUM8}, + {name: "pincodevalue", type: DataType.OCTET_STR}, ], }, - clearRfidCodeRsp: { - ID: 24, - parameters: [{name: "status", type: DataType.UINT8}], - }, - clearAllRfidCodesRsp: { - ID: 25, - parameters: [{name: "status", type: DataType.UINT8}], - }, + clearRfidCodeRsp: {ID: 0x18, parameters: [{name: "status", type: DataType.UINT8}]}, + clearAllRfidCodesRsp: {ID: 0x19, parameters: [{name: "status", type: DataType.UINT8}]}, operationEventNotification: { - ID: 32, + ID: 0x20, parameters: [ {name: "opereventsrc", type: DataType.UINT8}, {name: "opereventcode", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, {name: "pin", type: DataType.OCTET_STR}, {name: "zigbeelocaltime", type: DataType.UINT32}, - {name: "data", type: DataType.UINT8}, + {name: "data", type: DataType.CHAR_STR}, ], }, programmingEventNotification: { - ID: 33, + ID: 0x21, parameters: [ {name: "programeventsrc", type: DataType.UINT8}, {name: "programeventcode", type: DataType.UINT8}, {name: "userid", type: DataType.UINT16}, {name: "pin", type: DataType.OCTET_STR}, - {name: "usertype", type: DataType.UINT8}, + {name: "usertype", type: DataType.ENUM8}, {name: "userstatus", type: DataType.UINT8}, {name: "zigbeelocaltime", type: DataType.UINT32}, - {name: "data", type: DataType.UINT8}, + {name: "data", type: DataType.CHAR_STR}, ], }, }, }, closuresWindowCovering: { - ID: 258, - attributes: { - windowCoveringType: {ID: 0, type: DataType.ENUM8}, - physicalClosedLimitLiftCm: {ID: 1, type: DataType.UINT16}, - physicalClosedLimitTiltDdegree: {ID: 2, type: DataType.UINT16}, - currentPositionLiftCm: {ID: 3, type: DataType.UINT16}, - currentPositionTiltDdegree: {ID: 4, type: DataType.UINT16}, - numOfActuationsLift: {ID: 5, type: DataType.UINT16}, - numOfActuationsTilt: {ID: 6, type: DataType.UINT16}, - configStatus: {ID: 7, type: DataType.BITMAP8}, - currentPositionLiftPercentage: {ID: 8, type: DataType.UINT8}, - currentPositionTiltPercentage: {ID: 9, type: DataType.UINT8}, - operationalStatus: {ID: 10, type: DataType.BITMAP8}, - installedOpenLimitLiftCm: {ID: 16, type: DataType.UINT16}, - installedClosedLimitLiftCm: {ID: 17, type: DataType.UINT16}, - installedOpenLimitTiltDdegree: {ID: 18, type: DataType.UINT16}, - installedClosedLimitTiltDdegree: {ID: 19, type: DataType.UINT16}, - velocityLift: {ID: 20, type: DataType.UINT16}, - accelerationTimeLift: {ID: 21, type: DataType.UINT16}, - decelerationTimeLift: {ID: 22, type: DataType.UINT16}, - windowCoveringMode: {ID: 23, type: DataType.BITMAP8}, - intermediateSetpointsLift: {ID: 24, type: DataType.OCTET_STR}, - intermediateSetpointsTilt: {ID: 25, type: DataType.OCTET_STR}, - tuyaMovingState: {ID: 0xf000, type: DataType.ENUM8}, - tuyaCalibration: {ID: 0xf001, type: DataType.ENUM8}, - stepPositionLift: {ID: 0xf001, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP}, - tuyaMotorReversal: {ID: 0xf002, type: DataType.ENUM8}, - calibrationMode: {ID: 0xf002, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP}, - moesCalibrationTime: {ID: 0xf003, type: DataType.UINT16}, - targetPositionTiltPercentage: {ID: 0xf003, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP}, - stepPositionTilt: {ID: 0xf004, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP}, - elkoDriveCloseDuration: {ID: 0xe000, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoProtectionStatus: {ID: 0xe010, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO}, - elkoProtectionSensor: {ID: 0xe013, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO}, - elkoSunProtectionIlluminanceThreshold: {ID: 0xe012, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoLiftDriveUpTime: {ID: 0xe014, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoLiftDriveDownTime: {ID: 0xe015, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoTiltOpenCloseAndStepTime: {ID: 0xe016, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoTiltPositionPercentageAfterMoveToLevel: {ID: 0xe017, type: DataType.UINT8, manufacturerCode: ManufacturerCode.ADEO}, - nikoCalibrationTimeUp: {ID: 0xfcc1, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NIKO_NV}, - nikoCalibrationTimeDown: {ID: 0xfcc2, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NIKO_NV}, + ID: 0x0102, + attributes: { + windowCoveringType: {ID: 0x0000, type: DataType.ENUM8, required: true, default: 0}, + physicalClosedLimitLiftCm: {ID: 0x0001, type: DataType.UINT16, max: 0xffff, default: 0}, + physicalClosedLimitTiltDdegree: {ID: 0x0002, type: DataType.UINT16, max: 0xffff, default: 0}, + currentPositionLiftCm: {ID: 0x0003, type: DataType.UINT16, max: 0xffff, default: 0}, + currentPositionTiltDdegree: {ID: 0x0004, type: DataType.UINT16, max: 0xffff, default: 0}, + numOfActuationsLift: {ID: 0x0005, type: DataType.UINT16, max: 0xffff, default: 0}, + numOfActuationsTilt: {ID: 0x0006, type: DataType.UINT16, max: 0xffff, default: 0}, + configStatus: {ID: 0x0007, type: DataType.BITMAP8, required: true, default: 3}, + // `required: true` only if Closed Loop control and Lift actions are supported + currentPositionLiftPercentage: {ID: 0x0008, type: DataType.UINT8, report: true, scene: true, max: 100, default: 0}, + // `required: true` only if Closed Loop control and Tilt actions are supported + currentPositionTiltPercentage: {ID: 0x0009, type: DataType.UINT8, report: true, scene: true, max: 100, default: 0}, + + // `required: true` only if Closed Loop control and Lift actions are supported + installedOpenLimitLiftCm: {ID: 0x0010, type: DataType.UINT16, max: 0xffff, default: 0}, + // `required: true` only if Closed Loop control and Lift actions are supported + installedClosedLimitLiftCm: {ID: 0x0011, type: DataType.UINT16, max: 0xffff, default: 0xffff}, + // `required: true` only if Closed Loop control and Tilt actions are supported + installedOpenLimitTiltDdegree: {ID: 0x0012, type: DataType.UINT16, max: 0xffff, default: 0}, + // `required: true` only if Closed Loop control and Tilt actions are supported + installedClosedLimitTiltDdegree: {ID: 0x0013, type: DataType.UINT16, max: 0xffff, default: 0xffff}, + velocityLift: {ID: 0x0014, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + accelerationTimeLift: {ID: 0x0015, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + decelerationTimeLift: {ID: 0x0016, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + windowCoveringMode: {ID: 0x0017, type: DataType.BITMAP8, required: true, default: 4}, + intermediateSetpointsLift: {ID: 0x0018, type: DataType.OCTET_STR, default: "1,0x0000"}, + intermediateSetpointsTilt: {ID: 0x0019, type: DataType.OCTET_STR, default: "1,0x0000"}, + // custom + // XXX: doesn't exist? + operationalStatus: {ID: 0x000a, type: DataType.BITMAP8}, + elkoDriveCloseDuration: {ID: 0xe000, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoProtectionStatus: {ID: 0xe010, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO, write: true}, + elkoSunProtectionIlluminanceThreshold: { + ID: 0xe012, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.ADEO, + write: true, + max: 0xffff, + }, + elkoProtectionSensor: {ID: 0xe013, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.ADEO, write: true}, + elkoLiftDriveUpTime: {ID: 0xe014, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoLiftDriveDownTime: {ID: 0xe015, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoTiltOpenCloseAndStepTime: {ID: 0xe016, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoTiltPositionPercentageAfterMoveToLevel: { + ID: 0xe017, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.ADEO, + write: true, + max: 0xff, + }, + tuyaMovingState: {ID: 0xf000, type: DataType.ENUM8, write: true, max: 0xff}, + tuyaCalibration: {ID: 0xf001, type: DataType.ENUM8, write: true, max: 0xff}, + stepPositionLift: {ID: 0xf001, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP, write: true, max: 0xff}, + tuyaMotorReversal: {ID: 0xf002, type: DataType.ENUM8, write: true, max: 0xff}, + calibrationMode: {ID: 0xf002, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP, write: true, max: 0xff}, + moesCalibrationTime: {ID: 0xf003, type: DataType.UINT16, write: true, max: 0xffff}, + targetPositionTiltPercentage: { + ID: 0xf003, + type: DataType.ENUM8, + manufacturerCode: ManufacturerCode.LEGRAND_GROUP, + write: true, + max: 0xff, + }, + stepPositionTilt: {ID: 0xf004, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.LEGRAND_GROUP, write: true, max: 0xff}, + nikoCalibrationTimeUp: {ID: 0xfcc1, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NIKO_NV, write: true, max: 0xffff}, + nikoCalibrationTimeDown: {ID: 0xfcc2, type: DataType.UINT16, manufacturerCode: ManufacturerCode.NIKO_NV, write: true, max: 0xffff}, }, commands: { - upOpen: { - ID: 0, - parameters: [], - }, - downClose: { - ID: 1, - parameters: [], - }, - stop: { - ID: 2, - parameters: [], - }, + upOpen: {ID: 0x00, parameters: [], required: true}, + downClose: {ID: 0x01, parameters: [], required: true}, + stop: {ID: 0x02, parameters: [], required: true}, goToLiftValue: { - ID: 4, - parameters: [{name: "liftvalue", type: DataType.UINT16}], - }, - goToLiftPercentage: { - ID: 5, - parameters: [{name: "percentageliftvalue", type: DataType.UINT8}], + ID: 0x04, + parameters: [ + { + name: "liftvalue", + type: DataType.UINT16, + }, + ], }, + goToLiftPercentage: {ID: 0x05, parameters: [{name: "percentageliftvalue", type: DataType.UINT8, max: 100}]}, goToTiltValue: { - ID: 7, - parameters: [{name: "tiltvalue", type: DataType.UINT16}], - }, - goToTiltPercentage: { - ID: 8, - parameters: [{name: "percentagetiltvalue", type: DataType.UINT8}], + ID: 0x07, + parameters: [ + { + name: "tiltvalue", + type: DataType.UINT16, + }, + ], }, + goToTiltPercentage: {ID: 0x08, parameters: [{name: "percentagetiltvalue", type: DataType.UINT8, max: 100}]}, + // custom elkoStopOrStepLiftPercentage: { ID: 0x80, parameters: [ - {name: "direction", type: DataType.UINT16}, - {name: "stepvalue", type: DataType.UINT16}, + {name: "direction", type: DataType.UINT16, max: 0xffff}, + {name: "stepvalue", type: DataType.UINT16, max: 0xffff}, ], }, }, commandsResponse: {}, }, barrierControl: { - ID: 259, - attributes: { - movingState: {ID: 1, type: DataType.ENUM8}, - safetyStatus: {ID: 2, type: DataType.BITMAP16}, - capabilities: {ID: 3, type: DataType.BITMAP8}, - openEvents: {ID: 4, type: DataType.UINT16}, - closeEvents: {ID: 5, type: DataType.UINT16}, - commandOpenEvents: {ID: 6, type: DataType.UINT16}, - commandCloseEvents: {ID: 7, type: DataType.UINT16}, - openPeriod: {ID: 8, type: DataType.UINT16}, - closePeriod: {ID: 9, type: DataType.UINT16}, - barrierPosition: {ID: 10, type: DataType.UINT8}, + ID: 0x0103, + attributes: { + movingState: {ID: 0x0001, type: DataType.ENUM8, report: true, required: true}, + safetyStatus: {ID: 0x0002, type: DataType.BITMAP16, report: true, required: true}, + capabilities: {ID: 0x0003, type: DataType.BITMAP8, required: true}, + openEvents: {ID: 0x0004, type: DataType.UINT16, write: true, max: 0xfffe, default: 0}, + closeEvents: {ID: 0x0005, type: DataType.UINT16, write: true, max: 0xfffe, default: 0}, + commandOpenEvents: {ID: 0x0006, type: DataType.UINT16, write: true, max: 0xfffe, default: 0}, + commandCloseEvents: {ID: 0x0007, type: DataType.UINT16, write: true, max: 0xfffe, default: 0}, + openPeriod: {ID: 0x0008, type: DataType.UINT16, write: true, max: 0xfffe}, + closePeriod: {ID: 0x0009, type: DataType.UINT16, write: true, max: 0xfffe}, + barrierPosition: { + ID: 0x000a, + type: DataType.UINT8, + report: true, + scene: true, + required: true, + max: 100, + special: [["PositionUnknown", "ff"]], + }, }, commands: { - goToPercent: { - ID: 0, - parameters: [{name: "percentOpen", type: DataType.UINT8}], - }, - stop: { - ID: 1, - parameters: [], - }, + goToPercent: {ID: 0x00, parameters: [{name: "percentOpen", type: DataType.UINT8, min: 0, max: 100}], required: true}, + stop: {ID: 0x01, parameters: [], required: true}, }, commandsResponse: {}, }, hvacPumpCfgCtrl: { - ID: 512, - attributes: { - maxPressure: {ID: 0, type: DataType.INT16}, - maxSpeed: {ID: 1, type: DataType.UINT16}, - maxFlow: {ID: 2, type: DataType.UINT16}, - minConstPressure: {ID: 3, type: DataType.INT16}, - maxConstPressure: {ID: 4, type: DataType.INT16}, - minCompPressure: {ID: 5, type: DataType.INT16}, - maxCompPressure: {ID: 6, type: DataType.INT16}, - minConstSpeed: {ID: 7, type: DataType.UINT16}, - maxConstSpeed: {ID: 8, type: DataType.UINT16}, - minConstFlow: {ID: 9, type: DataType.UINT16}, - maxConstFlow: {ID: 10, type: DataType.UINT16}, - minConstTemp: {ID: 11, type: DataType.INT16}, - maxConstTemp: {ID: 12, type: DataType.INT16}, - pumpStatus: {ID: 16, type: DataType.BITMAP16}, - effectiveOperationMode: {ID: 17, type: DataType.ENUM8}, - effectiveControlMode: {ID: 18, type: DataType.ENUM8}, - capacity: {ID: 19, type: DataType.INT16}, - speed: {ID: 20, type: DataType.UINT16}, - lifetimeRunningHours: {ID: 21, type: DataType.UINT24}, - power: {ID: 22, type: DataType.UINT24}, - lifetimeEnergyConsumed: {ID: 23, type: DataType.UINT32}, - operationMode: {ID: 32, type: DataType.ENUM8}, - controlMode: {ID: 33, type: DataType.ENUM8}, - alarmMask: {ID: 34, type: DataType.BITMAP16}, + ID: 0x0200, + attributes: { + maxPressure: {ID: 0x0000, type: DataType.INT16, required: true, min: -32767, max: 32767}, + maxSpeed: {ID: 0x0001, type: DataType.UINT16, required: true, max: 65534}, + maxFlow: {ID: 0x0002, type: DataType.UINT16, required: true, max: 65534}, + minConstPressure: {ID: 0x0003, type: DataType.INT16, min: -32767, max: 32767}, + maxConstPressure: {ID: 0x0004, type: DataType.INT16, min: -32767, max: 32767}, + minCompPressure: {ID: 0x0005, type: DataType.INT16, min: -32767, max: 32767}, + maxCompPressure: {ID: 0x0006, type: DataType.INT16, min: -32767, max: 32767}, + minConstSpeed: {ID: 0x0007, type: DataType.UINT16, max: 65534}, + maxConstSpeed: {ID: 0x0008, type: DataType.UINT16, max: 65534}, + minConstFlow: {ID: 0x0009, type: DataType.UINT16, max: 65534}, + maxConstFlow: {ID: 0x000a, type: DataType.UINT16, max: 65534}, + minConstTemp: {ID: 0x000b, type: DataType.INT16, min: -27315, max: 32767}, + maxConstTemp: {ID: 0x000c, type: DataType.INT16, min: -27315, max: 32767}, + + pumpStatus: {ID: 0x0010, type: DataType.BITMAP16, report: true}, + effectiveOperationMode: {ID: 0x0011, type: DataType.ENUM8, required: true, max: 0xfe}, + effectiveControlMode: {ID: 0x0012, type: DataType.ENUM8, required: true, max: 0xfe}, + capacity: {ID: 0x0013, type: DataType.INT16, report: true, required: true, min: 0, max: 0x7fff}, + speed: {ID: 0x0014, type: DataType.UINT16, max: 0xfffe}, + lifetimeRunningHours: {ID: 0x0015, type: DataType.UINT24, write: true, max: 0xfffffe, default: 0}, + power: {ID: 0x0016, type: DataType.UINT24, write: true, max: 0xfffffe}, + lifetimeEnergyConsumed: {ID: 0x0017, type: DataType.UINT32, max: 0xfffffffe, default: 0}, + + operationMode: {ID: 0x0020, type: DataType.ENUM8, write: true, required: true, max: 0xfe, default: 0}, + controlMode: {ID: 0x0021, type: DataType.ENUM8, write: true, max: 0xfe, default: 0}, + alarmMask: {ID: 0x0022, type: DataType.BITMAP16}, }, commands: {}, commandsResponse: {}, }, hvacThermostat: { - ID: 513, - attributes: { - localTemp: {ID: 0, type: DataType.INT16}, - outdoorTemp: {ID: 1, type: DataType.INT16}, - occupancy: {ID: 2, type: DataType.BITMAP8}, - absMinHeatSetpointLimit: {ID: 3, type: DataType.INT16}, - absMaxHeatSetpointLimit: {ID: 4, type: DataType.INT16}, - absMinCoolSetpointLimit: {ID: 5, type: DataType.INT16}, - absMaxCoolSetpointLimit: {ID: 6, type: DataType.INT16}, - pICoolingDemand: {ID: 7, type: DataType.UINT8}, - pIHeatingDemand: {ID: 8, type: DataType.UINT8}, - systemTypeConfig: {ID: 9, type: DataType.BITMAP8}, - localTemperatureCalibration: {ID: 16, type: DataType.INT8}, - occupiedCoolingSetpoint: {ID: 17, type: DataType.INT16}, - occupiedHeatingSetpoint: {ID: 18, type: DataType.INT16}, - unoccupiedCoolingSetpoint: {ID: 19, type: DataType.INT16}, - unoccupiedHeatingSetpoint: {ID: 20, type: DataType.INT16}, - minHeatSetpointLimit: {ID: 21, type: DataType.INT16}, - maxHeatSetpointLimit: {ID: 22, type: DataType.INT16}, - minCoolSetpointLimit: {ID: 23, type: DataType.INT16}, - maxCoolSetpointLimit: {ID: 24, type: DataType.INT16}, - minSetpointDeadBand: {ID: 25, type: DataType.INT8}, - remoteSensing: {ID: 26, type: DataType.BITMAP8}, - ctrlSeqeOfOper: {ID: 27, type: DataType.ENUM8}, - systemMode: {ID: 28, type: DataType.ENUM8}, - alarmMask: {ID: 29, type: DataType.BITMAP8}, - runningMode: {ID: 30, type: DataType.ENUM8}, - startOfWeek: {ID: 32, type: DataType.ENUM8}, - numberOfWeeklyTrans: {ID: 33, type: DataType.UINT8}, - numberOfDailyTrans: {ID: 34, type: DataType.UINT8}, - tempSetpointHold: {ID: 35, type: DataType.ENUM8}, - tempSetpointHoldDuration: {ID: 36, type: DataType.UINT16}, - programingOperMode: {ID: 37, type: DataType.BITMAP8}, - runningState: {ID: 41, type: DataType.BITMAP16}, - setpointChangeSource: {ID: 48, type: DataType.ENUM8}, - setpointChangeAmount: {ID: 49, type: DataType.INT16}, - setpointChangeSourceTimeStamp: {ID: 50, type: DataType.UTC}, - acType: {ID: 64, type: DataType.ENUM8}, - acCapacity: {ID: 65, type: DataType.UINT16}, - acRefrigerantType: {ID: 66, type: DataType.ENUM8}, - acConpressorType: {ID: 67, type: DataType.ENUM8}, - acErrorCode: {ID: 68, type: DataType.BITMAP32}, - acLouverPosition: {ID: 69, type: DataType.ENUM8}, - acCollTemp: {ID: 70, type: DataType.INT16}, - acCapacityFormat: {ID: 71, type: DataType.ENUM8}, - SinopeOccupancy: {ID: 1024, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES}, - SinopeMainCycleOutput: {ID: 1025, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES}, - SinopeBacklight: {ID: 1026, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES}, - SinopeAuxCycleOutput: {ID: 1028, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES}, - StelproSystemMode: {ID: 0x401c, type: DataType.ENUM8}, - StelproOutdoorTemp: {ID: 0x4001, type: DataType.INT16}, - viessmannWindowOpenInternal: {ID: 0x4000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH}, - viessmannWindowOpenForce: {ID: 0x4003, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH}, - viessmannAssemblyMode: {ID: 0x4012, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH}, - schneiderWiserSpecific: {ID: 0xe110, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - danfossWindowOpenInternal: {ID: 0x4000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossWindowOpenExternal: {ID: 0x4003, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossDayOfWeek: {ID: 0x4010, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossTriggerTime: {ID: 0x4011, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossMountedModeActive: {ID: 0x4012, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossMountedModeControl: {ID: 0x4013, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossThermostatOrientation: {ID: 0x4014, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossExternalMeasuredRoomSensor: {ID: 0x4015, type: DataType.INT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossRadiatorCovered: {ID: 0x4016, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossAlgorithmScaleFactor: {ID: 0x4020, type: DataType.UINT8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossHeatAvailable: {ID: 0x4030, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossHeatRequired: {ID: 0x4031, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossLoadBalancingEnable: {ID: 0x4032, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossLoadRoomMean: {ID: 0x4040, type: DataType.INT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossLoadEstimate: {ID: 0x404a, type: DataType.INT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossRegulationSetpointOffset: {ID: 0x404b, type: DataType.INT8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossAdaptionRunControl: {ID: 0x404c, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossAdaptionRunStatus: {ID: 0x404d, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossAdaptionRunSettings: {ID: 0x404e, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossPreheatStatus: {ID: 0x404f, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossPreheatTime: {ID: 0x4050, type: DataType.UINT32, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossWindowOpenFeatureEnable: {ID: 0x4051, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossRoomStatusCode: {ID: 0x4100, type: DataType.BITMAP16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossOutputStatus: {ID: 0x4110, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossRoomFloorSensorMode: {ID: 0x4120, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossFloorMinSetpoint: {ID: 0x4121, type: DataType.INT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossFloorMaxSetpoint: {ID: 0x4122, type: DataType.INT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossScheduleTypeUsed: {ID: 0x4130, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossIcon2PreHeat: {ID: 0x4131, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossIcon2PreHeatStatus: {ID: 0x414f, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - elkoLoad: {ID: 0x0401, type: DataType.UINT16}, - elkoDisplayText: {ID: 0x0402, type: DataType.CHAR_STR}, - elkoSensor: {ID: 0x0403, type: DataType.ENUM8}, - elkoRegulatorTime: {ID: 0x0404, type: DataType.UINT8}, - elkoRegulatorMode: {ID: 0x0405, type: DataType.BOOLEAN}, - elkoPowerStatus: {ID: 0x0406, type: DataType.BOOLEAN}, - elkoDateTime: {ID: 0x0407, type: DataType.OCTET_STR}, - elkoMeanPower: {ID: 0x0408, type: DataType.UINT16}, - elkoExternalTemp: {ID: 0x0409, type: DataType.INT16}, - elkoNightSwitching: {ID: 0x0411, type: DataType.BOOLEAN}, - elkoFrostGuard: {ID: 0x0412, type: DataType.BOOLEAN}, - elkoChildLock: {ID: 0x0413, type: DataType.BOOLEAN}, - elkoMaxFloorTemp: {ID: 0x0414, type: DataType.UINT8}, - elkoRelayState: {ID: 0x0415, type: DataType.BOOLEAN}, - elkoVersion: {ID: 0x0416, type: DataType.OCTET_STR}, - elkoCalibration: {ID: 0x0417, type: DataType.INT8}, - elkoLastMessageId: {ID: 0x0418, type: DataType.UINT8}, - elkoLastMessageStatus: {ID: 0x0419, type: DataType.UINT8}, - fourNoksHysteresisHigh: {ID: 0x0101, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ASTREL_GROUP_SRL}, - fourNoksHysteresisLow: {ID: 0x0102, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ASTREL_GROUP_SRL}, + ID: 0x0201, + attributes: { + localTemp: {ID: 0x0000, type: DataType.INT16, report: true, required: true, min: -27315, max: 32767}, + outdoorTemp: {ID: 0x0001, type: DataType.INT16, min: -27315, max: 32767}, + occupancy: {ID: 0x0002, type: DataType.BITMAP8, default: 1}, + absMinHeatSetpointLimit: {ID: 0x0003, type: DataType.INT16, min: -27315, max: 32767, default: 700}, + absMaxHeatSetpointLimit: {ID: 0x0004, type: DataType.INT16, min: -27315, max: 32767, default: 3000}, + absMinCoolSetpointLimit: {ID: 0x0005, type: DataType.INT16, min: -27315, max: 32767, default: 1600}, + absMaxCoolSetpointLimit: {ID: 0x0006, type: DataType.INT16, min: -27315, max: 32767, default: 3200}, + pICoolingDemand: {ID: 0x0007, type: DataType.UINT8, report: true, max: 100}, + pIHeatingDemand: {ID: 0x0008, type: DataType.UINT8, report: true, max: 100}, + systemTypeConfig: {ID: 0x0009, type: DataType.BITMAP8, write: true, writeOptional: true, default: 0}, + + localTemperatureCalibration: {ID: 0x0010, type: DataType.INT8, write: true, min: -25, max: 25, default: 0}, + occupiedCoolingSetpoint: {ID: 0x0011, type: DataType.INT16, write: true, scene: true, default: 2600}, + occupiedHeatingSetpoint: {ID: 0x0012, type: DataType.INT16, write: true, scene: true, default: 2000}, + unoccupiedCoolingSetpoint: {ID: 0x0013, type: DataType.INT16, write: true, default: 2600}, + unoccupiedHeatingSetpoint: {ID: 0x0014, type: DataType.INT16, write: true, default: 2000}, + minHeatSetpointLimit: {ID: 0x0015, type: DataType.INT16, write: true, min: -27315, max: 32767, default: 700}, + maxHeatSetpointLimit: {ID: 0x0016, type: DataType.INT16, write: true, min: -27315, max: 32767, default: 3000}, + minCoolSetpointLimit: {ID: 0x0017, type: DataType.INT16, write: true, min: -27315, max: 32767, default: 1600}, + maxCoolSetpointLimit: {ID: 0x0018, type: DataType.INT16, write: true, min: -27315, max: 32767, default: 3200}, + minSetpointDeadBand: {ID: 0x0019, type: DataType.INT8, write: true, writeOptional: true, min: 10, max: 25, default: 25}, + remoteSensing: {ID: 0x001a, type: DataType.BITMAP8, write: true, default: 0}, + ctrlSeqeOfOper: {ID: 0x001b, type: DataType.ENUM8, write: true, required: true, default: 4}, + systemMode: {ID: 0x001c, type: DataType.ENUM8, write: true, required: true, default: 1}, + alarmMask: {ID: 0x001d, type: DataType.BITMAP8, default: 0}, + runningMode: {ID: 0x001e, type: DataType.ENUM8, default: 0}, + + startOfWeek: {ID: 0x0020, type: DataType.ENUM8}, + numberOfWeeklyTrans: {ID: 0x0021, type: DataType.UINT8, max: 0xff, default: 0}, + numberOfDailyTrans: {ID: 0x0022, type: DataType.UINT8, max: 0xff, default: 0}, + tempSetpointHold: {ID: 0x0023, type: DataType.ENUM8, write: true, default: 0}, + tempSetpointHoldDuration: {ID: 0x0024, type: DataType.UINT16, write: true, min: 0, max: 1440}, + programingOperMode: {ID: 0x0025, type: DataType.BITMAP8, write: true, report: true, default: 0}, + runningState: {ID: 0x0029, type: DataType.BITMAP16}, + + setpointChangeSource: {ID: 0x0030, type: DataType.ENUM8, default: 0}, + setpointChangeAmount: {ID: 0x0031, type: DataType.INT16, min: 0, max: 0xffff}, + setpointChangeSourceTimeStamp: {ID: 0x0032, type: DataType.UTC, max: 0xfffffffe, default: 0}, + occupiedSetback: {ID: 0x0034, type: DataType.UINT8, write: true}, + occupiedSetbackMin: {ID: 0x0035, type: DataType.UINT8, min: 0}, + occupiedSetbackMax: {ID: 0x0036, type: DataType.UINT8}, + unoccupiedSetback: {ID: 0x0037, type: DataType.UINT8, write: true}, + unoccupiedSetbackMin: {ID: 0x0038, type: DataType.UINT8, min: 0}, + unoccupiedSetbackMax: {ID: 0x0039, type: DataType.UINT8}, + emergencyHeatDelta: {ID: 0x003a, type: DataType.UINT8, write: true}, + + acType: {ID: 0x0040, type: DataType.ENUM8, write: true, default: 0}, + acCapacity: {ID: 0x0041, type: DataType.UINT16, write: true, max: 0xffff, default: 0}, + acRefrigerantType: {ID: 0x0042, type: DataType.ENUM8, write: true, default: 0}, + acConpressorType: {ID: 0x0043, type: DataType.ENUM8, write: true, default: 0}, + acErrorCode: {ID: 0x0044, type: DataType.BITMAP32, write: true, max: 0xffffffff, default: 0}, + acLouverPosition: {ID: 0x0045, type: DataType.ENUM8, write: true, default: 0}, + acCollTemp: {ID: 0x0046, type: DataType.INT16, min: -27315, max: 32767}, + acCapacityFormat: {ID: 0x0047, type: DataType.ENUM8, write: true, default: 0}, + // custom + fourNoksHysteresisHigh: { + ID: 0x0101, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.ASTREL_GROUP_SRL, + write: true, + max: 0xffff, + }, + fourNoksHysteresisLow: {ID: 0x0102, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ASTREL_GROUP_SRL, write: true, max: 0xffff}, + SinopeOccupancy: {ID: 0x0400, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES, write: true, max: 0xff}, + elkoLoad: {ID: 0x0401, type: DataType.UINT16, write: true, max: 0xffff}, + SinopeMainCycleOutput: { + ID: 0x0401, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES, + write: true, + max: 0xffff, + }, + elkoDisplayText: {ID: 0x0402, type: DataType.CHAR_STR, write: true}, + SinopeBacklight: {ID: 0x0402, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES, write: true, max: 0xff}, + elkoSensor: {ID: 0x0403, type: DataType.ENUM8, write: true, max: 0xff}, + elkoRegulatorTime: {ID: 0x0404, type: DataType.UINT8, write: true, max: 0xff}, + SinopeAuxCycleOutput: { + ID: 0x0404, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES, + write: true, + max: 0xffff, + }, + elkoRegulatorMode: {ID: 0x0405, type: DataType.BOOLEAN, write: true}, + elkoPowerStatus: {ID: 0x0406, type: DataType.BOOLEAN, write: true}, + elkoDateTime: {ID: 0x0407, type: DataType.OCTET_STR, write: true}, + elkoMeanPower: {ID: 0x0408, type: DataType.UINT16, write: true, max: 0xffff}, + elkoExternalTemp: {ID: 0x0409, type: DataType.INT16, write: true, min: -32768, max: 32767}, + elkoNightSwitching: {ID: 0x0411, type: DataType.BOOLEAN, write: true}, + elkoFrostGuard: {ID: 0x0412, type: DataType.BOOLEAN, write: true}, + elkoChildLock: {ID: 0x0413, type: DataType.BOOLEAN, write: true}, + elkoMaxFloorTemp: {ID: 0x0414, type: DataType.UINT8, write: true, max: 0xff}, + elkoRelayState: {ID: 0x0415, type: DataType.BOOLEAN, write: true}, + elkoVersion: {ID: 0x0416, type: DataType.OCTET_STR, write: true}, + elkoCalibration: {ID: 0x0417, type: DataType.INT8, write: true, min: -128, max: 127}, + elkoLastMessageId: {ID: 0x0418, type: DataType.UINT8, write: true, max: 0xff}, + elkoLastMessageStatus: {ID: 0x0419, type: DataType.UINT8, write: true, max: 0xff}, + viessmannWindowOpenInternal: { + ID: 0x4000, + type: DataType.ENUM8, + manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH, + write: true, + max: 0xff, + }, + danfossWindowOpenInternal: {ID: 0x4000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + StelproOutdoorTemp: {ID: 0x4001, type: DataType.INT16, write: true, min: -32768, max: 32767}, + viessmannWindowOpenForce: {ID: 0x4003, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH, write: true}, + danfossWindowOpenExternal: {ID: 0x4003, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossDayOfWeek: {ID: 0x4010, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossTriggerTime: {ID: 0x4011, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xffff}, + viessmannAssemblyMode: {ID: 0x4012, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.VIESSMANN_ELEKTRONIK_GMBH, write: true}, + danfossMountedModeActive: {ID: 0x4012, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossMountedModeControl: {ID: 0x4013, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossThermostatOrientation: {ID: 0x4014, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossExternalMeasuredRoomSensor: { + ID: 0x4015, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -32768, + max: 32767, + }, + danfossRadiatorCovered: {ID: 0x4016, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + StelproSystemMode: {ID: 0x401c, type: DataType.ENUM8, write: true, max: 0xff}, + danfossAlgorithmScaleFactor: {ID: 0x4020, type: DataType.UINT8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossHeatAvailable: {ID: 0x4030, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossHeatRequired: {ID: 0x4031, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossLoadBalancingEnable: {ID: 0x4032, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossLoadRoomMean: { + ID: 0x4040, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -32768, + max: 32767, + }, + danfossLoadEstimate: { + ID: 0x404a, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -32768, + max: 32767, + }, + danfossRegulationSetpointOffset: { + ID: 0x404b, + type: DataType.INT8, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -128, + max: 127, + }, + danfossAdaptionRunControl: {ID: 0x404c, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossAdaptionRunStatus: {ID: 0x404d, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossAdaptionRunSettings: {ID: 0x404e, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossPreheatStatus: {ID: 0x404f, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossPreheatTime: {ID: 0x4050, type: DataType.UINT32, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossWindowOpenFeatureEnable: {ID: 0x4051, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossRoomStatusCode: {ID: 0x4100, type: DataType.BITMAP16, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + danfossOutputStatus: {ID: 0x4110, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossRoomFloorSensorMode: {ID: 0x4120, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossFloorMinSetpoint: { + ID: 0x4121, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -32768, + max: 32767, + }, + danfossFloorMaxSetpoint: { + ID: 0x4122, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + min: -32768, + max: 32767, + }, + danfossScheduleTypeUsed: {ID: 0x4130, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossIcon2PreHeat: {ID: 0x4131, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossIcon2PreHeatStatus: {ID: 0x414f, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + schneiderWiserSpecific: {ID: 0xe110, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, write: true, max: 0xff}, }, commands: { setpointRaiseLower: { - ID: 0, + ID: 0x00, parameters: [ - {name: "mode", type: DataType.UINT8}, + {name: "mode", type: DataType.ENUM8}, {name: "amount", type: DataType.INT8}, ], + required: true, }, setWeeklySchedule: { - ID: 1, + ID: 0x01, parameters: [ - {name: "numoftrans", type: DataType.UINT8}, - {name: "dayofweek", type: DataType.UINT8}, - {name: "mode", type: DataType.UINT8}, + {name: "numoftrans", type: DataType.UINT8, min: 0, max: 10}, + {name: "dayofweek", type: DataType.BITMAP8}, + {name: "mode", type: DataType.BITMAP8}, {name: "transitions", type: BuffaloZclDataType.LIST_THERMO_TRANSITIONS}, ], }, getWeeklySchedule: { - ID: 2, + ID: 0x02, response: 0, parameters: [ - {name: "daystoreturn", type: DataType.UINT8}, - {name: "modetoreturn", type: DataType.UINT8}, + {name: "daystoreturn", type: DataType.BITMAP8}, + {name: "modetoreturn", type: DataType.BITMAP8}, ], }, - clearWeeklySchedule: { - ID: 3, - parameters: [], - }, - getRelayStatusLog: { - ID: 4, - response: 1, - parameters: [], - }, + clearWeeklySchedule: {ID: 0x03, parameters: []}, + getRelayStatusLog: {ID: 0x04, response: 1, parameters: []}, + // custom danfossSetpointCommand: { - ID: 64, + ID: 0x40, parameters: [ - {name: "setpointType", type: DataType.ENUM8}, - {name: "setpoint", type: DataType.INT16}, + {name: "setpointType", type: DataType.ENUM8, max: 0xff}, + {name: "setpoint", type: DataType.INT16, min: -32768, max: 32767}, ], }, schneiderWiserThermostatBoost: { ID: 0x80, parameters: [ - {name: "command", type: DataType.ENUM8}, - {name: "enable", type: DataType.ENUM8}, - {name: "temperature", type: DataType.UINT16}, - {name: "duration", type: DataType.UINT16}, + {name: "command", type: DataType.ENUM8, max: 0xff}, + {name: "enable", type: DataType.ENUM8, max: 0xff}, + {name: "temperature", type: DataType.UINT16, max: 0xffff}, + {name: "duration", type: DataType.UINT16, max: 0xffff}, ], }, + plugwiseCalibrateValve: {ID: 0xa0, parameters: []}, wiserSmartSetSetpoint: { - ID: 224, + ID: 0xe0, parameters: [ - {name: "operatingmode", type: DataType.UINT8}, - {name: "zonemode", type: DataType.UINT8}, - {name: "setpoint", type: DataType.INT16}, - {name: "reserved", type: DataType.UINT8}, + {name: "operatingmode", type: DataType.UINT8, max: 0xff}, + {name: "zonemode", type: DataType.UINT8, max: 0xff}, + {name: "setpoint", type: DataType.INT16, min: -32768, max: 32767}, + {name: "reserved", type: DataType.UINT8, max: 0xff}, ], }, wiserSmartSetFipMode: { - ID: 225, + ID: 0xe1, parameters: [ - {name: "zonemode", type: DataType.UINT8}, - {name: "fipmode", type: DataType.ENUM8}, - {name: "reserved", type: DataType.UINT8}, + {name: "zonemode", type: DataType.UINT8, max: 0xff}, + {name: "fipmode", type: DataType.ENUM8, max: 0xff}, + {name: "reserved", type: DataType.UINT8, max: 0xff}, ], }, - wiserSmartCalibrateValve: { - ID: 226, - parameters: [], - }, - plugwiseCalibrateValve: { - ID: 0xa0, - parameters: [], - }, + wiserSmartCalibrateValve: {ID: 0xe2, parameters: []}, }, commandsResponse: { getWeeklyScheduleRsp: { - ID: 0, + ID: 0x00, parameters: [ - {name: "numoftrans", type: DataType.UINT8}, - {name: "dayofweek", type: DataType.UINT8}, - {name: "mode", type: DataType.UINT8}, + {name: "numoftrans", type: DataType.UINT8, min: 0, max: 10}, + {name: "dayofweek", type: DataType.BITMAP8}, + {name: "mode", type: DataType.BITMAP8}, {name: "transitions", type: BuffaloZclDataType.LIST_THERMO_TRANSITIONS}, ], }, getRelayStatusLogRsp: { - ID: 1, + ID: 0x01, parameters: [ {name: "timeofday", type: DataType.UINT16}, - {name: "relaystatus", type: DataType.UINT16}, - {name: "localtemp", type: DataType.UINT16}, + {name: "relaystatus", type: DataType.BITMAP8}, + {name: "localtemp", type: DataType.INT16}, {name: "humidity", type: DataType.UINT8}, - {name: "setpoint", type: DataType.UINT16}, + {name: "setpoint", type: DataType.INT16}, {name: "unreadentries", type: DataType.UINT16}, ], }, }, }, hvacFanCtrl: { - ID: 514, + ID: 0x0202, attributes: { - fanMode: {ID: 0, type: DataType.ENUM8}, - fanModeSequence: {ID: 1, type: DataType.ENUM8}, + fanMode: {ID: 0x0000, type: DataType.ENUM8, write: true, required: true, max: 0x06, default: 5}, + fanModeSequence: {ID: 0x0001, type: DataType.ENUM8, write: true, required: true, max: 0x04, default: 2}, }, commands: {}, commandsResponse: {}, }, hvacDehumidificationCtrl: { - ID: 515, + ID: 0x0203, attributes: { - relativeHumidity: {ID: 0, type: DataType.UINT8}, - dehumidCooling: {ID: 1, type: DataType.UINT8}, - rhDehumidSetpoint: {ID: 16, type: DataType.UINT8}, - relativeHumidityMode: {ID: 17, type: DataType.ENUM8}, - dehumidLockout: {ID: 18, type: DataType.ENUM8}, - dehumidHysteresis: {ID: 19, type: DataType.UINT8}, - dehumidMaxCool: {ID: 20, type: DataType.UINT8}, - relativeHumidDisplay: {ID: 21, type: DataType.ENUM8}, + relativeHumidity: {ID: 0x0000, type: DataType.UINT8, max: 100}, + dehumidCooling: {ID: 0x0001, type: DataType.UINT8, report: true, required: true}, + + rhDehumidSetpoint: {ID: 0x0010, type: DataType.UINT8, write: true, required: true, min: 30, max: 100, default: 50}, + relativeHumidityMode: {ID: 0x0011, type: DataType.ENUM8, write: true, default: 0}, + dehumidLockout: {ID: 0x0012, type: DataType.ENUM8, write: true, default: 1}, + dehumidHysteresis: {ID: 0x0013, type: DataType.UINT8, write: true, required: true, min: 2, max: 20, default: 2}, + dehumidMaxCool: {ID: 0x0014, type: DataType.UINT8, write: true, required: true, min: 20, max: 100, default: 20}, + relativeHumidDisplay: {ID: 0x0015, type: DataType.ENUM8, write: true, max: 0x01, default: 0}, }, commands: {}, commandsResponse: {}, }, hvacUserInterfaceCfg: { - ID: 516, + ID: 0x0204, attributes: { - tempDisplayMode: {ID: 0, type: DataType.ENUM8}, - keypadLockout: {ID: 1, type: DataType.ENUM8}, - programmingVisibility: {ID: 2, type: DataType.ENUM8}, - danfossViewingDirection: {ID: 0x4000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, + tempDisplayMode: {ID: 0x0000, type: DataType.ENUM8, write: true, required: true, max: 0x01, default: 0}, + keypadLockout: {ID: 0x0001, type: DataType.ENUM8, write: true, required: true, max: 0x05, default: 0}, + programmingVisibility: {ID: 0x0002, type: DataType.ENUM8, write: true, max: 0x01, default: 0}, + // custom + danfossViewingDirection: {ID: 0x4000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, }, lightingColorCtrl: { - ID: 768, - attributes: { - currentHue: {ID: 0, type: DataType.UINT8}, - currentSaturation: {ID: 1, type: DataType.UINT8}, - remainingTime: {ID: 2, type: DataType.UINT16}, - currentX: {ID: 3, type: DataType.UINT16}, - currentY: {ID: 4, type: DataType.UINT16}, - driftCompensation: {ID: 5, type: DataType.ENUM8}, - compensationText: {ID: 6, type: DataType.CHAR_STR}, - colorTemperature: {ID: 7, type: DataType.UINT16}, - colorMode: {ID: 8, type: DataType.ENUM8}, - options: {ID: 15, type: DataType.BITMAP8}, - numPrimaries: {ID: 16, type: DataType.UINT8}, - primary1X: {ID: 17, type: DataType.UINT16}, - primary1Y: {ID: 18, type: DataType.UINT16}, - primary1Intensity: {ID: 19, type: DataType.UINT8}, - primary2X: {ID: 21, type: DataType.UINT16}, - primary2Y: {ID: 22, type: DataType.UINT16}, - primary2Intensity: {ID: 23, type: DataType.UINT8}, - primary3X: {ID: 25, type: DataType.UINT16}, - primary3Y: {ID: 26, type: DataType.UINT16}, - primary3Intensity: {ID: 27, type: DataType.UINT8}, - primary4X: {ID: 32, type: DataType.UINT16}, - primary4Y: {ID: 33, type: DataType.UINT16}, - primary4Intensity: {ID: 34, type: DataType.UINT8}, - primary5X: {ID: 36, type: DataType.UINT16}, - primary5Y: {ID: 37, type: DataType.UINT16}, - primary5Intensity: {ID: 38, type: DataType.UINT8}, - primary6X: {ID: 40, type: DataType.UINT16}, - primary6Y: {ID: 41, type: DataType.UINT16}, - primary6Intensity: {ID: 42, type: DataType.UINT8}, - whitePointX: {ID: 48, type: DataType.UINT16}, - whitePointY: {ID: 49, type: DataType.UINT16}, - colorPointRX: {ID: 50, type: DataType.UINT16}, - colorPointRY: {ID: 51, type: DataType.UINT16}, - colorPointRIntensity: {ID: 52, type: DataType.UINT8}, - colorPointGX: {ID: 54, type: DataType.UINT16}, - colorPointGY: {ID: 55, type: DataType.UINT16}, - colorPointGIntensity: {ID: 56, type: DataType.UINT8}, - colorPointBX: {ID: 58, type: DataType.UINT16}, - colorPointBY: {ID: 59, type: DataType.UINT16}, - colorPointBIntensity: {ID: 60, type: DataType.UINT8}, - enhancedCurrentHue: {ID: 16384, type: DataType.UINT16}, - enhancedColorMode: {ID: 16385, type: DataType.ENUM8}, - colorLoopActive: {ID: 16386, type: DataType.UINT8}, - colorLoopDirection: {ID: 16387, type: DataType.UINT8}, - colorLoopTime: {ID: 16388, type: DataType.UINT16}, - colorLoopStartEnhancedHue: {ID: 16389, type: DataType.UINT16}, - colorLoopStoredEnhancedHue: {ID: 16390, type: DataType.UINT16}, - colorCapabilities: {ID: 16394, type: DataType.UINT16}, - colorTempPhysicalMin: {ID: 16395, type: DataType.UINT16}, - colorTempPhysicalMax: {ID: 16396, type: DataType.UINT16}, - coupleColorTempToLevelMin: {ID: 16397, type: DataType.UINT16}, - startUpColorTemperature: {ID: 16400, type: DataType.UINT16}, - tuyaBrightness: {ID: 61441, type: DataType.UINT8}, - tuyaRgbMode: {ID: 61440, type: DataType.UINT8}, + ID: 0x0300, + attributes: { + // `required: true` only if bit 0 of colorCapabilities attribute is 1 + currentHue: {ID: 0x0000, type: DataType.UINT8, report: true, max: 0xfe, default: 0}, + // `required: true` only if bit 0 of colorCapabilities attribute is 1 + currentSaturation: {ID: 0x0001, type: DataType.UINT8, report: true, scene: true, max: 0xfe, default: 0}, + remainingTime: {ID: 0x0002, type: DataType.UINT16, max: 0xfffe, default: 0}, + // `required: true` only if bit 3 of colorCapabilities attribute is 1 + currentX: {ID: 0x0003, type: DataType.UINT16, report: true, scene: true, max: 0xfeff, default: 0x616b}, + // `required: true` only if bit 3 of colorCapabilities attribute is 1 + currentY: {ID: 0x0004, type: DataType.UINT16, report: true, scene: true, max: 0xfeff, default: 0x607d}, + driftCompensation: {ID: 0x0005, type: DataType.ENUM8, max: 0x04}, + compensationText: {ID: 0x0006, type: DataType.CHAR_STR, maxLen: 254}, + // `required: true` only if bit 4 of colorCapabilities attribute is 1 + colorTemperature: { + ID: 0x0007, + type: DataType.UINT16, + report: true, + scene: true, + max: 0xfeff, + default: 0x00fa, + special: [["Undefined", "0000"]], + }, + colorMode: {ID: 0x0008, type: DataType.ENUM8, required: true, max: 0x02, default: 1}, + options: {ID: 0x000f, type: DataType.BITMAP8, write: true, required: true, default: 0}, + + numPrimaries: {ID: 0x0010, type: DataType.UINT8, required: true, max: 0x06}, + // all `primary1..` `required: true` only if numPrimaries > 0 + primary1X: {ID: 0x0011, type: DataType.UINT16, max: 0xfeff}, + primary1Y: {ID: 0x0012, type: DataType.UINT16, max: 0xfeff}, + primary1Intensity: {ID: 0x0013, type: DataType.UINT8, max: 0xff}, + // 0x0014: reserved + // all `primary2..` `required: true` only if numPrimaries > 1 + primary2X: {ID: 0x0015, type: DataType.UINT16, max: 0xfeff}, + primary2Y: {ID: 0x0016, type: DataType.UINT16, max: 0xfeff}, + primary2Intensity: {ID: 0x0017, type: DataType.UINT8}, + // 0x0018: reserved + // all `primary3..` `required: true` only if numPrimaries > 2 + primary3X: {ID: 0x0019, type: DataType.UINT16, max: 0xfeff}, + primary3Y: {ID: 0x001a, type: DataType.UINT16, max: 0xfeff}, + primary3Intensity: {ID: 0x001b, type: DataType.UINT8, max: 0xff}, + + // all `primary4..` `required: true` only if numPrimaries > 3 + primary4X: {ID: 0x0020, type: DataType.UINT16, max: 0xfeff}, + primary4Y: {ID: 0x0021, type: DataType.UINT16, max: 0xfeff}, + primary4Intensity: {ID: 0x0022, type: DataType.UINT8, max: 0xff}, + // 0x0023: reserved + // all `primary5..` `required: true` only if numPrimaries > 4 + primary5X: {ID: 0x0024, type: DataType.UINT16, max: 0xfeff}, + primary5Y: {ID: 0x0025, type: DataType.UINT16, max: 0xfeff}, + primary5Intensity: {ID: 0x0026, type: DataType.UINT8, max: 0xff}, + // 0x0027: reserved + // all `primary6..` `required: true` only if numPrimaries > 5 + primary6X: {ID: 0x0028, type: DataType.UINT16, max: 0xfeff}, + primary6Y: {ID: 0x0029, type: DataType.UINT16, max: 0xfeff}, + primary6Intensity: {ID: 0x002a, type: DataType.UINT8, max: 0xff}, + + whitePointX: {ID: 0x0030, type: DataType.UINT16, write: true, max: 0xfeff}, + whitePointY: {ID: 0x0031, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointRX: {ID: 0x0032, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointRY: {ID: 0x0033, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointRIntensity: {ID: 0x0034, type: DataType.UINT8, write: true, max: 0xff}, + // 0x0035: reserved + colorPointGX: {ID: 0x0036, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointGY: {ID: 0x0037, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointGIntensity: {ID: 0x0038, type: DataType.UINT8, write: true, max: 0xff}, + // 0x0039: reserved + colorPointBX: {ID: 0x003a, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointBY: {ID: 0x003b, type: DataType.UINT16, write: true, max: 0xfeff}, + colorPointBIntensity: {ID: 0x003c, type: DataType.UINT8, write: true, max: 0xff}, + + // `required: true` only if bit 1 of colorCapabilities attribute is 1 + enhancedCurrentHue: {ID: 0x4000, type: DataType.UINT16, scene: true, max: 0xffff, default: 0}, + enhancedColorMode: {ID: 0x4001, type: DataType.ENUM8, required: true, max: 0xff, default: 1}, + // `required: true` only if bit 2 of colorCapabilities attribute is 1 + colorLoopActive: {ID: 0x4002, type: DataType.UINT8, scene: true, max: 0xff, default: 0}, + // `required: true` only if bit 2 of colorCapabilities attribute is 1 + colorLoopDirection: {ID: 0x4003, type: DataType.UINT8, scene: true, max: 0xff, default: 0}, + // `required: true` only if bit 2 of colorCapabilities attribute is 1 + colorLoopTime: {ID: 0x4004, type: DataType.UINT16, scene: true, max: 0xffff, default: 0x0019}, + // `required: true` only if bit 2 of colorCapabilities attribute is 1 + colorLoopStartEnhancedHue: {ID: 0x4005, type: DataType.UINT16, max: 0xffff, default: 0x2300}, + // `required: true` only if bit 2 of colorCapabilities attribute is 1 + colorLoopStoredEnhancedHue: {ID: 0x4006, type: DataType.UINT16, max: 0xffff, default: 0}, + colorCapabilities: {ID: 0x400a, type: DataType.BITMAP16, required: true, max: 0x001f, default: 0}, + // `required: true` only if bit 4 of colorCapabilities attribute is 1 + colorTempPhysicalMin: {ID: 0x400b, type: DataType.UINT16, max: 0xfeff, default: 0}, + // `required: true` only if bit 4 of colorCapabilities attribute is 1 + colorTempPhysicalMax: {ID: 0x400c, type: DataType.UINT16, max: 0xfeff, default: 0xfeff}, + // `required: true` only if bit 4 of colorCapabilities attribute is 1 AND colorTemperature supported + coupleColorTempToLevelMin: {ID: 0x400d, type: DataType.UINT16}, + // `required: true` only if bit 4 of colorCapabilities attribute is 1 AND colorTemperature supported + startUpColorTemperature: { + ID: 0x4010, + type: DataType.UINT16, + write: true, + max: 0xfeff, + special: [["SetColorTempToPreviousValue", "ffff"]], + }, + // custom + tuyaRgbMode: {ID: 0xf000, type: DataType.UINT8, write: true, max: 0xff}, + tuyaBrightness: {ID: 0xf001, type: DataType.UINT8, write: true, max: 0xff}, }, commands: { moveToHue: { - ID: 0, + ID: 0x00, parameters: [ {name: "hue", type: DataType.UINT8}, - {name: "direction", type: DataType.UINT8}, + {name: "direction", type: DataType.ENUM8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, moveHue: { - ID: 1, + ID: 0x01, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, stepHue: { - ID: 2, + ID: 0x02, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, moveToSaturation: { - ID: 3, + ID: 0x03, parameters: [ {name: "saturation", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, moveSaturation: { - ID: 4, + ID: 0x04, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, stepSaturation: { - ID: 5, + ID: 0x05, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, moveToHueAndSaturation: { - ID: 6, - parameters: [ - {name: "hue", type: DataType.UINT8}, - {name: "saturation", type: DataType.UINT8}, - {name: "transtime", type: DataType.UINT16}, - ], - }, - tuyaMoveToHueAndSaturationBrightness: { - ID: 6, + ID: 0x06, parameters: [ {name: "hue", type: DataType.UINT8}, {name: "saturation", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, - {name: "brightness", type: DataType.UINT8}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, moveToColor: { - ID: 7, + ID: 0x07, parameters: [ {name: "colorx", type: DataType.UINT16}, {name: "colory", type: DataType.UINT16}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 3 of colorCapabilities attribute is 1 }, moveColor: { - ID: 8, + ID: 0x08, parameters: [ {name: "ratex", type: DataType.INT16}, {name: "ratey", type: DataType.INT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 3 of colorCapabilities attribute is 1 }, stepColor: { - ID: 9, + ID: 0x09, parameters: [ {name: "stepx", type: DataType.INT16}, {name: "stepy", type: DataType.INT16}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 3 of colorCapabilities attribute is 1 }, moveToColorTemp: { - ID: 10, + ID: 0x0a, parameters: [ {name: "colortemp", type: DataType.UINT16}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 4 of colorCapabilities attribute is 1 }, enhancedMoveToHue: { - ID: 64, + ID: 0x40, parameters: [ {name: "enhancehue", type: DataType.UINT16}, - {name: "direction", type: DataType.UINT8}, + {name: "direction", type: DataType.ENUM8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 1 of colorCapabilities attribute is 1 }, enhancedMoveHue: { - ID: 65, + ID: 0x41, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 1 of colorCapabilities attribute is 1 }, enhancedStepHue: { - ID: 66, + ID: 0x42, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT16}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 1 of colorCapabilities attribute is 1 }, enhancedMoveToHueAndSaturation: { - ID: 67, + ID: 0x43, parameters: [ {name: "enhancehue", type: DataType.UINT16}, {name: "saturation", type: DataType.UINT8}, {name: "transtime", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 1 of colorCapabilities attribute is 1 }, colorLoopSet: { - ID: 68, + ID: 0x44, parameters: [ - {name: "updateflags", type: DataType.UINT8}, - {name: "action", type: DataType.UINT8}, - {name: "direction", type: DataType.UINT8}, + {name: "updateflags", type: DataType.BITMAP8}, + {name: "action", type: DataType.ENUM8}, + {name: "direction", type: DataType.ENUM8}, {name: "time", type: DataType.UINT16}, {name: "starthue", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 2 of colorCapabilities attribute is 1 }, stopMoveStep: { - ID: 71, + ID: 0x47, parameters: [ - {name: "bits", type: DataType.UINT8}, - {name: "bytee", type: DataType.UINT8}, - {name: "action", type: DataType.UINT8}, - {name: "direction", type: DataType.UINT8}, - {name: "time", type: DataType.UINT16}, - {name: "starthue", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0, 1, 3 or 4 of colorCapabilities attribute is 1 }, moveColorTemp: { - ID: 75, + ID: 0x4b, parameters: [ - {name: "movemode", type: DataType.UINT8}, + {name: "movemode", type: DataType.ENUM8}, {name: "rate", type: DataType.UINT16}, {name: "minimum", type: DataType.UINT16}, {name: "maximum", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 4 of colorCapabilities attribute is 1 }, stepColorTemp: { - ID: 76, + ID: 0x4c, parameters: [ - {name: "stepmode", type: DataType.UINT8}, + {name: "stepmode", type: DataType.ENUM8}, {name: "stepsize", type: DataType.UINT16}, {name: "transtime", type: DataType.UINT16}, {name: "minimum", type: DataType.UINT16}, {name: "maximum", type: DataType.UINT16}, + // XXX: behind bytes condition due to likely missing fields with many devices + {name: "optionsMask", type: DataType.BITMAP8, conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}]}, + { + name: "optionsOverride", + type: DataType.BITMAP8, + conditions: [{type: ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1}], + }, ], + // required: true only if bit 0 of colorCapabilities attribute is 1 }, - tuyaSetMinimumBrightness: { - ID: 224, - parameters: [{name: "minimum", type: DataType.UINT16}], + // custom + tuyaMoveToHueAndSaturationBrightness: { + ID: 0x06, + parameters: [ + {name: "hue", type: DataType.UINT8, max: 0xff}, + {name: "saturation", type: DataType.UINT8, max: 0xff}, + {name: "transtime", type: DataType.UINT16, max: 0xffff}, + {name: "brightness", type: DataType.UINT8, max: 0xff}, + ], }, + tuyaSetMinimumBrightness: {ID: 0xe0, parameters: [{name: "minimum", type: DataType.UINT16, max: 0xffff}]}, tuyaMoveToHueAndSaturationBrightness2: { - ID: 225, + ID: 0xe1, parameters: [ - {name: "hue", type: DataType.UINT16}, - {name: "saturation", type: DataType.UINT16}, - {name: "brightness", type: DataType.UINT16}, + {name: "hue", type: DataType.UINT16, max: 0xffff}, + {name: "saturation", type: DataType.UINT16, max: 0xffff}, + {name: "brightness", type: DataType.UINT16, max: 0xffff}, ], }, - tuyaRgbMode: { - ID: 240, - parameters: [{name: "enable", type: DataType.UINT8}], - }, + tuyaRgbMode: {ID: 0xf0, parameters: [{name: "enable", type: DataType.UINT8, max: 0xff}]}, tuyaOnStartUp: { - ID: 249, + ID: 0xf9, parameters: [ - {name: "mode", type: DataType.UINT16}, + {name: "mode", type: DataType.UINT16, max: 0xffff}, {name: "data", type: BuffaloZclDataType.LIST_UINT8}, ], }, - tuyaDoNotDisturb: { - ID: 250, - parameters: [{name: "enable", type: DataType.UINT8}], - }, + tuyaDoNotDisturb: {ID: 0xfa, parameters: [{name: "enable", type: DataType.UINT8, max: 0xff}]}, tuyaOnOffTransitionTime: { - ID: 251, + ID: 0xfb, parameters: [ - {name: "unknown", type: DataType.UINT8}, + {name: "unknown", type: DataType.UINT8, max: 0xff}, {name: "onTransitionTime", type: BuffaloZclDataType.BIG_ENDIAN_UINT24}, {name: "offTransitionTime", type: BuffaloZclDataType.BIG_ENDIAN_UINT24}, ], @@ -2694,602 +3783,620 @@ export const Clusters: Readonly> commandsResponse: {}, }, lightingBallastCfg: { - ID: 769, - attributes: { - physicalMinLevel: {ID: 0, type: DataType.UINT8}, - physicalMaxLevel: {ID: 1, type: DataType.UINT8}, - ballastStatus: {ID: 2, type: DataType.BITMAP8}, - minLevel: {ID: 16, type: DataType.UINT8}, - maxLevel: {ID: 17, type: DataType.UINT8}, - powerOnLevel: {ID: 18, type: DataType.UINT8}, - powerOnFadeTime: {ID: 19, type: DataType.UINT16}, - intrinsicBallastFactor: {ID: 20, type: DataType.UINT8}, - ballastFactorAdjustment: {ID: 21, type: DataType.UINT8}, - lampQuantity: {ID: 32, type: DataType.UINT8}, - lampType: {ID: 48, type: DataType.CHAR_STR}, - lampManufacturer: {ID: 49, type: DataType.CHAR_STR}, - lampRatedHours: {ID: 50, type: DataType.UINT24}, - lampBurnHours: {ID: 51, type: DataType.UINT24}, - lampAlarmMode: {ID: 52, type: DataType.BITMAP8}, - lampBurnHoursTripPoint: {ID: 53, type: DataType.UINT24}, - elkoControlMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO}, - wiserControlMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, + ID: 0x0301, + attributes: { + physicalMinLevel: {ID: 0x0000, type: DataType.UINT8, required: true, min: 1, max: 0xfe, default: 1}, + physicalMaxLevel: {ID: 0x0001, type: DataType.UINT8, required: true, min: 1, max: 0xfe, default: 0xfe}, + ballastStatus: {ID: 0x0002, type: DataType.BITMAP8, default: 0}, + + minLevel: {ID: 0x0010, type: DataType.UINT8, write: true, required: true, min: 1, max: 0xfe}, + maxLevel: {ID: 0x0011, type: DataType.UINT8, write: true, required: true, min: 1, max: 0xfe}, + powerOnLevel: {ID: 0x0012, type: DataType.UINT8, write: true, max: 0xfe}, + powerOnFadeTime: {ID: 0x0013, type: DataType.UINT16, write: true, max: 0xfffe, default: 0}, + intrinsicBallastFactor: {ID: 0x0014, type: DataType.UINT8, write: true, max: 0xfe}, + ballastFactorAdjustment: {ID: 0x0015, type: DataType.UINT8, write: true, min: 100, default: 0xff}, + + lampQuantity: {ID: 0x0020, type: DataType.UINT8, max: 0xfe}, + + lampType: {ID: 0x0030, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + lampManufacturer: {ID: 0x0031, type: DataType.CHAR_STR, write: true, default: "", maxLen: 16}, + lampRatedHours: {ID: 0x0032, type: DataType.UINT24, write: true, max: 0xfffffe, default: 0xffffff}, + lampBurnHours: {ID: 0x0033, type: DataType.UINT24, write: true, max: 0xfffffe, default: 0}, + lampAlarmMode: {ID: 0x0034, type: DataType.BITMAP8, write: true, default: 0}, + lampBurnHoursTripPoint: {ID: 0x0035, type: DataType.UINT24, write: true, max: 0xfffffe, default: 0xffffff}, + // custom + elkoControlMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xff}, + wiserControlMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, }, msIlluminanceMeasurement: { - ID: 1024, // 0x0400 + ID: 0x0400, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, - lightSensorType: {ID: 4, type: DataType.ENUM8}, + measuredValue: { + ID: 0x0000, + type: DataType.UINT16, + report: true, + required: true, + max: 65535, + default: 0, + special: [ + ["TooLowToBeMeasured", "0000"], + ["Invalid", "ffff"], + ], + }, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, min: 1, max: 65533}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 2, max: 65534}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, + lightSensorType: {ID: 0x0004, type: DataType.ENUM8, default: 0xff, special: [["Unknown", "ff"]]}, }, commands: {}, commandsResponse: {}, }, msIlluminanceLevelSensing: { - ID: 1025, // 0x0401 + ID: 0x0401, attributes: { - levelStatus: {ID: 0, type: DataType.ENUM8}, - lightSensorType: {ID: 1, type: DataType.ENUM8}, - illuminanceTargetLevel: {ID: 16, type: DataType.UINT16}, + levelStatus: {ID: 0x0000, type: DataType.ENUM8, report: true, required: true, max: 254}, + lightSensorType: {ID: 0x0001, type: DataType.ENUM8, max: 0xfe}, + illuminanceTargetLevel: {ID: 0x0010, type: DataType.UINT16, write: true, required: true, max: 65534}, }, commands: {}, commandsResponse: {}, }, msTemperatureMeasurement: { - ID: 1026, // 0x0402 - attributes: { - measuredValue: {ID: 0, type: DataType.INT16}, - minMeasuredValue: {ID: 1, type: DataType.INT16}, - maxMeasuredValue: {ID: 2, type: DataType.INT16}, - tolerance: {ID: 3, type: DataType.UINT16}, - minPercentChange: {ID: 16, type: DataType.UNKNOWN}, - minAbsoluteChange: {ID: 17, type: DataType.UNKNOWN}, - sprutTemperatureOffset: {ID: 0x6600, type: DataType.INT16, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, + ID: 0x0402, + attributes: { + measuredValue: {ID: 0x0000, type: DataType.INT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.INT16, required: true, min: -27315, max: 32766}, + maxMeasuredValue: {ID: 0x0002, type: DataType.INT16, required: true, min: -27314, max: 32767}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, + // custom + minPercentChange: {ID: 0x0010, type: DataType.UNKNOWN, write: true}, + minAbsoluteChange: {ID: 0x0011, type: DataType.UNKNOWN, write: true}, + sprutTemperatureOffset: { + ID: 0x6600, + type: DataType.INT16, + manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, + write: true, + min: -32768, + max: 32767, + }, }, commands: {}, commandsResponse: {}, }, msPressureMeasurement: { - ID: 1027, // 0x0403 - attributes: { - measuredValue: {ID: 0, type: DataType.INT16}, - minMeasuredValue: {ID: 1, type: DataType.INT16}, - maxMeasuredValue: {ID: 2, type: DataType.INT16}, - tolerance: {ID: 3, type: DataType.UINT16}, - scaledValue: {ID: 0x0010, type: DataType.INT16}, - minScaledValue: {ID: 0x0011, type: DataType.INT16}, - maxScaledValue: {ID: 0x0012, type: DataType.INT16}, - scaledTolerance: {ID: 0x0013, type: DataType.UINT16}, - scale: {ID: 0x0014, type: DataType.INT8}, + ID: 0x0403, + attributes: { + measuredValue: {ID: 0x0000, type: DataType.INT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.INT16, required: true, min: -32767, max: 32766}, + maxMeasuredValue: {ID: 0x0002, type: DataType.INT16, required: true, min: -32766, max: 32767}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, + // if supported, should also be `report: true` + scaledValue: {ID: 0x0010, type: DataType.INT16, default: 0}, + minScaledValue: {ID: 0x0011, type: DataType.INT16, min: -32767, max: 32766}, + maxScaledValue: {ID: 0x0012, type: DataType.INT16, min: -32766, max: 32767}, + // if supported, should also be `report: true` + scaledTolerance: {ID: 0x0013, type: DataType.UINT16, max: 2048}, + scale: {ID: 0x0014, type: DataType.INT8, min: -127, max: 127}, }, commands: {}, commandsResponse: {}, }, msFlowMeasurement: { - ID: 1028, // 0x0404 + ID: 0x0404, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 65533}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 65534}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, }, commands: {}, commandsResponse: {}, }, msRelativeHumidity: { - // Water Content - ID: 1029, // 0x0405 + ID: 0x0405, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, - sprutHeater: {ID: 0x6600, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 9999}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 10000}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, + // custom + sprutHeater: {ID: 0x6600, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, write: true}, }, commands: {}, commandsResponse: {}, }, msOccupancySensing: { - ID: 1030, // 0x0406 - attributes: { - occupancy: {ID: 0x0000, type: DataType.BITMAP8}, - occupancySensorType: {ID: 0x0001, type: DataType.ENUM8}, - occupancySensorTypeBitmap: {ID: 0x0002, type: DataType.BITMAP8}, - pirOToUDelay: {ID: 0x0010, type: DataType.UINT16}, - pirUToODelay: {ID: 0x0011, type: DataType.UINT16}, - pirUToOThreshold: {ID: 0x0012, type: DataType.UINT8}, - ultrasonicOToUDelay: {ID: 0x0020, type: DataType.UINT16}, - ultrasonicUToODelay: {ID: 0x0021, type: DataType.UINT16}, - ultrasonicUToOThreshold: {ID: 0x0022, type: DataType.UINT8}, - contactOToUDelay: {ID: 0x0030, type: DataType.UINT16}, - contactUToODelay: {ID: 0x0031, type: DataType.UINT16}, - contactUToOThreshold: {ID: 0x0032, type: DataType.UINT8}, - elkoOccupancyDfltOperationMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO}, - elkoOccupancyOperationMode: {ID: 0xe001, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO}, - elkoForceOffTimeout: {ID: 0xe002, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO}, - elkoOccupancySensitivity: {ID: 0xe003, type: DataType.UINT8, manufacturerCode: ManufacturerCode.ADEO}, - sprutOccupancyLevel: {ID: 0x6600, type: DataType.UINT16, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, - sprutOccupancySensitivity: {ID: 0x6601, type: DataType.UINT16, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, + ID: 0x0406, + attributes: { + occupancy: {ID: 0x0000, type: DataType.BITMAP8, report: true, required: true}, + occupancySensorType: {ID: 0x0001, type: DataType.ENUM8, required: true, default: 0}, + occupancySensorTypeBitmap: {ID: 0x0002, type: DataType.BITMAP8, required: true}, + pirOToUDelay: {ID: 0x0010, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + pirUToODelay: {ID: 0x0011, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + pirUToOThreshold: {ID: 0x0012, type: DataType.UINT8, write: true, min: 0x01, max: 0xfe, default: 0x01}, + ultrasonicOToUDelay: {ID: 0x0020, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + ultrasonicUToODelay: {ID: 0x0021, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + ultrasonicUToOThreshold: {ID: 0x0022, type: DataType.UINT8, write: true, min: 0x01, max: 0xfe, default: 0x01}, + contactOToUDelay: {ID: 0x0030, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + contactUToODelay: {ID: 0x0031, type: DataType.UINT16, write: true, max: 0xfffe, default: 0x0000}, + contactUToOThreshold: {ID: 0x0032, type: DataType.UINT8, write: true, min: 0x01, max: 0xfe, default: 0x01}, + // custom + sprutOccupancyLevel: { + ID: 0x6600, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, + write: true, + max: 0xffff, + }, + sprutOccupancySensitivity: { + ID: 0x6601, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, + write: true, + max: 0xffff, + }, + elkoOccupancyDfltOperationMode: {ID: 0xe000, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xff}, + elkoOccupancyOperationMode: {ID: 0xe001, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xff}, + elkoForceOffTimeout: {ID: 0xe002, type: DataType.UINT16, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xffff}, + elkoOccupancySensitivity: {ID: 0xe003, type: DataType.UINT8, manufacturerCode: ManufacturerCode.ADEO, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, }, msLeafWetness: { - ID: 1031, // 0x0407 + ID: 0x0407, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 9999}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 10000}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, }, commands: {}, commandsResponse: {}, }, msSoilMoisture: { - ID: 1032, // 0x0408 + ID: 0x0408, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 9999}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 10000}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0800}, }, commands: {}, commandsResponse: {}, }, pHMeasurement: { - ID: 1033, // 0x0409 + ID: 0x0409, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 1399}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 1400}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x00c8}, }, commands: {}, commandsResponse: {}, }, msElectricalConductivity: { - ID: 1034, // 0x040a + ID: 0x040a, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 65533}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 65534}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0064}, }, commands: {}, commandsResponse: {}, }, msWindSpeed: { - ID: 1035, // 0x040b + ID: 0x040b, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, - minMeasuredValue: {ID: 1, type: DataType.UINT16}, - maxMeasuredValue: {ID: 2, type: DataType.UINT16}, - tolerance: {ID: 3, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.UINT16, required: true, max: 65533}, + maxMeasuredValue: {ID: 0x0002, type: DataType.UINT16, required: true, min: 1, max: 65534}, + tolerance: {ID: 0x0003, type: DataType.UINT16, max: 0x0308, default: 0}, }, commands: {}, commandsResponse: {}, }, msCarbonMonoxide: { // CO - ID: 1036, // 0x040c + ID: 0x040c, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msCO2: { // Carbon Dioxide - ID: 1037, // 0x040d + ID: 0x040d, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, - sprutCO2Calibration: {ID: 0x6600, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, - sprutCO2AutoCalibration: {ID: 0x6601, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, + // custom + sprutCO2Calibration: {ID: 0x6600, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, write: true}, + sprutCO2AutoCalibration: {ID: 0x6601, type: DataType.BOOLEAN, manufacturerCode: ManufacturerCode.CUSTOM_SPRUT_DEVICE, write: true}, }, commands: {}, commandsResponse: {}, }, msEthylene: { // CH2 - ID: 1038, // 0x040e + ID: 0x040e, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msEthyleneOxide: { // C2H4O - ID: 1039, // 0x040f + ID: 0x040f, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msHydrogen: { // H - ID: 1040, // 0x0410 + ID: 0x0410, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msHydrogenSulfide: { // H2S - ID: 1041, // 0x0411 + ID: 0x0411, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msNitricOxide: { // NO - ID: 1042, // 0x0412 + ID: 0x0412, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msNitrogenDioxide: { // NO2 - ID: 1043, // 0x0413 + ID: 0x0413, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msOxygen: { // O2 - ID: 1044, // 0x0414 + ID: 0x0414, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msOzone: { // O3 - ID: 1045, // 0x0415 + ID: 0x0415, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msSulfurDioxide: { // SO2 - ID: 1046, // 0x0416 + ID: 0x0416, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msDissolvedOxygen: { // DO - ID: 1047, // 0x0417 + ID: 0x0417, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msBromate: { - ID: 1048, // 0x0418 + ID: 0x0418, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msChloramines: { - ID: 1049, // 0x0419 + ID: 0x0419, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msChlorine: { - ID: 1050, // 0x041a + ID: 0x041a, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msFecalColiformAndEColi: { - ID: 1051, // 0x041b + ID: 0x041b, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msFluoride: { - ID: 1052, // 0x041c + ID: 0x041c, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msHaloaceticAcids: { - ID: 1053, // 0x041d + ID: 0x041d, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msTotalTrihalomethanes: { - ID: 1054, // 0x041e + ID: 0x041e, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msTotalColiformBacteria: { - ID: 1055, // 0x041f + ID: 0x041f, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msTurbidity: { - ID: 1056, // 0x0420 + ID: 0x0420, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msCopper: { - ID: 1057, // 0x0421 + ID: 0x0421, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msLead: { - ID: 1058, // 0x0422 + ID: 0x0422, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msManganese: { - ID: 1059, // 0x0423 + ID: 0x0423, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msSulfate: { - ID: 1060, // 0x0424 + ID: 0x0424, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msBromodichloromethane: { - ID: 1061, // 0x0425 + ID: 0x0425, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msBromoform: { - ID: 1062, // 0x0426 + ID: 0x0426, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msChlorodibromomethane: { - ID: 1063, // 0x0427 + ID: 0x0427, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msChloroform: { - ID: 1064, // 0x0428 + ID: 0x0428, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msSodium: { - ID: 1065, // 0x0429 + ID: 0x0429, attributes: { - measuredValue: {ID: 0, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 1, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 2, type: DataType.SINGLE_PREC}, - tolerance: {ID: 3, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, + tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, pm25Measurement: { - ID: 1066, // 0x042a + ID: 0x042a, + // XXX: attrs not named same as other concentration measurement clusters attributes: { - measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC}, - measuredMinValue: {ID: 0x0001, type: DataType.SINGLE_PREC}, - measuredMaxValue: {ID: 0x0002, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + measuredMinValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + measuredMaxValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, msFormaldehyde: { - ID: 1067, // 0x042b - attributes: { - measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC}, - minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC}, - maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC}, - tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, - }, - commands: {}, - commandsResponse: {}, - }, - pm1Measurement: { - // XXX: not in R8 spec? - ID: 1068, // 0x042c - attributes: { - measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC}, - measuredMinValue: {ID: 0x0001, type: DataType.SINGLE_PREC}, - measuredMaxValue: {ID: 0x0002, type: DataType.SINGLE_PREC}, - tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, - }, - commands: {}, - commandsResponse: {}, - }, - pm10Measurement: { - // XXX: not in R8 spec? - ID: 1069, // 0x042d + ID: 0x042b, attributes: { - measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC}, - measuredMinValue: {ID: 0x0001, type: DataType.SINGLE_PREC}, - measuredMaxValue: {ID: 0x0002, type: DataType.SINGLE_PREC}, + measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC, report: true, required: true}, + minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC, required: true, min: 0}, + maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC, required: true, max: 1}, tolerance: {ID: 0x0003, type: DataType.SINGLE_PREC}, }, commands: {}, commandsResponse: {}, }, ssIasZone: { - ID: 1280, + ID: 0x0500, attributes: { - zoneState: {ID: 0, type: DataType.ENUM8}, - zoneType: {ID: 1, type: DataType.ENUM16}, - zoneStatus: {ID: 2, type: DataType.BITMAP16}, - iasCieAddr: {ID: 16, type: DataType.IEEE_ADDR}, - zoneId: {ID: 17, type: DataType.UINT8}, - numZoneSensitivityLevelsSupported: {ID: 18, type: DataType.UINT8}, - currentZoneSensitivityLevel: {ID: 19, type: DataType.UINT8}, - develcoAlarmOffDelay: {ID: 0x8001, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DEVELCO}, + zoneState: {ID: 0x0000, type: DataType.ENUM8, required: true, default: 0}, + zoneType: {ID: 0x0001, type: DataType.ENUM16, required: true}, + zoneStatus: {ID: 0x0002, type: DataType.BITMAP16, required: true, default: 0}, + + iasCieAddr: {ID: 0x0010, type: DataType.IEEE_ADDR, write: true, required: true}, + zoneId: {ID: 0x0011, type: DataType.UINT8, required: true, max: 0xff, default: 0xff}, + // if currentZoneSensitivityLevel is supported, this one should be too (`required: true`) + numZoneSensitivityLevelsSupported: {ID: 0x0012, type: DataType.UINT8, min: 2, max: 0xff, default: 2}, + // if numZoneSensitivityLevelsSupported is supported, this one should be too (`required: true`) + currentZoneSensitivityLevel: {ID: 0x0013, type: DataType.UINT8, write: true, max: 0xff, default: 0}, + // custom + develcoAlarmOffDelay: {ID: 0x8001, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DEVELCO, write: true, max: 0xffff}, }, commands: { enrollRsp: { - ID: 0, + ID: 0x00, parameters: [ - {name: "enrollrspcode", type: DataType.UINT8}, + {name: "enrollrspcode", type: DataType.ENUM8}, {name: "zoneid", type: DataType.UINT8}, ], + required: true, }, - initNormalOpMode: { - ID: 1, - parameters: [], - }, + initNormalOpMode: {ID: 0x01, parameters: []}, initTestMode: { - ID: 2, + ID: 0x02, parameters: [ {name: "testModeDuration", type: DataType.UINT8}, {name: "currentZoneSensitivityLevel", type: DataType.UINT8}, @@ -3298,1334 +4405,2450 @@ export const Clusters: Readonly> }, commandsResponse: { statusChangeNotification: { - ID: 0, + ID: 0x00, parameters: [ - {name: "zonestatus", type: DataType.UINT16}, - {name: "extendedstatus", type: DataType.UINT8}, + {name: "zonestatus", type: DataType.BITMAP16}, + {name: "extendedstatus", type: DataType.BITMAP8}, + {name: "zoneID", type: DataType.UINT8}, + {name: "delay", type: DataType.UINT16}, ], + required: true, }, enrollReq: { - ID: 1, + ID: 0x01, parameters: [ - {name: "zonetype", type: DataType.UINT16}, + {name: "zonetype", type: DataType.ENUM16}, {name: "manucode", type: DataType.UINT16}, ], + required: true, }, }, }, ssIasAce: { - ID: 1281, + ID: 0x0501, attributes: {}, commands: { arm: { - ID: 0, + ID: 0x00, response: 0, parameters: [ - {name: "armmode", type: DataType.UINT8}, + {name: "armmode", type: DataType.ENUM8}, {name: "code", type: DataType.CHAR_STR}, {name: "zoneid", type: DataType.UINT8}, ], + required: true, }, bypass: { - ID: 1, + ID: 0x01, parameters: [ {name: "numofzones", type: DataType.UINT8}, {name: "zoneidlist", type: BuffaloZclDataType.LIST_UINT8}, + {name: "armDisarmCode", type: DataType.CHAR_STR}, ], + required: true, }, - emergency: { - ID: 2, - parameters: [], - }, - fire: { - ID: 3, - parameters: [], - }, - panic: { - ID: 4, - parameters: [], - }, - getZoneIDMap: { - ID: 5, - response: 1, - parameters: [], - }, - getZoneInfo: { - ID: 6, - response: 2, - parameters: [{name: "zoneid", type: DataType.UINT8}], - }, - getPanelStatus: { - ID: 7, - response: 5, - parameters: [], - }, - getBypassedZoneList: { - ID: 8, - parameters: [], - }, + emergency: {ID: 0x02, parameters: [], required: true}, + fire: {ID: 0x03, parameters: [], required: true}, + panic: {ID: 0x04, parameters: [], required: true}, + getZoneIDMap: {ID: 0x05, response: 1, parameters: [], required: true}, + getZoneInfo: {ID: 0x06, response: 2, parameters: [{name: "zoneid", type: DataType.UINT8}], required: true}, + getPanelStatus: {ID: 0x07, response: 5, parameters: [], required: true}, + getBypassedZoneList: {ID: 0x08, parameters: [], required: true}, getZoneStatus: { - ID: 9, + ID: 0x09, response: 8, parameters: [ {name: "startzoneid", type: DataType.UINT8}, {name: "maxnumzoneid", type: DataType.UINT8}, - {name: "zonestatusmaskflag", type: DataType.UINT8}, - {name: "zonestatusmask", type: DataType.UINT16}, + {name: "zonestatusmaskflag", type: DataType.BOOLEAN}, + {name: "zonestatusmask", type: DataType.BITMAP16}, ], + required: true, }, }, commandsResponse: { - armRsp: { - ID: 0, - parameters: [{name: "armnotification", type: DataType.UINT8}], - }, + armRsp: {ID: 0x00, parameters: [{name: "armnotification", type: DataType.ENUM8}], required: true}, getZoneIDMapRsp: { - ID: 1, - parameters: [ - {name: "zoneidmapsection0", type: DataType.UINT16}, - {name: "zoneidmapsection1", type: DataType.UINT16}, - {name: "zoneidmapsection2", type: DataType.UINT16}, - {name: "zoneidmapsection3", type: DataType.UINT16}, - {name: "zoneidmapsection4", type: DataType.UINT16}, - {name: "zoneidmapsection5", type: DataType.UINT16}, - {name: "zoneidmapsection6", type: DataType.UINT16}, - {name: "zoneidmapsection7", type: DataType.UINT16}, - {name: "zoneidmapsection8", type: DataType.UINT16}, - {name: "zoneidmapsection9", type: DataType.UINT16}, - {name: "zoneidmapsection10", type: DataType.UINT16}, - {name: "zoneidmapsection11", type: DataType.UINT16}, - {name: "zoneidmapsection12", type: DataType.UINT16}, - {name: "zoneidmapsection13", type: DataType.UINT16}, - {name: "zoneidmapsection14", type: DataType.UINT16}, - {name: "zoneidmapsection15", type: DataType.UINT16}, - ], + ID: 0x01, + parameters: [ + {name: "zoneidmapsection0", type: DataType.BITMAP16}, + {name: "zoneidmapsection1", type: DataType.BITMAP16}, + {name: "zoneidmapsection2", type: DataType.BITMAP16}, + {name: "zoneidmapsection3", type: DataType.BITMAP16}, + {name: "zoneidmapsection4", type: DataType.BITMAP16}, + {name: "zoneidmapsection5", type: DataType.BITMAP16}, + {name: "zoneidmapsection6", type: DataType.BITMAP16}, + {name: "zoneidmapsection7", type: DataType.BITMAP16}, + {name: "zoneidmapsection8", type: DataType.BITMAP16}, + {name: "zoneidmapsection9", type: DataType.BITMAP16}, + {name: "zoneidmapsection10", type: DataType.BITMAP16}, + {name: "zoneidmapsection11", type: DataType.BITMAP16}, + {name: "zoneidmapsection12", type: DataType.BITMAP16}, + {name: "zoneidmapsection13", type: DataType.BITMAP16}, + {name: "zoneidmapsection14", type: DataType.BITMAP16}, + {name: "zoneidmapsection15", type: DataType.BITMAP16}, + ], + required: true, }, getZoneInfoRsp: { - ID: 2, + ID: 0x02, parameters: [ {name: "zoneid", type: DataType.UINT8}, - {name: "zonetype", type: DataType.UINT16}, + {name: "zonetype", type: DataType.ENUM16}, {name: "ieeeaddr", type: DataType.IEEE_ADDR}, {name: "zonelabel", type: DataType.CHAR_STR}, ], + required: true, }, zoneStatusChanged: { - ID: 3, + ID: 0x03, parameters: [ {name: "zoneid", type: DataType.UINT8}, - {name: "zonestatus", type: DataType.UINT16}, - {name: "audiblenotif", type: DataType.UINT8}, + {name: "zonestatus", type: DataType.ENUM16}, + {name: "audiblenotif", type: DataType.ENUM8}, {name: "zonelabel", type: DataType.CHAR_STR}, ], + required: true, }, panelStatusChanged: { - ID: 4, + ID: 0x04, parameters: [ - {name: "panelstatus", type: DataType.UINT8}, + {name: "panelstatus", type: DataType.ENUM8}, {name: "secondsremain", type: DataType.UINT8}, - {name: "audiblenotif", type: DataType.UINT8}, - {name: "alarmstatus", type: DataType.UINT8}, + {name: "audiblenotif", type: DataType.ENUM8}, + {name: "alarmstatus", type: DataType.ENUM8}, ], + required: true, }, getPanelStatusRsp: { - ID: 5, + ID: 0x05, parameters: [ - {name: "panelstatus", type: DataType.UINT8}, + {name: "panelstatus", type: DataType.ENUM8}, {name: "secondsremain", type: DataType.UINT8}, - {name: "audiblenotif", type: DataType.UINT8}, - {name: "alarmstatus", type: DataType.UINT8}, + {name: "audiblenotif", type: DataType.ENUM8}, + {name: "alarmstatus", type: DataType.ENUM8}, ], + required: true, }, setBypassedZoneList: { - ID: 6, + ID: 0x06, parameters: [ {name: "numofzones", type: DataType.UINT8}, {name: "zoneid", type: BuffaloZclDataType.LIST_UINT8}, ], + required: true, }, bypassRsp: { - ID: 7, + ID: 0x07, parameters: [ {name: "numofzones", type: DataType.UINT8}, {name: "bypassresult", type: BuffaloZclDataType.LIST_UINT8}, ], + required: true, }, getZoneStatusRsp: { - ID: 8, + ID: 0x08, parameters: [ - {name: "zonestatuscomplete", type: DataType.UINT8}, + {name: "zonestatuscomplete", type: DataType.BOOLEAN}, {name: "numofzones", type: DataType.UINT8}, {name: "zoneinfo", type: BuffaloZclDataType.LIST_ZONEINFO}, ], + required: true, }, }, }, ssIasWd: { - ID: 1282, + ID: 0x0502, attributes: { - maxDuration: {ID: 0, type: DataType.UINT16}, + maxDuration: {ID: 0x0000, type: DataType.UINT16, write: true, required: true, max: 0xfffe, default: 240}, }, commands: { startWarning: { - ID: 0, + ID: 0x00, parameters: [ - {name: "startwarninginfo", type: DataType.UINT8}, + /** [4: warning mode, 2: strobe, 2: siren level] */ + {name: "startwarninginfo", type: DataType.BITMAP8}, {name: "warningduration", type: DataType.UINT16}, - {name: "strobedutycycle", type: DataType.UINT8}, - {name: "strobelevel", type: DataType.UINT8}, + {name: "strobedutycycle", type: DataType.UINT8, max: 100}, + {name: "strobelevel", type: DataType.ENUM8}, ], + required: true, }, squawk: { - ID: 1, - parameters: [{name: "squawkinfo", type: DataType.UINT8}], + ID: 0x01, + parameters: [ + /** [4: squawk mode, 1: strobe, 1: reserved, 2: squawk level] */ + {name: "squawkinfo", type: DataType.BITMAP8}, + ], + required: true, }, }, commandsResponse: {}, }, piGenericTunnel: { - ID: 1536, + ID: 0x0600, attributes: { - maxIncomeTransSize: {ID: 1, type: DataType.UINT16}, - maxOutgoTransSize: {ID: 2, type: DataType.UINT16}, - protocolAddr: {ID: 3, type: DataType.OCTET_STR}, + maxIncomeTransSize: {ID: 0x0001, type: DataType.UINT16, required: true, max: 0xffff}, + maxOutgoTransSize: {ID: 0x0002, type: DataType.UINT16, required: true, max: 0xffff}, + protocolAddr: {ID: 0x0003, type: DataType.OCTET_STR, required: true, minLen: 0, maxLen: 255, default: "\u0000"}, }, commands: { - matchProtocolAddr: { - ID: 0, - parameters: [{name: "protocoladdr", type: DataType.CHAR_STR}], - }, + matchProtocolAddr: {ID: 0x00, parameters: [{name: "protocoladdr", type: DataType.OCTET_STR}], required: true}, }, commandsResponse: { matchProtocolAddrRsp: { - ID: 0, + ID: 0x00, parameters: [ {name: "devieeeaddr", type: DataType.IEEE_ADDR}, - {name: "protocoladdr", type: DataType.CHAR_STR}, + {name: "protocoladdr", type: DataType.OCTET_STR}, ], + required: true, }, - advertiseProtocolAddr: { - ID: 1, - parameters: [{name: "protocoladdr", type: DataType.CHAR_STR}], - }, + advertiseProtocolAddr: {ID: 0x01, parameters: [{name: "protocoladdr", type: DataType.OCTET_STR}]}, }, }, piBacnetProtocolTunnel: { - ID: 1537, + ID: 0x0601, attributes: {}, commands: { - transferNpdu: { - ID: 0, - parameters: [{name: "npdu", type: DataType.UINT8}], - }, + transferNpdu: {ID: 0x00, parameters: [{name: "npdu", type: BuffaloZclDataType.LIST_UINT8}], required: true}, }, commandsResponse: {}, }, piAnalogInputReg: { - ID: 1538, + ID: 0x0602, attributes: { - covIncrement: {ID: 22, type: DataType.SINGLE_PREC}, - deviceType: {ID: 31, type: DataType.CHAR_STR}, - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - updateInterval: {ID: 118, type: DataType.UINT8}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + covIncrement: {ID: 0x0016, type: DataType.SINGLE_PREC, write: true, writeOptional: true}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + objectId: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + updateInterval: {ID: 0x0076, type: DataType.UINT8, write: true, writeOptional: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piAnalogInputExt: { - ID: 1539, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - notificationClass: {ID: 17, type: DataType.UINT16}, - deadband: {ID: 25, type: DataType.SINGLE_PREC}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - highLimit: {ID: 45, type: DataType.SINGLE_PREC}, - limitEnable: {ID: 52, type: DataType.BITMAP8}, - lowLimit: {ID: 59, type: DataType.SINGLE_PREC}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x0603, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + deadband: {ID: 0x0019, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + highLimit: {ID: 0x002d, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + limitEnable: {ID: 0x0034, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, max: 0x11, default: 0}, + lowLimit: {ID: 0x003b, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // length 3, each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY}, }, commands: { - transferApdu: { - ID: 0, - parameters: [], - }, - connectReq: { - ID: 1, - parameters: [], - }, - disconnectReq: { - ID: 2, - parameters: [], - }, - connectStatusNoti: { - ID: 3, - parameters: [], - }, + transferApdu: {ID: 0x00, parameters: []}, + connectReq: {ID: 0x01, parameters: []}, + disconnectReq: {ID: 0x02, parameters: []}, + connectStatusNoti: {ID: 0x03, parameters: []}, }, commandsResponse: {}, }, piAnalogOutputReg: { - ID: 1540, + ID: 0x0604, attributes: { - covIncrement: {ID: 22, type: DataType.SINGLE_PREC}, - deviceType: {ID: 31, type: DataType.CHAR_STR}, - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - updateInterval: {ID: 118, type: DataType.UINT8}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + covIncrement: {ID: 0x0016, type: DataType.SINGLE_PREC, write: true, writeOptional: true, default: 0}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + objectId: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piAnalogOutputExt: { - ID: 1541, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - notificationClass: {ID: 17, type: DataType.UINT16}, - deadband: {ID: 25, type: DataType.SINGLE_PREC}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - highLimit: {ID: 45, type: DataType.SINGLE_PREC}, - limitEnable: {ID: 52, type: DataType.BITMAP8}, - lowLimit: {ID: 59, type: DataType.SINGLE_PREC}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x0605, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + deadband: {ID: 0x0019, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + highLimit: {ID: 0x002d, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + limitEnable: {ID: 0x0034, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, max: 0x11, default: 0}, + lowLimit: {ID: 0x003b, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY}, }, commands: {}, commandsResponse: {}, }, piAnalogValueReg: { - ID: 1542, + ID: 0x0606, attributes: { - covIncrement: {ID: 22, type: DataType.SINGLE_PREC}, - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + covIncrement: {ID: 0x0016, type: DataType.SINGLE_PREC, write: true, writeOptional: true, default: 0}, + objectId: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piAnalogValueExt: { - ID: 1543, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - notificationClass: {ID: 17, type: DataType.UINT16}, - deadband: {ID: 25, type: DataType.SINGLE_PREC}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - highLimit: {ID: 45, type: DataType.SINGLE_PREC}, - limitEnable: {ID: 52, type: DataType.BITMAP8}, - lowLimit: {ID: 59, type: DataType.SINGLE_PREC}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x0607, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + deadband: {ID: 0x0019, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + highLimit: {ID: 0x002d, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + limitEnable: {ID: 0x0034, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, max: 0x11, default: 0}, + lowLimit: {ID: 0x003b, type: DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, piBinaryInputReg: { - ID: 1544, - attributes: { - changeOfStateCount: {ID: 15, type: DataType.UINT32}, - changeOfStateTime: {ID: 16, type: DataType.STRUCT}, - deviceType: {ID: 31, type: DataType.CHAR_STR}, - elapsedActiveTime: {ID: 33, type: DataType.UINT32}, - objectIdentifier: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - timeOfATReset: {ID: 114, type: DataType.STRUCT}, - timeOfSCReset: {ID: 115, type: DataType.STRUCT}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + ID: 0x0608, + attributes: { + changeOfStateCount: {ID: 0x000f, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + changeOfStateTime: {ID: 0x0010, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + elapsedActiveTime: {ID: 0x0021, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + timeOfATReset: {ID: 0x0072, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + timeOfSCReset: {ID: 0x0073, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piBinaryInputExt: { - ID: 1545, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - alarmValue: {ID: 6, type: DataType.BOOLEAN}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x0609, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + alarmValue: {ID: 0x0006, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, piBinaryOutputReg: { - ID: 1546, - attributes: { - changeOfStateCount: {ID: 15, type: DataType.UINT32}, - changeOfStateTime: {ID: 16, type: DataType.STRUCT}, - deviceType: {ID: 31, type: DataType.CHAR_STR}, - elapsedActiveTime: {ID: 33, type: DataType.UINT32}, - feedBackValue: {ID: 40, type: DataType.ENUM8}, - objectIdentifier: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - timeOfATReset: {ID: 114, type: DataType.STRUCT}, - timeOfSCReset: {ID: 115, type: DataType.STRUCT}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + ID: 0x060a, + attributes: { + changeOfStateCount: {ID: 0x000f, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + changeOfStateTime: {ID: 0x0010, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + elapsedActiveTime: {ID: 0x0021, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + feedBackValue: {ID: 0x0028, type: DataType.ENUM8, max: 1, default: 0}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + timeOfATReset: {ID: 0x0072, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + timeOfSCReset: {ID: 0x0073, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piBinaryOutputExt: { - ID: 1547, + ID: 0x060b, attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY}, }, commands: {}, commandsResponse: {}, }, piBinaryValueReg: { - ID: 1548, - attributes: { - changeOfStateCount: {ID: 15, type: DataType.UINT32}, - changeOfStateTime: {ID: 16, type: DataType.STRUCT}, - elapsedActiveTime: {ID: 33, type: DataType.UINT32}, - objectIdentifier: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - timeOfATReset: {ID: 114, type: DataType.STRUCT}, - timeOfSCReset: {ID: 115, type: DataType.STRUCT}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + ID: 0x060c, + attributes: { + changeOfStateCount: {ID: 0x000f, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + changeOfStateTime: {ID: 0x0010, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + elapsedActiveTime: {ID: 0x0021, type: DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + timeOfATReset: {ID: 0x0072, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + timeOfSCReset: {ID: 0x0073, type: DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piBinaryValueExt: { - ID: 1549, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - alarmValue: {ID: 6, type: DataType.BOOLEAN}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x060d, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + alarmValue: {ID: 0x0006, type: DataType.BOOLEAN, required: true, write: true, writeOptional: true}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, piMultistateInputReg: { - ID: 1550, + ID: 0x060e, attributes: { - deviceType: {ID: 31, type: DataType.CHAR_STR}, - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piMultistateInputExt: { - ID: 1551, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - alarmValue: {ID: 6, type: DataType.UINT16}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - faultValues: {ID: 37, type: DataType.UINT16}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x060f, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + alarmValues: {ID: 0x0006, type: DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + faultValues: {ID: 0x0025, type: DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, piMultistateOutputReg: { - ID: 1552, + ID: 0x0610, attributes: { - deviceType: {ID: 31, type: DataType.CHAR_STR}, - feedBackValue: {ID: 40, type: DataType.ENUM8}, - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + deviceType: {ID: 0x001f, type: DataType.CHAR_STR, default: "\u0000"}, + feedBackValue: {ID: 0x0028, type: DataType.ENUM8, write: true, writeOptional: true, max: 1}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piMultistateOutputExt: { - ID: 1553, + ID: 0x0611, attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, piMultistateValueReg: { - ID: 1554, + ID: 0x0612, attributes: { - objectId: {ID: 75, type: DataType.BAC_OID}, - objectName: {ID: 77, type: DataType.CHAR_STR}, - objectType: {ID: 79, type: DataType.ENUM16}, - profileName: {ID: 168, type: DataType.CHAR_STR}, + objectIdentifier: {ID: 0x004b, type: DataType.BAC_OID, required: true, max: 0xffffffff}, + objectName: {ID: 0x004d, type: DataType.CHAR_STR, required: true, default: "\u0000"}, + objectType: {ID: 0x004f, type: DataType.ENUM16, required: true}, + profileName: {ID: 0x00a8, type: DataType.CHAR_STR, default: "\u0000"}, }, commands: {}, commandsResponse: {}, }, piMultistateValueExt: { - ID: 1555, - attributes: { - ackedTransitions: {ID: 0, type: DataType.BITMAP8}, - alarmValue: {ID: 6, type: DataType.UINT16}, - notificationClass: {ID: 17, type: DataType.UINT16}, - eventEnable: {ID: 35, type: DataType.BITMAP8}, - eventState: {ID: 36, type: DataType.ENUM8}, - faultValues: {ID: 37, type: DataType.UINT16}, - notifyType: {ID: 72, type: DataType.ENUM8}, - timeDelay: {ID: 113, type: DataType.UINT8}, - eventTimeStamps: {ID: 130, type: DataType.ARRAY}, + ID: 0x0613, + attributes: { + ackedTransitions: {ID: 0x0000, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + alarmValues: {ID: 0x0006, type: DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff}, + notificationClass: {ID: 0x0011, type: DataType.UINT16, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + eventEnable: {ID: 0x0023, type: DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0}, + eventState: {ID: 0x0024, type: DataType.ENUM8}, + faultValues: {ID: 0x0025, type: DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff, default: 0}, + notifyType: {ID: 0x0048, type: DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0}, + timeDelay: {ID: 0x0071, type: DataType.UINT8, required: true, write: true, writeOptional: true, default: 0}, + // each index is any of: UINT16 | TOD | struct(DATE, TOD) + eventTimeStamps: {ID: 0x0082, type: DataType.ARRAY, required: true}, }, commands: {}, commandsResponse: {}, }, pi11073ProtocolTunnel: { - ID: 1556, + ID: 0x0614, attributes: { - deviceidList: {ID: 0, type: DataType.ARRAY}, - managerTarget: {ID: 1, type: DataType.IEEE_ADDR}, - managerEndpoint: {ID: 2, type: DataType.UINT8}, - connected: {ID: 3, type: DataType.BOOLEAN}, - preemptible: {ID: 4, type: DataType.BOOLEAN}, - idleTimeout: {ID: 5, type: DataType.UINT16}, + deviceidList: {ID: 0x0000, type: DataType.ARRAY, default: 0xffff}, + managerTarget: {ID: 0x0001, type: DataType.IEEE_ADDR}, + managerEndpoint: {ID: 0x0002, type: DataType.UINT8, min: 0x01, max: 0xff}, + connected: {ID: 0x0003, type: DataType.BOOLEAN}, + preemptible: {ID: 0x0004, type: DataType.BOOLEAN}, + idleTimeout: {ID: 0x0005, type: DataType.UINT16, min: 0x0001, max: 0xffff, default: 0x0000}, }, commands: { - transferApdu: { - ID: 0, - parameters: [], - }, - connectReq: { - ID: 1, - parameters: [], - }, - disconnectReq: { - ID: 2, - parameters: [], - }, - connectStatusNoti: { - ID: 3, - parameters: [], + transferApdu: {ID: 0x00, parameters: [{name: "apdu", type: DataType.OCTET_STR}], required: true}, + connectRequest: { + ID: 0x01, + parameters: [ + /** [7: reserved, 1: preemptible] */ + {name: "control", type: DataType.BITMAP8}, + {name: "idleTimeout", type: DataType.UINT16}, + {name: "managerTarget", type: DataType.IEEE_ADDR}, + {name: "managerEndpoint", type: DataType.UINT8}, + ], }, + disconnectRequest: {ID: 0x02, parameters: [{name: "managerTarget", type: DataType.IEEE_ADDR}]}, + connectStatusNotification: {ID: 0x03, parameters: [{name: "status", type: DataType.ENUM8}]}, }, commandsResponse: {}, }, piIso7818ProtocolTunnel: { - ID: 1557, + ID: 0x0615, attributes: { - status: {ID: 0, type: DataType.UINT8}, + status: {ID: 0x0000, type: DataType.UINT8, required: true, max: 1, default: 0}, + }, + commands: { + transferApdu: {ID: 0x00, parameters: [{name: "apdu", type: DataType.OCTET_STR}], required: true}, + insertSmartCard: {ID: 0x01, parameters: [], required: true}, + extractSmartCard: {ID: 0x02, parameters: [], required: true}, + }, + commandsResponse: { + transferApdu: {ID: 0x00, parameters: [{name: "apdu", type: DataType.OCTET_STR}], required: true}, }, - commands: {}, - commandsResponse: {}, }, - piRetailTunnel: { - ID: 1559, + retailTunnel: { + ID: 0x0617, attributes: { - manufacturerCode: {ID: 0, type: DataType.UINT16}, - msProfile: {ID: 1, type: DataType.UINT16}, + manufacturerCode: {ID: 0x0000, type: DataType.UINT16, required: true, min: 0x1000, max: 0x10ff}, + msProfile: {ID: 0x0001, type: DataType.UINT16, required: true, min: 0xc000, max: 0xffff}, + }, + commands: { + transferApdu: {ID: 0x00, parameters: [{name: "apdu", type: DataType.OCTET_STR}], required: true}, }, - commands: {}, commandsResponse: {}, }, + // sePrice: {ID: 0x0700}, + // seDemandResponseAndLoadControl: {ID: 0x0701}, seMetering: { - ID: 1794, - attributes: { - currentSummDelivered: {ID: 0, type: DataType.UINT48}, - currentSummReceived: {ID: 1, type: DataType.UINT48}, - currentMaxDemandDelivered: {ID: 2, type: DataType.UINT48}, - currentMaxDemandReceived: {ID: 3, type: DataType.UINT48}, - dftSumm: {ID: 4, type: DataType.UINT48}, - dailyFreezeTime: {ID: 5, type: DataType.UINT16}, - powerFactor: {ID: 6, type: DataType.INT8}, - readingSnapshotTime: {ID: 7, type: DataType.UTC}, - currentMaxDemandDeliverdTime: {ID: 8, type: DataType.UTC}, - currentMaxDemandReceivedTime: {ID: 9, type: DataType.UTC}, - defaultUpdatePeriod: {ID: 10, type: DataType.UINT8}, - fastPollUpdatePeriod: {ID: 11, type: DataType.UINT8}, - currentBlockPeriodConsumpDelivered: {ID: 12, type: DataType.UINT48}, - dailyConsumpTarget: {ID: 13, type: DataType.UINT24}, - currentBlock: {ID: 14, type: DataType.ENUM8}, - profileIntervalPeriod: {ID: 15, type: DataType.ENUM8}, - intervalReadReportingPeriod: {ID: 16, type: DataType.UINT16}, - presetReadingTime: {ID: 17, type: DataType.UINT16}, - volumePerReport: {ID: 18, type: DataType.UINT16}, - flowRestriction: {ID: 19, type: DataType.UINT8}, - supplyStatus: {ID: 20, type: DataType.ENUM8}, - currentInEnergyCarrierSumm: {ID: 21, type: DataType.UINT48}, - currentOutEnergyCarrierSumm: {ID: 22, type: DataType.UINT48}, - inletTempreature: {ID: 23, type: DataType.INT24}, - outletTempreature: {ID: 24, type: DataType.INT24}, - controlTempreature: {ID: 25, type: DataType.INT24}, - currentInEnergyCarrierDemand: {ID: 26, type: DataType.INT24}, - currentOutEnergyCarrierDemand: {ID: 27, type: DataType.INT24}, - currentBlockPeriodConsumpReceived: {ID: 29, type: DataType.UINT48}, - currentBlockReceived: {ID: 30, type: DataType.UINT48}, - DFTSummationReceived: {ID: 31, type: DataType.UINT48}, - activeRegisterTierDelivered: {ID: 32, type: DataType.ENUM8}, - activeRegisterTierReceived: {ID: 33, type: DataType.ENUM8}, - currentTier1SummDelivered: {ID: 256, type: DataType.UINT48}, - currentTier1SummReceived: {ID: 257, type: DataType.UINT48}, - currentTier2SummDelivered: {ID: 258, type: DataType.UINT48}, - currentTier2SummReceived: {ID: 259, type: DataType.UINT48}, - currentTier3SummDelivered: {ID: 260, type: DataType.UINT48}, - currentTier3SummReceived: {ID: 261, type: DataType.UINT48}, - currentTier4SummDelivered: {ID: 262, type: DataType.UINT48}, - currentTier4SummReceived: {ID: 263, type: DataType.UINT48}, - currentTier5SummDelivered: {ID: 264, type: DataType.UINT48}, - currentTier5SummReceived: {ID: 265, type: DataType.UINT48}, - currentTier6SummDelivered: {ID: 266, type: DataType.UINT48}, - currentTier6SummReceived: {ID: 267, type: DataType.UINT48}, - currentTier7SummDelivered: {ID: 268, type: DataType.UINT48}, - currentTier7SummReceived: {ID: 269, type: DataType.UINT48}, - currentTier8SummDelivered: {ID: 270, type: DataType.UINT48}, - currentTier8SummReceived: {ID: 271, type: DataType.UINT48}, - currentTier9SummDelivered: {ID: 272, type: DataType.UINT48}, - currentTier9SummReceived: {ID: 273, type: DataType.UINT48}, - currentTier10SummDelivered: {ID: 274, type: DataType.UINT48}, - currentTier10SummReceived: {ID: 275, type: DataType.UINT48}, - currentTier11SummDelivered: {ID: 276, type: DataType.UINT48}, - currentTier11SummReceived: {ID: 277, type: DataType.UINT48}, - currentTier12SummDelivered: {ID: 278, type: DataType.UINT48}, - currentTier12SummReceived: {ID: 279, type: DataType.UINT48}, - currentTier13SummDelivered: {ID: 280, type: DataType.UINT48}, - currentTier13SummReceived: {ID: 281, type: DataType.UINT48}, - currentTier14SummDelivered: {ID: 282, type: DataType.UINT48}, - currentTier14SummReceived: {ID: 283, type: DataType.UINT48}, - currentTier15SummDelivered: {ID: 284, type: DataType.UINT48}, - currentTier15SummReceived: {ID: 285, type: DataType.UINT48}, - status: {ID: 512, type: DataType.BITMAP8}, - remainingBattLife: {ID: 513, type: DataType.UINT8}, - hoursInOperation: {ID: 514, type: DataType.UINT24}, - hoursInFault: {ID: 515, type: DataType.UINT24}, - extendedStatus: {ID: 516, type: DataType.BITMAP64}, - unitOfMeasure: {ID: 768, type: DataType.ENUM8}, - multiplier: {ID: 769, type: DataType.UINT24}, - divisor: {ID: 770, type: DataType.UINT24}, - summaFormatting: {ID: 771, type: DataType.BITMAP8}, - demandFormatting: {ID: 772, type: DataType.BITMAP8}, - historicalConsumpFormatting: {ID: 773, type: DataType.BITMAP8}, - meteringDeviceType: {ID: 774, type: DataType.BITMAP8}, - siteId: {ID: 775, type: DataType.OCTET_STR}, - meterSerialNumber: {ID: 776, type: DataType.OCTET_STR}, - energyCarrierUnitOfMeas: {ID: 777, type: DataType.ENUM8}, - energyCarrierSummFormatting: {ID: 778, type: DataType.BITMAP8}, - energyCarrierDemandFormatting: {ID: 779, type: DataType.BITMAP8}, - temperatureUnitOfMeas: {ID: 780, type: DataType.ENUM8}, - temperatureFormatting: {ID: 781, type: DataType.BITMAP8}, - moduleSerialNumber: {ID: 782, type: DataType.OCTET_STR}, - operatingTariffLevel: {ID: 783, type: DataType.OCTET_STR}, - instantaneousDemand: {ID: 1024, type: DataType.INT24}, - currentdayConsumpDelivered: {ID: 1025, type: DataType.UINT24}, - currentdayConsumpReceived: {ID: 1026, type: DataType.UINT24}, - previousdayConsumpDelivered: {ID: 1027, type: DataType.UINT24}, - previousdayConsumpReceived: {ID: 1028, type: DataType.UINT24}, - curPartProfileIntStartTimeDelivered: {ID: 1029, type: DataType.UTC}, - curPartProfileIntStartTimeReceived: {ID: 1030, type: DataType.UTC}, - curPartProfileIntValueDelivered: {ID: 1031, type: DataType.UINT24}, - curPartProfileIntValueReceived: {ID: 1032, type: DataType.UINT24}, - currentDayMaxPressure: {ID: 1033, type: DataType.UINT48}, - currentDayMinPressure: {ID: 1034, type: DataType.UINT48}, - previousDayMaxPressure: {ID: 1035, type: DataType.UINT48}, - previousDayMinPressure: {ID: 1036, type: DataType.UINT48}, - currentDayMaxDemand: {ID: 1037, type: DataType.INT24}, - previousDayMaxDemand: {ID: 1038, type: DataType.INT24}, - currentMonthMaxDemand: {ID: 1039, type: DataType.INT24}, - currentYearMaxDemand: {ID: 1040, type: DataType.INT24}, - currentdayMaxEnergyCarrDemand: {ID: 1041, type: DataType.INT24}, - previousdayMaxEnergyCarrDemand: {ID: 1042, type: DataType.INT24}, - curMonthMaxEnergyCarrDemand: {ID: 1043, type: DataType.INT24}, - curMonthMinEnergyCarrDemand: {ID: 1044, type: DataType.INT24}, - curYearMaxEnergyCarrDemand: {ID: 1045, type: DataType.INT24}, - curYearMinEnergyCarrDemand: {ID: 1046, type: DataType.INT24}, - maxNumberOfPeriodsDelivered: {ID: 1280, type: DataType.UINT8}, - currentDemandDelivered: {ID: 1536, type: DataType.UINT24}, - demandLimit: {ID: 1537, type: DataType.UINT24}, - demandIntegrationPeriod: {ID: 1538, type: DataType.UINT8}, - numberOfDemandSubintervals: {ID: 1539, type: DataType.UINT8}, - demandLimitArmDuration: {ID: 1540, type: DataType.UINT16}, - genericAlarmMask: {ID: 2048, type: DataType.BITMAP16}, - electricityAlarmMask: {ID: 2049, type: DataType.BITMAP32}, - genFlowPressureAlarmMask: {ID: 2050, type: DataType.BITMAP16}, - waterSpecificAlarmMask: {ID: 2051, type: DataType.BITMAP16}, - heatCoolSpecificAlarmMASK: {ID: 2052, type: DataType.BITMAP16}, - gasSpecificAlarmMask: {ID: 2053, type: DataType.BITMAP16}, - extendedGenericAlarmMask: {ID: 2054, type: DataType.BITMAP48}, - manufactureAlarmMask: {ID: 2055, type: DataType.BITMAP16}, - billToDate: {ID: 2560, type: DataType.UINT32}, - billToDateTimeStamp: {ID: 2561, type: DataType.UTC}, - projectedBill: {ID: 2562, type: DataType.UINT32}, - projectedBillTimeStamp: {ID: 2563, type: DataType.UTC}, - develcoPulseConfiguration: {ID: 0x0300, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DEVELCO}, - develcoCurrentSummation: {ID: 0x0301, type: DataType.UINT48, manufacturerCode: ManufacturerCode.DEVELCO}, - develcoInterfaceMode: {ID: 0x0302, type: DataType.ENUM16, manufacturerCode: ManufacturerCode.DEVELCO}, - owonL1PhasePower: {ID: 0x2000, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2PhasePower: {ID: 0x2001, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3PhasePower: {ID: 0x2002, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1PhaseReactivePower: {ID: 0x2100, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2PhaseReactivePower: {ID: 0x2101, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3PhaseReactivePower: {ID: 0x2102, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonReactivePowerSum: {ID: 0x2103, type: DataType.INT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1PhaseVoltage: {ID: 0x3000, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2PhaseVoltage: {ID: 0x3001, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3PhaseVoltage: {ID: 0x3002, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1PhaseCurrent: {ID: 0x3100, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2PhaseCurrent: {ID: 0x3101, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3PhaseCurrent: {ID: 0x3102, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonCurrentSum: {ID: 0x3103, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonLeakageCurrent: {ID: 0x3104, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1Energy: {ID: 0x4000, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2Energy: {ID: 0x4001, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3Energy: {ID: 0x4002, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1ReactiveEnergy: {ID: 0x4100, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2ReactiveEnergy: {ID: 0x4101, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3ReactiveEnergy: {ID: 0x4102, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonReactiveEnergySum: {ID: 0x4103, type: DataType.UINT48, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL1PowerFactor: {ID: 0x4104, type: DataType.INT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL2PowerFactor: {ID: 0x4105, type: DataType.INT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonL3PowerFactor: {ID: 0x4106, type: DataType.INT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonFrequency: {ID: 0x5005, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonReportMap: {ID: 0x1000, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonLastHistoricalRecordTime: {ID: 0x5000, type: DataType.UINT32, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonOldestHistoricalRecordTime: {ID: 0x5001, type: DataType.UINT32, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonMinimumReportCycle: {ID: 0x5002, type: DataType.UINT32, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonMaximumReportCycle: {ID: 0x5003, type: DataType.UINT32, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonSentHistoricalRecordState: {ID: 0x5004, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonAccumulativeEnergyThreshold: {ID: 0x5006, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonReportMode: {ID: 0x5007, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - owonPercentChangeInPower: {ID: 0x5008, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC}, - schneiderActiveEnergyTotal: {ID: 0x4010, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyTotal: {ID: 0x4011, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyTotal: {ID: 0x4012, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialActiveEnergyTotal: {ID: 0x4014, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialReactiveEnergyTotal: {ID: 0x4015, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialApparentEnergyTotal: {ID: 0x4016, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialActiveEnergyL1Phase: {ID: 0x4100, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialReactiveEnergyL1Phase: {ID: 0x4101, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialApparentEnergyL1Phase: {ID: 0x4102, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActiveEnergyL1Phase: {ID: 0x4103, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyL1Phase: {ID: 0x4104, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyL1Phase: {ID: 0x4105, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialActiveEnergyL2Phase: {ID: 0x4200, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialReactiveEnergyL2Phase: {ID: 0x4201, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialApparentEnergyL2Phase: {ID: 0x4202, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActiveEnergyL2Phase: {ID: 0x4203, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyL2Phase: {ID: 0x4204, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyL2Phase: {ID: 0x4205, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialActiveEnergyL3Phase: {ID: 0x4300, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialReactiveEnergyL3Phase: {ID: 0x4301, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderPartialApparentEnergyL3Phase: {ID: 0x4302, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActiveEnergyL3Phase: {ID: 0x4303, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyL3Phase: {ID: 0x4304, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyL3Phase: {ID: 0x4305, type: DataType.INT48, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActiveEnergyMultiplier: {ID: 0x4400, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActiveEnergyDivisor: {ID: 0x4401, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyMultiplier: {ID: 0x4402, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactiveEnergyDivisor: {ID: 0x4403, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyMultiplier: {ID: 0x4404, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentEnergyDivisor: {ID: 0x4405, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderEnergyResetDateTime: {ID: 0x4501, type: DataType.UTC, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderEnergyCountersReportingPeriod: {ID: 0x4600, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, + ID: 0x0702, + attributes: { + currentSummDelivered: {ID: 0x0000, type: DataType.UINT48, required: true, max: 0xffffffffffff}, + currentSummReceived: {ID: 0x0001, type: DataType.UINT48, max: 0xffffffffffff}, + currentMaxDemandDelivered: {ID: 0x0002, type: DataType.UINT48, max: 0xffffffffffff}, + currentMaxDemandReceived: {ID: 0x0003, type: DataType.UINT48, max: 0xffffffffffff}, + dftSumm: {ID: 0x0004, type: DataType.UINT48, max: 0xffffffffffff}, + dailyFreezeTime: {ID: 0x0005, type: DataType.UINT16, max: 0x173b, default: 0}, + powerFactor: {ID: 0x0006, type: DataType.INT8, min: -100, max: 100, default: 0}, + readingSnapshotTime: {ID: 0x0007, type: DataType.UTC}, + currentMaxDemandDeliverdTime: {ID: 0x0008, type: DataType.UTC}, + currentMaxDemandReceivedTime: {ID: 0x0009, type: DataType.UTC}, + defaultUpdatePeriod: {ID: 0x000a, type: DataType.UINT8, max: 0xff, default: 0x1e}, + fastPollUpdatePeriod: {ID: 0x000b, type: DataType.UINT8, max: 0xff, default: 0x05}, + currentBlockPeriodConsumpDelivered: {ID: 0x000c, type: DataType.UINT48, max: 0xffffffffffff}, + dailyConsumpTarget: {ID: 0x000d, type: DataType.UINT24, max: 0xffffff}, + currentBlock: {ID: 0x000e, type: DataType.ENUM8, max: 0x10}, + profileIntervalPeriod: {ID: 0x000f, type: DataType.ENUM8, max: 0xff}, + presetReadingTime: {ID: 0x0011, type: DataType.UINT16, max: 0x173b, default: 0}, + volumePerReport: {ID: 0x0012, type: DataType.UINT16, max: 0xffff}, + flowRestriction: {ID: 0x0013, type: DataType.UINT8, max: 0xff}, + supplyStatus: {ID: 0x0014, type: DataType.ENUM8, max: 0xff}, + currentInEnergyCarrierSumm: {ID: 0x0015, type: DataType.UINT48, max: 0xffffffffffff}, + currentOutEnergyCarrierSumm: {ID: 0x0016, type: DataType.UINT48, max: 0xffffffffffff}, + inletTempreature: {ID: 0x0017, type: DataType.INT24, min: -8388607, max: 8388607}, + outletTempreature: {ID: 0x0018, type: DataType.INT24, min: -8388607, max: 8388607}, + controlTempreature: {ID: 0x0019, type: DataType.INT24, min: -8388607, max: 8388607}, + currentInEnergyCarrierDemand: {ID: 0x001a, type: DataType.INT24, min: -8388607, max: 8388607}, + currentOutEnergyCarrierDemand: {ID: 0x001b, type: DataType.INT24, min: -8388607, max: 8388607}, + previousBlockPeriodConsumpReceived: {ID: 0x001c, type: DataType.UINT48, max: 0xffffffffffff}, + currentBlockPeriodConsumpReceived: {ID: 0x001d, type: DataType.UINT48, max: 0xffffffffffff}, + currentBlockReceived: {ID: 0x001e, type: DataType.ENUM8, max: 0xff}, + DFTSummationReceived: {ID: 0x001f, type: DataType.UINT48, max: 0xffffffffffff}, + activeRegisterTierDelivered: {ID: 0x0020, type: DataType.ENUM8, max: 48}, + activeRegisterTierReceived: {ID: 0x0021, type: DataType.ENUM8, max: 48}, + lastBlockSwitchTime: {ID: 0x0022, type: DataType.UTC}, + + currentTier1SummDelivered: {ID: 0x0100, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier1SummReceived: {ID: 0x0101, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier2SummDelivered: {ID: 0x0102, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier2SummReceived: {ID: 0x0103, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier3SummDelivered: {ID: 0x0104, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier3SummReceived: {ID: 0x0105, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier4SummDelivered: {ID: 0x0106, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier4SummReceived: {ID: 0x0107, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier5SummDelivered: {ID: 0x0108, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier5SummReceived: {ID: 0x0109, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier6SummDelivered: {ID: 0x010a, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier6SummReceived: {ID: 0x010b, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier7SummDelivered: {ID: 0x010c, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier7SummReceived: {ID: 0x010d, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier8SummDelivered: {ID: 0x010e, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier8SummReceived: {ID: 0x010f, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier9SummDelivered: {ID: 0x0110, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier9SummReceived: {ID: 0x0111, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier10SummDelivered: {ID: 0x0112, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier10SummReceived: {ID: 0x0113, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier11SummDelivered: {ID: 0x0114, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier11SummReceived: {ID: 0x0115, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier12SummDelivered: {ID: 0x0116, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier12SummReceived: {ID: 0x0117, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier13SummDelivered: {ID: 0x0118, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier13SummReceived: {ID: 0x0119, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier14SummDelivered: {ID: 0x011a, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier14SummReceived: {ID: 0x011b, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier15SummDelivered: {ID: 0x011c, type: DataType.UINT48, max: 0xffffffffffff}, + currentTier15SummReceived: {ID: 0x011d, type: DataType.UINT48, max: 0xffffffffffff}, + // XXX: continues to currentTier48 + cpp1SummationDelivered: {ID: 0x01fc, type: DataType.UINT48, max: 0xffffffffffff}, + cpp2SummationDelivered: {ID: 0x01fe, type: DataType.UINT48, max: 0xffffffffffff}, + + status: {ID: 0x0200, type: DataType.BITMAP8, required: true, max: 0xff, default: 0x00}, + remainingBattLife: {ID: 0x0201, type: DataType.UINT8, max: 0xff}, + hoursInOperation: {ID: 0x0202, type: DataType.UINT24, max: 0xffffff}, + hoursInFault: {ID: 0x0203, type: DataType.UINT24, max: 0xffffff}, + extendedStatus: {ID: 0x0204, type: DataType.BITMAP64 /* max: 0xfffffffffffffff */}, + remainingBattLifeInDays: {ID: 0x0205, type: DataType.UINT16, max: 0xffff}, + currentMeterId: {ID: 0x0206, type: DataType.OCTET_STR}, + ambientConsumptionIndicator: {ID: 0x0207, type: DataType.ENUM8, max: 0x02}, + + unitOfMeasure: {ID: 0x0300, type: DataType.ENUM8, required: true, max: 0xff, default: 0x00}, + multiplier: {ID: 0x0301, type: DataType.UINT24, max: 0xffffff}, + divisor: {ID: 0x0302, type: DataType.UINT24, max: 0xffffff}, + summaFormatting: {ID: 0x0303, type: DataType.BITMAP8, required: true, max: 0xff}, + demandFormatting: {ID: 0x0304, type: DataType.BITMAP8, max: 0xff}, + historicalConsumpFormatting: {ID: 0x0305, type: DataType.BITMAP8, max: 0xff}, + meteringDeviceType: {ID: 0x0306, type: DataType.BITMAP8, max: 0xff}, + siteId: {ID: 0x0307, type: DataType.OCTET_STR, minLen: 1, maxLen: 33}, + meterSerialNumber: {ID: 0x0308, type: DataType.OCTET_STR, minLen: 1, maxLen: 25}, + energyCarrierUnitOfMeas: {ID: 0x0309, type: DataType.ENUM8, max: 0xff}, + energyCarrierSummFormatting: {ID: 0x030a, type: DataType.BITMAP8, max: 0xff}, + energyCarrierDemandFormatting: {ID: 0x030b, type: DataType.BITMAP8, max: 0xff}, + temperatureUnitOfMeas: {ID: 0x030c, type: DataType.ENUM8, max: 0xff}, + temperatureFormatting: {ID: 0x030d, type: DataType.BITMAP8, max: 0xff}, + moduleSerialNumber: {ID: 0x030e, type: DataType.OCTET_STR, minLen: 1, maxLen: 25}, + operatingTariffLevelDelivered: {ID: 0x030f, type: DataType.OCTET_STR, minLen: 1, maxLen: 25}, + operatingTariffLevelReceived: {ID: 0x0310, type: DataType.OCTET_STR, minLen: 1, maxLen: 25}, + customIdNumber: {ID: 0x0311, type: DataType.OCTET_STR, minLen: 1, maxLen: 25}, + alternativeUnitOfMeasure: {ID: 0x0312, type: DataType.ENUM8, default: 0x00}, + alternativeDemandFormatting: {ID: 0x0312, type: DataType.BITMAP8, max: 0xff}, + alternativeConsumptionFormatting: {ID: 0x0312, type: DataType.BITMAP8, max: 0xff}, + + instantaneousDemand: {ID: 0x0400, type: DataType.INT24, min: -8388607, max: 8388607, default: 0}, + currentDayConsumpDelivered: {ID: 0x0401, type: DataType.UINT24, max: 0xffffff}, + currentDayConsumpReceived: {ID: 0x0402, type: DataType.UINT24, max: 0xffffff}, + previousDayConsumpDelivered: {ID: 0x0403, type: DataType.UINT24, max: 0xffffff}, + previousDayConsumpReceived: {ID: 0x0404, type: DataType.UINT24, max: 0xffffff}, + curPartProfileIntStartTimeDelivered: {ID: 0x0405, type: DataType.UTC}, + curPartProfileIntStartTimeReceived: {ID: 0x0406, type: DataType.UTC}, + curPartProfileIntValueDelivered: {ID: 0x0407, type: DataType.UINT24, max: 0xffffff}, + curPartProfileIntValueReceived: {ID: 0x0408, type: DataType.UINT24, max: 0xffffff}, + currentDayMaxPressure: {ID: 0x0409, type: DataType.UINT48, max: 0xffffffffffff}, + currentDayMinPressure: {ID: 0x040a, type: DataType.UINT48, max: 0xffffffffffff}, + previousDayMaxPressure: {ID: 0x040b, type: DataType.UINT48, max: 0xffffffffffff}, + previousDayMinPressure: {ID: 0x040c, type: DataType.UINT48, max: 0xffffffffffff}, + currentDayMaxDemand: {ID: 0x040d, type: DataType.INT24, min: -8388607, max: 8388607}, + previousDayMaxDemand: {ID: 0x040e, type: DataType.INT24, min: -8388607, max: 8388607}, + currentMonthMaxDemand: {ID: 0x040f, type: DataType.INT24, min: -8388607, max: 8388607}, + currentYearMaxDemand: {ID: 0x0410, type: DataType.INT24, min: -8388607, max: 8388607}, + currentDayMaxEnergyCarrDemand: {ID: 0x0411, type: DataType.INT24, min: -8388607, max: 8388607}, + previousDayMaxEnergyCarrDemand: {ID: 0x0412, type: DataType.INT24, min: -8388607, max: 8388607}, + curMonthMaxEnergyCarrDemand: {ID: 0x0413, type: DataType.INT24, min: -8388607, max: 8388607}, + curMonthMinEnergyCarrDemand: {ID: 0x0414, type: DataType.INT24, min: -8388607, max: 8388607}, + curYearMaxEnergyCarrDemand: {ID: 0x0415, type: DataType.INT24, min: -8388607, max: 8388607}, + curYearMinEnergyCarrDemand: {ID: 0x0416, type: DataType.INT24, min: -8388607, max: 8388607}, + previousDay2ConsumptionDelivered: {ID: 0x0420, type: DataType.UINT24, max: 0xffffff}, + previousDay2ConsumptionReceived: {ID: 0x0421, type: DataType.UINT24, max: 0xffffff}, + previousDay3ConsumptionDelivered: {ID: 0x0422, type: DataType.UINT24, max: 0xffffff}, + previousDay3ConsumptionReceived: {ID: 0x0423, type: DataType.UINT24, max: 0xffffff}, + previousDay4ConsumptionDelivered: {ID: 0x0424, type: DataType.UINT24, max: 0xffffff}, + previousDay4ConsumptionReceived: {ID: 0x0425, type: DataType.UINT24, max: 0xffffff}, + previousDay5ConsumptionDelivered: {ID: 0x0426, type: DataType.UINT24, max: 0xffffff}, + previousDay5ConsumptionReceived: {ID: 0x0427, type: DataType.UINT24, max: 0xffffff}, + previousDay6ConsumptionDelivered: {ID: 0x0428, type: DataType.UINT24, max: 0xffffff}, + previousDay6ConsumptionReceived: {ID: 0x0420, type: DataType.UINT24, max: 0xffffff}, + previousDay7ConsumptionDelivered: {ID: 0x042a, type: DataType.UINT24, max: 0xffffff}, + previousDay7ConsumptionReceived: {ID: 0x042b, type: DataType.UINT24, max: 0xffffff}, + previousDay8ConsumptionDelivered: {ID: 0x042c, type: DataType.UINT24, max: 0xffffff}, + previousDay8ConsumptionReceived: {ID: 0x042d, type: DataType.UINT24, max: 0xffffff}, + currentWeekConsumptionDelivered: {ID: 0x0430, type: DataType.UINT24, max: 0xffffff}, + currentWeekConsumptionReceived: {ID: 0x0431, type: DataType.UINT24, max: 0xffffff}, + previousWeekConsumptionDelivered: {ID: 0x0432, type: DataType.UINT24, max: 0xffffff}, + previousWeekConsumptionReceived: {ID: 0x0433, type: DataType.UINT24, max: 0xffffff}, + previousWeek2ConsumptionDelivered: {ID: 0x0434, type: DataType.UINT24, max: 0xffffff}, + previousWeek2ConsumptionReceived: {ID: 0x0435, type: DataType.UINT24, max: 0xffffff}, + previousWeek3ConsumptionDelivered: {ID: 0x0436, type: DataType.UINT24, max: 0xffffff}, + previousWeek3ConsumptionReceived: {ID: 0x0437, type: DataType.UINT24, max: 0xffffff}, + previousWeek4ConsumptionDelivered: {ID: 0x0438, type: DataType.UINT24, max: 0xffffff}, + previousWeek4ConsumptionReceived: {ID: 0x0439, type: DataType.UINT24, max: 0xffffff}, + previousWeek5ConsumptionDelivered: {ID: 0x043a, type: DataType.UINT24, max: 0xffffff}, + previousWeek5ConsumptionReceived: {ID: 0x043b, type: DataType.UINT24, max: 0xffffff}, + currentMonthConsumptionDelivered: {ID: 0x0440, type: DataType.UINT32, max: 0xffffffff}, + currentMonthConsumptionReceived: {ID: 0x0441, type: DataType.UINT32, max: 0xffffffff}, + previousMonthConsumptionDelivered: {ID: 0x0442, type: DataType.UINT32, max: 0xffffffff}, + previousMonthConsumptionReceived: {ID: 0x0443, type: DataType.UINT32, max: 0xffffffff}, + previousMonth2ConsumptionDelivered: {ID: 0x0444, type: DataType.UINT32, max: 0xffffffff}, + previousMonth2ConsumptionReceived: {ID: 0x0445, type: DataType.UINT32, max: 0xffffffff}, + previousMonth3ConsumptionDelivered: {ID: 0x0446, type: DataType.UINT32, max: 0xffffffff}, + previousMonth3ConsumptionReceived: {ID: 0x0447, type: DataType.UINT32, max: 0xffffffff}, + previousMonth4ConsumptionDelivered: {ID: 0x0448, type: DataType.UINT32, max: 0xffffffff}, + previousMonth4ConsumptionReceived: {ID: 0x0449, type: DataType.UINT32, max: 0xffffffff}, + previousMonth5ConsumptionDelivered: {ID: 0x044a, type: DataType.UINT32, max: 0xffffffff}, + previousMonth5ConsumptionReceived: {ID: 0x044b, type: DataType.UINT32, max: 0xffffffff}, + previousMonth6ConsumptionDelivered: {ID: 0x044c, type: DataType.UINT32, max: 0xffffffff}, + previousMonth6ConsumptionReceived: {ID: 0x044d, type: DataType.UINT32, max: 0xffffffff}, + previousMonth7ConsumptionDelivered: {ID: 0x044e, type: DataType.UINT32, max: 0xffffffff}, + previousMonth7ConsumptionReceived: {ID: 0x044f, type: DataType.UINT32, max: 0xffffffff}, + previousMonth8ConsumptionDelivered: {ID: 0x0450, type: DataType.UINT32, max: 0xffffffff}, + previousMonth8ConsumptionReceived: {ID: 0x0451, type: DataType.UINT32, max: 0xffffffff}, + previousMonth9ConsumptionDelivered: {ID: 0x0452, type: DataType.UINT32, max: 0xffffffff}, + previousMonth9ConsumptionReceived: {ID: 0x0453, type: DataType.UINT32, max: 0xffffffff}, + previousMonth10ConsumptionDelivered: {ID: 0x0454, type: DataType.UINT32, max: 0xffffffff}, + previousMonth10ConsumptionReceived: {ID: 0x0455, type: DataType.UINT32, max: 0xffffffff}, + previousMonth11ConsumptionDelivered: {ID: 0x0456, type: DataType.UINT32, max: 0xffffffff}, + previousMonth11ConsumptionReceived: {ID: 0x0457, type: DataType.UINT32, max: 0xffffffff}, + previousMonth12ConsumptionDelivered: {ID: 0x0458, type: DataType.UINT32, max: 0xffffffff}, + previousMonth12ConsumptionReceived: {ID: 0x0459, type: DataType.UINT32, max: 0xffffffff}, + previousMonth13ConsumptionDelivered: {ID: 0x045a, type: DataType.UINT32, max: 0xffffffff}, + previousMonth13ConsumptionReceived: {ID: 0x045b, type: DataType.UINT32, max: 0xffffffff}, + historicalFreezeTime: {ID: 0x045c, type: DataType.UINT16, max: 0x173b, default: 0}, + + maxNumberOfPeriodsDelivered: {ID: 0x0500, type: DataType.UINT8, max: 0xff, default: 0x18}, + + currentDemandDelivered: {ID: 0x0600, type: DataType.UINT24, max: 0xffffff}, + demandLimit: {ID: 0x0601, type: DataType.UINT24, max: 0xffffff}, + demandIntegrationPeriod: {ID: 0x0602, type: DataType.UINT8, min: 0x01, max: 0xff}, + numberOfDemandSubintervals: {ID: 0x0603, type: DataType.UINT8, min: 0x01, max: 0xff}, + demandLimitArmDuration: {ID: 0x0604, type: DataType.UINT16, max: 0xffff, default: 0x003c}, + loadLimitSupplyState: {ID: 0x0605, type: DataType.ENUM8, max: 0xff, default: 0x00}, + loadLimitCounter: {ID: 0x0606, type: DataType.UINT8, max: 0xff, default: 0x01}, + supplyTamperState: {ID: 0x0607, type: DataType.ENUM8, max: 0xff, default: 0x00}, + supplyDepletionState: {ID: 0x0608, type: DataType.ENUM8, max: 0xff, default: 0x00}, + supplyUncontrolledFlowState: {ID: 0x0609, type: DataType.ENUM8, max: 0xff, default: 0x00}, + + // TODO: Block Information Set (Delivered) (0x700..) + + genericAlarmMask: {ID: 0x0800, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + electricityAlarmMask: {ID: 0x0801, type: DataType.BITMAP32, max: 0xffffffff, default: 0xffffffff}, + genFlowPressureAlarmMask: {ID: 0x0802, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + waterSpecificAlarmMask: {ID: 0x0803, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + heatCoolSpecificAlarmMASK: {ID: 0x0804, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + gasSpecificAlarmMask: {ID: 0x0805, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + extendedGenericAlarmMask: {ID: 0x0806, type: DataType.BITMAP48, max: 0xffffffffffff, default: 0xffffffffffff}, + manufactureAlarmMask: {ID: 0x0807, type: DataType.BITMAP16, max: 0xffff, default: 0xffff}, + + // TODO: Block Information Attribute Set (Received) (0x900..) + + billToDateDelivered: {ID: 0x0a00, type: DataType.UINT32, max: 0xffffffff, default: 0}, + billToDateTimeStampDelivered: {ID: 0x0a01, type: DataType.UTC, default: 0}, + projectedBillDelivered: {ID: 0x0a02, type: DataType.UINT32, max: 0xffffffff, default: 0}, + projectedBillTimeStampDelivered: {ID: 0x0a03, type: DataType.UTC, default: 0}, + billDeliveredTrailingDigit: {ID: 0x0a04, type: DataType.BITMAP8}, + billToDateReceived: {ID: 0x0a10, type: DataType.UINT32, max: 0xffffffff, default: 0}, + billToDateTimeStampReceived: {ID: 0x0a11, type: DataType.UTC, default: 0}, + projectedBillReceived: {ID: 0x0a12, type: DataType.UINT32, max: 0xffffffff, default: 0}, + projectedBillTimeStampReceived: {ID: 0x0a13, type: DataType.UTC, default: 0}, + billReceivedTrailingDigit: {ID: 0x0a14, type: DataType.BITMAP8}, + + // TODO: Supply Control Attribute Set (0x0b00..) + // TODO: Alternative Historical Consumption Attribute Set (0x0c00..) + // TODO: Noti fication At tribute Set (0x0000.., client=true) + // custom + develcoPulseConfiguration: {ID: 0x0300, type: DataType.UINT16, manufacturerCode: ManufacturerCode.DEVELCO, write: true, max: 0xffff}, + develcoCurrentSummation: { + ID: 0x0301, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.DEVELCO, + write: true, + max: 0xffffffffffff, + }, + develcoInterfaceMode: {ID: 0x0302, type: DataType.ENUM16, manufacturerCode: ManufacturerCode.DEVELCO, write: true, max: 0xffff}, + owonL1PhasePower: { + ID: 0x2000, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL2PhasePower: { + ID: 0x2001, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL3PhasePower: { + ID: 0x2002, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL1PhaseReactivePower: { + ID: 0x2100, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL2PhaseReactivePower: { + ID: 0x2101, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL3PhaseReactivePower: { + ID: 0x2102, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonReactivePowerSum: { + ID: 0x2103, + type: DataType.INT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -8388608, + max: 8388607, + }, + owonL1PhaseVoltage: { + ID: 0x3000, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL2PhaseVoltage: { + ID: 0x3001, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL3PhaseVoltage: { + ID: 0x3002, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL1PhaseCurrent: { + ID: 0x3100, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL2PhaseCurrent: { + ID: 0x3101, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL3PhaseCurrent: { + ID: 0x3102, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonCurrentSum: {ID: 0x3103, type: DataType.UINT24, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, write: true, max: 0xffffff}, + owonLeakageCurrent: { + ID: 0x3104, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffff, + }, + owonL1Energy: { + ID: 0x4000, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL2Energy: { + ID: 0x4001, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL3Energy: { + ID: 0x4002, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL1ReactiveEnergy: { + ID: 0x4100, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL2ReactiveEnergy: { + ID: 0x4101, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL3ReactiveEnergy: { + ID: 0x4102, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonReactiveEnergySum: { + ID: 0x4103, + type: DataType.UINT48, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffffffff, + }, + owonL1PowerFactor: { + ID: 0x4104, + type: DataType.INT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -128, + max: 127, + }, + owonL2PowerFactor: { + ID: 0x4105, + type: DataType.INT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -128, + max: 127, + }, + owonL3PowerFactor: { + ID: 0x4106, + type: DataType.INT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + min: -128, + max: 127, + }, + owonFrequency: {ID: 0x5005, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, write: true, max: 0xff}, + owonReportMap: {ID: 0x1000, type: DataType.BITMAP8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, write: true}, + owonLastHistoricalRecordTime: { + ID: 0x5000, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffff, + }, + owonOldestHistoricalRecordTime: { + ID: 0x5001, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffff, + }, + owonMinimumReportCycle: { + ID: 0x5002, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffff, + }, + owonMaximumReportCycle: { + ID: 0x5003, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xffffffff, + }, + owonSentHistoricalRecordState: { + ID: 0x5004, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xff, + }, + owonAccumulativeEnergyThreshold: { + ID: 0x5006, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xff, + }, + owonReportMode: {ID: 0x5007, type: DataType.UINT8, manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, write: true, max: 0xff}, + owonPercentChangeInPower: { + ID: 0x5008, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, + write: true, + max: 0xff, + }, + schneiderActiveEnergyTotal: { + ID: 0x4010, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderReactiveEnergyTotal: { + ID: 0x4011, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderApparentEnergyTotal: { + ID: 0x4012, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialActiveEnergyTotal: { + ID: 0x4014, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialReactiveEnergyTotal: { + ID: 0x4015, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialApparentEnergyTotal: { + ID: 0x4016, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialActiveEnergyL1Phase: { + ID: 0x4100, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialReactiveEnergyL1Phase: { + ID: 0x4101, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialApparentEnergyL1Phase: { + ID: 0x4102, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderActiveEnergyL1Phase: { + ID: 0x4103, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderReactiveEnergyL1Phase: { + ID: 0x4104, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderApparentEnergyL1Phase: { + ID: 0x4105, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialActiveEnergyL2Phase: { + ID: 0x4200, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialReactiveEnergyL2Phase: { + ID: 0x4201, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialApparentEnergyL2Phase: { + ID: 0x4202, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderActiveEnergyL2Phase: { + ID: 0x4203, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderReactiveEnergyL2Phase: { + ID: 0x4204, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderApparentEnergyL2Phase: { + ID: 0x4205, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialActiveEnergyL3Phase: { + ID: 0x4300, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialReactiveEnergyL3Phase: { + ID: 0x4301, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderPartialApparentEnergyL3Phase: { + ID: 0x4302, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderActiveEnergyL3Phase: { + ID: 0x4303, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderReactiveEnergyL3Phase: { + ID: 0x4304, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderApparentEnergyL3Phase: { + ID: 0x4305, + type: DataType.INT48, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -140737488355328, + max: 140737488355327, + }, + schneiderActiveEnergyMultiplier: { + ID: 0x4400, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderActiveEnergyDivisor: { + ID: 0x4401, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderReactiveEnergyMultiplier: { + ID: 0x4402, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderReactiveEnergyDivisor: { + ID: 0x4403, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderApparentEnergyMultiplier: { + ID: 0x4404, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderApparentEnergyDivisor: { + ID: 0x4405, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderEnergyResetDateTime: { + ID: 0x4501, + type: DataType.UTC, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffffff, + }, + schneiderEnergyCountersReportingPeriod: { + ID: 0x4600, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, }, commands: { getProfile: { - ID: 0, - parameters: [], - }, - reqMirror: { - ID: 1, - parameters: [], + ID: 0x00, + parameters: [ + {name: "intervalChannel", type: DataType.ENUM8}, + {name: "endTime", type: DataType.UTC}, + {name: "numberOfPeriods", type: DataType.UINT8}, + ], + response: 0x00, }, - mirrorRem: { - ID: 2, - parameters: [], + requestMirrorRsp: {ID: 0x01, parameters: [{name: "endpointId", type: DataType.UINT16}], response: 0x01}, + mirrorRemoved: {ID: 0x02, parameters: [{name: "removedEndpointId", type: DataType.UINT16}], response: 0x02}, + requestFastPollMode: { + ID: 0x03, + parameters: [ + {name: "fastPollUpdatePeriod", type: DataType.UINT8}, + {name: "duration", type: DataType.UINT8}, + ], + response: 0x03, }, - reqFastPollMode: { - ID: 3, - parameters: [], + schneduleSnapshot: { + ID: 0x04, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "commandIndex", type: DataType.UINT8}, + {name: "totalNumberOfCommands", type: DataType.UINT8}, + // TODO: need BuffaloZcl read/write + // {name: "payload", type: DataType.LIST_SCHEDULE_SNAPSHOT}, + // {name: "id", type: DataType.UINT8, min: 1, max: 254}, + // {name: "startTime", type: DataType.UTC}, + // {name: "schedule", type: DataType.UINT24}, + // {name: "payloadType", type: DataType.ENUM8}, + // {name: "cause", type: DataType.BITMAP32}, + ], + response: 0x04, }, + takeSnapshot: {ID: 0x05, parameters: [{name: "cause", type: DataType.BITMAP32}], response: 0x05}, getSnapshot: { - ID: 4, - parameters: [], + ID: 0x06, + parameters: [ + {name: "earliestStartTime", type: DataType.UTC}, + {name: "latestEndTime", type: DataType.UTC}, + {name: "offset", type: DataType.UINT8}, + {name: "cause", type: DataType.BITMAP32}, + ], }, - takeSnapshot: { - ID: 5, - parameters: [], + startSampling: { + ID: 0x07, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "startTime", type: DataType.UTC}, + {name: "type", type: DataType.ENUM8}, + {name: "requestInterval", type: DataType.UINT16}, + {name: "maxNumberOfSamples", type: DataType.UINT16}, + ], + response: 0x0d, }, - mirrorReportAttrRsp: { - ID: 6, - parameters: [], + getSampledData: { + ID: 0x08, + parameters: [ + {name: "sampleId", type: DataType.UINT16}, + {name: "earliestSampleTime", type: DataType.UTC}, + {name: "type", type: DataType.ENUM8}, + {name: "numberOfSamples", type: DataType.UINT16}, + ], + response: 0x07, }, - owonGetHistoryRecord: { - ID: 0x20, - parameters: [], + mirrorReportAttributeRsp: { + ID: 0x09, + parameters: [ + {name: "notificationScheme", type: DataType.UINT8}, + {name: "notificationFlags", type: DataType.BITMAP32}, + ], }, - owonStopSendingHistoricalRecord: { - ID: 0x21, - parameters: [], + resetLoadLimitCounter: { + ID: 0x0a, + parameters: [ + {name: "providerId", type: DataType.UINT32}, + {name: "issuerEventId", type: DataType.UINT32}, + ], + }, + changeSupply: { + ID: 0x0b, + parameters: [ + {name: "providerId", type: DataType.UINT32}, + {name: "issuerEventId", type: DataType.UINT32}, + {name: "requestDateTime", type: DataType.UTC}, + {name: "implDateTime", type: DataType.UTC}, + {name: "proposedSupplyStatusAfterImpl", type: DataType.ENUM8}, + {name: "SupplyControlBits", type: DataType.BITMAP8}, + ], + }, + localChangeSupply: {ID: 0x0c, parameters: [{name: "proposedSupplyStatus", type: DataType.ENUM8}]}, + setSupplyStatus: { + ID: 0x0d, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "tamperState", type: DataType.ENUM8}, + {name: "depletionState", type: DataType.ENUM8}, + {name: "uncontrolledFlowState", type: DataType.ENUM8}, + {name: "loadLimitSupplyState", type: DataType.ENUM8}, + ], + }, + setUncontrolledFlowThreshold: { + ID: 0x0e, + parameters: [ + {name: "providerId", type: DataType.UINT32}, + {name: "issuerEventId", type: DataType.UINT32}, + {name: "uncontrolledFlowThreshold", type: DataType.UINT16}, + {name: "unitOfMeasure", type: DataType.ENUM8}, + {name: "multiplier", type: DataType.UINT16}, + {name: "divisor", type: DataType.UINT16}, + {name: "stabilisationPeriod", type: DataType.UINT8}, + {name: "measurementPeriod", type: DataType.UINT16}, + ], }, + // custom + owonGetHistoryRecord: {ID: 0x20, parameters: []}, + owonStopSendingHistoricalRecord: {ID: 0x21, parameters: []}, }, commandsResponse: { getProfileRsp: { - ID: 0, - parameters: [], + ID: 0x00, + parameters: [ + {name: "endTime", type: DataType.UTC}, + {name: "status", type: DataType.ENUM8}, + {name: "profileIntervalPeriod", type: DataType.ENUM8}, + {name: "numberOfPeriodsDelivered", type: DataType.UINT8}, + {name: "intervals", type: BuffaloZclDataType.LIST_UINT24}, + ], }, - reqMirrorRsp: { - ID: 1, - parameters: [], + requestMirror: {ID: 0x01, parameters: []}, + removeMirror: {ID: 0x02, parameters: []}, + requestFastPollModeRsp: { + ID: 0x03, + parameters: [ + {name: "appliedUpdatePeriod", type: DataType.UINT8}, + {name: "fastPollModeEndTime", type: DataType.UTC}, + ], }, - mirrorRemRsp: { - ID: 2, - parameters: [], + scheduleSnapshotRsp: { + ID: 0x04, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + // TODO: need BuffaloZcl read/write + // {name: "fastPollModeEndTime", type: DataType.LIST_SCHEDULE_SNAPSHOT_RSP}, + // {name: "id", type: DataType.UINT8, min: 1, max: 254}, + // {name: "confirmation", type: DataType.UINT8}, + ], }, - reqFastPollModeRsp: { - ID: 3, - parameters: [], + takeSnapshotRsp: { + ID: 0x05, + parameters: [ + {name: "id", type: DataType.UINT32}, + {name: "confirmation", type: DataType.UINT8}, + ], }, - getSnapshotRsp: { - ID: 4, - parameters: [], + publishSnapshot: { + ID: 0x06, + parameters: [ + {name: "id", type: DataType.UINT32}, + {name: "time", type: DataType.UTC}, + {name: "totalSnapshotsFound", type: DataType.UINT8}, + {name: "commandIndex", type: DataType.UINT8}, + {name: "totalNumberOfCommands", type: DataType.UINT8}, + {name: "cause", type: DataType.BITMAP32}, + {name: "payloadType", type: DataType.ENUM8}, + // TODO: need BuffaloZcl read/write (complex) + // {name: "subPayload", type: DataType.LIST_SNAPSHOT_SUBPAYLOAD}, + ], + }, + getSampledDataRsp: { + ID: 0x07, + parameters: [ + {name: "id", type: DataType.UINT16}, + {name: "startTime", type: DataType.UTC}, + {name: "type", type: DataType.ENUM8}, + {name: "requestInterval", type: DataType.UINT16}, + {name: "numberOfSamples", type: DataType.UINT16}, + {name: "samples", type: BuffaloZclDataType.LIST_UINT24}, + ], + }, + configureMirror: { + ID: 0x08, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "reportingInterval", type: DataType.UINT24}, + {name: "mirrorNotificationReporting", type: DataType.BOOLEAN}, + {name: "notificationScheme", type: DataType.UINT8}, + ], + }, + configureNotificationScheme: { + ID: 0x09, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "notificationScheme", type: DataType.UINT8}, + {name: "notificationFlagOrder", type: DataType.BITMAP32}, + ], + }, + configureNotificationFlag: { + ID: 0x0a, + parameters: [ + {name: "issuerEventId", type: DataType.UINT32}, + {name: "notificationScheme", type: DataType.UINT8}, + {name: "notificationFlagAttributeId", type: DataType.UINT16}, + {name: "clusterId", type: DataType.CLUSTER_ID}, + {name: "manufacturerCode", type: DataType.UINT16}, + {name: "numberOfCommands", type: DataType.UINT8}, + {name: "commandIds", type: BuffaloZclDataType.LIST_UINT8}, + ], + }, + getNotifiedMessage: { + ID: 0x0b, + parameters: [ + {name: "notificationScheme", type: DataType.UINT8}, + {name: "notificationFlagAttributeId", type: DataType.UINT16}, + {name: "notificationFlags", type: DataType.BITMAP32}, + ], + }, + supplyStatusRsp: { + ID: 0x0c, + parameters: [ + {name: "providerId", type: DataType.UINT32}, + {name: "issuerEventId", type: DataType.UINT32}, + {name: "implDateTime", type: DataType.UTC}, + {name: "supplyStatusAfterImpl", type: DataType.ENUM8}, + ], + }, + startSamplingRsp: {ID: 0x0d, parameters: [{name: "sampleId", type: DataType.UINT16}]}, + // custom + owonGetHistoryRecordRsp: {ID: 0x20, parameters: []}, + }, + }, + // seMessaging: {ID: 0x0703}, + seTunneling: { + ID: 0x0704, + attributes: { + closeTunnelTimeout: {ID: 0x0000, type: DataType.UINT16, required: true, min: 1, default: 0xffff}, + }, + commands: { + requestTunnel: { + ID: 0x00, + response: 0x00, + parameters: [ + {name: "protocolId", type: DataType.ENUM8, min: 0x01, max: 0xff}, + {name: "manufacturerCode", type: DataType.UINT16, max: 0xffff}, + {name: "flowControl", type: DataType.BOOLEAN}, + {name: "maxIncomingTransferSize", type: DataType.UINT16, max: 0xffff}, + ], + required: true, + }, + closeTunnel: {ID: 0x01, parameters: [{name: "tunnelId", type: DataType.UINT16, max: 0xffff}], required: true}, + transferData: { + ID: 0x02, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "data", type: BuffaloZclDataType.BUFFER}, + ], + required: true, + }, + transferDataError: { + ID: 0x03, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "status", type: DataType.UINT8}, + ], + required: true, + }, + ackTransferData: { + ID: 0x04, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "numberOfBytesLeft", type: DataType.UINT16}, + ], + }, + readyData: { + ID: 0x05, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "numberOfOctetsLeft", type: DataType.UINT16}, + ], + }, + getSupportedTunnelProtocols: {ID: 0x06, parameters: [{name: "protocolOffset", type: DataType.UINT8}]}, + }, + commandsResponse: { + requestTunnelRsp: { + ID: 0x00, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "status", type: DataType.UINT8}, + {name: "maxIncomingTransferSize", type: DataType.UINT16}, + ], + required: true, + }, + transferData: { + ID: 0x01, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "data", type: BuffaloZclDataType.BUFFER}, + ], + required: true, + }, + transferDataError: { + ID: 0x02, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "status", type: DataType.UINT8}, + ], + required: true, + }, + ackTransferData: { + ID: 0x03, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "numberOfBytesLeft", type: DataType.UINT16}, + ], + }, + readyData: { + ID: 0x04, + parameters: [ + {name: "tunnelId", type: DataType.UINT16, max: 0xffff}, + {name: "numberOfOctetsLeft", type: DataType.UINT16}, + ], + }, + supportedProtocolsRsp: { + ID: 0x05, + parameters: [ + {name: "listComplete", type: DataType.BOOLEAN}, + {name: "count", type: DataType.UINT8}, + // TODO: need BuffaloZcl read/write + // {name: "protocols", type: BuffaloZclDataType.LIST_PROTOCOLS}, + // {name: "manufacturerCode", type: DataType.UINT16}, + // {name: "protocolId", type: DataType.ENUM8}, + ], + }, + closureNotification: {ID: 0x06, parameters: [{name: "tunnelId", type: DataType.UINT16}]}, + }, + }, + // sePrepayment: {ID: 0x0705}, + // seCalendar: {ID: 0x0707}, + // seDeviceManagement: {ID: 0x0708}, + // seEvents: {ID: 0x0709}, + // seSubGhz: {ID: 0x070b}, + // seKeyEstablishment: {ID: 0x0800}, + telecommunicationsInformation: { + ID: 0x0900, + attributes: { + nodeDescription: {ID: 0x0000, type: DataType.CHAR_STR, required: true}, + deliveryEnable: {ID: 0x0001, type: DataType.BOOLEAN, required: true}, + pushInformationTimer: {ID: 0x0002, type: DataType.UINT32}, + enableSecureConfiguration: {ID: 0x0003, type: DataType.BOOLEAN, required: true}, + + numberOfContents: {ID: 0x0010, type: DataType.UINT16, max: 0xffff}, + contentRootID: {ID: 0x0011, type: DataType.UINT16, max: 0xffff}, + }, + commands: { + // TODO: most of these require custom BuffaloZcl read/write + requestInfo: {ID: 0x00, parameters: [], response: 0x00, required: true}, + pushInfoResponse: {ID: 0x01, parameters: [], required: true}, + sendPreference: {ID: 0x02, parameters: [], response: 0x02}, + requestPreferenceRsp: {ID: 0x03, parameters: []}, + update: {ID: 0x04, parameters: [], response: 0x05}, + delete: {ID: 0x05, parameters: [], response: 0x06}, + configureNodeDescription: {ID: 0x06, parameters: []}, + configureDeliveryEnable: {ID: 0x07, parameters: []}, + configurePushInfoTimer: {ID: 0x08, parameters: []}, + configureSetRootId: {ID: 0x09, parameters: []}, + }, + commandsResponse: { + // TODO: most of these require custom BuffaloZcl read/write + requestInfoRsp: {ID: 0x00, parameters: [], required: true}, + pushInfo: {ID: 0x01, parameters: [], required: true}, + sendPreferenceRsp: {ID: 0x02, parameters: [], required: true}, + serverRequestPreference: {ID: 0x03, parameters: [], required: true}, + requestPreferenceConfirmation: {ID: 0x04, parameters: [], required: true}, + updateRsp: {ID: 0x05, parameters: [], required: true}, + deleteRsp: {ID: 0x06, parameters: [], required: true}, + }, + }, + telecommunicationsVoiceOverZigbee: { + ID: 0x0904, + attributes: { + codecType: {ID: 0x0000, type: DataType.ENUM8, required: true, write: true}, + samplingFrequency: {ID: 0x0001, type: DataType.ENUM8, required: true, write: true}, + codecrate: {ID: 0x0002, type: DataType.ENUM8, required: true, write: true}, + establishmentTimeout: {ID: 0x0003, type: DataType.UINT8, required: true, min: 0x01, max: 0xff}, + codecTypeSub1: {ID: 0x0004, type: DataType.ENUM8, write: true}, + codecTypeSub2: {ID: 0x0005, type: DataType.ENUM8, write: true}, + codecTypeSub3: {ID: 0x0006, type: DataType.ENUM8, write: true}, + compressionType: {ID: 0x0007, type: DataType.ENUM8}, + compressionRate: {ID: 0x0008, type: DataType.ENUM8}, + optionFlags: {ID: 0x0009, type: DataType.BITMAP8, write: true, max: 0xff}, + threshold: {ID: 0x000a, type: DataType.UINT8, write: true, max: 0xff}, + }, + commands: { + establishmentRequest: { + ID: 0x00, + parameters: [ + /** [3: reserved, 1: compression, 1: codecTypeS3, 1: codecTypeS2, 1: codecTypeS1] */ + {name: "flag", type: DataType.BITMAP8}, + {name: "codecType", type: DataType.ENUM8}, + {name: "sampFreq", type: DataType.ENUM8}, + {name: "codecRate", type: DataType.ENUM8}, + {name: "serviceType", type: DataType.ENUM8}, + {name: "codecTypeS1", type: DataType.ENUM8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0001}]}, + {name: "codecTypeS2", type: DataType.ENUM8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0010}]}, + {name: "codecTypeS3", type: DataType.ENUM8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0100}]}, + {name: "compType", type: DataType.ENUM8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "flag", mask: 0b1000}]}, + {name: "compRate", type: DataType.ENUM8, conditions: [{type: ParameterCondition.BITMASK_SET, param: "flag", mask: 0b1000}]}, + ], + response: 0x00, + required: true, + }, + voiceTransmission: {ID: 0x00, parameters: [{name: "voiceData", type: DataType.UNKNOWN}], required: true}, + voiceTransmissionCompletion: {ID: 0x00, parameters: [{name: "zclHeader", type: DataType.UNKNOWN}]}, + controlResponse: {ID: 0x00, parameters: [{name: "status", type: DataType.ENUM8}]}, + }, + commandsResponse: { + establishmentRsp: { + ID: 0x00, + parameters: [ + {name: "status", type: DataType.ENUM8}, + {name: "codecType", type: DataType.ENUM8}, + ], + required: true, + }, + voiceTransmissionRsp: { + ID: 0x01, + parameters: [ + {name: "zclHeaderSeqNum", type: DataType.UINT8}, + {name: "errorFlag", type: DataType.ENUM8}, + ], + required: true, + }, + control: {ID: 0x02, parameters: [{name: "controlType", type: DataType.ENUM8}]}, + }, + }, + telecommunicationsChatting: { + ID: 0x0905, + attributes: { + uID: {ID: 0x0000, type: DataType.UINT16, required: true, max: 0xffff}, + nickname: {ID: 0x0001, type: DataType.CHAR_STR, required: true}, + + cID: {ID: 0x0010, type: DataType.UINT16, required: true, max: 0xffff}, + name: {ID: 0x0011, type: DataType.CHAR_STR, required: true}, + enableAddChat: {ID: 0x0012, type: DataType.BOOLEAN}, + }, + commands: { + joinChatReq: { + ID: 0x00, + parameters: [ + {name: "uID", type: DataType.UINT16}, + {name: "nickname", type: DataType.CHAR_STR}, + {name: "cID", type: DataType.UINT16}, + ], + response: 0x01, + required: true, + }, + leaveChatReq: { + ID: 0x01, + parameters: [ + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + ], + required: true, + }, + searchChatReq: {ID: 0x02, parameters: [], response: 0x04, required: true}, + switchCharmanRsp: { + ID: 0x03, + parameters: [ + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + ], + }, + startChatReq: { + ID: 0x04, + parameters: [ + {name: "name", type: DataType.CHAR_STR}, + {name: "uID", type: DataType.UINT16}, + {name: "nickname", type: DataType.CHAR_STR}, + ], + response: 0x00, + }, + chatMessage: { + ID: 0x05, + parameters: [ + {name: "destUID", type: DataType.UINT16}, + {name: "srcUID", type: DataType.UINT16}, + {name: "cID", type: DataType.UINT16}, + {name: "nickname", type: DataType.CHAR_STR}, + {name: "message", type: DataType.CHAR_STR}, + ], + required: true, }, - owonGetHistoryRecordRsp: { - ID: 0x20, - parameters: [], + getNodeInfoReq: { + ID: 0x06, + parameters: [ + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + ], + response: 0x08, }, }, - }, - tunneling: { - ID: 0x0704, - attributes: {}, - commands: { - requestTunnel: { - ID: 0, - response: 0, + commandsResponse: { + startChatRsp: { + ID: 0x00, parameters: [ - {name: "protocolId", type: DataType.ENUM8}, - {name: "manufCode", type: DataType.UINT16}, - {name: "flowControl", type: DataType.BOOLEAN}, - {name: "mtuSize", type: DataType.UINT16}, + {name: "status", type: DataType.ENUM8}, + {name: "cID", type: DataType.UINT16}, ], + required: true, }, - closeTunnel: { - ID: 1, - parameters: [{name: "tunnelId", type: DataType.UINT16}], + joinChatRsp: { + ID: 0x01, + parameters: [ + {name: "status", type: DataType.ENUM8}, + {name: "cID", type: DataType.UINT16}, + // TODO: need BuffaloZcl read/write + // { + // name: "users", + // type: BuffaloZclDataType.LIST_CHAT_NODES, + // conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}], + // }, + // {name: "uId", type: DataType.UINT16}, + // {name: "nickname", type: DataType.CHAR_STR}, + ], + required: true, + }, + userLeft: { + ID: 0x02, + parameters: [ + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + {name: "nickName", type: DataType.CHAR_STR}, + ], + required: true, }, - transferData: { - ID: 2, + userJoined: { + ID: 0x03, parameters: [ - {name: "tunnelId", type: DataType.UINT16}, - {name: "data", type: BuffaloZclDataType.BUFFER}, + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + {name: "nickName", type: DataType.CHAR_STR}, ], + required: true, }, - transferDataError: { - ID: 3, + searchChatRsp: { + ID: 0x04, parameters: [ - {name: "tunnelId", type: DataType.UINT16}, - {name: "status", type: DataType.UINT8}, + {name: "options", type: DataType.BITMAP8}, + // TODO: need BuffaloZcl read/write + // {name: "chats", type: BuffaloZclDataType.LIST_CHATS }, + // {name: "cID", type: DataType.UINT16}, + // {name: "name", type: DataType.CHAR_STR}, ], + required: true, }, - }, - commandsResponse: { - requestTunnelResp: { - ID: 0, + switchChairmanReq: {ID: 0x05, parameters: [{name: "cID", type: DataType.UINT16}], required: true}, + switchChairmanConfirm: { + ID: 0x06, parameters: [ - {name: "tunnelId", type: DataType.UINT16}, - {name: "tunnelStatus", type: DataType.UINT8}, - {name: "mtuSize", type: DataType.UINT16}, + {name: "cID", type: DataType.UINT16}, + // TODO: need BuffaloZcl read/write + // {name: "nodeInfo", type: BuffaloZclDataType.LIST_CHAT_NODE_INFO}, + // {name: "uID", type: DataType.UINT16}, + // {name: "address", type: DataType.DATA16}, + // {name: "endpoint", type: DataType.UINT8}, + // {name: "nickName", type: DataType.CHAR_STR}, ], + required: true, }, - transferDataResp: { - ID: 1, + switchChairmanNotification: { + ID: 0x07, parameters: [ - {name: "tunnelId", type: DataType.UINT16}, - {name: "data", type: BuffaloZclDataType.BUFFER}, + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + {name: "address", type: DataType.DATA16}, + {name: "endpoint", type: DataType.UINT8}, ], + required: true, }, - transferDataErrorResp: { - ID: 2, + getNodeInfoRsp: { + ID: 0x08, parameters: [ - {name: "tunnelId", type: DataType.UINT16}, - {name: "status", type: DataType.UINT8}, + {name: "status", type: DataType.ENUM8}, + {name: "cID", type: DataType.UINT16}, + {name: "uID", type: DataType.UINT16}, + {name: "address", type: DataType.DATA16}, + {name: "endpoint", type: DataType.UINT8}, + {name: "nickName", type: DataType.CHAR_STR}, ], + required: true, }, }, }, - telecommunicationsInformation: { - ID: 2304, + haApplianceIdentification: { + ID: 0x0b00, attributes: { - nodeDescription: {ID: 0, type: DataType.CHAR_STR}, - deliveryEnable: {ID: 1, type: DataType.BOOLEAN}, - pushInformationTimer: {ID: 2, type: DataType.UINT32}, - enableSecureConfiguration: {ID: 3, type: DataType.BOOLEAN}, - numberOfContents: {ID: 16, type: DataType.UINT16}, - contentRootID: {ID: 17, type: DataType.UINT16}, - }, - commands: {}, - commandsResponse: {}, - }, - telecommunicationsVoiceOverZigbee: { - ID: 2308, - attributes: { - codecType: {ID: 0, type: DataType.ENUM8}, - samplingFrequency: {ID: 1, type: DataType.ENUM8}, - codecrate: {ID: 2, type: DataType.ENUM8}, - establishmentTimeout: {ID: 3, type: DataType.UINT8}, - codecTypeSub1: {ID: 4, type: DataType.ENUM8}, - codecTypeSub2: {ID: 5, type: DataType.ENUM8}, - codecTypeSub3: {ID: 6, type: DataType.ENUM8}, - compressionType: {ID: 7, type: DataType.ENUM8}, - compressionRate: {ID: 8, type: DataType.ENUM8}, - optionFlags: {ID: 9, type: DataType.BITMAP8}, - threshold: {ID: 10, type: DataType.UINT8}, + basicIdentification: {ID: 0x0000, type: DataType.UINT56, required: true}, + + companyName: {ID: 0x0010, type: DataType.CHAR_STR, maxLen: 16}, + companyId: {ID: 0x0011, type: DataType.UINT16, max: 0xffff}, + brandName: {ID: 0x0012, type: DataType.CHAR_STR, maxLen: 16}, + brandId: {ID: 0x0013, type: DataType.UINT16, max: 0xffff}, + model: {ID: 0x0014, type: DataType.OCTET_STR, maxLen: 16}, + partNumber: {ID: 0x0015, type: DataType.OCTET_STR, maxLen: 16}, + productRevision: {ID: 0x0016, type: DataType.OCTET_STR, maxLen: 6}, + softwareRevision: {ID: 0x0017, type: DataType.OCTET_STR, maxLen: 6}, + productTypeName: {ID: 0x0018, type: DataType.OCTET_STR, length: 2}, + productTypeId: {ID: 0x0019, type: DataType.UINT16, max: 0xffff}, + cecedSpecificationVersion: {ID: 0x001a, type: DataType.UINT8, max: 0xff}, }, commands: {}, commandsResponse: {}, }, - telecommunicationsChatting: { - ID: 2309, + seMeterIdentification: { + ID: 0x0b01, attributes: { - uID: {ID: 0, type: DataType.UINT16}, - nickname: {ID: 1, type: DataType.CHAR_STR}, - cID: {ID: 16, type: DataType.UINT16}, - name: {ID: 17, type: DataType.CHAR_STR}, - enableAddChat: {ID: 18, type: DataType.BOOLEAN}, - }, - commands: {}, - commandsResponse: {}, - }, - haApplianceIdentification: { - ID: 2816, - attributes: { - basicIdentification: {ID: 0, type: DataType.UINT56}, - companyName: {ID: 16, type: DataType.CHAR_STR}, - companyId: {ID: 17, type: DataType.UINT16}, - brandName: {ID: 18, type: DataType.CHAR_STR}, - brandId: {ID: 19, type: DataType.UINT16}, - model: {ID: 20, type: DataType.OCTET_STR}, - partNumber: {ID: 21, type: DataType.OCTET_STR}, - productRevision: {ID: 22, type: DataType.OCTET_STR}, - softwareRevision: {ID: 23, type: DataType.OCTET_STR}, - productTypeName: {ID: 24, type: DataType.OCTET_STR}, - productTypeId: {ID: 25, type: DataType.UINT16}, - cecedSpecificationVersion: {ID: 26, type: DataType.UINT8}, - }, - commands: {}, - commandsResponse: {}, - }, - haMeterIdentification: { - ID: 2817, - attributes: { - companyName: {ID: 0, type: DataType.CHAR_STR}, - meterTypeId: {ID: 1, type: DataType.UINT16}, - dataQualityId: {ID: 4, type: DataType.UINT16}, - customerName: {ID: 5, type: DataType.CHAR_STR}, - model: {ID: 6, type: DataType.CHAR_STR}, - partNumber: {ID: 7, type: DataType.CHAR_STR}, - productRevision: {ID: 8, type: DataType.CHAR_STR}, - softwareRevision: {ID: 10, type: DataType.CHAR_STR}, - utilityName: {ID: 11, type: DataType.CHAR_STR}, - pod: {ID: 12, type: DataType.CHAR_STR}, - availablePower: {ID: 13, type: DataType.INT24}, - powerThreshold: {ID: 14, type: DataType.INT24}, + companyName: {ID: 0x0000, type: DataType.CHAR_STR, required: true, minLen: 0, maxLen: 16}, + meterTypeId: {ID: 0x0001, type: DataType.UINT16, required: true, max: 0xffff}, + dataQualityId: {ID: 0x0004, type: DataType.UINT16, required: true, max: 0xffff}, + customerName: {ID: 0x0005, type: DataType.CHAR_STR, write: true, minLen: 0, maxLen: 16}, + model: {ID: 0x0006, type: DataType.OCTET_STR, minLen: 0, maxLen: 16}, + partNumber: {ID: 0x0007, type: DataType.OCTET_STR, minLen: 0, maxLen: 16}, + productRevision: {ID: 0x0008, type: DataType.OCTET_STR, minLen: 0, maxLen: 16}, + softwareRevision: {ID: 0x000a, type: DataType.OCTET_STR, minLen: 0, maxLen: 16}, + utilityName: {ID: 0x000b, type: DataType.CHAR_STR, minLen: 0, maxLen: 16}, + pod: {ID: 0x000c, type: DataType.CHAR_STR, required: true, minLen: 0, maxLen: 16}, + availablePower: {ID: 0x000d, type: DataType.INT24, required: true, max: 0xffffff}, + powerThreshold: {ID: 0x000e, type: DataType.INT24, required: true, max: 0xffffff}, }, commands: {}, commandsResponse: {}, }, haApplianceEventsAlerts: { - ID: 2818, + ID: 0x0b02, attributes: {}, commands: { - getAlerts: { - ID: 0, - parameters: [], - }, + getAlerts: {ID: 0x00, parameters: [], required: true}, }, commandsResponse: { getAlertsRsp: { - ID: 0, + ID: 0x00, parameters: [ {name: "alertscount", type: DataType.UINT8}, {name: "aalert", type: BuffaloZclDataType.LIST_UINT24}, ], + required: true, }, alertsNotification: { - ID: 1, + ID: 0x01, parameters: [ {name: "alertscount", type: DataType.UINT8}, {name: "aalert", type: BuffaloZclDataType.LIST_UINT24}, ], + required: true, }, eventNotification: { - ID: 2, + ID: 0x02, parameters: [ {name: "eventheader", type: DataType.UINT8}, - {name: "eventid", type: DataType.UINT8}, + {name: "eventid", type: DataType.UINT8, max: 0xff}, ], + required: true, }, }, }, haApplianceStatistics: { - ID: 2819, + ID: 0x0b03, attributes: { - logMaxSize: {ID: 0, type: DataType.UINT32}, - logQueueMaxSize: {ID: 1, type: DataType.UINT8}, + logMaxSize: {ID: 0x0000, type: DataType.UINT32, required: true, default: 0x0000003c}, + logQueueMaxSize: {ID: 0x0001, type: DataType.UINT8, required: true, default: 0x01}, }, commands: { - log: { - ID: 0, - parameters: [{name: "logid", type: DataType.UINT32}], - }, - logQueue: { - ID: 1, - parameters: [], - }, + log: {ID: 0x00, parameters: [{name: "logid", type: DataType.UINT32}], required: true}, + logQueue: {ID: 0x01, parameters: [], required: true}, }, commandsResponse: { logNotification: { - ID: 0, + ID: 0x00, parameters: [ - {name: "timestamp", type: DataType.UINT32}, + {name: "timestamp", type: DataType.UTC}, {name: "logid", type: DataType.UINT32}, {name: "loglength", type: DataType.UINT32}, + // TODO: LIST_DATA8 {name: "logpayload", type: BuffaloZclDataType.LIST_UINT8}, ], + required: true, }, logRsp: { - ID: 1, + ID: 0x01, parameters: [ - {name: "timestamp", type: DataType.UINT32}, + {name: "timestamp", type: DataType.UTC}, {name: "logid", type: DataType.UINT32}, {name: "loglength", type: DataType.UINT32}, + // TODO: LIST_DATA8 {name: "logpayload", type: BuffaloZclDataType.LIST_UINT8}, ], + required: true, }, logQueueRsp: { - ID: 2, + ID: 0x02, parameters: [ {name: "logqueuesize", type: DataType.UINT8}, {name: "logid", type: BuffaloZclDataType.LIST_UINT32}, ], + required: true, }, statisticsAvailable: { - ID: 3, + ID: 0x03, parameters: [ {name: "logqueuesize", type: DataType.UINT8}, {name: "logid", type: BuffaloZclDataType.LIST_UINT32}, ], + required: true, }, }, }, haElectricalMeasurement: { - ID: 2820, - attributes: { - measurementType: {ID: 0, type: DataType.BITMAP32}, - dcVoltage: {ID: 256, type: DataType.INT16}, - dcVoltageMin: {ID: 257, type: DataType.INT16}, - dcvoltagemax: {ID: 258, type: DataType.INT16}, - dcCurrent: {ID: 259, type: DataType.INT16}, - dcCurrentMin: {ID: 260, type: DataType.INT16}, - dcCurrentMax: {ID: 261, type: DataType.INT16}, - dcPower: {ID: 262, type: DataType.INT16}, - dcPowerMin: {ID: 263, type: DataType.INT16}, - dcPowerMax: {ID: 264, type: DataType.INT16}, - dcVoltageMultiplier: {ID: 512, type: DataType.UINT16}, - dcVoltageDivisor: {ID: 513, type: DataType.UINT16}, - dcCurrentMultiplier: {ID: 514, type: DataType.UINT16}, - dcCurrentDivisor: {ID: 515, type: DataType.UINT16}, - dcPowerMultiplier: {ID: 516, type: DataType.UINT16}, - dcPowerDivisor: {ID: 517, type: DataType.UINT16}, - acFrequency: {ID: 768, type: DataType.UINT16}, - acFrequencyMin: {ID: 769, type: DataType.UINT16}, - acFrequencyMax: {ID: 770, type: DataType.UINT16}, - neutralCurrent: {ID: 771, type: DataType.UINT16}, - totalActivePower: {ID: 772, type: DataType.INT32}, - totalReactivePower: {ID: 773, type: DataType.INT32}, - totalApparentPower: {ID: 774, type: DataType.UINT32}, - meas1stHarmonicCurrent: {ID: 775, type: DataType.INT16}, - meas3rdHarmonicCurrent: {ID: 776, type: DataType.INT16}, - meas5thHarmonicCurrent: {ID: 777, type: DataType.INT16}, - meas7thHarmonicCurrent: {ID: 778, type: DataType.INT16}, - meas9thHarmonicCurrent: {ID: 779, type: DataType.INT16}, - meas11thHarmonicCurrent: {ID: 780, type: DataType.INT16}, - measPhase1stHarmonicCurrent: {ID: 781, type: DataType.INT16}, - measPhase3rdHarmonicCurrent: {ID: 782, type: DataType.INT16}, - measPhase5thHarmonicCurrent: {ID: 783, type: DataType.INT16}, - measPhase7thHarmonicCurrent: {ID: 784, type: DataType.INT16}, - measPhase9thHarmonicCurrent: {ID: 785, type: DataType.INT16}, - measPhase11thHarmonicCurrent: {ID: 786, type: DataType.INT16}, - acFrequencyMultiplier: {ID: 1024, type: DataType.UINT16}, - acFrequencyDivisor: {ID: 1025, type: DataType.UINT16}, - powerMultiplier: {ID: 1026, type: DataType.UINT32}, - powerDivisor: {ID: 1027, type: DataType.UINT32}, - harmonicCurrentMultiplier: {ID: 1028, type: DataType.INT8}, - phaseHarmonicCurrentMultiplier: {ID: 1029, type: DataType.INT8}, - instantaneousVoltage: {ID: 1280, type: DataType.INT16}, - instantaneousLineCurrent: {ID: 1281, type: DataType.UINT16}, - instantaneousActiveCurrent: {ID: 1282, type: DataType.INT16}, - instantaneousReactiveCurrent: {ID: 1283, type: DataType.INT16}, - instantaneousPower: {ID: 1284, type: DataType.INT16}, - rmsVoltage: {ID: 1285, type: DataType.UINT16}, - rmsVoltageMin: {ID: 1286, type: DataType.UINT16}, - rmsVoltageMax: {ID: 1287, type: DataType.UINT16}, - rmsCurrent: {ID: 1288, type: DataType.UINT16}, - rmsCurrentMin: {ID: 1289, type: DataType.UINT16}, - rmsCurrentMax: {ID: 1290, type: DataType.UINT16}, - activePower: {ID: 1291, type: DataType.INT16}, - activePowerMin: {ID: 1292, type: DataType.INT16}, - activePowerMax: {ID: 1293, type: DataType.INT16}, - reactivePower: {ID: 1294, type: DataType.INT16}, - apparentPower: {ID: 1295, type: DataType.UINT16}, - powerFactor: {ID: 1296, type: DataType.INT8}, - averageRmsVoltageMeasPeriod: {ID: 1297, type: DataType.UINT16}, - averageRmsOverVoltageCounter: {ID: 1298, type: DataType.UINT16}, - averageRmsUnderVoltageCounter: {ID: 1299, type: DataType.UINT16}, - rmsExtremeOverVoltagePeriod: {ID: 1300, type: DataType.UINT16}, - rmsExtremeUnderVoltagePeriod: {ID: 1301, type: DataType.UINT16}, - rmsVoltageSagPeriod: {ID: 1302, type: DataType.UINT16}, - rmsVoltageSwellPeriod: {ID: 1303, type: DataType.UINT16}, - acVoltageMultiplier: {ID: 1536, type: DataType.UINT16}, - acVoltageDivisor: {ID: 1537, type: DataType.UINT16}, - acCurrentMultiplier: {ID: 1538, type: DataType.UINT16}, - acCurrentDivisor: {ID: 1539, type: DataType.UINT16}, - acPowerMultiplier: {ID: 1540, type: DataType.UINT16}, - acPowerDivisor: {ID: 1541, type: DataType.UINT16}, - dcOverloadAlarmsMask: {ID: 1792, type: DataType.BITMAP8}, - dcVoltageOverload: {ID: 1793, type: DataType.INT16}, - dcCurrentOverload: {ID: 1794, type: DataType.INT16}, - acAlarmsMask: {ID: 2048, type: DataType.BITMAP16}, - acVoltageOverload: {ID: 2049, type: DataType.INT16}, - acCurrentOverload: {ID: 2050, type: DataType.INT16}, - acActivePowerOverload: {ID: 2051, type: DataType.INT16}, - acReactivePowerOverload: {ID: 2052, type: DataType.INT16}, - averageRmsOverVoltage: {ID: 2053, type: DataType.INT16}, - averageRmsUnderVoltage: {ID: 2054, type: DataType.INT16}, - rmsExtremeOverVoltage: {ID: 2055, type: DataType.INT16}, - rmsExtremeUnderVoltage: {ID: 2056, type: DataType.INT16}, - rmsVoltageSag: {ID: 2057, type: DataType.INT16}, - rmsVoltageSwell: {ID: 2058, type: DataType.INT16}, - lineCurrentPhB: {ID: 2305, type: DataType.UINT16}, - activeCurrentPhB: {ID: 2306, type: DataType.INT16}, - reactiveCurrentPhB: {ID: 2307, type: DataType.INT16}, - rmsVoltagePhB: {ID: 2309, type: DataType.UINT16}, - rmsVoltageMinPhB: {ID: 2310, type: DataType.UINT16}, - rmsVoltageMaxPhB: {ID: 2311, type: DataType.UINT16}, - rmsCurrentPhB: {ID: 2312, type: DataType.UINT16}, - rmsCurrentMinPhB: {ID: 2313, type: DataType.UINT16}, - rmsCurrentMaxPhB: {ID: 2314, type: DataType.UINT16}, - activePowerPhB: {ID: 2315, type: DataType.INT16}, - activePowerMinPhB: {ID: 2316, type: DataType.INT16}, - activePowerMaxPhB: {ID: 2317, type: DataType.INT16}, - reactivePowerPhB: {ID: 2318, type: DataType.INT16}, - apparentPowerPhB: {ID: 2319, type: DataType.UINT16}, - powerFactorPhB: {ID: 2320, type: DataType.INT8}, - averageRmsVoltageMeasurePeriodPhB: {ID: 2321, type: DataType.UINT16}, - averageRmsOverVoltageCounterPhB: {ID: 2322, type: DataType.UINT16}, - averageUnderVoltageCounterPhB: {ID: 2323, type: DataType.UINT16}, - rmsExtremeOverVoltagePeriodPhB: {ID: 2324, type: DataType.UINT16}, - rmsExtremeUnderVoltagePeriodPhB: {ID: 2325, type: DataType.UINT16}, - rmsVoltageSagPeriodPhB: {ID: 2326, type: DataType.UINT16}, - rmsVoltageSwellPeriodPhB: {ID: 2327, type: DataType.UINT16}, - lineCurrentPhC: {ID: 2561, type: DataType.UINT16}, - activeCurrentPhC: {ID: 2562, type: DataType.INT16}, - reactiveCurrentPhC: {ID: 2563, type: DataType.INT16}, - rmsVoltagePhC: {ID: 2565, type: DataType.UINT16}, - rmsVoltageMinPhC: {ID: 2566, type: DataType.UINT16}, - rmsVoltageMaxPhC: {ID: 2567, type: DataType.UINT16}, - rmsCurrentPhC: {ID: 2568, type: DataType.UINT16}, - rmsCurrentMinPhC: {ID: 2569, type: DataType.UINT16}, - rmsCurrentMaxPhC: {ID: 2570, type: DataType.UINT16}, - activePowerPhC: {ID: 2571, type: DataType.INT16}, - activePowerMinPhC: {ID: 2572, type: DataType.INT16}, - activePowerMaxPhC: {ID: 2573, type: DataType.INT16}, - reactivePowerPhC: {ID: 2574, type: DataType.INT16}, - apparentPowerPhC: {ID: 2575, type: DataType.UINT16}, - powerFactorPhC: {ID: 2576, type: DataType.INT8}, - averageRmsVoltageMeasPeriodPhC: {ID: 2577, type: DataType.UINT16}, - averageRmsOverVoltageCounterPhC: {ID: 2578, type: DataType.UINT16}, - averageUnderVoltageCounterPhC: {ID: 2579, type: DataType.UINT16}, - rmsExtremeOverVoltagePeriodPhC: {ID: 2580, type: DataType.UINT16}, - rmsExtremeUnderVoltagePeriodPhC: {ID: 2581, type: DataType.UINT16}, - rmsVoltageSagPeriodPhC: {ID: 2582, type: DataType.UINT16}, - rmsVoltageSwellPeriodPhC: {ID: 2583, type: DataType.UINT16}, - schneiderActivePowerDemandTotal: {ID: 0x4300, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactivePowerDemandTotal: {ID: 0x4303, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentPowerDemandTotal: {ID: 0x4318, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalDuration: {ID: 0x4319, type: DataType.UINT24, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandDateTime: {ID: 0x4320, type: DataType.UTC, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActivePowerDemandPhase1: {ID: 0x4509, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactivePowerDemandPhase1: {ID: 0x450a, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentPowerDemandPhase1: {ID: 0x450b, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMinimalVoltageL1: {ID: 0x4510, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMaximalCurrentI1: {ID: 0x4513, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActivePowerDemandPhase2: {ID: 0x4909, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactivePowerDemandPhase2: {ID: 0x490a, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentPowerDemandPhase2: {ID: 0x490b, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMinimalVoltageL2: {ID: 0x4910, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMaximalCurrentI2: {ID: 0x4913, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderActivePowerDemandPhase3: {ID: 0x4a09, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderReactivePowerDemandPhase3: {ID: 0x4a0a, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderApparentPowerDemandPhase3: {ID: 0x4a0b, type: DataType.INT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMinimalVoltageL3: {ID: 0x4a10, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDemandIntervalMaximalCurrentI3: {ID: 0x4a13, type: DataType.UINT16, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderCurrentSensorMultiplier: {ID: 0x4e00, type: DataType.UINT8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, + ID: 0x0b04, + attributes: { + measurementType: {ID: 0x0000, type: DataType.BITMAP32, required: true, max: 0xffffffff, default: 0}, + + dcVoltage: {ID: 0x0100, type: DataType.INT16, report: true, min: -32767}, + dcVoltageMin: {ID: 0x0101, type: DataType.INT16, min: -32767}, + dcvoltagemax: {ID: 0x0102, type: DataType.INT16, min: -32767}, + dcCurrent: {ID: 0x0103, type: DataType.INT16, report: true, min: -32767}, + dcCurrentMin: {ID: 0x0104, type: DataType.INT16, min: -32767}, + dcCurrentMax: {ID: 0x0105, type: DataType.INT16, min: -32767}, + dcPower: {ID: 0x0106, type: DataType.INT16, report: true, min: -32767}, + dcPowerMin: {ID: 0x0107, type: DataType.INT16, min: -32767}, + dcPowerMax: {ID: 0x0108, type: DataType.INT16, min: -32767}, + + dcVoltageMultiplier: {ID: 0x0200, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + dcVoltageDivisor: {ID: 0x0201, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + dcCurrentMultiplier: {ID: 0x0202, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + dcCurrentDivisor: {ID: 0x0203, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + dcPowerMultiplier: {ID: 0x0204, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + dcPowerDivisor: {ID: 0x0205, type: DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1}, + + acFrequency: {ID: 0x0300, type: DataType.UINT16, report: true}, + acFrequencyMin: {ID: 0x0301, type: DataType.UINT16}, + acFrequencyMax: {ID: 0x0302, type: DataType.UINT16}, + neutralCurrent: {ID: 0x0303, type: DataType.UINT16, report: true}, + totalActivePower: {ID: 0x0304, type: DataType.INT32, report: true, min: -8388607, max: 8388607}, + totalReactivePower: {ID: 0x0305, type: DataType.INT32, report: true, min: -8388607, max: 8388607}, + totalApparentPower: {ID: 0x0306, type: DataType.UINT32, report: true, max: 0xffffff}, + meas1stHarmonicCurrent: {ID: 0x0307, type: DataType.INT16, report: true}, + meas3rdHarmonicCurrent: {ID: 0x0308, type: DataType.INT16, report: true}, + meas5thHarmonicCurrent: {ID: 0x0309, type: DataType.INT16, report: true}, + meas7thHarmonicCurrent: {ID: 0x030a, type: DataType.INT16, report: true}, + meas9thHarmonicCurrent: {ID: 0x030b, type: DataType.INT16, report: true}, + meas11thHarmonicCurrent: {ID: 0x030c, type: DataType.INT16, report: true}, + measPhase1stHarmonicCurrent: {ID: 0x030d, type: DataType.INT16, report: true}, + measPhase3rdHarmonicCurrent: {ID: 0x030e, type: DataType.INT16, report: true}, + measPhase5thHarmonicCurrent: {ID: 0x030f, type: DataType.INT16, report: true}, + measPhase7thHarmonicCurrent: {ID: 0x0310, type: DataType.INT16, report: true}, + measPhase9thHarmonicCurrent: {ID: 0x0311, type: DataType.INT16, report: true}, + measPhase11thHarmonicCurrent: {ID: 0x0312, type: DataType.INT16, report: true}, + + acFrequencyMultiplier: {ID: 0x0400, type: DataType.UINT16, report: true, min: 1, default: 1}, + acFrequencyDivisor: {ID: 0x0401, type: DataType.UINT16, report: true, min: 1, default: 1}, + powerMultiplier: {ID: 0x0402, type: DataType.UINT32, report: true, max: 0xffffff, default: 1}, + powerDivisor: {ID: 0x0403, type: DataType.UINT32, report: true, max: 0xffffff, default: 1}, + harmonicCurrentMultiplier: {ID: 0x0404, type: DataType.INT8, report: true, min: -127, default: 0}, + phaseHarmonicCurrentMultiplier: {ID: 0x0405, type: DataType.INT8, report: true, min: -127, default: 0}, + + // XXX: does not exist? + instantaneousVoltage: {ID: 0x0500, type: DataType.INT16}, + instantaneousLineCurrent: {ID: 0x0501, type: DataType.UINT16, report: true}, + instantaneousActiveCurrent: {ID: 0x0502, type: DataType.INT16, report: true}, + instantaneousReactiveCurrent: {ID: 0x0503, type: DataType.INT16, report: true}, + // XXX: does not exist? + instantaneousPower: {ID: 0x0504, type: DataType.INT16}, + rmsVoltage: {ID: 0x0505, type: DataType.UINT16, report: true}, + rmsVoltageMin: {ID: 0x0506, type: DataType.UINT16}, + rmsVoltageMax: {ID: 0x0507, type: DataType.UINT16}, + rmsCurrent: {ID: 0x0508, type: DataType.UINT16, report: true}, + rmsCurrentMin: {ID: 0x0509, type: DataType.UINT16}, + rmsCurrentMax: {ID: 0x050a, type: DataType.UINT16}, + activePower: {ID: 0x050b, type: DataType.INT16, report: true}, + activePowerMin: {ID: 0x050c, type: DataType.INT16}, + activePowerMax: {ID: 0x050d, type: DataType.INT16}, + reactivePower: {ID: 0x050e, type: DataType.INT16, report: true}, + apparentPower: {ID: 0x050f, type: DataType.UINT16, report: true}, + powerFactor: {ID: 0x0510, type: DataType.INT8, min: -100, max: 100, default: 0}, + averageRmsVoltageMeasPeriod: {ID: 0x0511, type: DataType.UINT16, write: true, default: 0}, + averageRmsOverVoltageCounter: {ID: 0x0512, type: DataType.UINT16, write: true, default: 0}, + averageRmsUnderVoltageCounter: {ID: 0x0513, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeOverVoltagePeriod: {ID: 0x0514, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeUnderVoltagePeriod: {ID: 0x0515, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSagPeriod: {ID: 0x0516, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSwellPeriod: {ID: 0x0517, type: DataType.UINT16, write: true, default: 0}, + acVoltageMultiplier: {ID: 0x0600, type: DataType.UINT16, report: true, min: 1, default: 1}, + acVoltageDivisor: {ID: 0x0601, type: DataType.UINT16, report: true, min: 1, default: 1}, + acCurrentMultiplier: {ID: 0x0602, type: DataType.UINT16, report: true, min: 1, default: 1}, + acCurrentDivisor: {ID: 0x0603, type: DataType.UINT16, report: true, min: 1, default: 1}, + acPowerMultiplier: {ID: 0x0604, type: DataType.UINT16, report: true, min: 1, default: 1}, + acPowerDivisor: {ID: 0x0605, type: DataType.UINT16, report: true, min: 1, default: 1}, + + dcOverloadAlarmsMask: {ID: 0x0700, type: DataType.BITMAP8, write: true, default: 0}, + dcVoltageOverload: {ID: 0x0701, type: DataType.INT16}, + dcCurrentOverload: {ID: 0x0702, type: DataType.INT16}, + + acAlarmsMask: {ID: 0x0800, type: DataType.BITMAP16, write: true, default: 0}, + acVoltageOverload: {ID: 0x0801, type: DataType.INT16}, + acCurrentOverload: {ID: 0x0802, type: DataType.INT16}, + acActivePowerOverload: {ID: 0x0803, type: DataType.INT16}, + acReactivePowerOverload: {ID: 0x0804, type: DataType.INT16}, + averageRmsOverVoltage: {ID: 0x0805, type: DataType.INT16}, + averageRmsUnderVoltage: {ID: 0x0806, type: DataType.INT16}, + rmsExtremeOverVoltage: {ID: 0x0807, type: DataType.INT16, write: true}, + rmsExtremeUnderVoltage: {ID: 0x0808, type: DataType.INT16, write: true}, + rmsVoltageSag: {ID: 0x0809, type: DataType.INT16, write: true}, + rmsVoltageSwell: {ID: 0x080a, type: DataType.INT16, write: true}, + + lineCurrentPhB: {ID: 0x0901, type: DataType.UINT16, report: true}, + activeCurrentPhB: {ID: 0x0902, type: DataType.INT16, report: true}, + reactiveCurrentPhB: {ID: 0x0903, type: DataType.INT16, report: true}, + rmsVoltagePhB: {ID: 0x0905, type: DataType.UINT16, report: true}, + rmsVoltageMinPhB: {ID: 0x0906, type: DataType.UINT16, default: 32768}, + rmsVoltageMaxPhB: {ID: 0x0907, type: DataType.UINT16, default: 32768}, + rmsCurrentPhB: {ID: 0x0908, type: DataType.UINT16, report: true}, + rmsCurrentMinPhB: {ID: 0x0909, type: DataType.UINT16}, + rmsCurrentMaxPhB: {ID: 0x090a, type: DataType.UINT16}, + activePowerPhB: {ID: 0x090b, type: DataType.INT16, report: true}, + activePowerMinPhB: {ID: 0x090c, type: DataType.INT16}, + activePowerMaxPhB: {ID: 0x090d, type: DataType.INT16}, + reactivePowerPhB: {ID: 0x090e, type: DataType.INT16, report: true}, + apparentPowerPhB: {ID: 0x090f, type: DataType.UINT16, report: true}, + powerFactorPhB: {ID: 0x0910, type: DataType.INT8, min: -100, max: 100, default: 0}, + averageRmsVoltageMeasurePeriodPhB: {ID: 0x0911, type: DataType.UINT16, write: true, default: 0}, + averageRmsOverVoltageCounterPhB: {ID: 0x0912, type: DataType.UINT16, write: true, default: 0}, + averageUnderVoltageCounterPhB: {ID: 0x0913, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeOverVoltagePeriodPhB: {ID: 0x0914, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeUnderVoltagePeriodPhB: {ID: 0x0915, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSagPeriodPhB: {ID: 0x0916, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSwellPeriodPhB: {ID: 0x0917, type: DataType.UINT16, write: true, default: 0}, + + lineCurrentPhC: {ID: 0x0a01, type: DataType.UINT16, report: true}, + activeCurrentPhC: {ID: 0x0a02, type: DataType.INT16, report: true}, + reactiveCurrentPhC: {ID: 0x0a03, type: DataType.INT16, report: true}, + rmsVoltagePhC: {ID: 0x0a05, type: DataType.UINT16, report: true}, + rmsVoltageMinPhC: {ID: 0x0a06, type: DataType.UINT16, default: 32768}, + rmsVoltageMaxPhC: {ID: 0x0a07, type: DataType.UINT16, default: 32768}, + rmsCurrentPhC: {ID: 0x0a08, type: DataType.UINT16, report: true}, + rmsCurrentMinPhC: {ID: 0x0a09, type: DataType.UINT16}, + rmsCurrentMaxPhC: {ID: 0x0a0a, type: DataType.UINT16}, + activePowerPhC: {ID: 0x0a0b, type: DataType.INT16, report: true}, + activePowerMinPhC: {ID: 0x0a0c, type: DataType.INT16}, + activePowerMaxPhC: {ID: 0x0a0d, type: DataType.INT16}, + reactivePowerPhC: {ID: 0x0a0e, type: DataType.INT16, report: true}, + apparentPowerPhC: {ID: 0x0a0f, type: DataType.UINT16, report: true}, + powerFactorPhC: {ID: 0x0a10, type: DataType.INT8, min: -100, max: 100, default: 0}, + averageRmsVoltageMeasPeriodPhC: {ID: 0x0a11, type: DataType.UINT16, write: true, default: 0}, + averageRmsOverVoltageCounterPhC: {ID: 0x0a12, type: DataType.UINT16, write: true, default: 0}, + averageUnderVoltageCounterPhC: {ID: 0x0a13, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeOverVoltagePeriodPhC: {ID: 0x0a14, type: DataType.UINT16, write: true, default: 0}, + rmsExtremeUnderVoltagePeriodPhC: {ID: 0x0a15, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSagPeriodPhC: {ID: 0x0a16, type: DataType.UINT16, write: true, default: 0}, + rmsVoltageSwellPeriodPhC: {ID: 0x0a17, type: DataType.UINT16, write: true, default: 0}, + // custom + schneiderActivePowerDemandTotal: { + ID: 0x4300, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderReactivePowerDemandTotal: { + ID: 0x4303, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderApparentPowerDemandTotal: { + ID: 0x4318, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderDemandIntervalDuration: { + ID: 0x4319, + type: DataType.UINT24, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffff, + }, + schneiderDemandDateTime: { + ID: 0x4320, + type: DataType.UTC, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffffff, + }, + schneiderActivePowerDemandPhase1: { + ID: 0x4509, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderReactivePowerDemandPhase1: { + ID: 0x450a, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderApparentPowerDemandPhase1: { + ID: 0x450b, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderDemandIntervalMinimalVoltageL1: { + ID: 0x4510, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderDemandIntervalMaximalCurrentI1: { + ID: 0x4513, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderActivePowerDemandPhase2: { + ID: 0x4909, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderReactivePowerDemandPhase2: { + ID: 0x490a, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderApparentPowerDemandPhase2: { + ID: 0x490b, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderDemandIntervalMinimalVoltageL2: { + ID: 0x4910, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderDemandIntervalMaximalCurrentI2: { + ID: 0x4913, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderActivePowerDemandPhase3: { + ID: 0x4a09, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderReactivePowerDemandPhase3: { + ID: 0x4a0a, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderApparentPowerDemandPhase3: { + ID: 0x4a0b, + type: DataType.INT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + min: -2147483648, + max: 2147483647, + }, + schneiderDemandIntervalMinimalVoltageL3: { + ID: 0x4a10, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderDemandIntervalMaximalCurrentI3: { + ID: 0x4a13, + type: DataType.UINT16, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffff, + }, + schneiderCurrentSensorMultiplier: { + ID: 0x4e00, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xff, + }, }, commands: { - getProfileInfo: { - ID: 0, - parameters: [], - }, + getProfileInfo: {ID: 0x00, parameters: []}, getMeasurementProfile: { - ID: 1, + ID: 0x01, parameters: [ - {name: "attrId", type: DataType.UINT16}, - {name: "starttime", type: DataType.UINT32}, + {name: "attrId", type: DataType.ATTR_ID}, + {name: "starttime", type: DataType.UTC}, {name: "numofuntervals", type: DataType.UINT8}, ], }, }, commandsResponse: { getProfileInfoRsp: { - ID: 0, + ID: 0x00, parameters: [ {name: "profilecount", type: DataType.UINT8}, - {name: "profileintervalperiod", type: DataType.UINT8}, + {name: "profileintervalperiod", type: DataType.ENUM8}, {name: "maxnumofintervals", type: DataType.UINT8}, + // TODO invalid, no `numofattrs` present? {name: "numofattrs", type: DataType.UINT8}, {name: "listofattr", type: BuffaloZclDataType.LIST_UINT16}, ], }, getMeasurementProfileRsp: { - ID: 1, + ID: 0x01, parameters: [ - {name: "starttime", type: DataType.UINT32}, - {name: "status", type: DataType.UINT8}, - {name: "profileintervalperiod", type: DataType.UINT8}, + {name: "starttime", type: DataType.UTC}, + {name: "status", type: DataType.ENUM8}, + {name: "profileintervalperiod", type: DataType.ENUM8}, {name: "numofintervalsdeliv", type: DataType.UINT8}, - {name: "attrId", type: DataType.UINT16}, - {name: "intervals", type: BuffaloZclDataType.LIST_UINT8}, + {name: "attrId", type: DataType.ATTR_ID}, + // content depends on the type of information requested using the `attrId` field in the `getMeasurementProfile` command + // invalid intervals should be marked as 0xffff + {name: "intervals", type: BuffaloZclDataType.BUFFER}, ], }, }, }, haDiagnostic: { - ID: 2821, - attributes: { - numberOfResets: {ID: 0, type: DataType.UINT16}, - persistentMemoryWrites: {ID: 1, type: DataType.UINT16}, - macRxBcast: {ID: 256, type: DataType.UINT32}, - macTxBcast: {ID: 257, type: DataType.UINT32}, - macRxUcast: {ID: 258, type: DataType.UINT32}, - macTxUcast: {ID: 259, type: DataType.UINT32}, - macTxUcastRetry: {ID: 260, type: DataType.UINT16}, - macTxUcastFail: {ID: 261, type: DataType.UINT16}, - aPSRxBcast: {ID: 262, type: DataType.UINT16}, - aPSTxBcast: {ID: 263, type: DataType.UINT16}, - aPSRxUcast: {ID: 264, type: DataType.UINT16}, - aPSTxUcastSuccess: {ID: 265, type: DataType.UINT16}, - aPSTxUcastRetry: {ID: 266, type: DataType.UINT16}, - aPSTxUcastFail: {ID: 267, type: DataType.UINT16}, - routeDiscInitiated: {ID: 268, type: DataType.UINT16}, - neighborAdded: {ID: 269, type: DataType.UINT16}, - neighborRemoved: {ID: 270, type: DataType.UINT16}, - neighborStale: {ID: 271, type: DataType.UINT16}, - joinIndication: {ID: 272, type: DataType.UINT16}, - childMoved: {ID: 273, type: DataType.UINT16}, - nwkFcFailure: {ID: 274, type: DataType.UINT16}, - apsFcFailure: {ID: 275, type: DataType.UINT16}, - apsUnauthorizedKey: {ID: 276, type: DataType.UINT16}, - nwkDecryptFailures: {ID: 277, type: DataType.UINT16}, - apsDecryptFailures: {ID: 278, type: DataType.UINT16}, - packetBufferAllocateFailures: {ID: 279, type: DataType.UINT16}, - relayedUcast: {ID: 280, type: DataType.UINT16}, - phyToMacQueueLimitReached: {ID: 281, type: DataType.UINT16}, - packetValidateDropCount: {ID: 282, type: DataType.UINT16}, - averageMacRetryPerApsMessageSent: {ID: 283, type: DataType.UINT16}, - lastMessageLqi: {ID: 284, type: DataType.UINT8}, - lastMessageRssi: {ID: 285, type: DataType.INT8}, - danfossSystemStatusCode: {ID: 0x4000, type: DataType.BITMAP16, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossHeatSupplyRequest: {ID: 0x4031, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossSystemStatusWater: {ID: 0x4200, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossMultimasterRole: {ID: 0x4201, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossIconApplication: {ID: 0x4210, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - danfossIconForcedHeatingCooling: {ID: 0x4220, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S}, - schneiderMeterStatus: {ID: 0xff01, type: DataType.UINT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderDiagnosticRegister1: {ID: 0xff02, type: DataType.UINT32, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, - schneiderCommunicationQuality: {ID: 0x4000, type: DataType.UINT8, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC}, + ID: 0x0b05, + attributes: { + numberOfResets: {ID: 0x0000, type: DataType.UINT16, max: 0xffff, default: 0}, + persistentMemoryWrites: {ID: 0x0001, type: DataType.UINT16, max: 0xffff, default: 0}, + macRxBcast: {ID: 0x0100, type: DataType.UINT32, max: 0xffffffff, default: 0}, + macTxBcast: {ID: 0x0101, type: DataType.UINT32, max: 0xffffffff, default: 0}, + macRxUcast: {ID: 0x0102, type: DataType.UINT32, max: 0xffffffff, default: 0}, + macTxUcast: {ID: 0x0103, type: DataType.UINT32, max: 0xffffffff, default: 0}, + macTxUcastRetry: {ID: 0x0104, type: DataType.UINT16, max: 0xffff, default: 0}, + macTxUcastFail: {ID: 0x0105, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSRxBcast: {ID: 0x0106, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSTxBcast: {ID: 0x0107, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSRxUcast: {ID: 0x0108, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSTxUcastSuccess: {ID: 0x0109, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSTxUcastRetry: {ID: 0x010a, type: DataType.UINT16, max: 0xffff, default: 0}, + aPSTxUcastFail: {ID: 0x010b, type: DataType.UINT16, max: 0xffff, default: 0}, + routeDiscInitiated: {ID: 0x010c, type: DataType.UINT16, max: 0xffff, default: 0}, + neighborAdded: {ID: 0x010d, type: DataType.UINT16, max: 0xffff, default: 0}, + neighborRemoved: {ID: 0x010e, type: DataType.UINT16, max: 0xffff, default: 0}, + neighborStale: {ID: 0x010f, type: DataType.UINT16, max: 0xffff, default: 0}, + joinIndication: {ID: 0x0110, type: DataType.UINT16, max: 0xffff, default: 0}, + childMoved: {ID: 0x0111, type: DataType.UINT16, max: 0xffff, default: 0}, + nwkFcFailure: {ID: 0x0112, type: DataType.UINT16, max: 0xffff, default: 0}, + apsFcFailure: {ID: 0x0113, type: DataType.UINT16, max: 0xffff, default: 0}, + apsUnauthorizedKey: {ID: 0x0114, type: DataType.UINT16, max: 0xffff, default: 0}, + nwkDecryptFailures: {ID: 0x0115, type: DataType.UINT16, max: 0xffff, default: 0}, + apsDecryptFailures: {ID: 0x0116, type: DataType.UINT16, max: 0xffff, default: 0}, + packetBufferAllocateFailures: {ID: 0x0117, type: DataType.UINT16, max: 0xffff, default: 0}, + relayedUcast: {ID: 0x0118, type: DataType.UINT16, max: 0xffff, default: 0}, + phyToMacQueueLimitReached: {ID: 0x0119, type: DataType.UINT16, max: 0xffff, default: 0}, + packetValidateDropCount: {ID: 0x011a, type: DataType.UINT16, max: 0xffff, default: 0}, + averageMacRetryPerApsMessageSent: {ID: 0x011b, type: DataType.UINT16, max: 0xffff, default: 0}, + lastMessageLqi: {ID: 0x011c, type: DataType.UINT8, max: 0xff, default: 0}, + lastMessageRssi: {ID: 0x011d, type: DataType.INT8, min: -127, max: 127, default: 0}, + // custom + danfossSystemStatusCode: {ID: 0x4000, type: DataType.BITMAP16, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true}, + schneiderCommunicationQuality: { + ID: 0x4000, + type: DataType.UINT8, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xff, + }, + danfossHeatSupplyRequest: {ID: 0x4031, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossSystemStatusWater: {ID: 0x4200, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossMultimasterRole: {ID: 0x4201, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossIconApplication: {ID: 0x4210, type: DataType.ENUM8, manufacturerCode: ManufacturerCode.DANFOSS_A_S, write: true, max: 0xff}, + danfossIconForcedHeatingCooling: { + ID: 0x4220, + type: DataType.ENUM8, + manufacturerCode: ManufacturerCode.DANFOSS_A_S, + write: true, + max: 0xff, + }, + schneiderMeterStatus: { + ID: 0xff01, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffffff, + }, + schneiderDiagnosticRegister1: { + ID: 0xff02, + type: DataType.UINT32, + manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, + write: true, + max: 0xffffffff, + }, }, commands: {}, commandsResponse: {}, }, touchlink: { - ID: 4096, + ID: 0x1000, attributes: {}, commands: { scanRequest: { ID: 0x00, response: 0x01, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "zigbeeInformation", type: DataType.BITMAP8}, {name: "touchlinkInformation", type: DataType.BITMAP8}, ], + required: true, }, deviceInformation: { ID: 0x02, response: 0x03, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "startIndex", type: DataType.UINT8}, ], + required: true, }, identifyRequest: { ID: 0x06, parameters: [ - {name: "transactionID", type: DataType.UINT32}, - {name: "duration", type: DataType.UINT16}, + {name: "transactionID", type: DataType.UINT32, min: 1}, + { + name: "duration", + type: DataType.UINT16, + max: 0xffff, + special: [ + ["ExitIdentifyMode", "0000"], + ["IdentifyForReceiverKnownTime", "ffff"], + ], + }, ], + required: true, }, - resetToFactoryNew: { - ID: 0x07, - parameters: [{name: "transactionID", type: DataType.UINT32}], - }, + resetToFactoryNew: {ID: 0x07, parameters: [{name: "transactionID", type: DataType.UINT32, min: 1}], required: true}, networkStart: { ID: 0x10, response: 0x11, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "extendedPANID", type: DataType.IEEE_ADDR}, - {name: "keyIndex", type: DataType.UINT8}, + {name: "keyIndex", type: DataType.UINT8, max: 0x0f}, {name: "encryptedNetworkKey", type: DataType.SEC_KEY}, {name: "logicalChannel", type: DataType.UINT8}, - {name: "panID", type: DataType.UINT16}, - {name: "nwkAddr", type: DataType.UINT16}, + {name: "panID", type: DataType.UINT16, max: 0xfffe}, + {name: "nwkAddr", type: DataType.UINT16, min: 0x0001, max: 0xfff7}, {name: "groupIDsBegin", type: DataType.UINT16}, {name: "groupIDsEnd", type: DataType.UINT16}, {name: "freeNwkAddrRangeBegin", type: DataType.UINT16}, @@ -4635,19 +6858,20 @@ export const Clusters: Readonly> {name: "initiatorIEEE", type: DataType.IEEE_ADDR}, {name: "initiatorNwkAddr", type: DataType.UINT16}, ], + required: true, }, networkJoinRouter: { ID: 0x12, response: 0x13, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "extendedPANID", type: DataType.IEEE_ADDR}, - {name: "keyIndex", type: DataType.UINT8}, + {name: "keyIndex", type: DataType.UINT8, max: 0x0f}, {name: "encryptedNetworkKey", type: DataType.SEC_KEY}, {name: "networkUpdateID", type: DataType.UINT8}, {name: "logicalChannel", type: DataType.UINT8}, - {name: "panID", type: DataType.UINT16}, - {name: "nwkAddr", type: DataType.UINT16}, + {name: "panID", type: DataType.UINT16, min: 0x0001, max: 0xfffe}, + {name: "nwkAddr", type: DataType.UINT16, min: 0x0001, max: 0xfff7}, {name: "groupIDsBegin", type: DataType.UINT16}, {name: "groupIDsEnd", type: DataType.UINT16}, {name: "freeNwkAddrRangeBegin", type: DataType.UINT16}, @@ -4655,19 +6879,20 @@ export const Clusters: Readonly> {name: "freeGroupIDRangeBegin", type: DataType.UINT16}, {name: "freeGroupIDRangeEnd", type: DataType.UINT16}, ], + required: true, }, networkJoinEndDevice: { ID: 0x14, response: 0x15, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "extendedPANID", type: DataType.IEEE_ADDR}, - {name: "keyIndex", type: DataType.UINT8}, + {name: "keyIndex", type: DataType.UINT8, max: 0x0f}, {name: "encryptedNetworkKey", type: DataType.SEC_KEY}, {name: "networkUpdateID", type: DataType.UINT8}, {name: "logicalChannel", type: DataType.UINT8}, - {name: "panID", type: DataType.UINT16}, - {name: "nwkAddr", type: DataType.UINT16}, + {name: "panID", type: DataType.UINT16, min: 0x0001, max: 0xfffe}, + {name: "nwkAddr", type: DataType.UINT16, min: 0x0001, max: 0xfff7}, {name: "groupIDsBegin", type: DataType.UINT16}, {name: "groupIDsEnd", type: DataType.UINT16}, {name: "freeNwkAddrRangeBegin", type: DataType.UINT16}, @@ -4675,44 +6900,38 @@ export const Clusters: Readonly> {name: "freeGroupIDRangeBegin", type: DataType.UINT16}, {name: "freeGroupIDRangeEnd", type: DataType.UINT16}, ], + required: true, }, networkUpdate: { ID: 0x16, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "extendedPANID", type: DataType.IEEE_ADDR}, {name: "networkUpdateID", type: DataType.UINT8}, {name: "logicalChannel", type: DataType.UINT8}, - {name: "panID", type: DataType.UINT16}, - {name: "nwkAddr", type: DataType.UINT16}, + {name: "panID", type: DataType.UINT16, min: 0x0001, max: 0xfffe}, + {name: "nwkAddr", type: DataType.UINT16, min: 0x0001, max: 0xfff7}, ], + required: true, }, - getGroupIdentifiers: { - ID: 0x41, - response: 0x41, - parameters: [{name: "startIndex", type: DataType.UINT8}], - }, - getEndpointList: { - ID: 0x42, - response: 0x42, - parameters: [{name: "startIndex", type: DataType.UINT8}], - }, + getGroupIdentifiers: {ID: 0x41, response: 0x41, parameters: [{name: "startIndex", type: DataType.UINT8}]}, + getEndpointList: {ID: 0x42, response: 0x42, parameters: [{name: "startIndex", type: DataType.UINT8}]}, }, commandsResponse: { scanResponse: { ID: 0x01, parameters: [ - {name: "transactionID", type: DataType.UINT32}, - {name: "rssiCorrection", type: DataType.UINT8}, - {name: "zigbeeInformation", type: DataType.UINT8}, - {name: "touchlinkInformation", type: DataType.UINT8}, - {name: "keyBitmask", type: DataType.UINT16}, + {name: "transactionID", type: DataType.UINT32, min: 1}, + {name: "rssiCorrection", type: DataType.UINT8, min: 0, max: 20}, + {name: "zigbeeInformation", type: DataType.BITMAP8}, + {name: "touchlinkInformation", type: DataType.BITMAP8}, + {name: "keyBitmask", type: DataType.BITMAP16}, {name: "responseID", type: DataType.UINT32}, {name: "extendedPanID", type: DataType.IEEE_ADDR}, {name: "networkUpdateID", type: DataType.UINT8}, {name: "logicalChannel", type: DataType.UINT8}, {name: "panID", type: DataType.UINT16}, - {name: "networkAddress", type: DataType.UINT16}, + {name: "networkAddress", type: DataType.UINT16, min: 0x0001, max: 0xfff7}, {name: "numberOfSubDevices", type: DataType.UINT8}, {name: "totalGroupIdentifiers", type: DataType.UINT8}, { @@ -4741,66 +6960,57 @@ export const Clusters: Readonly> conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1}], }, ], + required: true, }, deviceInformation: { ID: 0x03, parameters: [ - {name: "transactionID", type: DataType.UINT32}, + {name: "transactionID", type: DataType.UINT32, min: 1}, {name: "numberOfSubDevices", type: DataType.UINT8}, {name: "startIndex", type: DataType.UINT8}, - {name: "deviceInfoCount", type: DataType.UINT8}, - /** - * TODO: (this * deviceInfoCount) - * {name: 'ieeeAddress', type: DataType.IEEE_ADDR}, - * {name: 'endpointID', type: DataType.UINT8}, - * {name: 'profileID', type: DataType.UINT16}, - * {name: 'deviceID', type: DataType.UINT16}, - * {name: 'version', type: DataType.UINT8}, - * {name: 'groupIdCount', type: DataType.UINT8}, - * {name: 'sort', type: DataType.UINT8}, - */ - // {name: 'deviceInfoRecord', type: TODO}, - ], + {name: "deviceInfoCount", type: DataType.UINT8, max: 5}, + // TODO: need BuffaloZcl read/write + // {name: "deviceInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_DEVICE_INFO}, + // {name: "ieeeAddress", type: DataType.IEEE_ADDR}, + // {name: "endpointID", type: DataType.UINT8}, + // {name: "profileID", type: DataType.UINT16}, + // {name: "deviceID", type: DataType.UINT16}, + // {name: "version", type: DataType.UINT8}, + // {name: "groupIdCount", type: DataType.UINT8}, + // {name: "sort", type: DataType.UINT8}, + ], + required: true, }, networkStart: { ID: 0x11, parameters: [ - {name: "transactionID", type: DataType.UINT32}, - /** - * - 0x00 Success - * - 0x01 Failure - * - 0x02 – 0xff Reserved - */ - {name: "status", type: DataType.ENUM8}, + {name: "transactionID", type: DataType.UINT32, min: 1}, + /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */ + {name: "status", type: DataType.UINT8}, {name: "extendedPANID", type: DataType.IEEE_ADDR}, {name: "networkUpdateID", type: DataType.UINT8}, {name: "logicalChannel", type: DataType.UINT8}, {name: "panID", type: DataType.UINT16}, ], + required: true, }, networkJoinRouter: { ID: 0x13, parameters: [ - {name: "transactionID", type: DataType.UINT32}, - /** - * - 0x00 Success - * - 0x01 Failure - * - 0x02 – 0xff Reserved - */ - {name: "status", type: DataType.ENUM8}, + {name: "transactionID", type: DataType.UINT32, min: 1}, + /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */ + {name: "status", type: DataType.UINT8}, ], + required: true, }, networkJoinEndDevice: { ID: 0x15, parameters: [ - {name: "transactionID", type: DataType.UINT32}, - /** - * - 0x00 Success - * - 0x01 Failure - * - 0x02 – 0xff Reserved - */ - {name: "status", type: DataType.ENUM8}, + {name: "transactionID", type: DataType.UINT32, min: 1}, + /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */ + {name: "status", type: DataType.UINT8}, ], + required: true, }, endpointInformation: { ID: 0x40, @@ -4819,13 +7029,12 @@ export const Clusters: Readonly> {name: "total", type: DataType.UINT8}, {name: "startIndex", type: DataType.UINT8}, {name: "count", type: DataType.UINT8}, - /** - * TODO: (this * count) - * {name: 'groupID', type: DataType.UINT16}, - * {name: 'groupType', type: DataType.UINT8}, - */ - // {name: 'groupInfoList', type: TODO}, + // TODO: need BuffaloZcl read/write + // {name: "groupInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_GROUP_INFO}, + // {name: "id", type: DataType.UINT16}, + // {name: "type", type: DataType.UINT8}, ], + // required: true only if request supported }, getEndpointList: { ID: 0x42, @@ -4833,67 +7042,54 @@ export const Clusters: Readonly> {name: "total", type: DataType.UINT8}, {name: "startIndex", type: DataType.UINT8}, {name: "count", type: DataType.UINT8}, - /** - * TODO: (this * count) - * {name: 'networkAddress', type: DataType.UINT16}, - * {name: 'endpointID', type: DataType.UINT8}, - * {name: 'profileID', type: DataType.UINT16}, - * {name: 'deviceID', type: DataType.UINT16}, - * {name: 'version', type: DataType.UINT8}, - */ - // {name: 'endpointInfoList', type: TODO}, + // TODO: need BuffaloZcl read/write + // {name: "endpointInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_ENDPOINT_INFO}, + // {name: "networkAddress", type: DataType.UINT16}, + // {name: "endpointID", type: DataType.UINT8}, + // {name: "profileID", type: DataType.UINT16}, + // {name: "deviceID", type: DataType.UINT16}, + // {name: "version", type: DataType.UINT8}, ], + // required: true only if request supported }, }, }, manuSpecificClusterAduroSmart: { - ID: 64716, + ID: 0xfccc, attributes: {}, commands: { - cmd0: { - ID: 0, - parameters: [], - }, + cmd0: {ID: 0x00, parameters: []}, }, commandsResponse: {}, }, manuSpecificOsram: { - ID: 64527, + ID: 0xfc0f, attributes: {}, commands: { - saveStartupParams: { - ID: 1, - parameters: [], - }, - resetStartupParams: { - ID: 2, - parameters: [], - }, + saveStartupParams: {ID: 0x01, parameters: []}, + resetStartupParams: {ID: 0x02, parameters: []}, }, commandsResponse: { - saveStartupParamsRsp: { - ID: 0, - parameters: [], - }, + saveStartupParamsRsp: {ID: 0x00, parameters: []}, }, }, manuSpecificPhilips: { ID: 0xfc00, manufacturerCode: ManufacturerCode.SIGNIFY_NETHERLANDS_B_V, attributes: { - config: {ID: 49, type: DataType.BITMAP16}, + config: {ID: 0x0031, type: DataType.BITMAP16, write: true}, }, commands: {}, commandsResponse: { hueNotification: { - ID: 0, + ID: 0x00, parameters: [ - {name: "button", type: DataType.UINT8}, - {name: "unknown1", type: DataType.UINT24}, - {name: "type", type: DataType.UINT8}, - {name: "unknown2", type: DataType.UINT8}, - {name: "time", type: DataType.UINT8}, - {name: "unknown3", type: DataType.UINT8}, + {name: "button", type: DataType.UINT8, max: 0xff}, + {name: "unknown1", type: DataType.UINT24, max: 0xffffff}, + {name: "type", type: DataType.UINT8, max: 0xff}, + {name: "unknown2", type: DataType.UINT8, max: 0xff}, + {name: "time", type: DataType.UINT8, max: 0xff}, + {name: "unknown3", type: DataType.UINT8, max: 0xff}, ], }, }, @@ -4902,69 +7098,66 @@ export const Clusters: Readonly> ID: 0xfc03, manufacturerCode: ManufacturerCode.SIGNIFY_NETHERLANDS_B_V, attributes: { - state: {ID: 0x0002, type: DataType.OCTET_STR}, + state: {ID: 0x0002, type: DataType.OCTET_STR, write: true}, }, commands: { - multiColor: { - ID: 0, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, + multiColor: {ID: 0x00, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, }, commandsResponse: {}, }, manuSpecificSinope: { - ID: 65281, + ID: 0xff01, manufacturerCode: ManufacturerCode.SINOPE_TECHNOLOGIES, attributes: { // attribute ID :1's readable - keypadLockout: {ID: 2, type: DataType.ENUM8}, - // 'firmware number': {ID: 3, type: DataType.UNKNOWN}, - firmwareVersion: {ID: 4, type: DataType.CHAR_STR}, - outdoorTempToDisplay: {ID: 16, type: DataType.INT16}, - outdoorTempToDisplayTimeout: {ID: 17, type: DataType.UINT16}, - secondScreenBehavior: {ID: 18, type: DataType.ENUM8}, // auto:0,setpoint:1,outside:2 - currentTimeToDisplay: {ID: 32, type: DataType.UINT32}, - ledIntensityOn: {ID: 82, type: DataType.UINT8}, - ledIntensityOff: {ID: 83, type: DataType.UINT8}, - ledColorOn: {ID: 80, type: DataType.UINT24}, // inversed hex BBGGRR - ledColorOff: {ID: 81, type: DataType.UINT24}, - onLedIntensity: {ID: 82, type: DataType.UINT8}, // percent - offLedIntensity: {ID: 83, type: DataType.UINT8}, // percent - actionReport: {ID: 84, type: DataType.ENUM8}, // singleTapUp: 1,2, doubleTapUp: 1,4, singleTapDown: 17,18, doubleTapDown: 17,20 - minimumBrightness: {ID: 85, type: DataType.UINT16}, - connectedLoadRM: {ID: 96, type: DataType.UINT16}, // unit watt/hr for Calypso RM3500 & Load Controller RM3250 - currentLoad: {ID: 112, type: DataType.BITMAP8}, // related to ecoMode(s) - ecoMode: {ID: 113, type: DataType.INT8}, // default:-128||-100-0-100% - ecoMode1: {ID: 114, type: DataType.UINT8}, // default:255||0-99 - ecoMode2: {ID: 115, type: DataType.UINT8}, // default 255||0-100 - unknown: {ID: 117, type: DataType.BITMAP32}, // RW *testing* - drConfigWaterTempMin: {ID: 118, type: DataType.UINT8}, // value 45 or 0 - drConfigWaterTempTime: {ID: 119, type: DataType.UINT8}, // default 2 - drWTTimeOn: {ID: 120, type: DataType.UINT16}, - unknown1: {ID: 128, type: DataType.UINT32}, // readOnly stringNumber *testing* - dimmerTimmer: {ID: 160, type: DataType.UINT32}, - unknown2: {ID: 256, type: DataType.UINT8}, // readOnly *testing* - floorControlMode: {ID: 261, type: DataType.ENUM8}, // airFloorMode - auxOutputMode: {ID: 262, type: DataType.ENUM8}, - floorTemperature: {ID: 263, type: DataType.INT16}, - ambiantMaxHeatSetpointLimit: {ID: 264, type: DataType.INT16}, - floorMinHeatSetpointLimit: {ID: 265, type: DataType.INT16}, - floorMaxHeatSetpointLimit: {ID: 266, type: DataType.INT16}, - temperatureSensor: {ID: 267, type: DataType.ENUM8}, - floorLimitStatus: {ID: 268, type: DataType.ENUM8}, - roomTemperature: {ID: 269, type: DataType.INT16}, - timeFormatToDisplay: {ID: 276, type: DataType.ENUM8}, - GFCiStatus: {ID: 277, type: DataType.ENUM8}, - auxConnectedLoad: {ID: 280, type: DataType.UINT16}, - connectedLoad: {ID: 281, type: DataType.UINT16}, - pumpProtection: {ID: 296, type: DataType.UINT8}, - unknown3: {ID: 298, type: DataType.ENUM8}, // RW default:60||5,10,15,20,30,60 *testing* - currentSetpoint: {ID: 299, type: DataType.INT16}, // W:to ocuppiedHeatSetpoint, R:depends of SinopeOccupancy + keypadLockout: {ID: 0x0002, type: DataType.ENUM8, write: true, max: 0xff}, + // 'firmware number': {ID: 3, type: DataType.UNKNOWN}, write: true, + firmwareVersion: {ID: 0x0004, type: DataType.CHAR_STR, write: true}, + outdoorTempToDisplay: {ID: 0x0010, type: DataType.INT16, write: true, max: 0xffff}, + outdoorTempToDisplayTimeout: {ID: 0x0011, type: DataType.UINT16, write: true, max: 0xffff}, + secondScreenBehavior: {ID: 0x0012, type: DataType.ENUM8, write: true, max: 0xff}, // auto:0,setpoint:1,outside:2 + currentTimeToDisplay: {ID: 0x0020, type: DataType.UINT32, write: true, max: 0xffffffff}, + ledIntensityOn: {ID: 0x0052, type: DataType.UINT8, write: true, max: 0xff}, + ledIntensityOff: {ID: 0x0053, type: DataType.UINT8, write: true, max: 0xff}, + ledColorOn: {ID: 0x0050, type: DataType.UINT24, write: true, max: 0xffffff}, // inversed hex BBGGRR + ledColorOff: {ID: 0x0051, type: DataType.UINT24, write: true, max: 0xffffff}, + onLedIntensity: {ID: 0x0052, type: DataType.UINT8, write: true, max: 0xff}, // percent + offLedIntensity: {ID: 0x0053, type: DataType.UINT8, write: true, max: 0xff}, // percent + actionReport: {ID: 0x0054, type: DataType.ENUM8, write: true, max: 0xff}, // singleTapUp: 1,2, doubleTapUp: 1,4, singleTapDown: 17,18, doubleTapDown: 17,20 + minimumBrightness: {ID: 0x0055, type: DataType.UINT16, write: true, max: 0xffff}, + connectedLoadRM: {ID: 0x0060, type: DataType.UINT16, write: true, max: 0xffff}, // unit watt/hr for Calypso RM3500 & Load Controller RM3250 + currentLoad: {ID: 0x0070, type: DataType.BITMAP8, write: true}, // related to ecoMode(s) + ecoMode: {ID: 0x0071, type: DataType.INT8, write: true, min: -128, max: 127, default: -128}, // -100-0-100% + ecoMode1: {ID: 0x0072, type: DataType.UINT8, write: true, max: 0xff, default: 0xff}, // 0-99 + ecoMode2: {ID: 0x0073, type: DataType.UINT8, write: true, max: 0xff, default: 0xff}, // 0-100 + unknown: {ID: 0x0075, type: DataType.BITMAP32, write: true, max: 0xffffffff}, // RW *testing* + drConfigWaterTempMin: {ID: 0x0076, type: DataType.UINT8, write: true, max: 0xff}, // value 45 or 0 + drConfigWaterTempTime: {ID: 0x0077, type: DataType.UINT8, write: true, max: 0xff, default: 2}, // default 2 + drWTTimeOn: {ID: 0x0078, type: DataType.UINT16, write: true, max: 0xffff}, + unknown1: {ID: 0x0080, type: DataType.UINT32, max: 0xffffffff}, // readOnly stringNumber *testing* + dimmerTimmer: {ID: 0x00a0, type: DataType.UINT32, write: true, max: 0xffffffff}, + unknown2: {ID: 0x0100, type: DataType.UINT8, max: 0xff}, // readOnly *testing* + floorControlMode: {ID: 0x0105, type: DataType.ENUM8, write: true, max: 0xff}, // airFloorMode + auxOutputMode: {ID: 0x0106, type: DataType.ENUM8, write: true, max: 0xff}, + floorTemperature: {ID: 0x0107, type: DataType.INT16, write: true, max: 0xffff}, + ambiantMaxHeatSetpointLimit: {ID: 0x0108, type: DataType.INT16, write: true, max: 0xffff}, + floorMinHeatSetpointLimit: {ID: 0x0109, type: DataType.INT16, write: true, max: 0xffff}, + floorMaxHeatSetpointLimit: {ID: 0x010a, type: DataType.INT16, write: true, max: 0xffff}, + temperatureSensor: {ID: 0x010b, type: DataType.ENUM8, write: true, max: 0xff}, + floorLimitStatus: {ID: 0x010c, type: DataType.ENUM8, write: true, max: 0xff}, + roomTemperature: {ID: 0x010d, type: DataType.INT16, write: true, max: 0xffff}, + timeFormatToDisplay: {ID: 0x0114, type: DataType.ENUM8, write: true, max: 0xff}, + GFCiStatus: {ID: 0x0115, type: DataType.ENUM8, write: true, max: 0xff}, + auxConnectedLoad: {ID: 0x0118, type: DataType.UINT16, write: true, max: 0xff}, + connectedLoad: {ID: 0x0119, type: DataType.UINT16, write: true, max: 0xffff}, + pumpProtection: {ID: 0x0128, type: DataType.UINT8, write: true, max: 0xff}, + unknown3: {ID: 0x012a, type: DataType.ENUM8, write: true, max: 0xff, default: 60}, // RW 5,10,15,20,30,60 *testing* + currentSetpoint: {ID: 0x012b, type: DataType.INT16, write: true, max: 0xffff}, // W:to ocuppiedHeatSetpoint, R:depends of SinopeOccupancy // attribute ID: 300's readable, returns a buffer - reportLocalTemperature: {ID: 301, type: DataType.INT16}, + reportLocalTemperature: {ID: 0x012d, type: DataType.INT16, write: true, min: -32768, max: 32767}, // attribute ID: 512's readable - flowMeterConfig: {ID: 576, type: DataType.ARRAY}, - coldLoadPickupStatus: {ID: 643, type: DataType.UINT8}, + flowMeterConfig: {ID: 0x0240, type: DataType.ARRAY, write: true}, + coldLoadPickupStatus: {ID: 0x0283, type: DataType.UINT8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -4983,10 +7176,7 @@ export const Clusters: Readonly> manufacturerCode: ManufacturerCode.LEGRAND_GROUP, attributes: {}, commands: { - command0: { - ID: 0, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, + command0: {ID: 0x00, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, }, commandsResponse: {}, }, @@ -4995,17 +7185,14 @@ export const Clusters: Readonly> manufacturerCode: ManufacturerCode.LEGRAND_GROUP, attributes: {}, commands: { - command0: { - ID: 0, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, + command0: {ID: 0x00, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, }, commandsResponse: {}, }, wiserDeviceInfo: { ID: 0xfe03, // 65027 attributes: { - deviceInfo: {ID: 32, type: DataType.CHAR_STR}, + deviceInfo: {ID: 0x0020, type: DataType.CHAR_STR, write: true}, }, commands: {}, commandsResponse: {}, @@ -5028,9 +7215,9 @@ export const Clusters: Readonly> * Gateway-side data request */ dataRequest: { - ID: 0, + ID: 0x00, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, @@ -5038,18 +7225,11 @@ export const Clusters: Readonly> * GW send, trigger MCU side to report all current information, no zcl payload. * Note: Device side can make a policy, data better not to report centrally */ - dataQuery: { - ID: 3, - parameters: [], - }, + dataQuery: {ID: 0x03, parameters: []}, /** * Gw->Zigbee gateway query MCU version */ - mcuVersionRequest: { - ID: 0x10, - parameters: [{name: "seq", type: DataType.UINT16}], - }, - + mcuVersionRequest: {ID: 0x10, parameters: [{name: "seq", type: DataType.UINT16, max: 0xffff}]}, /** * FIXME: This command is not listed in Tuya zigbee cluster description, * but there is some command 0x04 (description is: Command Issuance) @@ -5057,87 +7237,79 @@ export const Clusters: Readonly> * So, need to investigate more information about it */ sendData: { - ID: 4, + ID: 0x04, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, - /** * Gw->Zigbee gateway notifies MCU of upgrade */ mcuOtaNotify: { ID: 0x12, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, // FIXME: key is fixed (8 byte) uint8 array // Ask Koen is there any type to read fixed size uint_8t. // currently there is `length` property in options but sems it is // ignored in `writePayloadCluster()` and other methods. // So, as workaround we use hi/low for key, which is not best solution - {name: "key_hi", type: DataType.UINT32}, - {name: "key_lo", type: DataType.UINT32}, - {name: "version", type: DataType.UINT8}, - {name: "imageSize", type: DataType.UINT32}, - {name: "crc", type: DataType.UINT32}, + {name: "key_hi", type: DataType.UINT32, max: 0xffffffff}, + {name: "key_lo", type: DataType.UINT32, max: 0xffffffff}, + {name: "version", type: DataType.UINT8, max: 0xff}, + {name: "imageSize", type: DataType.UINT32, max: 0xffffffff}, + {name: "crc", type: DataType.UINT32, max: 0xffffffff}, ], }, - /** * Gw->Zigbee gateway returns the requested upgrade package for MCU */ mcuOtaBlockDataResponse: { ID: 0x14, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "status", type: DataType.UINT8}, - {name: "key_hi", type: DataType.UINT32}, - {name: "key_lo", type: DataType.UINT32}, - {name: "version", type: DataType.UINT8}, - {name: "offset", type: DataType.UINT32}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "status", type: DataType.UINT8, max: 0xff}, + {name: "key_hi", type: DataType.UINT32, max: 0xffffffff}, + {name: "key_lo", type: DataType.UINT32, max: 0xffffffff}, + {name: "version", type: DataType.UINT8, max: 0xff}, + {name: "offset", type: DataType.UINT32, max: 0xffffffff}, {name: "imageData", type: BuffaloZclDataType.LIST_UINT8}, ], }, - /** * Time synchronization (bidirectional) */ mcuSyncTime: { ID: 0x24, parameters: [ - {name: "payloadSize", type: DataType.UINT16}, + {name: "payloadSize", type: DataType.UINT16, max: 0xffff}, {name: "payload", type: BuffaloZclDataType.LIST_UINT8}, ], }, - /** * Gateway connection status (bidirectional) */ mcuGatewayConnectionStatus: { ID: 0x25, parameters: [ - {name: "payloadSize", type: DataType.UINT16}, - {name: "payload", type: DataType.UINT8}, + {name: "payloadSize", type: DataType.UINT16, max: 0xffff}, + {name: "payload", type: DataType.UINT8, max: 0xff}, ], }, - /** * Weather forecast synchronization (check requestWeatherInformation) */ - tuyaWeatherSync: { - ID: 0x61, - parameters: [{name: "payload", type: BuffaloZclDataType.BUFFER}], - }, + tuyaWeatherSync: {ID: 0x61, parameters: [{name: "payload", type: BuffaloZclDataType.BUFFER}]}, }, commandsResponse: { /** * Reply to MCU-side data request */ dataResponse: { - ID: 1, + ID: 0x01, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, @@ -5145,9 +7317,9 @@ export const Clusters: Readonly> * MCU-side data active upload (bidirectional) */ dataReport: { - ID: 2, + ID: 0x02, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, @@ -5158,9 +7330,9 @@ export const Clusters: Readonly> * So, need to investigate more information about it */ activeStatusReportAlt: { - ID: 5, + ID: 0x05, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, @@ -5171,9 +7343,9 @@ export const Clusters: Readonly> * So, need to investigate more information about it */ activeStatusReport: { - ID: 6, + ID: 0x06, parameters: [ - {name: "seq", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, {name: "dpValues", type: BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES}, ], }, @@ -5183,56 +7355,45 @@ export const Clusters: Readonly> mcuVersionResponse: { ID: 0x11, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "version", type: DataType.UINT8}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "version", type: DataType.UINT8, max: 0xff}, ], }, - /** * Zigbee->Gw requests an upgrade package for the MCU */ mcuOtaBlockDataRequest: { ID: 0x13, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "key_hi", type: DataType.UINT32}, - {name: "key_lo", type: DataType.UINT32}, - {name: "version", type: DataType.UINT8}, - {name: "offset", type: DataType.UINT32}, - {name: "size", type: DataType.UINT32}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "key_hi", type: DataType.UINT32, max: 0xffffffff}, + {name: "key_lo", type: DataType.UINT32, max: 0xffffffff}, + {name: "version", type: DataType.UINT8, max: 0xff}, + {name: "offset", type: DataType.UINT32, max: 0xffffffff}, + {name: "size", type: DataType.UINT32, max: 0xffffffff}, ], }, - /** * Zigbee->Gw returns the upgrade result for the mcu */ mcuOtaResult: { ID: 0x15, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "status", type: DataType.UINT8}, - {name: "key_hi", type: DataType.UINT32}, - {name: "key_lo", type: DataType.UINT32}, - {name: "version", type: DataType.UINT8}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "status", type: DataType.UINT8, max: 0xff}, + {name: "key_hi", type: DataType.UINT32, max: 0xffffffff}, + {name: "key_lo", type: DataType.UINT32, max: 0xffffffff}, + {name: "version", type: DataType.UINT8, max: 0xff}, ], }, - /** * Time synchronization (bidirectional) */ - mcuSyncTime: { - ID: 0x24, - parameters: [{name: "payloadSize", type: DataType.UINT16}], - }, - + mcuSyncTime: {ID: 0x24, parameters: [{name: "payloadSize", type: DataType.UINT16, max: 0xffff}]}, /** * Gateway connection status (bidirectional) */ - mcuGatewayConnectionStatus: { - ID: 0x25, - parameters: [{name: "payloadSize", type: DataType.UINT16}], - }, - + mcuGatewayConnectionStatus: {ID: 0x25, parameters: [{name: "payloadSize", type: DataType.UINT16, max: 0xffff}]}, /** * Device can request weather forecast information and expects response respecting given parameters. * This command ID seem to be device speciffic, because there is simmilar structure documented in Tuya Serial Communication Protocol, @@ -5240,23 +7401,20 @@ export const Clusters: Readonly> * docs or be also speciffic (providing space for the implementation of the correct one in the future)? * */ - tuyaWeatherRequest: { - ID: 0x60, - parameters: [{name: "payload", type: BuffaloZclDataType.BUFFER}], - }, + tuyaWeatherRequest: {ID: 0x60, parameters: [{name: "payload", type: BuffaloZclDataType.BUFFER}]}, }, }, manuSpecificLumi: { ID: 0xfcc0, manufacturerCode: ManufacturerCode.LUMI_UNITED_TECHOLOGY_LTD_SHENZHEN, attributes: { - mode: {ID: 0x0009, type: DataType.UINT8}, - illuminance: {ID: 0x0112, type: DataType.UINT32}, - displayUnit: {ID: 0x0114, type: DataType.UINT8}, - airQuality: {ID: 0x0129, type: DataType.UINT8}, - curtainReverse: {ID: 0x0400, type: DataType.BOOLEAN}, - curtainHandOpen: {ID: 0x0401, type: DataType.BOOLEAN}, - curtainCalibrated: {ID: 0x0402, type: DataType.BOOLEAN}, + mode: {ID: 0x0009, type: DataType.UINT8, write: true, max: 0xff}, + illuminance: {ID: 0x0112, type: DataType.UINT32, write: true, max: 0xffffffff}, + displayUnit: {ID: 0x0114, type: DataType.UINT8, write: true, max: 0xff}, + airQuality: {ID: 0x0129, type: DataType.UINT8, write: true, max: 0xff}, + curtainReverse: {ID: 0x0400, type: DataType.BOOLEAN, write: true}, + curtainHandOpen: {ID: 0x0401, type: DataType.BOOLEAN, write: true}, + curtainCalibrated: {ID: 0x0402, type: DataType.BOOLEAN, write: true}, }, commands: {}, commandsResponse: {}, @@ -5264,13 +7422,13 @@ export const Clusters: Readonly> manuSpecificTuya2: { ID: 0xe002, attributes: { - alarm_temperature_max: {ID: 53258, type: DataType.INT16}, - alarm_temperature_min: {ID: 53259, type: DataType.INT16}, - alarm_humidity_max: {ID: 53261, type: DataType.INT16}, - alarm_humidity_min: {ID: 53262, type: DataType.INT16}, - alarm_humidity: {ID: 53263, type: DataType.ENUM8}, - alarm_temperature: {ID: 53254, type: DataType.ENUM8}, - unknown: {ID: 53264, type: DataType.UINT8}, + alarm_temperature_max: {ID: 0xd00a, type: DataType.INT16, write: true, min: -32768, max: 32767}, + alarm_temperature_min: {ID: 0xd00b, type: DataType.INT16, write: true, min: -32768, max: 32767}, + alarm_humidity_max: {ID: 0xd00d, type: DataType.INT16, write: true, min: -32768, max: 32767}, + alarm_humidity_min: {ID: 0xd00e, type: DataType.INT16, write: true, min: -32768, max: 32767}, + alarm_humidity: {ID: 0xd00f, type: DataType.ENUM8, write: true, max: 0xff}, + alarm_temperature: {ID: 0xd006, type: DataType.ENUM8, write: true, max: 0xff}, + unknown: {ID: 0xd010, type: DataType.UINT8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -5278,23 +7436,14 @@ export const Clusters: Readonly> manuSpecificTuya3: { ID: 0xe001, attributes: { - powerOnBehavior: {ID: 0xd010, type: DataType.ENUM8}, - switchMode: {ID: 0xd020, type: DataType.ENUM8}, - switchType: {ID: 0xd030, type: DataType.ENUM8}, + powerOnBehavior: {ID: 0xd010, type: DataType.ENUM8, write: true, max: 0xff}, + switchMode: {ID: 0xd020, type: DataType.ENUM8, write: true, max: 0xff}, + switchType: {ID: 0xd030, type: DataType.ENUM8, write: true, max: 0xff}, }, commands: { - setOptions1: { - ID: 0xe5, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, - setOptions2: { - ID: 0xe6, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, - setOptions3: { - ID: 0xe7, - parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}], - }, + setOptions1: {ID: 0xe5, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, + setOptions2: {ID: 0xe6, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, + setOptions3: {ID: 0xe7, parameters: [{name: "data", type: BuffaloZclDataType.BUFFER}]}, }, commandsResponse: {}, }, @@ -5302,7 +7451,7 @@ export const Clusters: Readonly> ID: 0xfc45, manufacturerCode: ManufacturerCode.CENTRALITE_SYSTEMS_INC, attributes: { - measuredValue: {ID: 0, type: DataType.UINT16}, + measuredValue: {ID: 0x0000, type: DataType.UINT16, write: true, max: 0xffff}, }, commands: {}, commandsResponse: {}, @@ -5313,22 +7462,19 @@ export const Clusters: Readonly> attributes: {}, commands: {}, commandsResponse: { - arrivalSensorNotify: { - ID: 1, - parameters: [], - }, + arrivalSensorNotify: {ID: 0x01, parameters: []}, }, }, manuSpecificSamsungAccelerometer: { ID: 0xfc02, manufacturerCode: ManufacturerCode.SMARTTHINGS_INC, attributes: { - motion_threshold_multiplier: {ID: 0, type: DataType.UINT8}, - motion_threshold: {ID: 2, type: DataType.UINT16}, - acceleration: {ID: 16, type: DataType.BITMAP8}, - x_axis: {ID: 18, type: DataType.INT16}, - y_axis: {ID: 19, type: DataType.INT16}, - z_axis: {ID: 20, type: DataType.INT16}, + motion_threshold_multiplier: {ID: 0x0000, type: DataType.UINT8, write: true, max: 0xff}, + motion_threshold: {ID: 0x0002, type: DataType.UINT16, write: true, max: 0xffff}, + acceleration: {ID: 0x0010, type: DataType.BITMAP8, write: true, max: 0xff}, + x_axis: {ID: 0x0012, type: DataType.INT16, write: true, min: -32768, max: 32767}, + y_axis: {ID: 0x0013, type: DataType.INT16, write: true, min: -32768, max: 32767}, + z_axis: {ID: 0x0014, type: DataType.INT16, write: true, min: -32768, max: 32767}, }, commands: {}, commandsResponse: {}, @@ -5338,26 +7484,11 @@ export const Clusters: Readonly> manufacturerCode: ManufacturerCode.IKEA_OF_SWEDEN, attributes: {}, commands: { - action1: { - ID: 1, - parameters: [{name: "data", type: DataType.UINT8}], - }, - action2: { - ID: 2, - parameters: [{name: "data", type: DataType.UINT8}], - }, - action3: { - ID: 3, - parameters: [{name: "data", type: DataType.UINT8}], - }, - action4: { - ID: 4, - parameters: [{name: "data", type: DataType.UINT8}], - }, - action6: { - ID: 6, - parameters: [{name: "data", type: DataType.UINT8}], - }, + action1: {ID: 0x01, parameters: [{name: "data", type: DataType.UINT8, max: 0xff}]}, + action2: {ID: 0x02, parameters: [{name: "data", type: DataType.UINT8, max: 0xff}]}, + action3: {ID: 0x03, parameters: [{name: "data", type: DataType.UINT8, max: 0xff}]}, + action4: {ID: 0x04, parameters: [{name: "data", type: DataType.UINT8, max: 0xff}]}, + action6: {ID: 0x06, parameters: [{name: "data", type: DataType.UINT8, max: 0xff}]}, }, commandsResponse: {}, }, @@ -5365,7 +7496,7 @@ export const Clusters: Readonly> ID: 0xff23, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, attributes: { - pilotMode: {ID: 0x0031, type: DataType.ENUM8}, + pilotMode: {ID: 0x0031, type: DataType.ENUM8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -5374,10 +7505,10 @@ export const Clusters: Readonly> ID: 0xff19, manufacturerCode: ManufacturerCode.ADEO, attributes: { - AmbienceLightThreshold: {ID: 0x0000, type: DataType.UINT16}, - OccupancyActions: {ID: 0x0001, type: DataType.ENUM8}, - UnoccupiedLevelDflt: {ID: 0x0002, type: DataType.UINT8}, - UnoccupiedLevel: {ID: 0x0003, type: DataType.UINT8}, + AmbienceLightThreshold: {ID: 0x0000, type: DataType.UINT16, write: true, max: 0xffff}, + OccupancyActions: {ID: 0x0001, type: DataType.ENUM8, write: true, max: 0xff}, + UnoccupiedLevelDflt: {ID: 0x0002, type: DataType.UINT8, write: true, max: 0xff}, + UnoccupiedLevel: {ID: 0x0003, type: DataType.UINT8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -5386,12 +7517,12 @@ export const Clusters: Readonly> ID: 0xff17, manufacturerCode: ManufacturerCode.ADEO, attributes: { - SwitchIndication: {ID: 0x0000, type: DataType.ENUM8}, - UpSceneID: {ID: 0x0010, type: DataType.UINT8}, - UpGroupID: {ID: 0x0011, type: DataType.UINT16}, - DownSceneID: {ID: 0x0020, type: DataType.UINT8}, - DownGroupID: {ID: 0x0021, type: DataType.UINT16}, - SwitchActions: {ID: 0x0001, type: DataType.ENUM8}, + SwitchIndication: {ID: 0x0000, type: DataType.ENUM8, write: true, max: 0xff}, + UpSceneID: {ID: 0x0010, type: DataType.UINT8, write: true, max: 0xff}, + UpGroupID: {ID: 0x0011, type: DataType.UINT16, write: true, max: 0xffff}, + DownSceneID: {ID: 0x0020, type: DataType.UINT8, write: true, max: 0xff}, + DownGroupID: {ID: 0x0021, type: DataType.UINT16, write: true, max: 0xffff}, + SwitchActions: {ID: 0x0001, type: DataType.ENUM8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -5400,12 +7531,12 @@ export const Clusters: Readonly> ID: 0xff17, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, attributes: { - ledIndication: {ID: 0x0000, type: DataType.ENUM8}, - upSceneID: {ID: 0x0010, type: DataType.UINT8}, - upGroupID: {ID: 0x0011, type: DataType.UINT16}, - downSceneID: {ID: 0x0020, type: DataType.UINT8}, - downGroupID: {ID: 0x0021, type: DataType.UINT16}, - switchActions: {ID: 0x0001, type: DataType.ENUM8}, + ledIndication: {ID: 0x0000, type: DataType.ENUM8, write: true, max: 0xff}, + upSceneID: {ID: 0x0010, type: DataType.UINT8, write: true, max: 0xff}, + upGroupID: {ID: 0x0011, type: DataType.UINT16, write: true, max: 0xffff}, + downSceneID: {ID: 0x0020, type: DataType.UINT8, write: true, max: 0xff}, + downGroupID: {ID: 0x0021, type: DataType.UINT16, write: true, max: 0xffff}, + switchActions: {ID: 0x0001, type: DataType.ENUM8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, @@ -5414,66 +7545,45 @@ export const Clusters: Readonly> ID: 0xfc04, manufacturerCode: ManufacturerCode.SCHNEIDER_ELECTRIC, attributes: { - ledIndication: {ID: 0x0002, type: DataType.UINT8}, - ledOrientation: {ID: 0x0060, type: DataType.UINT8}, + ledIndication: {ID: 0x0002, type: DataType.UINT8, write: true, max: 0xff}, + ledOrientation: {ID: 0x0060, type: DataType.UINT8, write: true, max: 0xff}, }, commands: {}, commandsResponse: {}, }, sprutVoc: { - ID: 26113, + ID: 0x6601, manufacturerCode: 26214, attributes: { - voc: {ID: 26112, type: DataType.UINT16}, + voc: {ID: 0x6600, type: DataType.UINT16, write: true, max: 0xffff}, }, commands: {}, commandsResponse: {}, }, sprutNoise: { - ID: 26114, + ID: 0x6602, manufacturerCode: 26214, attributes: { - noise: {ID: 26112, type: DataType.SINGLE_PREC}, - noiseDetected: {ID: 26113, type: DataType.BITMAP8}, - noiseDetectLevel: {ID: 26114, type: DataType.SINGLE_PREC}, - noiseAfterDetectDelay: {ID: 26115, type: DataType.UINT16}, + noise: {ID: 0x6600, type: DataType.SINGLE_PREC, write: true}, + noiseDetected: {ID: 0x6601, type: DataType.BITMAP8, write: true}, + noiseDetectLevel: {ID: 0x6602, type: DataType.SINGLE_PREC, write: true}, + noiseAfterDetectDelay: {ID: 0x6603, type: DataType.UINT16, write: true, max: 0xffff}, }, commands: {}, commandsResponse: {}, }, sprutIrBlaster: { - ID: 26115, + ID: 0x6603, manufacturerCode: 26214, attributes: {}, commands: { - playStore: { - ID: 0x00, - parameters: [{name: "param", type: DataType.UINT8}], - }, - learnStart: { - ID: 0x01, - parameters: [{name: "value", type: DataType.UINT8}], - }, - learnStop: { - ID: 0x02, - parameters: [{name: "value", type: DataType.UINT8}], - }, - clearStore: { - ID: 0x03, - parameters: [], - }, - playRam: { - ID: 0x04, - parameters: [], - }, - learnRamStart: { - ID: 0x05, - parameters: [], - }, - learnRamStop: { - ID: 0x06, - parameters: [], - }, + playStore: {ID: 0x00, parameters: [{name: "param", type: DataType.UINT8, max: 0xff}]}, + learnStart: {ID: 0x01, parameters: [{name: "value", type: DataType.UINT8, max: 0xff}]}, + learnStop: {ID: 0x02, parameters: [{name: "value", type: DataType.UINT8, max: 0xff}]}, + clearStore: {ID: 0x03, parameters: []}, + playRam: {ID: 0x04, parameters: []}, + learnRamStart: {ID: 0x05, parameters: []}, + learnRamStop: {ID: 0x06, parameters: []}, }, commandsResponse: {}, }, @@ -5481,15 +7591,15 @@ export const Clusters: Readonly> ID: 0xfc42, manufacturerCode: 0x129c, attributes: { - buttonEvent: {ID: 0x0008, type: DataType.UINT32}, + buttonEvent: {ID: 0x0008, type: DataType.UINT32, write: true, max: 0xffffffff}, }, commands: { siglisZigfredButtonEvent: { ID: 0x02, parameters: [ - {name: "button", type: DataType.UINT8}, - {name: "type", type: DataType.UINT8}, - {name: "duration", type: DataType.UINT16}, + {name: "button", type: DataType.UINT8, max: 0xff}, + {name: "type", type: DataType.UINT8, max: 0xff}, + {name: "duration", type: DataType.UINT16, max: 0xffff}, ], }, }, @@ -5500,10 +7610,7 @@ export const Clusters: Readonly> manufacturerCode: ManufacturerCode.OWON_TECHNOLOGY_INC, attributes: {}, commands: { - owonClearMeasurementData: { - ID: 0x00, - parameters: [], - }, + owonClearMeasurementData: {ID: 0x00, parameters: []}, }, commandsResponse: {}, }, @@ -5512,80 +7619,80 @@ export const Clusters: Readonly> attributes: {}, commands: { zosungSendIRCode00: { - ID: 0, + ID: 0x00, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "length", type: DataType.UINT32}, - {name: "unk1", type: DataType.UINT32}, - {name: "unk2", type: DataType.UINT16}, - {name: "unk3", type: DataType.UINT8}, - {name: "cmd", type: DataType.UINT8}, - {name: "unk4", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "length", type: DataType.UINT32, max: 0xffffffff}, + {name: "unk1", type: DataType.UINT32, max: 0xffffffff}, + {name: "unk2", type: DataType.UINT16, max: 0xffff}, + {name: "unk3", type: DataType.UINT8, max: 0xff}, + {name: "cmd", type: DataType.UINT8, max: 0xff}, + {name: "unk4", type: DataType.UINT16, max: 0xffff}, ], }, zosungSendIRCode01: { - ID: 1, + ID: 0x01, parameters: [ - {name: "zero", type: DataType.UINT8}, - {name: "seq", type: DataType.UINT16}, - {name: "length", type: DataType.UINT32}, - {name: "unk1", type: DataType.UINT32}, - {name: "unk2", type: DataType.UINT16}, - {name: "unk3", type: DataType.UINT8}, - {name: "cmd", type: DataType.UINT8}, - {name: "unk4", type: DataType.UINT16}, + {name: "zero", type: DataType.UINT8, max: 0xff}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "length", type: DataType.UINT32, max: 0xffffffff}, + {name: "unk1", type: DataType.UINT32, max: 0xffffffff}, + {name: "unk2", type: DataType.UINT16, max: 0xffff}, + {name: "unk3", type: DataType.UINT8, max: 0xff}, + {name: "cmd", type: DataType.UINT8, max: 0xff}, + {name: "unk4", type: DataType.UINT16, max: 0xffff}, ], }, zosungSendIRCode02: { - ID: 2, + ID: 0x02, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "position", type: DataType.UINT32}, - {name: "maxlen", type: DataType.UINT8}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "position", type: DataType.UINT32, max: 0xffffffff}, + {name: "maxlen", type: DataType.UINT8, max: 0xff}, ], }, zosungSendIRCode03: { - ID: 3, + ID: 0x03, parameters: [ - {name: "zero", type: DataType.UINT8}, - {name: "seq", type: DataType.UINT16}, - {name: "position", type: DataType.UINT32}, + {name: "zero", type: DataType.UINT8, max: 0xff}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "position", type: DataType.UINT32, max: 0xffffffff}, {name: "msgpart", type: DataType.OCTET_STR}, - {name: "msgpartcrc", type: DataType.UINT8}, + {name: "msgpartcrc", type: DataType.UINT8, max: 0xff}, ], }, zosungSendIRCode04: { - ID: 4, + ID: 0x04, parameters: [ - {name: "zero0", type: DataType.UINT8}, - {name: "seq", type: DataType.UINT16}, - {name: "zero1", type: DataType.UINT16}, + {name: "zero0", type: DataType.UINT8, max: 0xff}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "zero1", type: DataType.UINT16, max: 0xffff}, ], }, zosungSendIRCode05: { - ID: 5, + ID: 0x05, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "zero", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "zero", type: DataType.UINT16, max: 0xffff}, ], }, }, commandsResponse: { zosungSendIRCode03Resp: { - ID: 3, + ID: 0x03, parameters: [ - {name: "zero", type: DataType.UINT8}, - {name: "seq", type: DataType.UINT16}, - {name: "position", type: DataType.UINT32}, + {name: "zero", type: DataType.UINT8, max: 0xff}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "position", type: DataType.UINT32, max: 0xffffffff}, {name: "msgpart", type: DataType.OCTET_STR}, - {name: "msgpartcrc", type: DataType.UINT8}, + {name: "msgpartcrc", type: DataType.UINT8, max: 0xff}, ], }, zosungSendIRCode05Resp: { - ID: 5, + ID: 0x05, parameters: [ - {name: "seq", type: DataType.UINT16}, - {name: "zero", type: DataType.UINT16}, + {name: "seq", type: DataType.UINT16, max: 0xffff}, + {name: "zero", type: DataType.UINT16, max: 0xffff}, ], }, }, @@ -5595,7 +7702,7 @@ export const Clusters: Readonly> attributes: {}, commands: { zosungControlIRCommand00: { - ID: 0, + ID: 0x00, parameters: [ // JSON string with a command. {name: "data", type: BuffaloZclDataType.BUFFER}, @@ -5607,39 +7714,28 @@ export const Clusters: Readonly> manuSpecificAssaDoorLock: { ID: 0xfc00, attributes: { - autoLockTime: {ID: 0x0012, type: DataType.UINT8}, - wrongCodeAttempts: {ID: 0x0013, type: DataType.UINT8}, - shutdownTime: {ID: 0x0014, type: DataType.UINT8}, - batteryLevel: {ID: 0x0015, type: DataType.UINT8}, - insideEscutcheonLED: {ID: 0x0016, type: DataType.UINT8}, - volume: {ID: 0x0017, type: DataType.UINT8}, - lockMode: {ID: 0x0018, type: DataType.UINT8}, - language: {ID: 0x0019, type: DataType.UINT8}, - allCodesLockout: {ID: 0x001a, type: DataType.BOOLEAN}, - oneTouchLocking: {ID: 0x001b, type: DataType.BOOLEAN}, - privacyButtonSetting: {ID: 0x001c, type: DataType.BOOLEAN}, - /* enableLogging: {ID: 0x0020, type: DataType.BOOLEAN},*/ // marked in C4 driver as not supported - numberLogRecordsSupported: {ID: 0x0021, type: DataType.UINT16}, - numberPinsSupported: {ID: 0x0030, type: DataType.UINT8}, - numberScheduleSlotsPerUser: {ID: 0x0040, type: DataType.UINT8}, - alarmMask: {ID: 0x0050, type: DataType.UINT8}, + autoLockTime: {ID: 0x0012, type: DataType.UINT8, write: true, max: 0xff}, + wrongCodeAttempts: {ID: 0x0013, type: DataType.UINT8, write: true, max: 0xff}, + shutdownTime: {ID: 0x0014, type: DataType.UINT8, write: true, max: 0xff}, + batteryLevel: {ID: 0x0015, type: DataType.UINT8, write: true, max: 0xff}, + insideEscutcheonLED: {ID: 0x0016, type: DataType.UINT8, write: true, max: 0xff}, + volume: {ID: 0x0017, type: DataType.UINT8, write: true, max: 0xff}, + lockMode: {ID: 0x0018, type: DataType.UINT8, write: true, max: 0xff}, + language: {ID: 0x0019, type: DataType.UINT8, write: true, max: 0xff}, + allCodesLockout: {ID: 0x001a, type: DataType.BOOLEAN, write: true}, + oneTouchLocking: {ID: 0x001b, type: DataType.BOOLEAN, write: true}, + privacyButtonSetting: {ID: 0x001c, type: DataType.BOOLEAN, write: true}, + /* enableLogging: {ID: 0x0020, type: DataType.BOOLEAN, write: true},*/ // marked in C4 driver as not supported + numberLogRecordsSupported: {ID: 0x0021, type: DataType.UINT16, write: true, max: 0xffff}, + numberPinsSupported: {ID: 0x0030, type: DataType.UINT8, write: true, max: 0xff}, + numberScheduleSlotsPerUser: {ID: 0x0040, type: DataType.UINT8, write: true, max: 0xff}, + alarmMask: {ID: 0x0050, type: DataType.UINT8, write: true, max: 0xff}, }, commands: { - getLockStatus: { - ID: 0x10, - response: 0, - parameters: [], - }, - getBatteryLevel: { - ID: 0x12, - parameters: [], - }, - setRFLockoutTime: { - ID: 0x13, - parameters: [], - }, - /* getLogRecord: { - ID: 0x20, + getLockStatus: {ID: 0x10, response: 0, parameters: []}, + getBatteryLevel: {ID: 0x12, parameters: []}, + setRFLockoutTime: {ID: 0x13, parameters: []}, + /* getLogRecord: {ID: 0x20, parameters: [], },*/ // marked in C4 driver as not supported userCodeSet: { @@ -5663,30 +7759,12 @@ export const Clusters: Readonly> {name: "payload", type: DataType.CHAR_STR}, ], }, - clearAllUserCodes: { - ID: 0x33, - parameters: [], - }, - setUserCodeStatus: { - ID: 0x34, - parameters: [], - }, - getUserCodeStatus: { - ID: 0x35, - parameters: [], - }, - getLastUserIdEntered: { - ID: 0x36, - parameters: [], - }, - userAdded: { - ID: 0x37, - parameters: [], - }, - userDeleted: { - ID: 0x38, - parameters: [], - }, + clearAllUserCodes: {ID: 0x33, parameters: []}, + setUserCodeStatus: {ID: 0x34, parameters: []}, + getUserCodeStatus: {ID: 0x35, parameters: []}, + getLastUserIdEntered: {ID: 0x36, parameters: []}, + userAdded: {ID: 0x37, parameters: []}, + userDeleted: {ID: 0x38, parameters: []}, setScheduleSlot: { ID: 0x40, parameters: [ @@ -5732,86 +7810,40 @@ export const Clusters: Readonly> {name: "payload", type: DataType.CHAR_STR}, ], }, - getReflashLock: { - ID: 0x90, - parameters: [], - }, - getHistory: { - ID: 0xa0, - parameters: [], - }, - getLogin: { - ID: 0xa1, - parameters: [], - }, - getUser: { - ID: 0xa2, - parameters: [], - }, - getUsers: { - ID: 0xa3, - parameters: [], - }, - getMandatoryAttributes: { - ID: 0xb0, - parameters: [], - }, - readAttribute: { - ID: 0xb1, - parameters: [], - }, - writeAttribute: { - ID: 0xb2, - parameters: [], - }, - configureReporting: { - ID: 0xb3, - parameters: [], - }, - getBasicClusterAttributes: { - ID: 0xb4, - parameters: [], - }, + getReflashLock: {ID: 0x90, parameters: []}, + getHistory: {ID: 0xa0, parameters: []}, + getLogin: {ID: 0xa1, parameters: []}, + getUser: {ID: 0xa2, parameters: []}, + getUsers: {ID: 0xa3, parameters: []}, + getMandatoryAttributes: {ID: 0xb0, parameters: []}, + readAttribute: {ID: 0xb1, parameters: []}, + writeAttribute: {ID: 0xb2, parameters: []}, + configureReporting: {ID: 0xb3, parameters: []}, + getBasicClusterAttributes: {ID: 0xb4, parameters: []}, }, commandsResponse: { - getLockStatusRsp: { - ID: 0, - parameters: [{name: "status", type: DataType.UINT8}], - }, - reflashRsp: { - ID: 1, - parameters: [{name: "status", type: DataType.UINT8}], - }, - reflashDataRsp: { - ID: 2, - parameters: [{name: "status", type: DataType.UINT8}], - }, - reflashStatusRsp: { - ID: 3, - parameters: [{name: "status", type: DataType.UINT8}], - }, - /* boltStateRsp: { - ID: 4, + getLockStatusRsp: {ID: 0x00, parameters: [{name: "status", type: DataType.UINT8, max: 0xff}]}, + reflashRsp: {ID: 0x01, parameters: [{name: "status", type: DataType.UINT8, max: 0xff}]}, + reflashDataRsp: {ID: 0x02, parameters: [{name: "status", type: DataType.UINT8, max: 0xff}]}, + reflashStatusRsp: {ID: 0x03, parameters: [{name: "status", type: DataType.UINT8, max: 0xff}]}, + /* boltStateRsp: {ID: 4, parameters: [ - {name: 'state', type: DataType.UINT8}, + {name: 'state', type: DataType.UINT8, max: 0xff}, ], },*/ // C4 driver has this response yet there is no command - maybe a non-specific cluster response? - /* lockStatusReportRsp: { - ID: 5, + /* lockStatusReportRsp: {ID: 5, parameters: [ - {name: 'status', type: DataType.UINT8}, + {name: 'status', type: DataType.UINT8, max: 0xff}, ], },*/ // C4 driver has this response yet there is no command - maybe a non-specific cluster response? - /* handleStateRsp: { - ID: 6, + /* handleStateRsp: {ID: 6, parameters: [ - {name: 'state', type: DataType.UINT8}, + {name: 'state', type: DataType.UINT8, max: 0xff}, ], },*/ // C4 driver has this response yet there is no command - maybe a non-specific cluster response? - /* userStatusRsp: { - ID: 7, + /* userStatusRsp: {ID: 7, parameters: [ - {name: 'status', type: DataType.UINT8}, + {name: 'status', type: DataType.UINT8, max: 0xff}, ], },*/ // C4 driver has this response yet there is no command - maybe a non-specific cluster response? }, @@ -5855,7 +7887,7 @@ export const Clusters: Readonly> ID: 0xfc21, // Config cluster, 0xfc20 mostly for commands it seems manufacturerCode: ManufacturerCode.PROFALUX, attributes: { - motorCoverType: {ID: 0, type: DataType.UINT8}, // 0 : rolling shutters (volet), 1 : rolling shutters with tilt (BSO), 2: shade (store) + motorCoverType: {ID: 0x0000, type: DataType.UINT8, write: true, max: 0xff}, // 0 : rolling shutters (volet), 1 : rolling shutters with tilt (BSO), 2: shade (store) }, commands: {}, commandsResponse: {}, @@ -5864,31 +7896,28 @@ export const Clusters: Readonly> ID: 0xfc57, manufacturerCode: ManufacturerCode.AMAZON_LAB126, attributes: { - disableOTADowngrades: {ID: 0x0002, type: DataType.BOOLEAN}, - mgmtLeaveWithoutRejoinEnabled: {ID: 0x0003, type: DataType.BOOLEAN}, - nwkRetryCount: {ID: 0x0004, type: DataType.UINT8}, - macRetryCount: {ID: 0x0005, type: DataType.UINT8}, - routerCheckInEnabled: {ID: 0x0006, type: DataType.BOOLEAN}, - touchlinkInterpanEnabled: {ID: 0x0007, type: DataType.BOOLEAN}, - wwahParentClassificationEnabled: {ID: 0x0008, type: DataType.BOOLEAN}, - wwahAppEventRetryEnabled: {ID: 0x0009, type: DataType.BOOLEAN}, - wwahAppEventRetryQueueSize: {ID: 0x000a, type: DataType.UINT8}, - wwahRejoinEnabled: {ID: 0x000b, type: DataType.BOOLEAN}, - macPollFailureWaitTime: {ID: 0x000c, type: DataType.UINT8}, - configurationModeEnabled: {ID: 0x000d, type: DataType.BOOLEAN}, - currentDebugReportID: {ID: 0x000e, type: DataType.UINT8}, - tcSecurityOnNwkKeyRotationEnabled: {ID: 0x000f, type: DataType.BOOLEAN}, - wwahBadParentRecoveryEnabled: {ID: 0x0010, type: DataType.BOOLEAN}, - pendingNetworkUpdateChannel: {ID: 0x0011, type: DataType.UINT8}, - pendingNetworkUpdatePANID: {ID: 0x0012, type: DataType.UINT16}, - otaMaxOfflineDuration: {ID: 0x0013, type: DataType.UINT16}, - clusterRevision: {ID: 0xfffd, type: DataType.UINT16}, + disableOTADowngrades: {ID: 0x0002, type: DataType.BOOLEAN, write: true}, + mgmtLeaveWithoutRejoinEnabled: {ID: 0x0003, type: DataType.BOOLEAN, write: true}, + nwkRetryCount: {ID: 0x0004, type: DataType.UINT8, write: true, max: 0xff}, + macRetryCount: {ID: 0x0005, type: DataType.UINT8, write: true, max: 0xff}, + routerCheckInEnabled: {ID: 0x0006, type: DataType.BOOLEAN, write: true}, + touchlinkInterpanEnabled: {ID: 0x0007, type: DataType.BOOLEAN, write: true}, + wwahParentClassificationEnabled: {ID: 0x0008, type: DataType.BOOLEAN, write: true}, + wwahAppEventRetryEnabled: {ID: 0x0009, type: DataType.BOOLEAN, write: true}, + wwahAppEventRetryQueueSize: {ID: 0x000a, type: DataType.UINT8, write: true, max: 0xff}, + wwahRejoinEnabled: {ID: 0x000b, type: DataType.BOOLEAN, write: true}, + macPollFailureWaitTime: {ID: 0x000c, type: DataType.UINT8, write: true, max: 0xff}, + configurationModeEnabled: {ID: 0x000d, type: DataType.BOOLEAN, write: true}, + currentDebugReportID: {ID: 0x000e, type: DataType.UINT8, write: true, max: 0xff}, + tcSecurityOnNwkKeyRotationEnabled: {ID: 0x000f, type: DataType.BOOLEAN, write: true}, + wwahBadParentRecoveryEnabled: {ID: 0x0010, type: DataType.BOOLEAN, write: true}, + pendingNetworkUpdateChannel: {ID: 0x0011, type: DataType.UINT8, write: true, max: 0xff}, + pendingNetworkUpdatePANID: {ID: 0x0012, type: DataType.UINT16, write: true, max: 0xffff}, + otaMaxOfflineDuration: {ID: 0x0013, type: DataType.UINT16, write: true, max: 0xffff}, + clusterRevision: {ID: 0xfffd, type: DataType.UINT16, write: true, max: 0xffff}, }, commands: { - clearBindingTable: { - ID: 0x0a, - parameters: [], - }, + clearBindingTable: {ID: 0x0a, parameters: []}, }, commandsResponse: {}, }, diff --git a/src/zspec/zcl/definition/clusters-types.ts b/src/zspec/zcl/definition/clusters-types.ts index 4b6fbe758f..6d1ca1df59 100644 --- a/src/zspec/zcl/definition/clusters-types.ts +++ b/src/zspec/zcl/definition/clusters-types.ts @@ -18,130 +18,198 @@ import type { export interface TClusters { genBasic: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | required=true | max=255 | default=8 */ zclVersion: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | max=255 | default=0 */ appVersion: number; - /** ID: 2 | Type: UINT8 */ + /** ID=0x0002 | type=UINT8 | max=255 | default=0 */ stackVersion: number; - /** ID: 3 | Type: UINT8 */ + /** ID=0x0003 | type=UINT8 | max=255 | default=0 */ hwVersion: number; - /** ID: 4 | Type: CHAR_STR */ + /** ID=0x0004 | type=CHAR_STR | default= | maxLen=32 */ manufacturerName: string; - /** ID: 5 | Type: CHAR_STR */ + /** ID=0x0005 | type=CHAR_STR | default= | maxLen=32 */ modelId: string; - /** ID: 6 | Type: CHAR_STR */ + /** ID=0x0006 | type=CHAR_STR | default= | maxLen=16 */ dateCode: string; - /** ID: 7 | Type: ENUM8 */ + /** ID=0x0007 | type=ENUM8 | required=true | default=255 */ powerSource: number; - /** ID: 8 | Type: ENUM8 */ - appProfileVersion: number; - /** ID: 9 | Type: ENUM8 */ + /** ID=0x0008 | type=ENUM8 | default=255 */ + genericDeviceClass: number; + /** ID=0x0009 | type=ENUM8 | default=255 */ genericDeviceType: number; - /** ID: 10 | Type: OCTET_STR */ + /** ID=0x000a | type=OCTET_STR | default= */ productCode: Buffer; - /** ID: 11 | Type: CHAR_STR */ + /** ID=0x000b | type=CHAR_STR | default= */ productUrl: string; - /** ID: 12 | Type: CHAR_STR */ + /** ID=0x000c | type=CHAR_STR | default= */ manufacturerVersionDetails: string; - /** ID: 13 | Type: CHAR_STR */ + /** ID=0x000d | type=CHAR_STR | default= */ serialNumber: string; - /** ID: 14 | Type: CHAR_STR */ + /** ID=0x000e | type=CHAR_STR | default= */ productLabel: string; - /** ID: 16 | Type: CHAR_STR */ + /** ID=0x0010 | type=CHAR_STR | write=true | default= | maxLen=16 */ locationDesc: string; - /** ID: 17 | Type: ENUM8 */ + /** ID=0x0011 | type=ENUM8 | write=true | default=0 */ physicalEnv: number; - /** ID: 18 | Type: BOOLEAN */ + /** ID=0x0012 | type=BOOLEAN | write=true | default=1 */ deviceEnabled: number; - /** ID: 19 | Type: BITMAP8 */ + /** ID=0x0013 | type=BITMAP8 | write=true | default=0 */ alarmMask: number; - /** ID: 20 | Type: BITMAP8 */ + /** ID=0x0014 | type=BITMAP8 | write=true | default=0 */ disableLocalConfig: number; - /** ID: 16384 | Type: CHAR_STR */ + /** ID=0x4000 | type=CHAR_STR | default= | maxLen=16 */ swBuildId: string; - /** ID: 57856 | Type: INT8 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0xe200 | type=INT8 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-128 | max=127 */ schneiderMeterRadioPower?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 */ resetFactDefault: Record; - /** ID: 240 */ + /** ID=0xf0 */ tuyaSetup: Record; }; commandResponses: never; }; genPowerCfg: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | max=65535 */ mainsVoltage: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | max=255 */ mainsFrequency: number; - /** ID: 16 | Type: BITMAP8 */ + /** ID=0x0010 | type=BITMAP8 | write=true | default=0 */ mainsAlarmMask: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | write=true | max=65535 | default=0 */ mainsVoltMinThres: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | write=true | max=65535 | default=65535 */ mainsVoltMaxThres: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | write=true | max=65535 | default=0 */ mainsVoltageDwellTripPoint: number; - /** ID: 32 | Type: UINT8 */ + /** ID=0x0020 | type=UINT8 | max=255 */ batteryVoltage: number; - /** ID: 33 | Type: UINT8 */ + /** ID=0x0021 | type=UINT8 | report=true | max=255 | default=0 */ batteryPercentageRemaining: number; - /** ID: 48 | Type: CHAR_STR */ + /** ID=0x0030 | type=CHAR_STR | write=true | default= | maxLen=16 */ batteryManufacturer: string; - /** ID: 49 | Type: ENUM8 */ + /** ID=0x0031 | type=ENUM8 | write=true | default=255 */ batterySize: number; - /** ID: 50 | Type: UINT16 */ + /** ID=0x0032 | type=UINT16 | write=true | max=65535 */ batteryAHrRating: number; - /** ID: 51 | Type: UINT8 */ + /** ID=0x0033 | type=UINT8 | write=true | max=255 */ batteryQuantity: number; - /** ID: 52 | Type: UINT8 */ + /** ID=0x0034 | type=UINT8 | write=true | max=255 */ batteryRatedVoltage: number; - /** ID: 53 | Type: BITMAP8 */ + /** ID=0x0035 | type=BITMAP8 | write=true | default=0 */ batteryAlarmMask: number; - /** ID: 54 | Type: UINT8 */ + /** ID=0x0036 | type=UINT8 | write=true | max=255 | default=0 */ batteryVoltMinThres: number; - /** ID: 55 | Type: UINT8 */ + /** ID=0x0037 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryVoltThres1: number; - /** ID: 56 | Type: UINT8 */ + /** ID=0x0038 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryVoltThres2: number; - /** ID: 57 | Type: UINT8 */ + /** ID=0x0039 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryVoltThres3: number; - /** ID: 58 | Type: UINT8 */ + /** ID=0x003a | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryPercentMinThres: number; - /** ID: 59 | Type: UINT8 */ + /** ID=0x003b | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryPercentThres1: number; - /** ID: 60 | Type: UINT8 */ + /** ID=0x003c | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryPercentThres2: number; - /** ID: 61 | Type: UINT8 */ + /** ID=0x003d | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ batteryPercentThres3: number; - /** ID: 62 | Type: BITMAP32 */ + /** ID=0x003e | type=BITMAP32 | report=true | default=0 */ batteryAlarmState: number; + /** ID=0x0040 | type=UINT8 | max=255 */ + battery2Voltage: number; + /** ID=0x0041 | type=UINT8 | report=true | max=255 | default=0 */ + battery2PercentageRemaining: number; + /** ID=0x0050 | type=CHAR_STR | write=true | default= | maxLen=16 */ + battery2Manufacturer: string; + /** ID=0x0051 | type=ENUM8 | write=true | default=255 */ + battery2Size: number; + /** ID=0x0052 | type=UINT16 | write=true | max=65535 */ + battery2AHrRating: number; + /** ID=0x0053 | type=UINT8 | write=true | max=255 */ + battery2Quantity: number; + /** ID=0x0054 | type=UINT8 | write=true | max=255 */ + battery2RatedVoltage: number; + /** ID=0x0055 | type=BITMAP8 | write=true | default=0 */ + battery2AlarmMask: number; + /** ID=0x0056 | type=UINT8 | write=true | max=255 | default=0 */ + battery2VoltageMinThreshold: number; + /** ID=0x0057 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2VoltageThreshold1: number; + /** ID=0x0058 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2VoltageThreshold2: number; + /** ID=0x0059 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2VoltageThreshold3: number; + /** ID=0x005a | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2PercentageMinThreshold: number; + /** ID=0x005b | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2PercentageThreshold1: number; + /** ID=0x005c | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2PercentageThreshold2: number; + /** ID=0x005d | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery2PercentageThreshold3: number; + /** ID=0x005e | type=BITMAP32 | report=true | default=0 */ + battery2AlarmState: number; + /** ID=0x0060 | type=UINT8 | max=255 */ + battery3Voltage: number; + /** ID=0x0061 | type=UINT8 | report=true | max=255 | default=0 */ + battery3PercentageRemaining: number; + /** ID=0x0070 | type=CHAR_STR | write=true | default= | maxLen=16 */ + battery3Manufacturer: string; + /** ID=0x0071 | type=ENUM8 | write=true | default=255 */ + battery3Size: number; + /** ID=0x0072 | type=UINT16 | write=true | max=65535 */ + battery3AHrRating: number; + /** ID=0x0073 | type=UINT8 | write=true | max=255 */ + battery3Quantity: number; + /** ID=0x0074 | type=UINT8 | write=true | max=255 */ + battery3RatedVoltage: number; + /** ID=0x0075 | type=BITMAP8 | write=true | default=0 */ + battery3AlarmMask: number; + /** ID=0x0076 | type=UINT8 | write=true | max=255 | default=0 */ + battery3VoltageMinThreshold: number; + /** ID=0x0077 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3VoltageThreshold1: number; + /** ID=0x0078 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3VoltageThreshold2: number; + /** ID=0x0079 | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3VoltageThreshold3: number; + /** ID=0x007a | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3PercentageMinThreshold: number; + /** ID=0x007b | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3PercentageThreshold1: number; + /** ID=0x007c | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3PercentageThreshold2: number; + /** ID=0x007d | type=UINT8 | write=true | writeOptional=true | max=255 | default=0 */ + battery3PercentageThreshold3: number; + /** ID=0x007e | type=BITMAP32 | report=true | default=0 */ + battery3AlarmState: number; }; commands: never; commandResponses: never; }; genDeviceTempCfg: { attributes: { - /** ID: 0 | Type: INT16 */ + /** ID=0x0000 | type=INT16 | required=true | min=-200 | max=200 */ currentTemperature: number; - /** ID: 1 | Type: INT16 */ + /** ID=0x0001 | type=INT16 | min=-200 | max=200 */ minTempExperienced: number; - /** ID: 2 | Type: INT16 */ + /** ID=0x0002 | type=INT16 | min=-200 | max=200 */ maxTempExperienced: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=65535 | default=0 */ overTempTotalDwell: number; - /** ID: 16 | Type: BITMAP8 */ + /** ID=0x0010 | type=BITMAP8 | write=true | default=0 */ devTempAlarmMask: number; - /** ID: 17 | Type: INT16 */ + /** ID=0x0011 | type=INT16 | write=true | min=-200 | max=200 */ lowTempThres: number; - /** ID: 18 | Type: INT16 */ + /** ID=0x0012 | type=INT16 | write=true | min=-200 | max=200 */ highTempThres: number; - /** ID: 19 | Type: UINT24 */ + /** ID=0x0013 | type=UINT24 | write=true | max=16777215 */ lowTempDwellTripPoint: number; - /** ID: 20 | Type: UINT24 */ + /** ID=0x0014 | type=UINT24 | write=true | max=16777215 */ highTempDwellTripPoint: number; }; commands: never; @@ -149,419 +217,417 @@ export interface TClusters { }; genIdentify: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | write=true | required=true | max=65535 | default=0 */ identifyTime: number; - /** ID: 1 | Type: UNKNOWN */ - identifyCommissionState: never; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ identify: { - /** Type: UINT16 */ + /** type=UINT16 */ identifytime: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ identifyQuery: Record; - /** ID: 2 */ + /** ID=0x40 */ + triggerEffect: { + /** type=ENUM8 */ + effectid: number; + /** type=ENUM8 */ + effectvariant: number; + }; + /** ID=0x02 */ ezmodeInvoke: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ action: number; }; - /** ID: 3 */ + /** ID=0x03 */ updateCommissionState: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ action: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ commstatemask: number; }; - /** ID: 64 */ - triggerEffect: { - /** Type: UINT8 */ - effectid: number; - /** Type: UINT8 */ - effectvariant: number; - }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ identifyQueryRsp: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ timeout: number; }; }; }; genGroups: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | default=0 */ nameSupport: number; }; commands: { - /** ID: 0 | Response ID: 0 */ + /** ID=0x00 | response=0 | required=true */ add: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ groupname: string; }; - /** ID: 1 | Response ID: 1 */ + /** ID=0x01 | response=1 | required=true */ view: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 2 | Response ID: 2 */ + /** ID=0x02 | response=2 | required=true */ getMembership: { - /** Type: UINT8 */ + /** type=UINT8 */ groupcount: number; - /** Type: LIST_UINT16 */ + /** type=LIST_UINT16 */ grouplist: number[]; }; - /** ID: 3 | Response ID: 3 */ + /** ID=0x03 | response=3 | required=true */ remove: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 4 */ + /** ID=0x04 | required=true */ removeAll: Record; - /** ID: 5 */ + /** ID=0x05 | required=true */ addIfIdentifying: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ groupname: string; }; - /** ID: 240 */ + /** ID=0xf0 */ miboxerSetZones: { - /** Type: LIST_MIBOXER_ZONES */ + /** type=LIST_MIBOXER_ZONES */ zones: MiboxerZone[]; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ addRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ viewRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ groupname: string; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ getMembershipRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ capacity: number; - /** Type: UINT8 */ + /** type=UINT8 */ groupcount: number; - /** Type: LIST_UINT16 */ + /** type=LIST_UINT16 */ grouplist: number[]; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ removeRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; }; }; genScenes: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | required=true | max=255 | default=0 */ count: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | required=true | max=255 | default=0 */ currentScene: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | max=65527 | default=0 */ currentGroup: number; - /** ID: 3 | Type: BOOLEAN */ + /** ID=0x0003 | type=BOOLEAN | required=true | default=0 */ sceneValid: number; - /** ID: 4 | Type: BITMAP8 */ + /** ID=0x0004 | type=BITMAP8 | required=true | default=0 */ nameSupport: number; - /** ID: 5 | Type: IEEE_ADDR */ + /** ID=0x0005 | type=IEEE_ADDR | special=UnknownOrNotConfigured,ffffffffffffffff */ lastCfgBy: string; }; commands: { - /** ID: 0 | Response ID: 0 */ + /** ID=0x00 | response=0 | required=true */ add: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ scenename: string; - /** Type: EXTENSION_FIELD_SETS */ + /** type=EXTENSION_FIELD_SETS */ extensionfieldsets: ExtensionFieldSet[]; }; - /** ID: 1 | Response ID: 1 */ + /** ID=0x01 | response=1 | required=true */ view: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 2 | Response ID: 2 */ + /** ID=0x02 | response=2 | required=true */ remove: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 3 | Response ID: 3 */ + /** ID=0x03 | response=3 | required=true */ removeAll: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 4 | Response ID: 4 */ + /** ID=0x04 | response=4 | required=true */ store: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 5 */ + /** ID=0x05 | required=true */ recall: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; + /** type=UINT16 */ + transitionTime: number; }; - /** ID: 6 | Response ID: 6 */ + /** ID=0x06 | response=6 | required=true */ getSceneMembership: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 64 | Response ID: 64 */ + /** ID=0x40 | response=64 */ enhancedAdd: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ scenename: string; - /** Type: EXTENSION_FIELD_SETS */ + /** type=EXTENSION_FIELD_SETS */ extensionfieldsets: ExtensionFieldSet[]; }; - /** ID: 65 | Response ID: 65 */ + /** ID=0x41 | response=65 */ enhancedView: { - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 66 | Response ID: 66 */ + /** ID=0x42 | response=66 */ copy: { - /** Type: UINT8 */ + /** type=BITMAP8 */ mode: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupidfrom: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneidfrom: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupidto: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneidto: number; }; - /** ID: 7 */ + /** ID=0x07 */ tradfriArrowSingle: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ value: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ value2: number; }; - /** ID: 8 */ + /** ID=0x08 */ tradfriArrowHold: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ value: number; }; - /** ID: 9 */ + /** ID=0x09 */ tradfriArrowRelease: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ value: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ addRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupId: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneId: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ viewRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ transtime?: number; - /** Type: CHAR_STR, Conditions: [{fieldEquals field=status value=0}] */ + /** type=CHAR_STR | conditions=[{fieldEquals field=status value=0}] */ scenename?: string; - /** Type: EXTENSION_FIELD_SETS, Conditions: [{fieldEquals field=status value=0}] */ + /** type=EXTENSION_FIELD_SETS | conditions=[{fieldEquals field=status value=0}] */ extensionfieldsets?: ExtensionFieldSet[]; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ removeRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ removeAllRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; }; - /** ID: 4 */ + /** ID=0x04 | required=true */ storeRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; }; - /** ID: 6 */ + /** ID=0x06 | required=true */ getSceneMembershipRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT8 */ + /** type=UINT8 | min=1 | max=255 | special=NoFurtherScenesMayBeAdded,00,AtLeastOneFurtherSceneMayBeAdded,fe,Unknown,ff */ capacity: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT8 | conditions=[{fieldEquals field=status value=0}] */ scenecount?: number; - /** Type: LIST_UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=LIST_UINT8 | conditions=[{fieldEquals field=status value=0}] */ scenelist?: number[]; }; - /** ID: 64 */ + /** ID=0x40 */ enhancedAddRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupId: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneId: number; }; - /** ID: 65 */ + /** ID=0x41 */ enhancedViewRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupid: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneid: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ transtime?: number; - /** Type: CHAR_STR, Conditions: [{fieldEquals field=status value=0}] */ + /** type=CHAR_STR | conditions=[{fieldEquals field=status value=0}] */ scenename?: string; - /** Type: EXTENSION_FIELD_SETS, Conditions: [{fieldEquals field=status value=0}] */ + /** type=EXTENSION_FIELD_SETS | conditions=[{fieldEquals field=status value=0}] */ extensionfieldsets?: ExtensionFieldSet[]; }; - /** ID: 66 */ + /** ID=0x42 */ copyRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupidfrom: number; - /** Type: UINT8 */ + /** type=UINT8 */ sceneidfrom: number; }; }; }; genOnOff: { attributes: { - /** ID: 0 | Type: BOOLEAN */ + /** ID=0x0000 | type=BOOLEAN | report=true | scene=true | required=true | default=0 */ onOff: number; - /** ID: 16384 | Type: BOOLEAN */ + /** ID=0x4000 | type=BOOLEAN | default=1 */ globalSceneCtrl: number; - /** ID: 16385 | Type: UINT16 */ + /** ID=0x4001 | type=UINT16 | write=true | max=65535 | default=0 */ onTime: number; - /** ID: 16386 | Type: UINT16 */ + /** ID=0x4002 | type=UINT16 | write=true | max=65535 | default=0 */ offWaitTime: number; - /** ID: 16387 | Type: ENUM8 */ + /** ID=0x4003 | type=ENUM8 | write=true | max=255 | special=SetToPreviousValue,ff */ startUpOnOff: number; - /** ID: 20480 | Type: ENUM8 */ + /** ID=0x0001 | type=UINT16 | manufacturerCode=NODON(0x128b) | write=true | max=65535 */ + nodonTransitionTime?: number; + /** ID=0x5000 | type=ENUM8 | write=true | max=255 */ tuyaBacklightSwitch: number; - /** ID: 32769 | Type: ENUM8 */ + /** ID=0x8001 | type=ENUM8 | write=true | max=255 */ tuyaBacklightMode: number; - /** ID: 32770 | Type: ENUM8 */ + /** ID=0x8002 | type=ENUM8 | write=true | max=255 */ moesStartUpOnOff: number; - /** ID: 32772 | Type: ENUM8 */ + /** ID=0x8004 | type=ENUM8 | write=true | max=255 */ tuyaOperationMode: number; - /** ID: 57344 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe000 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ elkoPreWarningTime?: number; - /** ID: 57345 | Type: UINT32 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe001 | type=UINT32 | manufacturerCode=ADEO(0x1277) | write=true | max=4294967295 */ elkoOnTimeReload?: number; - /** ID: 57346 | Type: BITMAP8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe002 | type=BITMAP8 | manufacturerCode=ADEO(0x1277) | write=true */ elkoOnTimeReloadOptions?: number; - /** ID: 1 | Type: UINT16 | Specific to manufacturer: NODON (4747) */ - nodonTransitionTime?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ off: Record; - /** ID: 1 */ + /** ID=0x01 | required=true */ on: Record; - /** ID: 2 */ + /** ID=0x02 | required=true */ toggle: Record; - /** ID: 64 */ + /** ID=0x40 */ offWithEffect: { - /** Type: UINT8 */ + /** type=ENUM8 */ effectid: number; - /** Type: UINT8 */ + /** type=UINT8 */ effectvariant: number; }; - /** ID: 65 */ + /** ID=0x41 */ onWithRecallGlobalScene: Record; - /** ID: 66 */ + /** ID=0x42 */ onWithTimedOff: { - /** Type: UINT8 */ + /** type=UINT8 */ ctrlbits: number; - /** Type: UINT16 */ + /** type=UINT16 */ ontime: number; - /** Type: UINT16 */ + /** type=UINT16 */ offwaittime: number; }; - /** ID: 253 */ - tuyaAction: { - /** Type: UINT8 */ + /** ID=0xfc */ + tuyaAction2: { + /** type=UINT8 | max=255 */ value: number; - /** Type: BUFFER */ - data: Buffer; }; - /** ID: 252 */ - tuyaAction2: { - /** Type: UINT8 */ + /** ID=0xfd */ + tuyaAction: { + /** type=UINT8 | max=255 */ value: number; + /** type=BUFFER */ + data: Buffer; }; }; commandResponses: never; }; genOnOffSwitchCfg: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | required=true | min=0 | max=2 */ switchType: number; - /** ID: 2 | Type: UNKNOWN */ - switchMultiFunction: never; - /** ID: 16 | Type: ENUM8 */ + /** ID=0x0010 | type=ENUM8 | required=true | write=true | min=0 | max=2 */ switchActions: number; }; commands: never; @@ -569,87 +635,132 @@ export interface TClusters { }; genLevelCtrl: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | report=true | scene=true | required=true | default=255 */ currentLevel: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | max=65535 | default=0 */ remainingTime: number; - /** ID: 2 | Type: UINT8 */ + /** ID=0x0002 | type=UINT8 | default=0 */ minLevel: number; - /** ID: 3 | Type: UINT8 */ + /** ID=0x0003 | type=UINT8 | max=255 | default=255 */ maxLevel: number; - /** ID: 15 | Type: BITMAP8 */ + /** ID=0x0004 | type=UINT16 | report=true | default=0 */ + currentFrequency: number; + /** ID=0x0005 | type=UINT16 | default=0 */ + minFrequency: number; + /** ID=0x0006 | type=UINT16 | max=65535 | default=0 */ + maxFrequency: number; + /** ID=0x000f | type=BITMAP8 | write=true | default=0 */ options: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | write=true | max=65535 | default=0 */ onOffTransitionTime: number; - /** ID: 17 | Type: UINT8 */ + /** ID=0x0011 | type=UINT8 | write=true | default=255 */ onLevel: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | write=true | max=65534 | default=65535 */ onTransitionTime: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | write=true | max=65534 | default=65535 */ offTransitionTime: number; - /** ID: 20 | Type: UINT16 */ + /** ID=0x0014 | type=UINT8 | write=true | max=254 */ defaultMoveRate: number; - /** ID: 16384 | Type: UINT8 */ + /** ID=0x4000 | type=UINT8 | write=true | max=255 | special=MinimumDeviceValuePermitted,00,SetToPreviousValue,ff */ startUpCurrentLevel: number; - /** ID: 16384 | Type: UINT8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0x4000 | type=UINT8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ elkoStartUpCurrentLevel?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ moveToLevel: { - /** Type: UINT8 */ + /** type=UINT8 */ level: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ move: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT8 */ + /** type=UINT8 */ rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ step: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT8 */ + /** type=UINT8 */ stepsize: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; - }; - /** ID: 3 */ - stop: Record; - /** ID: 4 */ + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x03 | required=true */ + stop: { + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x04 | required=true */ moveToLevelWithOnOff: { - /** Type: UINT8 */ + /** type=UINT8 */ level: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 5 */ + /** ID=0x05 | required=true */ moveWithOnOff: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT8 */ + /** type=UINT8 */ rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 6 */ + /** ID=0x06 | required=true */ stepWithOnOff: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT8 */ + /** type=UINT8 */ stepsize: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; - }; - /** ID: 7 */ - stopWithOnOff: Record; - /** ID: 240 */ + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x07 | required=true */ + stopWithOnOff: { + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x08 */ + moveToClosestFrequency: { + /** type=UINT16 */ + frequency: number; + }; + /** ID=0xf0 */ moveToLevelTuya: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ level: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ transtime: number; }; }; @@ -657,70 +768,70 @@ export interface TClusters { }; genAlarms: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | max=65535 | default=0 */ alarmCount: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ reset: { - /** Type: UINT8 */ + /** type=ENUM8 */ alarmcode: number; - /** Type: UINT16 */ + /** type=CLUSTER_ID */ clusterid: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ resetAll: Record; - /** ID: 2 */ + /** ID=0x02 */ getAlarm: Record; - /** ID: 3 */ + /** ID=0x03 */ resetLog: Record; - /** ID: 4 */ + /** ID=0x04 */ publishEventLog: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ alarm: { - /** Type: UINT8 */ + /** type=ENUM8 */ alarmcode: number; - /** Type: UINT16 */ + /** type=CLUSTER_ID */ clusterid: number; }; - /** ID: 1 */ + /** ID=0x01 */ getRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT8 */ - alarmcode: number; - /** Type: UINT16 */ - clusterid: number; - /** Type: UINT32 */ - timestamp: number; - }; - /** ID: 2 */ + /** type=ENUM8 | conditions=[{fieldEquals field=status value=0}] */ + alarmcode?: number; + /** type=CLUSTER_ID | conditions=[{fieldEquals field=status value=0}] */ + clusterid?: number; + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ + timestamp?: number; + }; + /** ID=0x02 */ getEventLog: Record; }; }; genTime: { attributes: { - /** ID: 0 | Type: UTC */ + /** ID=0x0000 | type=UTC | write=true | required=true | max=4294967294 | default=4294967295 */ time: number; - /** ID: 1 | Type: BITMAP8 */ + /** ID=0x0001 | type=BITMAP8 | write=true | required=true | default=0 */ timeStatus: number; - /** ID: 2 | Type: INT32 */ + /** ID=0x0002 | type=INT32 | write=true | min=-86400 | max=86400 | default=0 */ timeZone: number; - /** ID: 3 | Type: UINT32 */ + /** ID=0x0003 | type=UINT32 | write=true | max=4294967294 | default=4294967295 */ dstStart: number; - /** ID: 4 | Type: UINT32 */ + /** ID=0x0004 | type=UINT32 | write=true | max=4294967294 | default=4294967295 */ dstEnd: number; - /** ID: 5 | Type: INT32 */ + /** ID=0x0005 | type=INT32 | write=true | min=-86400 | max=86400 | default=0 */ dstShift: number; - /** ID: 6 | Type: UINT32 */ + /** ID=0x0006 | type=UINT32 | max=4294967294 | default=4294967295 */ standardTime: number; - /** ID: 7 | Type: UINT32 */ + /** ID=0x0007 | type=UINT32 | max=4294967294 | default=4294967295 */ localTime: number; - /** ID: 8 | Type: UTC */ + /** ID=0x0008 | type=UTC | default=4294967295 */ lastSetTime: number; - /** ID: 9 | Type: UTC */ + /** ID=0x0009 | type=UTC | write=true | default=4294967295 */ validUntilTime: number; }; commands: never; @@ -728,227 +839,227 @@ export interface TClusters { }; genRssiLocation: { attributes: { - /** ID: 0 | Type: DATA8 */ + /** ID=0x0000 | type=DATA8 | required=true | write=true */ type: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | required=true | write=true */ method: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | max=65535 */ age: number; - /** ID: 3 | Type: UINT8 */ + /** ID=0x0003 | type=UINT8 | max=100 */ qualityMeasure: number; - /** ID: 4 | Type: UINT8 */ + /** ID=0x0004 | type=UINT8 | max=255 */ numOfDevices: number; - /** ID: 16 | Type: INT16 */ + /** ID=0x0010 | type=INT16 | required=true | write=true | min=-32768 | max=32767 */ coordinate1: number; - /** ID: 17 | Type: INT16 */ + /** ID=0x0011 | type=INT16 | required=true | write=true | min=-32768 | max=32767 */ coordinate2: number; - /** ID: 18 | Type: INT16 */ + /** ID=0x0012 | type=INT16 | write=true | min=-32768 | max=32767 */ coordinate3: number; - /** ID: 19 | Type: INT16 */ + /** ID=0x0013 | type=INT16 | required=true | write=true | min=-32768 | max=32767 */ power: number; - /** ID: 20 | Type: UINT16 */ + /** ID=0x0014 | type=UINT16 | required=true | write=true */ pathLossExponent: number; - /** ID: 21 | Type: UINT16 */ + /** ID=0x0015 | type=UINT16 | write=true | max=65535 */ reportingPeriod: number; - /** ID: 22 | Type: UINT16 */ + /** ID=0x0016 | type=UINT16 | write=true | max=65535 */ calcPeriod: number; - /** ID: 23 | Type: UINT8 */ + /** ID=0x0017 | type=UINT8 | required=true | write=true | min=1 | max=255 */ numRSSIMeasurements: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ setAbsolute: { - /** Type: INT16 */ - coord1: number; - /** Type: INT16 */ - coord2: number; - /** Type: INT16 */ - coord3: number; - /** Type: INT16 */ + /** type=INT16 */ + coordinate1: number; + /** type=INT16 */ + coordinate2: number; + /** type=INT16 */ + coordinate3: number; + /** type=INT16 */ power: number; - /** Type: UINT16 */ + /** type=UINT16 */ pathLossExponent: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ setDeviceConfig: { - /** Type: INT16 */ + /** type=INT16 */ power: number; - /** Type: UINT16 */ + /** type=UINT16 */ pathLossExponent: number; - /** Type: UINT16 */ + /** type=UINT16 */ calcPeriod: number; - /** Type: UINT8 */ + /** type=UINT8 */ numRssiMeasurements: number; - /** Type: UINT16 */ + /** type=UINT16 */ reportingPeriod: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ getDeviceConfig: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ targetAddr: string; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ getLocationData: { - /** Type: BITMAP8 */ + /** type=BITMAP8 */ info: number; - /** Type: UINT8 */ + /** type=UINT8 */ numResponses: number; - /** Type: IEEE_ADDR, Conditions: [{bitMaskSet param=info mask=4 reversed=true}] */ + /** type=IEEE_ADDR | conditions=[{bitMaskSet param=info mask=4 reversed=true}] */ targetAddr?: string; }; - /** ID: 4 */ + /** ID=0x04 */ rssiResponse: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ replyingDevice: string; - /** Type: INT16 */ + /** type=INT16 */ x: number; - /** Type: INT16 */ + /** type=INT16 */ y: number; - /** Type: INT16 */ + /** type=INT16 */ z: number; - /** Type: INT8 */ + /** type=INT8 */ rssi: number; - /** Type: UINT8 */ + /** type=UINT8 */ numRssiMeasurements: number; }; - /** ID: 5 */ + /** ID=0x05 */ sendPings: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ targetAddr: string; - /** Type: UINT8 */ + /** type=UINT8 */ numRssiMeasurements: number; - /** Type: UINT16 */ + /** type=UINT16 */ calcPeriod: number; }; - /** ID: 6 */ + /** ID=0x06 */ anchorNodeAnnounce: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ anchorNodeAddr: string; - /** Type: INT16 */ + /** type=INT16 */ x: number; - /** Type: INT16 */ + /** type=INT16 */ y: number; - /** Type: INT16 */ + /** type=INT16 */ z: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ deviceConfigResponse: { - /** Type: ENUM8 */ + /** type=ENUM8 */ status: number; - /** Type: INT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=INT16 | conditions=[{fieldEquals field=status value=0}] */ power?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ pathLossExponent?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ calcPeriod?: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT8 | conditions=[{fieldEquals field=status value=0}] */ numRssiMeasurements?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ reportingPeriod?: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ locationDataResponse: { - /** Type: ENUM8 */ + /** type=ENUM8 */ status: number; - /** Type: DATA8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=DATA8 | conditions=[{fieldEquals field=status value=0}] */ type?: number; - /** Type: INT16, Conditions: [{fieldEquals field=status value=0}] */ - coord1?: number; - /** Type: INT16, Conditions: [{fieldEquals field=status value=0}] */ - coord2?: number; - /** Type: INT16, Conditions: [{fieldEquals field=status value=0}] */ - coord3?: number; - /** Type: INT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=INT16 | conditions=[{fieldEquals field=status value=0}] */ + coordinate1?: number; + /** type=INT16 | conditions=[{fieldEquals field=status value=0}] */ + coordinate2?: number; + /** type=INT16 | conditions=[{fieldEquals field=status value=0}] */ + coordinate3?: number; + /** type=INT16 | conditions=[{fieldEquals field=status value=0}] */ power?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ pathLossExponent?: number; - /** Type: ENUM8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=ENUM8 | conditions=[{fieldEquals field=status value=0}] */ method?: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT8 | conditions=[{fieldEquals field=status value=0}] */ qualityMeasure?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ age?: number; }; - /** ID: 2 */ + /** ID=0x02 */ locationDataNotification: { - /** Type: DATA8 */ + /** type=DATA8 */ type: number; - /** Type: INT16 */ - coord1: number; - /** Type: INT16 */ - coord2: number; - /** Type: INT16, Conditions: [{bitMaskSet param=type mask=2 reversed=true}] */ - coord3?: number; - /** Type: INT16 */ + /** type=INT16 */ + coordinate1: number; + /** type=INT16 */ + coordinate2: number; + /** type=INT16 | conditions=[{bitMaskSet param=type mask=2 reversed=true}] */ + coordinate3?: number; + /** type=INT16 */ power: number; - /** Type: UINT16 */ + /** type=UINT16 */ pathLossExponent: number; - /** Type: ENUM8, Conditions: [{bitMaskSet param=type mask=1 reversed=true}] */ + /** type=ENUM8 | conditions=[{bitMaskSet param=type mask=1 reversed=true}] */ method?: number; - /** Type: UINT8, Conditions: [{bitMaskSet param=type mask=1 reversed=true}] */ + /** type=UINT8 | conditions=[{bitMaskSet param=type mask=1 reversed=true}] */ qualityMeasure?: number; - /** Type: UINT16, Conditions: [{bitMaskSet param=type mask=1 reversed=true}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=type mask=1 reversed=true}] */ age?: number; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ compactLocationDataNotification: { - /** Type: DATA8 */ + /** type=DATA8 */ type: number; - /** Type: INT16 */ - coord1: number; - /** Type: INT16 */ - coord2: number; - /** Type: INT16, Conditions: [{bitMaskSet param=type mask=2 reversed=true}] */ - coord3?: number; - /** Type: UINT8, Conditions: [{bitMaskSet param=type mask=1 reversed=true}] */ + /** type=INT16 */ + coordinate1: number; + /** type=INT16 */ + coordinate2: number; + /** type=INT16 | conditions=[{bitMaskSet param=type mask=2 reversed=true}] */ + coordinate3?: number; + /** type=UINT8 | conditions=[{bitMaskSet param=type mask=1 reversed=true}] */ qualityMeasure?: number; - /** Type: UINT16, Conditions: [{bitMaskSet param=type mask=1 reversed=true}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=type mask=1 reversed=true}] */ age?: number; }; - /** ID: 4 */ + /** ID=0x04 | required=true */ rssiPing: { - /** Type: DATA8 */ + /** type=DATA8 */ type: number; }; - /** ID: 5 */ + /** ID=0x05 */ rssiRequest: Record; - /** ID: 6 */ + /** ID=0x06 */ reportRssiMeasurements: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ measuringDeviceAddr: string; - /** Type: UINT8 */ + /** type=UINT8 */ numNeighbors: number; }; - /** ID: 7 */ + /** ID=0x07 */ requestOwnLocation: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ blindNodeAddr: string; }; }; }; genAnalogInput: { attributes: { - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 65 | Type: SINGLE_PREC */ + /** ID=0x0041 | type=SINGLE_PREC | write=true | writeOptional=true */ maxPresentValue: number; - /** ID: 69 | Type: SINGLE_PREC */ + /** ID=0x0045 | type=SINGLE_PREC | write=true | writeOptional=true */ minPresentValue: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: SINGLE_PREC */ + /** ID=0x0055 | type=SINGLE_PREC | required=true | write=true | report=true */ presentValue: number; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 106 | Type: SINGLE_PREC */ + /** ID=0x006a | type=SINGLE_PREC | write=true | writeOptional=true */ resolution: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | report=true | max=15 | default=0 */ statusFlags: number; - /** ID: 117 | Type: ENUM16 */ + /** ID=0x0075 | type=ENUM16 | write=true | writeOptional=true | max=65535 */ engineeringUnits: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -956,29 +1067,29 @@ export interface TClusters { }; genAnalogOutput: { attributes: { - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 65 | Type: SINGLE_PREC */ + /** ID=0x0041 | type=SINGLE_PREC | write=true | writeOptional=true */ maxPresentValue: number; - /** ID: 69 | Type: SINGLE_PREC */ + /** ID=0x0045 | type=SINGLE_PREC | write=true | writeOptional=true */ minPresentValue: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: SINGLE_PREC */ + /** ID=0x0055 | type=SINGLE_PREC | required=true | write=true | report=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 104 | Type: SINGLE_PREC */ + /** ID=0x0068 | type=SINGLE_PREC | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 106 | Type: SINGLE_PREC */ + /** ID=0x006a | type=SINGLE_PREC | write=true | writeOptional=true */ resolution: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | report=true | max=15 | default=0 */ statusFlags: number; - /** ID: 117 | Type: ENUM16 */ + /** ID=0x0075 | type=ENUM16 | write=true | writeOptional=true | max=65535 */ engineeringUnits: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -986,23 +1097,23 @@ export interface TClusters { }; genAnalogValue: { attributes: { - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: SINGLE_PREC */ + /** ID=0x0055 | type=SINGLE_PREC | required=true | write=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 104 | Type: SINGLE_PREC */ + /** ID=0x0068 | type=SINGLE_PREC | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 117 | Type: ENUM16 */ + /** ID=0x0075 | type=ENUM16 | write=true | writeOptional=true | max=65535 */ engineeringUnits: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1010,23 +1121,23 @@ export interface TClusters { }; genBinaryInput: { attributes: { - /** ID: 4 | Type: CHAR_STR */ + /** ID=0x0004 | type=CHAR_STR | write=true | writeOptional=true | default= */ activeText: string; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 46 | Type: CHAR_STR */ + /** ID=0x002e | type=CHAR_STR | write=true | writeOptional=true | default= */ inactiveText: string; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 84 | Type: ENUM8 */ + /** ID=0x0054 | type=ENUM8 | default=0 */ polarity: number; - /** ID: 85 | Type: BOOLEAN */ + /** ID=0x0055 | type=BOOLEAN | required=true | write=true | writeOptional=true */ presentValue: number; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1034,31 +1145,31 @@ export interface TClusters { }; genBinaryOutput: { attributes: { - /** ID: 4 | Type: CHAR_STR */ + /** ID=0x0004 | type=CHAR_STR | write=true | writeOptional=true | default= */ activeText: string; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 46 | Type: CHAR_STR */ + /** ID=0x002e | type=CHAR_STR | write=true | writeOptional=true | default= */ inactiveText: string; - /** ID: 66 | Type: UINT32 */ + /** ID=0x0042 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ minimumOffTime: number; - /** ID: 67 | Type: UINT32 */ + /** ID=0x0043 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ minimumOnTime: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | writeOptional=true | write=true | default=0 */ outOfService: number; - /** ID: 84 | Type: ENUM8 */ + /** ID=0x0054 | type=ENUM8 | default=0 */ polarity: number; - /** ID: 85 | Type: BOOLEAN */ + /** ID=0x0055 | type=BOOLEAN | required=true | write=true | writeOptional=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true */ reliability: number; - /** ID: 104 | Type: BOOLEAN */ + /** ID=0x0068 | type=BOOLEAN | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1066,29 +1177,29 @@ export interface TClusters { }; genBinaryValue: { attributes: { - /** ID: 4 | Type: CHAR_STR */ + /** ID=0x0004 | type=CHAR_STR | write=true | writeOptional=true | default= */ activeText: string; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 46 | Type: CHAR_STR */ + /** ID=0x002e | type=CHAR_STR | write=true | writeOptional=true | default= */ inactiveText: string; - /** ID: 66 | Type: UINT32 */ + /** ID=0x0042 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ minimumOffTime: number; - /** ID: 67 | Type: UINT32 */ + /** ID=0x0043 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ minimumOnTime: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | writeOptional=true | write=true | default=0 */ outOfService: number; - /** ID: 85 | Type: BOOLEAN */ + /** ID=0x0055 | type=BOOLEAN | required=true | writeOptional=true | write=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true */ reliability: number; - /** ID: 104 | Type: BOOLEAN */ + /** ID=0x0068 | type=BOOLEAN | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1096,21 +1207,21 @@ export interface TClusters { }; genMultistateInput: { attributes: { - /** ID: 14 | Type: ARRAY */ + /** ID=0x000e | type=ARRAY | write=true | writeOptional=true */ stateText: ZclArray | unknown[]; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 74 | Type: UINT16 */ + /** ID=0x004a | type=UINT16 | required=true | write=true | writeOptional=true | min=1 | max=65535 | default=0 */ numberOfStates: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: UINT16 */ + /** ID=0x0055 | type=UINT16 | required=true | write=true | writeOptional=true */ presentValue: number; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1118,25 +1229,25 @@ export interface TClusters { }; genMultistateOutput: { attributes: { - /** ID: 14 | Type: ARRAY */ + /** ID=0x000e | type=ARRAY | write=true | writeOptional=true */ stateText: ZclArray | unknown[]; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 74 | Type: UINT16 */ + /** ID=0x004a | type=UINT16 | required=true | write=true | writeOptional=true | min=1 | max=65535 | default=0 */ numberOfStates: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: UINT16 */ + /** ID=0x0055 | type=UINT16 | required=true | write=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 104 | Type: UINT16 */ + /** ID=0x0068 | type=UINT16 | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1144,25 +1255,25 @@ export interface TClusters { }; genMultistateValue: { attributes: { - /** ID: 14 | Type: ARRAY */ + /** ID=0x000e | type=ARRAY | write=true | writeOptional=true */ stateText: ZclArray | unknown[]; - /** ID: 28 | Type: CHAR_STR */ + /** ID=0x001c | type=CHAR_STR | write=true | writeOptional=true | default= */ description: string; - /** ID: 74 | Type: UINT16 */ + /** ID=0x004a | type=UINT16 | required=true | write=true | writeOptional=true | min=1 | max=65535 | default=0 */ numberOfStates: number; - /** ID: 81 | Type: BOOLEAN */ + /** ID=0x0051 | type=BOOLEAN | required=true | write=true | writeOptional=true | default=0 */ outOfService: number; - /** ID: 85 | Type: UINT16 */ + /** ID=0x0055 | type=UINT16 | required=true | write=true */ presentValue: number; - /** ID: 87 | Type: ARRAY */ + /** ID=0x0057 | type=ARRAY | write=true */ priorityArray: ZclArray | unknown[]; - /** ID: 103 | Type: ENUM8 */ + /** ID=0x0067 | type=ENUM8 | write=true | writeOptional=true | default=0 */ reliability: number; - /** ID: 104 | Type: UINT16 */ + /** ID=0x0068 | type=UINT16 | write=true | writeOptional=true */ relinquishDefault: number; - /** ID: 111 | Type: BITMAP8 */ + /** ID=0x006f | type=BITMAP8 | required=true | max=15 | default=0 */ statusFlags: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 */ applicationType: number; }; commands: never; @@ -1170,355 +1281,796 @@ export interface TClusters { }; genCommissioning: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | write=true | required=true | max=65527 */ shortress: number; - /** ID: 1 | Type: IEEE_ADDR */ + /** ID=0x0001 | type=IEEE_ADDR | write=true | required=true | default=0xffffffffffffffff | special=PANIdUnspecified,ffffffffffffffff */ extendedPANId: string; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | write=true | required=true | max=65535 */ panId: number; - /** ID: 3 | Type: BITMAP32 */ + /** ID=0x0003 | type=BITMAP32 | write=true | required=true */ channelmask: number; - /** ID: 4 | Type: UINT8 */ + /** ID=0x0004 | type=UINT8 | write=true | required=true | min=2 | max=2 */ protocolVersion: number; - /** ID: 5 | Type: UINT8 */ + /** ID=0x0005 | type=UINT8 | write=true | required=true | min=1 | max=2 */ stackProfile: number; - /** ID: 6 | Type: ENUM8 */ + /** ID=0x0006 | type=ENUM8 | write=true | required=true | max=3 */ startupControl: number; - /** ID: 16 | Type: IEEE_ADDR */ + /** ID=0x0010 | type=IEEE_ADDR | write=true | required=true | default=0x0000000000000000 | special=AddressUnspecified,0000000000000000 */ trustCenterress: string; - /** ID: 17 | Type: SEC_KEY */ + /** ID=0x0011 | type=SEC_KEY | write=true */ trustCenterMasterKey: Buffer; - /** ID: 18 | Type: SEC_KEY */ + /** ID=0x0012 | type=SEC_KEY | write=true | required=true */ networkKey: Buffer; - /** ID: 19 | Type: BOOLEAN */ + /** ID=0x0013 | type=BOOLEAN | write=true | required=true | default=1 */ useInsecureJoin: number; - /** ID: 20 | Type: SEC_KEY */ + /** ID=0x0014 | type=SEC_KEY | write=true | required=true */ preconfiguredLinkKey: Buffer; - /** ID: 21 | Type: UINT8 */ + /** ID=0x0015 | type=UINT8 | write=true | required=true | max=255 | default=0 */ networkKeySeqNum: number; - /** ID: 22 | Type: ENUM8 */ + /** ID=0x0016 | type=ENUM8 | write=true | required=true */ networkKeyType: number; - /** ID: 23 | Type: UINT16 */ + /** ID=0x0017 | type=UINT16 | write=true | required=true | default=0 */ networkManagerress: number; - /** ID: 32 | Type: UINT8 */ + /** ID=0x0020 | type=UINT8 | write=true | min=1 | max=255 | default=5 */ scanAttempts: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | write=true | min=1 | max=65535 | default=100 */ timeBetweenScans: number; - /** ID: 34 | Type: UINT16 */ + /** ID=0x0022 | type=UINT16 | write=true | min=1 | default=60 */ rejoinInterval: number; - /** ID: 35 | Type: UINT16 */ + /** ID=0x0023 | type=UINT16 | write=true | min=1 | max=65535 | default=3600 */ maxRejoinInterval: number; - /** ID: 48 | Type: UINT16 */ + /** ID=0x0030 | type=UINT16 | write=true | max=65535 */ indirectPollRate: number; - /** ID: 49 | Type: UINT8 */ + /** ID=0x0031 | type=UINT8 | max=255 */ parentRetryThreshold: number; - /** ID: 64 | Type: BOOLEAN */ + /** ID=0x0040 | type=BOOLEAN | write=true | default=0 */ concentratorFlag: number; - /** ID: 65 | Type: UINT8 */ - concentratorRus: number; - /** ID: 66 | Type: UINT8 */ + /** ID=0x0041 | type=UINT8 | write=true | max=255 | default=15 */ + concentratorRadius: number; + /** ID=0x0042 | type=UINT8 | write=true | max=255 | default=0 */ concentratorDiscoveryTime: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ restartDevice: { - /** Type: UINT8 */ + /** type=BITMAP8 */ options: number; - /** Type: UINT8 */ + /** type=UINT8 */ delay: number; - /** Type: UINT8 */ + /** type=UINT8 */ jitter: number; }; - /** ID: 1 */ + /** ID=0x01 */ saveStartupParams: { - /** Type: UINT8 */ + /** type=BITMAP8 */ options: number; - /** Type: UINT8 */ + /** type=UINT8 */ index: number; }; - /** ID: 2 */ + /** ID=0x02 */ restoreStartupParams: { - /** Type: UINT8 */ + /** type=BITMAP8 */ options: number; - /** Type: UINT8 */ + /** type=UINT8 */ index: number; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ resetStartupParams: { - /** Type: UINT8 */ + /** type=BITMAP8 */ options: number; - /** Type: UINT8 */ + /** type=UINT8 */ index: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ restartDeviceRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ saveStartupParamsRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ restoreStartupParamsRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ resetStartupParamsRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; }; }; + piPartition: { + attributes: { + /** ID=0x0000 | type=UINT16 | required=true | max=65535 | default=1280 */ + maximumIncomingTransferSize: number; + /** ID=0x0001 | type=UINT16 | required=true | max=65535 | default=1280 */ + maximumOutgoingTransferSize: number; + /** ID=0x0002 | type=UINT8 | required=true | write=true | max=255 | default=80 */ + partionedFrameSize: number; + /** ID=0x0003 | type=UINT16 | required=true | write=true | max=65535 | default=1280 */ + largeFrameSize: number; + /** ID=0x0004 | type=UINT8 | required=true | write=true | max=255 | default=100 */ + numberOfAckFrame: number; + /** ID=0x0005 | type=UINT16 | required=true | max=65535 */ + nackTimeout: number; + /** ID=0x0006 | type=UINT8 | required=true | write=true | max=255 */ + interframeDelay: number; + /** ID=0x0007 | type=UINT8 | required=true | max=255 | default=3 */ + numberOfSendRetries: number; + /** ID=0x0008 | type=UINT16 | required=true | max=65535 */ + senderTimeout: number; + /** ID=0x0009 | type=UINT16 | required=true | max=65535 */ + receiverTimeout: number; + }; + commands: { + /** ID=0x00 | required=true */ + transferPartionedFrame: { + /** type=BITMAP8 */ + fragmentionOptions: number; + /** type=UINT8 | conditions=[{bitMaskSet param=fragmentationOptions mask=2 reversed=true}] */ + partitionIndicator?: number; + /** type=OCTET_STR */ + partitionedFrame: Buffer; + }; + /** ID=0x01 | required=true | response=1 */ + readHandshakeParam: { + /** type=CLUSTER_ID */ + partitionedClusterId: number; + /** type=LIST_UINT16 */ + attributeIds: number[]; + }; + /** ID=0x02 | required=true */ + writeHandshakeParam: { + /** type=CLUSTER_ID */ + partitionedClusterId: number; + }; + }; + commandResponses: { + /** ID=0x00 | required=true */ + multipleAck: { + /** type=BITMAP8 */ + ackOptions: number; + /** type=UINT8 | conditions=[{bitMaskSet param=fragmentationOptions mask=1 reversed=true}] */ + firstFrameId?: number; + /** type=LIST_UINT8 | conditions=[{bitMaskSet param=fragmentationOptions mask=1 reversed=true}] */ + nackId?: number[]; + }; + /** ID=0x01 | required=true */ + readHandshakeParamResponse: { + /** type=CLUSTER_ID */ + partitionedClusterId: number; + }; + }; + }; genOta: { attributes: { - /** ID: 0 | Type: IEEE_ADDR */ + /** ID=0x0000 | type=IEEE_ADDR | client=true | required=true | default=0xffffffffffffffff */ upgradeServerId: string; - /** ID: 1 | Type: UINT32 */ + /** ID=0x0001 | type=UINT32 | client=true | max=4294967295 | default=4294967295 */ fileOffset: number; - /** ID: 2 | Type: UINT32 */ + /** ID=0x0002 | type=UINT32 | client=true | max=4294967295 | default=4294967295 */ currentFileVersion: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | client=true | max=65535 | default=65535 */ currentZigbeeStackVersion: number; - /** ID: 4 | Type: UINT32 */ + /** ID=0x0004 | type=UINT32 | client=true | max=4294967295 | default=4294967295 */ downloadedFileVersion: number; - /** ID: 5 | Type: UINT16 */ + /** ID=0x0005 | type=UINT16 | client=true | max=65535 | default=65535 */ downloadedZigbeeStackVersion: number; - /** ID: 6 | Type: ENUM8 */ + /** ID=0x0006 | type=ENUM8 | client=true | required=true | max=255 | default=0 */ imageUpgradeStatus: number; - /** ID: 7 | Type: UINT16 */ + /** ID=0x0007 | type=UINT16 | client=true | max=65535 */ manufacturerId: number; - /** ID: 8 | Type: UINT16 */ + /** ID=0x0008 | type=UINT16 | client=true | max=65535 */ imageTypeId: number; - /** ID: 9 | Type: UINT16 */ + /** ID=0x0009 | type=UINT16 | client=true | max=65534 | default=0 */ minimumBlockReqDelay: number; - /** ID: 10 | Type: UINT32 */ + /** ID=0x000a | type=UINT32 | client=true | max=4294967295 */ imageStamp: number; + /** ID=0x000b | type=ENUM8 | client=true | default=0 */ + upgradeActivationPolicy: number; + /** ID=0x000c | type=ENUM8 | client=true | default=0 */ + upgradeTimeoutPolicy: number; }; commands: { - /** ID: 1 | Response ID: 2 */ + /** ID=0x01 | response=2 | required=true */ queryNextImageRequest: { - /** Type: UINT8 */ + /** type=BITMAP8 */ fieldControl: number; - /** Type: UINT16 */ + /** type=UINT16 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65471 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileVersion: number; - /** Type: UINT16, Conditions: [{bitMaskSet param=fieldControl mask=1}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=fieldControl mask=1}] */ hardwareVersion?: number; }; - /** ID: 3 | Response ID: 5 */ + /** ID=0x03 | response=5 | required=true */ imageBlockRequest: { - /** Type: UINT8 */ + /** type=BITMAP8 */ fieldControl: number; - /** Type: UINT16 */ + /** type=UINT16 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65471 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileVersion: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileOffset: number; - /** Type: UINT8 */ + /** type=UINT8 */ maximumDataSize: number; - /** Type: IEEE_ADDR, Conditions: [{bitMaskSet param=fieldControl mask=1}] */ + /** type=IEEE_ADDR | conditions=[{bitMaskSet param=fieldControl mask=1}] */ requestNodeIeeeAddress?: string; - /** Type: UINT16, Conditions: [{bitMaskSet param=fieldControl mask=2}{minimumRemainingBufferBytes value=2}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=fieldControl mask=2}{minimumRemainingBufferBytes value=2}] */ minimumBlockPeriod?: number; }; - /** ID: 4 | Response ID: 5 */ + /** ID=0x04 | response=5 */ imagePageRequest: { - /** Type: UINT8 */ + /** type=BITMAP8 */ fieldControl: number; - /** Type: UINT16 */ + /** type=UINT16 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65471 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileVersion: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileOffset: number; - /** Type: UINT8 */ + /** type=UINT8 */ maximumDataSize: number; - /** Type: UINT16 */ + /** type=UINT16 */ pageSize: number; - /** Type: UINT16 */ + /** type=UINT16 */ responseSpacing: number; - /** Type: IEEE_ADDR, Conditions: [{bitMaskSet param=fieldControl mask=1}] */ + /** type=IEEE_ADDR | conditions=[{bitMaskSet param=fieldControl mask=1}] */ requestNodeIeeeAddress?: string; }; - /** ID: 6 | Response ID: 7 */ + /** ID=0x06 | response=7 | required=true */ upgradeEndRequest: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16 */ + /** type=UINT16 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65471 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileVersion: number; }; - /** ID: 8 | Response ID: 9 */ + /** ID=0x08 | response=9 */ queryDeviceSpecificFileRequest: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ eui64: string; - /** Type: UINT16 */ + /** type=UINT16 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | min=65472 | max=65534 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 */ fileVersion: number; - /** Type: UINT16 */ + /** type=UINT16 */ zigbeeStackVersion: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ imageNotify: { - /** Type: UINT8 */ + /** type=ENUM8 */ payloadType: number; - /** Type: UINT8 */ + /** type=UINT8 */ queryJitter: number; - /** Type: UINT16, Conditions: [{fieldGT field=payloadType value=0}] */ + /** type=UINT16 | conditions=[{fieldGT field=payloadType value=0}] */ manufacturerCode?: number; - /** Type: UINT16, Conditions: [{fieldGT field=payloadType value=1}] */ + /** type=UINT16 | max=65535 | conditions=[{fieldGT field=payloadType value=1}] */ imageType?: number; - /** Type: UINT32, Conditions: [{fieldGT field=payloadType value=2}] */ + /** type=UINT32 | max=4294967295 | conditions=[{fieldGT field=payloadType value=2}] */ fileVersion?: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ queryNextImageResponse: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ manufacturerCode?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | max=65471 | conditions=[{fieldEquals field=status value=0}] */ imageType?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ fileVersion?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ imageSize?: number; }; - /** ID: 5 */ + /** ID=0x05 | required=true */ imageBlockResponse: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ manufacturerCode?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | max=65471 | conditions=[{fieldEquals field=status value=0}] */ imageType?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ fileVersion?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ fileOffset?: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT8 | conditions=[{fieldEquals field=status value=0}] */ dataSize?: number; - /** Type: BUFFER, Conditions: [{fieldEquals field=status value=0}] */ + /** type=BUFFER | conditions=[{fieldEquals field=status value=0}] */ data?: Buffer; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=151}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=151}] */ currentTime?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=151}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=151}] */ requestTime?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=151}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=151}] */ minimumBlockPeriod?: number; }; - /** ID: 7 */ + /** ID=0x07 | required=true */ upgradeEndResponse: { - /** Type: UINT16 */ + /** type=UINT16 | max=1048575 */ manufacturerCode: number; - /** Type: UINT16 */ + /** type=UINT16 | max=1048575 */ imageType: number; - /** Type: UINT32 */ + /** type=UINT32 | max=68719476735 */ fileVersion: number; - /** Type: UINT32 */ + /** type=UTC */ currentTime: number; - /** Type: UINT32 */ + /** type=UTC */ upgradeTime: number; }; - /** ID: 9 */ + /** ID=0x09 */ queryDeviceSpecificFileResponse: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | conditions=[{fieldEquals field=status value=0}] */ manufacturerCode?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT16 | min=65472 | max=65534 | conditions=[{fieldEquals field=status value=0}] */ imageType?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ fileVersion?: number; - /** Type: UINT32, Conditions: [{fieldEquals field=status value=0}] */ + /** type=UINT32 | conditions=[{fieldEquals field=status value=0}] */ imageSize?: number; }; }; }; + powerProfile: { + attributes: { + /** ID=0x0000 | type=UINT8 | required=true | min=1 | max=254 | default=1 */ + totalProfileNum: number; + /** ID=0x0001 | type=BOOLEAN | required=true | default=0 */ + multipleScheduling: number; + /** ID=0x0002 | type=BITMAP8 | required=true | default=1 */ + energyFormatting: number; + /** ID=0x0003 | type=BOOLEAN | required=true | default=0 */ + energyRemote: number; + /** ID=0x0004 | type=BITMAP8 | required=true | write=true | report=true | default=0 */ + scheduleMode: number; + }; + commands: { + /** ID=0x00 | required=true */ + powerProfileRequest: { + /** type=UINT8 */ + powerProfileId: number; + }; + /** ID=0x01 | required=true */ + powerProfileStateRequest: Record; + /** ID=0x02 | required=true */ + getPowerProfilePriceResponse: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT16 */ + currency: number; + /** type=UINT32 */ + price: number; + /** type=UINT8 */ + priceTrailingDigit: number; + }; + /** ID=0x03 | required=true */ + getOverallSchedulePriceResponse: { + /** type=UINT16 */ + currency: number; + /** type=UINT32 */ + price: number; + /** type=UINT8 */ + priceTrailingDigit: number; + }; + /** ID=0x04 | required=true */ + energyPhasesScheduleNotification: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numScheduledPhases: number; + }; + /** ID=0x05 | required=true */ + energyPhasesScheduleResponse: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numScheduledPhases: number; + }; + /** ID=0x06 | required=true */ + powerProfileScheduleConstraintsRequest: { + /** type=UINT8 */ + powerProfileId: number; + }; + /** ID=0x07 | required=true */ + energyPhasesScheduleStateRequest: { + /** type=UINT8 */ + powerProfileId: number; + }; + /** ID=0x08 | required=true */ + getPowerProfilePriceExtendedResponse: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT16 */ + currency: number; + /** type=UINT32 */ + price: number; + /** type=UINT8 */ + priceTrailingDigit: number; + }; + }; + commandResponses: { + /** ID=0x00 | required=true */ + powerProfileNotification: { + /** type=UINT8 */ + totalProfileNum: number; + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numTransferredPhases: number; + }; + /** ID=0x01 | required=true */ + powerProfileResponse: { + /** type=UINT8 */ + totalProfileNum: number; + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numTransferredPhases: number; + }; + /** ID=0x02 | required=true */ + powerProfileStateResponse: { + /** type=UINT8 */ + powerProfileCount: number; + }; + /** ID=0x03 */ + getPowerProfilePrice: { + /** type=UINT8 */ + powerProfileId: number; + }; + /** ID=0x04 | required=true */ + powerProfilesStateNotification: { + /** type=UINT8 */ + powerProfileCount: number; + }; + /** ID=0x05 */ + getOverallSchedulePrice: Record; + /** ID=0x06 | required=true */ + energyPhasesScheduleRequest: { + /** type=UINT8 */ + powerProfileId: number; + }; + /** ID=0x07 | required=true */ + energyPhasesScheduleStateResponse: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numScheduledPhases: number; + }; + /** ID=0x08 | required=true */ + energyPhasesScheduleStateNotification: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT8 */ + numScheduledPhases: number; + }; + /** ID=0x09 | required=true */ + powerProfileScheduleConstraintsNotification: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT16 */ + startAfter: number; + /** type=UINT16 */ + stopBefore: number; + }; + /** ID=0x0a | required=true */ + powerProfileScheduleConstraintsResponse: { + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT16 */ + startAfter: number; + /** type=UINT16 */ + stopBefore: number; + }; + /** ID=0x0b */ + getPowerProfilePriceExtended: { + /** type=BITMAP8 */ + options: number; + /** type=UINT8 */ + powerProfileId: number; + /** type=UINT16 | conditions=[{minimumRemainingBufferBytes value=2}] */ + powerProfileStartTime?: number; + }; + }; + }; + haApplianceControl: { + attributes: { + /** ID=0x0000 | type=UINT16 | required=true | report=true | max=65535 | default=0 */ + startTime: number; + /** ID=0x0001 | type=UINT16 | required=true | report=true | max=65535 | default=0 */ + finishTime: number; + /** ID=0x0002 | type=UINT16 | report=true | max=65535 | default=0 */ + remainingTime: number; + }; + commands: { + /** ID=0x00 */ + executionOfCommand: { + /** type=ENUM8 */ + commandId: number; + }; + /** ID=0x01 | response=0 | required=true */ + signalState: Record; + /** ID=0x02 */ + writeFunctions: Record; + /** ID=0x03 */ + overloadPauseResume: Record; + /** ID=0x04 */ + overloadPause: Record; + /** ID=0x05 */ + overloadWarning: { + /** type=ENUM8 */ + warningEvent: number; + }; + }; + commandResponses: { + /** ID=0x00 | required=true */ + signalStateRsp: { + /** type=ENUM8 */ + applianceStatus: number; + /** type=BITMAP8 */ + remoteEnableFlagsAndDeviceStatus2: number; + /** type=UINT24 | conditions=[{minimumRemainingBufferBytes value=3}] */ + applianceStatus2?: number; + }; + /** ID=0x00 | required=true */ + signalStateNotification: { + /** type=ENUM8 */ + applianceStatus: number; + /** type=BITMAP8 */ + remoteEnableFlagsAndDeviceStatus2: number; + /** type=UINT24 | conditions=[{minimumRemainingBufferBytes value=3}] */ + applianceStatus2?: number; + }; + }; + }; + pulseWidthModulation: { + attributes: { + /** ID=0x0000 | type=UINT8 | report=true | scene=true | required=true | default=255 */ + currentLevel: number; + /** ID=0x0001 | type=UINT16 | max=65535 | default=0 */ + remainingTime: number; + /** ID=0x0002 | type=UINT8 | default=0 | required=true */ + minLevel: number; + /** ID=0x0003 | type=UINT8 | max=100 | default=100 | required=true */ + maxLevel: number; + /** ID=0x0004 | type=UINT16 | report=true | default=0 | required=true */ + currentFrequency: number; + /** ID=0x0005 | type=UINT16 | default=0 | required=true */ + minFrequency: number; + /** ID=0x0006 | type=UINT16 | max=65535 | default=0 | required=true */ + maxFrequency: number; + /** ID=0x000f | type=BITMAP8 | write=true | default=0 */ + options: number; + /** ID=0x0010 | type=UINT16 | write=true | max=65535 | default=0 */ + onOffTransitionTime: number; + /** ID=0x0011 | type=UINT8 | write=true | default=255 */ + onLevel: number; + /** ID=0x0012 | type=UINT16 | write=true | max=65534 | default=65535 */ + onTransitionTime: number; + /** ID=0x0013 | type=UINT16 | write=true | max=65534 | default=65535 */ + offTransitionTime: number; + /** ID=0x0014 | type=UINT8 | write=true | max=254 */ + defaultMoveRate: number; + /** ID=0x4000 | type=UINT8 | write=true | max=255 | special=MinimumDeviceValuePermitted,00,SetToPreviousValue,ff */ + startUpCurrentLevel: number; + }; + commands: { + /** ID=0x00 | required=true */ + moveToLevel: { + /** type=UINT8 */ + level: number; + /** type=UINT16 */ + transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x01 | required=true */ + move: { + /** type=UINT8 */ + movemode: number; + /** type=UINT8 */ + rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x02 | required=true */ + step: { + /** type=UINT8 */ + stepmode: number; + /** type=UINT8 */ + stepsize: number; + /** type=UINT16 */ + transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x03 | required=true */ + stop: { + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x04 | required=true */ + moveToLevelWithOnOff: { + /** type=UINT8 */ + level: number; + /** type=UINT16 */ + transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x05 | required=true */ + moveWithOnOff: { + /** type=UINT8 */ + movemode: number; + /** type=UINT8 */ + rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x06 | required=true */ + stepWithOnOff: { + /** type=UINT8 */ + stepmode: number; + /** type=UINT8 */ + stepsize: number; + /** type=UINT16 */ + transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x07 | required=true */ + stopWithOnOff: { + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x08 | required=true */ + moveToClosestFrequency: { + /** type=UINT16 */ + frequency: number; + }; + }; + commandResponses: never; + }; genPollCtrl: { attributes: { - /** ID: 0 | Type: UINT32 */ + /** ID=0x0000 | type=UINT32 | write=true | required=true | max=7208960 | default=14400 */ checkinInterval: number; - /** ID: 1 | Type: UINT32 */ + /** ID=0x0001 | type=UINT32 | required=true | min=4 | max=7208960 | default=20 */ longPollInterval: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=65535 | default=2 */ shortPollInterval: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | write=true | required=true | min=1 | max=65535 | default=40 */ fastPollTimeout: number; - /** ID: 4 | Type: UINT32 */ + /** ID=0x0004 | type=UINT32 | default=0 */ checkinIntervalMin: number; - /** ID: 5 | Type: UINT32 */ + /** ID=0x0005 | type=UINT32 | default=0 */ longPollIntervalMin: number; - /** ID: 6 | Type: UINT16 */ + /** ID=0x0006 | type=UINT16 | default=0 */ fastPollTimeoutMax: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ checkinRsp: { - /** Type: BOOLEAN */ + /** type=BOOLEAN */ startFastPolling: number; - /** Type: UINT16 */ + /** type=UINT16 */ fastPollTimeout: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ fastPollStop: Record; - /** ID: 2 */ + /** ID=0x02 */ setLongPollInterval: { - /** Type: UINT32 */ + /** type=UINT32 */ newLongPollInterval: number; }; - /** ID: 3 */ + /** ID=0x03 */ setShortPollInterval: { - /** Type: UINT16 */ + /** type=UINT16 */ newShortPollInterval: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ checkin: Record; }; }; greenPower: { - attributes: never; + attributes: { + /** ID=0x0000 | type=UINT8 | required=true | max=255 */ + gpsMaxSinkTableEntries: number; + /** ID=0x0001 | type=LONG_OCTET_STR | required=true */ + sinkTable: Buffer; + /** ID=0x0002 | type=BITMAP8 | required=true | write=true | default=1 */ + gpsCommunicationMode: number; + /** ID=0x0003 | type=BITMAP8 | required=true | write=true | default=2 */ + gpsCommissioningExitMode: number; + /** ID=0x0004 | type=UINT16 | write=true | max=65535 | default=180 */ + gpsCommissioningWindow: number; + /** ID=0x0005 | type=BITMAP8 | required=true | write=true | default=6 */ + gpsSecurityLevel: number; + /** ID=0x0006 | type=BITMAP24 | required=true */ + gpsFunctionality: number; + /** ID=0x0007 | type=BITMAP24 | required=true | default=16777215 */ + gpsActiveFunctionality: number; + /** ID=0x0010 | type=UINT8 | required=true | max=255 | default=20 | client=true */ + gpsMaxProxyTableEntries: number; + /** ID=0x0011 | type=LONG_OCTET_STR | required=true | default=0 | client=true */ + proxyTable: Buffer; + /** ID=0x0012 | type=UINT8 | write=true | max=5 | default=2 | client=true */ + gppNotificationRetryNumber: number; + /** ID=0x0013 | type=UINT8 | write=true | max=255 | default=100 | client=true */ + gppNotificationRetryTimer: number; + /** ID=0x0014 | type=UINT8 | write=true | max=255 | default=10 | client=true */ + gppMaxSearchCounter: number; + /** ID=0x0015 | type=LONG_OCTET_STR | client=true */ + gppBlockGpdId: Buffer; + /** ID=0x0016 | type=BITMAP24 | required=true | client=true */ + gppFunctionality: number; + /** ID=0x0017 | type=BITMAP24 | required=true | client=true */ + gppActiveFunctionality: number; + /** ID=0x0020 | type=BITMAP8 | write=true | max=7 | default=0 */ + gpSharedSecurityKeyType: number; + /** ID=0x0021 | type=SEC_KEY | write=true */ + gpSharedSecurityKey: Buffer; + /** ID=0x0022 | type=SEC_KEY | write=true */ + gpLinkKey: Buffer; + }; commands: { - /** ID: 0 */ + /** ID=0x00 */ notification: { - /** Type: BITMAP16 */ + /** type=BITMAP16 */ options: number; - /** Type: UINT32, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=0}] */ + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ srcID?: number; - /** Type: IEEE_ADDR, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdIEEEAddr?: string; - /** Type: UINT8, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdEndpoint?: number; - /** Type: UINT32 */ + /** type=UINT32 */ frameCounter: number; - /** Type: UINT8 */ + /** type=UINT8 */ commandID: number; - /** Type: UINT8 */ + /** type=UINT8 */ payloadSize: number; - /** Type: GPD_FRAME, Conditions: [{bitMaskSet param=options mask=192 reversed=true}] */ + /** type=GPD_FRAME | conditions=[{bitMaskSet param=options mask=192 reversed=true}] */ commandFrame?: | Gpd | GpdChannelRequest @@ -1530,28 +2082,56 @@ export interface TClusters { | GpdCommissioningReply | GpdChannelConfiguration | GpdCustomReply; - /** Type: UINT16, Conditions: [{bitMaskSet param=options mask=16384}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=options mask=16384}] */ gppNwkAddr?: number; - /** Type: BITMAP8, Conditions: [{bitMaskSet param=options mask=16384}] */ + /** type=BITMAP8 | conditions=[{bitMaskSet param=options mask=16384}] */ gppGpdLink?: number; }; - /** ID: 4 */ + /** ID=0x01 */ + pairingSearch: { + /** type=BITMAP16 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + }; + /** ID=0x03 */ + tunnelingStop: { + /** type=BITMAP8 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + /** type=UINT32 */ + gpdSecurityFrameCounter: number; + /** type=UINT16 */ + gppShortAddress: number; + /** type=BITMAP8 */ + gppGpdLink: number; + }; + /** ID=0x04 */ commissioningNotification: { - /** Type: BITMAP16 */ + /** type=BITMAP16 */ options: number; - /** Type: UINT32, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=0}] */ + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ srcID?: number; - /** Type: IEEE_ADDR, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdIEEEAddr?: string; - /** Type: UINT8, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdEndpoint?: number; - /** Type: UINT32 */ + /** type=UINT32 */ frameCounter: number; - /** Type: UINT8 */ + /** type=UINT8 */ commandID: number; - /** Type: UINT8 */ + /** type=UINT8 */ payloadSize: number; - /** Type: GPD_FRAME, Conditions: [{bitMaskSet param=options mask=48 reversed=true}{bitMaskSet param=options mask=512 reversed=true}] */ + /** type=GPD_FRAME | conditions=[{bitMaskSet param=options mask=48 reversed=true}{bitMaskSet param=options mask=512 reversed=true}] */ commandFrame?: | Gpd | GpdChannelRequest @@ -1563,32 +2143,132 @@ export interface TClusters { | GpdCommissioningReply | GpdChannelConfiguration | GpdCustomReply; - /** Type: UINT16, Conditions: [{bitMaskSet param=options mask=2048}] */ + /** type=UINT16 | conditions=[{bitMaskSet param=options mask=2048}] */ gppNwkAddr?: number; - /** Type: BITMAP8, Conditions: [{bitMaskSet param=options mask=2048}] */ + /** type=BITMAP8 | conditions=[{bitMaskSet param=options mask=2048}] */ gppGpdLink?: number; - /** Type: UINT32, Conditions: [{bitMaskSet param=options mask=512}] */ + /** type=UINT32 | conditions=[{bitMaskSet param=options mask=512}] */ mic?: number; }; + /** ID=0x04 */ + sinkCommissioningMode: { + /** type=BITMAP8 */ + options: number; + /** type=UINT16 | max=65535 */ + gpmAddressForSecurity: number; + /** type=UINT16 | max=65535 */ + gpmAddressForPairing: number; + /** type=UINT8 */ + sinkEndpoint: number; + }; + /** ID=0x07 */ + translationTableUpdate: { + /** type=BITMAP16 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + }; + /** ID=0x08 | response=8 */ + translationTableReq: { + /** type=UINT8 */ + startIndex: number; + }; + /** ID=0x0a | response=10 */ + sinkTableReq: { + /** type=BITMAP8 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + /** type=UINT8 */ + index: number; + }; + /** ID=0x0b */ + proxyTableRsp: { + /** type=ENUM8 */ + status: number; + /** type=UINT8 */ + totalNumberNonEmptyEntries: number; + /** type=UINT8 */ + startIndex: number; + /** type=UINT8 */ + entriesCount: number; + }; }; commandResponses: { - /** ID: 6 */ + /** ID=0x00 */ + notificationResponse: { + /** type=BITMAP8 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + /** type=UINT32 */ + gpdSecurityFrameCounter: number; + }; + /** ID=0x01 */ + pairing: { + /** type=BITMAP24 */ + options: number; + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ + srcID?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdIEEEAddr?: string; + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ + gpdEndpoint?: number; + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=4 size=3 value=6}] */ + sinkIEEEAddr?: string; + /** type=UINT16 | conditions=[{bitFieldEnum param=options offset=4 size=3 value=6}] */ + sinkNwkAddr?: number; + /** type=UINT16 | conditions=[{bitFieldEnum param=options offset=4 size=3 value=4}] */ + sinkGroupID?: number; + /** type=UINT8 | conditions=[{bitMaskSet param=options mask=8}] */ + deviceID?: number; + /** type=UINT32 | conditions=[{bitMaskSet param=options mask=16384}] */ + frameCounter?: number; + /** type=SEC_KEY | conditions=[{bitMaskSet param=options mask=32768}] */ + gpdKey?: Buffer; + /** type=UINT16 | conditions=[{bitMaskSet param=options mask=65536}] */ + assignedAlias?: number; + /** type=UINT8 | conditions=[{bitMaskSet param=options mask=131072}] */ + groupcastRadius?: number; + }; + /** ID=0x02 */ + commisioningMode: { + /** type=BITMAP8 */ + options: number; + /** type=UINT16 | conditions=[{bitMaskSet param=options mask=2}] */ + commisioningWindow?: number; + /** type=UINT8 | conditions=[{bitMaskSet param=options mask=16}] */ + channel?: number; + }; + /** ID=0x06 */ response: { - /** Type: UINT8 */ + /** type=UINT8 */ options: number; - /** Type: UINT16 */ + /** type=UINT16 */ tempMaster: number; - /** Type: BITMAP8 */ + /** type=BITMAP8 */ tempMasterTx: number; - /** Type: UINT32, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=0}] */ + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ srcID?: number; - /** Type: IEEE_ADDR, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdIEEEAddr?: string; - /** Type: UINT8, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdEndpoint?: number; - /** Type: UINT8 */ + /** type=UINT8 */ gpdCmd: number; - /** Type: GPD_FRAME */ + /** type=GPD_FRAME */ gpdPayload: | Gpd | GpdChannelRequest @@ -1601,83 +2281,105 @@ export interface TClusters { | GpdChannelConfiguration | GpdCustomReply; }; - /** ID: 1 */ - pairing: { - /** Type: BITMAP24 */ + /** ID=0x08 */ + translationTableRsp: { + /** type=ENUM8 */ + status: number; + /** type=BITMAP8 */ + options: number; + /** type=UINT8 */ + totalNumberEntries: number; + /** type=UINT8 */ + startIndex: number; + /** type=UINT8 */ + entriesCount: number; + }; + /** ID=0x0a */ + sinkTableRsp: { + /** type=ENUM8 */ + status: number; + /** type=UINT8 */ + totalNumberNonEmptyEntries: number; + /** type=UINT8 */ + startIndex: number; + /** type=UINT8 */ + entriesCount: number; + }; + /** ID=0x0b */ + proxyTableReq: { + /** type=BITMAP8 */ options: number; - /** Type: UINT32, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=0}] */ + /** type=UINT32 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=0}] */ srcID?: number; - /** Type: IEEE_ADDR, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=IEEE_ADDR | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdIEEEAddr?: string; - /** Type: UINT8, Conditions: [{bitFieldEnum param=options offset=0 size=3 value=2}] */ + /** type=UINT8 | conditions=[{bitFieldEnum param=options offset=0 size=3 value=2}] */ gpdEndpoint?: number; - /** Type: IEEE_ADDR, Conditions: [{bitFieldEnum param=options offset=4 size=3 value=6}] */ - sinkIEEEAddr?: string; - /** Type: UINT16, Conditions: [{bitFieldEnum param=options offset=4 size=3 value=6}] */ - sinkNwkAddr?: number; - /** Type: UINT16, Conditions: [{bitFieldEnum param=options offset=4 size=3 value=4}] */ - sinkGroupID?: number; - /** Type: UINT8, Conditions: [{bitMaskSet param=options mask=8}] */ - deviceID?: number; - /** Type: UINT32, Conditions: [{bitMaskSet param=options mask=16384}] */ - frameCounter?: number; - /** Type: SEC_KEY, Conditions: [{bitMaskSet param=options mask=32768}] */ - gpdKey?: Buffer; - /** Type: UINT16, Conditions: [{bitMaskSet param=options mask=65536}] */ - assignedAlias?: number; - /** Type: UINT8, Conditions: [{bitMaskSet param=options mask=131072}] */ - groupcastRadius?: number; - }; - /** ID: 2 */ - commisioningMode: { - /** Type: BITMAP8 */ - options: number; - /** Type: UINT16, Conditions: [{bitMaskSet param=options mask=2}] */ - commisioningWindow?: number; - /** Type: UINT8, Conditions: [{bitMaskSet param=options mask=16}] */ - channel?: number; + /** type=UINT8 */ + index: number; }; }; }; mobileDeviceCfg: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | required=true | write=true | min=1 | max=65535 | default=15 */ keepAliveTime: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | write=true | max=65535 | default=65535 | special=Never,ffff */ rejoinTimeout: number; }; commands: never; - commandResponses: never; + commandResponses: { + /** ID=0x00 | required=true */ + keepAliveNotification: { + /** type=UINT16 */ + keepAliveTime: number; + /** type=UINT16 */ + rejoinTimeout: number; + }; + }; }; neighborCleaning: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | required=true | write=true | min=1 | max=65535 | default=30 */ neighborCleaningTimeout: number; }; - commands: never; + commands: { + /** ID=0x00 | required=true */ + purgeEntries: Record; + }; commandResponses: never; }; nearestGateway: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | required=true | write=true | max=65528 | default=0 */ nearestGateway: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | read=false | write=true | max=65528 | default=0 */ newMobileNode: number; }; commands: never; commandResponses: never; }; + keepAlive: { + attributes: { + /** ID=0x0000 | type=UINT8 | required=true | max=255 | default=10 */ + tcKeepAliveBase: number; + /** ID=0x0001 | type=UINT16 | required=true | max=65535 | default=300 */ + tcKeepAliveJitter: number; + }; + commands: never; + commandResponses: never; + }; closuresShadeCfg: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | min=1 | max=65534 */ physicalClosedLimit: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | max=254 */ motorStepSize: number; - /** ID: 2 | Type: BITMAP8 */ + /** ID=0x0002 | type=BITMAP8 | write=true | required=true | default=0 */ status: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | write=true | required=true | min=1 | max=65534 | default=1 */ losedLimit: number; - /** ID: 18 | Type: ENUM8 */ + /** ID=0x0011 | type=ENUM8 | write=true | required=true | max=254 | default=0 */ mode: number; }; commands: never; @@ -1685,605 +2387,607 @@ export interface TClusters { }; closuresDoorLock: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | report=true | required=true */ lockState: number; - /** ID: 38 | Type: BITMAP16 */ + /** ID=0x0001 | type=ENUM8 | required=true */ lockType: number; - /** ID: 2 | Type: BOOLEAN */ + /** ID=0x0002 | type=BOOLEAN | required=true */ actuatorEnabled: number; - /** ID: 3 | Type: ENUM8 */ + /** ID=0x0003 | type=ENUM8 | report=true */ doorState: number; - /** ID: 4 | Type: UINT32 */ + /** ID=0x0004 | type=UINT32 | write=true */ doorOpenEvents: number; - /** ID: 5 | Type: UINT32 */ + /** ID=0x0005 | type=UINT32 | write=true */ doorClosedEvents: number; - /** ID: 6 | Type: UINT16 */ + /** ID=0x0006 | type=UINT16 | write=true */ openPeriod: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | default=0 */ numOfLockRecordsSupported: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | default=0 */ numOfTotalUsersSupported: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | default=0 */ numOfPinUsersSupported: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | default=0 */ numOfRfidUsersSupported: number; - /** ID: 20 | Type: UINT8 */ + /** ID=0x0014 | type=UINT8 | default=0 */ numOfWeekDaySchedulesSupportedPerUser: number; - /** ID: 21 | Type: UINT8 */ + /** ID=0x0015 | type=UINT8 | default=0 */ numOfYearDaySchedulesSupportedPerUser: number; - /** ID: 22 | Type: UINT8 */ + /** ID=0x0016 | type=UINT8 | default=0 */ numOfHolidayScheduledsSupported: number; - /** ID: 23 | Type: UINT8 */ + /** ID=0x0017 | type=UINT8 | default=8 */ maxPinLen: number; - /** ID: 24 | Type: UINT8 */ + /** ID=0x0018 | type=UINT8 | default=4 */ minPinLen: number; - /** ID: 25 | Type: UINT8 */ + /** ID=0x0019 | type=UINT8 | default=20 */ maxRfidLen: number; - /** ID: 26 | Type: UINT8 */ + /** ID=0x001a | type=UINT8 | default=8 */ minRfidLen: number; - /** ID: 32 | Type: BOOLEAN */ + /** ID=0x0020 | type=BOOLEAN | write=true | writeOptional=true | report=true | default=0 */ enableLogging: number; - /** ID: 33 | Type: CHAR_STR */ + /** ID=0x0021 | type=CHAR_STR | write=true | writeOptional=true | report=true | default= | length=2 */ language: string; - /** ID: 34 | Type: UINT8 */ + /** ID=0x0022 | type=UINT8 | write=true | writeOptional=true | report=true | default=0 */ ledSettings: number; - /** ID: 35 | Type: UINT32 */ + /** ID=0x0023 | type=UINT32 | write=true | writeOptional=true | report=true | default=0 | special=Disabled,0 */ autoRelockTime: number; - /** ID: 36 | Type: UINT8 */ + /** ID=0x0024 | type=UINT8 | write=true | writeOptional=true | report=true | default=0 */ soundVolume: number; - /** ID: 37 | Type: UINT32 */ + /** ID=0x0025 | type=ENUM8 | write=true | writeOptional=true | report=true | default=0 */ operatingMode: number; - /** ID: 39 | Type: BITMAP16 */ + /** ID=0x0026 | type=BITMAP16 | default=1 */ + supportedOperatingModes: number; + /** ID=0x0027 | type=BITMAP16 | report=true | default=0 */ defaultConfigurationRegister: number; - /** ID: 40 | Type: BOOLEAN */ + /** ID=0x0028 | type=BOOLEAN | write=true | writeOptional=true | report=true | default=1 */ enableLocalProgramming: number; - /** ID: 41 | Type: BOOLEAN */ + /** ID=0x0029 | type=BOOLEAN | write=true | report=true | default=0 */ enableOneTouchLocking: number; - /** ID: 42 | Type: BOOLEAN */ + /** ID=0x002a | type=BOOLEAN | write=true | report=true | default=0 */ enableInsideStatusLed: number; - /** ID: 43 | Type: BOOLEAN */ + /** ID=0x002b | type=BOOLEAN | write=true | report=true | default=0 */ enablePrivacyModeButton: number; - /** ID: 48 | Type: UINT8 */ + /** ID=0x0030 | type=UINT8 | write=true | writeOptional=true | report=true | default=0 */ wrongCodeEntryLimit: number; - /** ID: 49 | Type: UINT8 */ + /** ID=0x0031 | type=UINT8 | write=true | writeOptional=true | report=true | default=0 */ userCodeTemporaryDisableTime: number; - /** ID: 50 | Type: BOOLEAN */ + /** ID=0x0032 | type=BOOLEAN | write=true | writeOptional=true | report=true | default=0 */ sendPinOta: number; - /** ID: 51 | Type: BOOLEAN */ + /** ID=0x0033 | type=BOOLEAN | write=true | writeOptional=true | report=true | default=0 */ requirePinForRfOperation: number; - /** ID: 52 | Type: UINT8 */ + /** ID=0x0034 | type=ENUM8 | report=true | default=0 */ zigbeeSecurityLevel: number; - /** ID: 64 | Type: BITMAP16 */ + /** ID=0x0040 | type=BITMAP16 | write=true | report=true | default=0 */ alarmMask: number; - /** ID: 65 | Type: BITMAP16 */ + /** ID=0x0041 | type=BITMAP16 | write=true | report=true | default=0 */ keypadOperationEventMask: number; - /** ID: 66 | Type: BITMAP16 */ + /** ID=0x0042 | type=BITMAP16 | write=true | report=true | default=0 */ rfOperationEventMask: number; - /** ID: 67 | Type: BITMAP16 */ + /** ID=0x0043 | type=BITMAP16 | write=true | report=true | default=0 */ manualOperationEventMask: number; - /** ID: 68 | Type: BITMAP16 */ + /** ID=0x0044 | type=BITMAP16 | write=true | report=true | default=0 */ rfidOperationEventMask: number; - /** ID: 69 | Type: BITMAP16 */ + /** ID=0x0045 | type=BITMAP16 | write=true | report=true | default=0 */ keypadProgrammingEventMask: number; - /** ID: 70 | Type: BITMAP16 */ + /** ID=0x0046 | type=BITMAP16 | write=true | report=true | default=0 */ rfProgrammingEventMask: number; - /** ID: 71 | Type: BITMAP16 */ + /** ID=0x0047 | type=BITMAP16 | write=true | report=true | default=0 */ rfidProgrammingEventMask: number; }; commands: { - /** ID: 0 | Response ID: 0 */ + /** ID=0x00 | response=0 | required=true */ lockDoor: { - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 1 | Response ID: 1 */ + /** ID=0x01 | response=1 | required=true */ unlockDoor: { - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 2 | Response ID: 2 */ + /** ID=0x02 | response=2 */ toggleDoor: { - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 3 | Response ID: 3 */ + /** ID=0x03 | response=3 */ unlockWithTimeout: { - /** Type: UINT16 */ + /** type=UINT16 */ timeout: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 4 | Response ID: 4 */ + /** ID=0x04 | response=4 */ getLogRecord: { - /** Type: UINT16 */ + /** type=UINT16 | special=MostRecent,0 */ logindex: number; }; - /** ID: 5 | Response ID: 5 */ + /** ID=0x05 | response=5 */ setPinCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 6 | Response ID: 6 */ + /** ID=0x06 | response=6 */ getPinCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 7 | Response ID: 7 */ + /** ID=0x07 | response=7 */ clearPinCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 8 | Response ID: 8 */ + /** ID=0x08 | response=8 */ clearAllPinCodes: Record; - /** ID: 9 | Response ID: 9 */ + /** ID=0x09 | response=9 */ setUserStatus: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; }; - /** ID: 10 | Response ID: 10 */ + /** ID=0x0a | response=10 */ getUserStatus: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 11 | Response ID: 11 */ + /** ID=0x0b | response=11 */ setWeekDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ daysmask: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=23 */ starthour: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=59 */ startminute: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=23 */ endhour: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=59 */ endminute: number; }; - /** ID: 12 | Response ID: 12 */ + /** ID=0x0c | response=12 */ getWeekDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 13 | Response ID: 13 */ + /** ID=0x0d | response=13 */ clearWeekDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 14 | Response ID: 14 */ + /** ID=0x0e | response=14 */ setYearDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalstarttime: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalendtime: number; }; - /** ID: 15 | Response ID: 15 */ + /** ID=0x0f | response=15 */ getYearDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 16 | Response ID: 16 */ + /** ID=0x10 | response=16 */ clearYearDaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 17 | Response ID: 17 */ + /** ID=0x11 | response=17 */ setHolidaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ holidayscheduleid: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalstarttime: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalendtime: number; - /** Type: UINT8 */ + /** type=ENUM8 */ opermodelduringholiday: number; }; - /** ID: 18 | Response ID: 18 */ + /** ID=0x12 | response=18 */ getHolidaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ holidayscheduleid: number; }; - /** ID: 19 | Response ID: 19 */ + /** ID=0x13 | response=19 */ clearHolidaySchedule: { - /** Type: UINT8 */ + /** type=UINT8 */ holidayscheduleid: number; }; - /** ID: 20 | Response ID: 20 */ + /** ID=0x14 | response=20 */ setUserType: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; }; - /** ID: 21 | Response ID: 21 */ + /** ID=0x15 | response=21 */ getUserType: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 22 | Response ID: 22 */ + /** ID=0x16 | response=22 */ setRfidCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 23 | Response ID: 23 */ + /** ID=0x17 | response=23 */ getRfidCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 24 | Response ID: 24 */ + /** ID=0x18 | response=24 */ clearRfidCode: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; }; - /** ID: 25 | Response ID: 25 */ + /** ID=0x19 | response=25 */ clearAllRfidCodes: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ lockDoorRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ unlockDoorRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 2 */ + /** ID=0x02 */ toggleDoorRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 3 */ + /** ID=0x03 */ unlockWithTimeoutRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; }; - /** ID: 4 */ + /** ID=0x04 */ getLogRecordRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ logentryid: number; - /** Type: UINT32 */ + /** type=UINT32 */ timestamp: number; - /** Type: UINT8 */ + /** type=ENUM8 */ eventtype: number; - /** Type: UINT8 */ + /** type=UINT8 */ source: number; - /** Type: UINT8 */ + /** type=UINT8 */ eventidalarmcode: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 5 */ + /** ID=0x05 */ setPinCodeRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 6 */ + /** ID=0x06 */ getPinCodeRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 7 */ + /** ID=0x07 */ clearPinCodeRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 8 */ + /** ID=0x08 */ clearAllPinCodesRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 9 */ + /** ID=0x09 */ setUserStatusRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 10 */ + /** ID=0x0a */ getUserStatusRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; }; - /** ID: 11 */ + /** ID=0x0b */ setWeekDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 12 */ + /** ID=0x0c */ getWeekDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ status: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ daysmask: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=23 */ starthour: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=59 */ startminute: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=23 */ endhour: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=59 */ endminute: number; }; - /** ID: 13 */ + /** ID=0x0d */ clearWeekDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 14 */ + /** ID=0x0e */ setYearDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 15 */ + /** ID=0x0f */ getYearDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ scheduleid: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalstarttime: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalendtime: number; }; - /** ID: 16 */ + /** ID=0x10 */ clearYearDayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 17 */ + /** ID=0x11 */ setHolidayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 18 */ + /** ID=0x12 */ getHolidayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ holidayscheduleid: number; - /** Type: UINT8 */ + /** type=UINT8 */ status: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalstarttime: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocalendtime: number; - /** Type: UINT8 */ + /** type=ENUM8 */ opermodelduringholiday: number; }; - /** ID: 19 */ + /** ID=0x13 */ clearHolidayScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 20 */ + /** ID=0x14 */ setUserTypeRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 21 */ + /** ID=0x15 */ getUserTypeRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; }; - /** ID: 22 */ + /** ID=0x16 */ setRfidCodeRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 23 */ + /** ID=0x17 */ getRfidCodeRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; - /** Type: CHAR_STR */ - pincodevalue: string; + /** type=OCTET_STR */ + pincodevalue: Buffer; }; - /** ID: 24 */ + /** ID=0x18 */ clearRfidCodeRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 25 */ + /** ID=0x19 */ clearAllRfidCodesRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; - /** ID: 32 */ + /** ID=0x20 */ operationEventNotification: { - /** Type: UINT8 */ + /** type=UINT8 */ opereventsrc: number; - /** Type: UINT8 */ + /** type=UINT8 */ opereventcode: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: OCTET_STR */ + /** type=OCTET_STR */ pin: Buffer; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocaltime: number; - /** Type: UINT8 */ - data: number; + /** type=CHAR_STR */ + data: string; }; - /** ID: 33 */ + /** ID=0x21 */ programmingEventNotification: { - /** Type: UINT8 */ + /** type=UINT8 */ programeventsrc: number; - /** Type: UINT8 */ + /** type=UINT8 */ programeventcode: number; - /** Type: UINT16 */ + /** type=UINT16 */ userid: number; - /** Type: OCTET_STR */ + /** type=OCTET_STR */ pin: Buffer; - /** Type: UINT8 */ + /** type=ENUM8 */ usertype: number; - /** Type: UINT8 */ + /** type=UINT8 */ userstatus: number; - /** Type: UINT32 */ + /** type=UINT32 */ zigbeelocaltime: number; - /** Type: UINT8 */ - data: number; + /** type=CHAR_STR */ + data: string; }; }; }; closuresWindowCovering: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | required=true | default=0 */ windowCoveringType: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | max=65535 | default=0 */ physicalClosedLimitLiftCm: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | max=65535 | default=0 */ physicalClosedLimitTiltDdegree: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=65535 | default=0 */ currentPositionLiftCm: number; - /** ID: 4 | Type: UINT16 */ + /** ID=0x0004 | type=UINT16 | max=65535 | default=0 */ currentPositionTiltDdegree: number; - /** ID: 5 | Type: UINT16 */ + /** ID=0x0005 | type=UINT16 | max=65535 | default=0 */ numOfActuationsLift: number; - /** ID: 6 | Type: UINT16 */ + /** ID=0x0006 | type=UINT16 | max=65535 | default=0 */ numOfActuationsTilt: number; - /** ID: 7 | Type: BITMAP8 */ + /** ID=0x0007 | type=BITMAP8 | required=true | default=3 */ configStatus: number; - /** ID: 8 | Type: UINT8 */ + /** ID=0x0008 | type=UINT8 | report=true | scene=true | max=100 | default=0 */ currentPositionLiftPercentage: number; - /** ID: 9 | Type: UINT8 */ + /** ID=0x0009 | type=UINT8 | report=true | scene=true | max=100 | default=0 */ currentPositionTiltPercentage: number; - /** ID: 10 | Type: BITMAP8 */ - operationalStatus: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | max=65535 | default=0 */ installedOpenLimitLiftCm: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | max=65535 | default=65535 */ installedClosedLimitLiftCm: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | max=65535 | default=0 */ installedOpenLimitTiltDdegree: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | max=65535 | default=65535 */ installedClosedLimitTiltDdegree: number; - /** ID: 20 | Type: UINT16 */ + /** ID=0x0014 | type=UINT16 | write=true | max=65535 | default=0 */ velocityLift: number; - /** ID: 21 | Type: UINT16 */ + /** ID=0x0015 | type=UINT16 | write=true | max=65535 | default=0 */ accelerationTimeLift: number; - /** ID: 22 | Type: UINT16 */ + /** ID=0x0016 | type=UINT16 | write=true | max=65535 | default=0 */ decelerationTimeLift: number; - /** ID: 23 | Type: BITMAP8 */ + /** ID=0x0017 | type=BITMAP8 | required=true | default=4 */ windowCoveringMode: number; - /** ID: 24 | Type: OCTET_STR */ + /** ID=0x0018 | type=OCTET_STR | default=1,0x0000 */ intermediateSetpointsLift: Buffer; - /** ID: 25 | Type: OCTET_STR */ + /** ID=0x0019 | type=OCTET_STR | default=1,0x0000 */ intermediateSetpointsTilt: Buffer; - /** ID: 61440 | Type: ENUM8 */ + /** ID=0x000a | type=BITMAP8 */ + operationalStatus: number; + /** ID=0xe000 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ + elkoDriveCloseDuration?: number; + /** ID=0xe010 | type=BITMAP8 | manufacturerCode=ADEO(0x1277) | write=true */ + elkoProtectionStatus?: number; + /** ID=0xe012 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ + elkoSunProtectionIlluminanceThreshold?: number; + /** ID=0xe013 | type=BITMAP8 | manufacturerCode=ADEO(0x1277) | write=true */ + elkoProtectionSensor?: number; + /** ID=0xe014 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ + elkoLiftDriveUpTime?: number; + /** ID=0xe015 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ + elkoLiftDriveDownTime?: number; + /** ID=0xe016 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ + elkoTiltOpenCloseAndStepTime?: number; + /** ID=0xe017 | type=UINT8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ + elkoTiltPositionPercentageAfterMoveToLevel?: number; + /** ID=0xf000 | type=ENUM8 | write=true | max=255 */ tuyaMovingState: number; - /** ID: 61441 | Type: ENUM8 */ + /** ID=0xf001 | type=ENUM8 | write=true | max=255 */ tuyaCalibration: number; - /** ID: 61441 | Type: ENUM8 | Specific to manufacturer: LEGRAND_GROUP (4129) */ + /** ID=0xf001 | type=ENUM8 | manufacturerCode=LEGRAND_GROUP(0x1021) | write=true | max=255 */ stepPositionLift?: number; - /** ID: 61442 | Type: ENUM8 */ + /** ID=0xf002 | type=ENUM8 | write=true | max=255 */ tuyaMotorReversal: number; - /** ID: 61442 | Type: ENUM8 | Specific to manufacturer: LEGRAND_GROUP (4129) */ + /** ID=0xf002 | type=ENUM8 | manufacturerCode=LEGRAND_GROUP(0x1021) | write=true | max=255 */ calibrationMode?: number; - /** ID: 61443 | Type: UINT16 */ + /** ID=0xf003 | type=UINT16 | write=true | max=65535 */ moesCalibrationTime: number; - /** ID: 61443 | Type: ENUM8 | Specific to manufacturer: LEGRAND_GROUP (4129) */ + /** ID=0xf003 | type=ENUM8 | manufacturerCode=LEGRAND_GROUP(0x1021) | write=true | max=255 */ targetPositionTiltPercentage?: number; - /** ID: 61444 | Type: ENUM8 | Specific to manufacturer: LEGRAND_GROUP (4129) */ + /** ID=0xf004 | type=ENUM8 | manufacturerCode=LEGRAND_GROUP(0x1021) | write=true | max=255 */ stepPositionTilt?: number; - /** ID: 57344 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ - elkoDriveCloseDuration?: number; - /** ID: 57360 | Type: BITMAP8 | Specific to manufacturer: ADEO (4727) */ - elkoProtectionStatus?: number; - /** ID: 57363 | Type: BITMAP8 | Specific to manufacturer: ADEO (4727) */ - elkoProtectionSensor?: number; - /** ID: 57362 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ - elkoSunProtectionIlluminanceThreshold?: number; - /** ID: 57364 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ - elkoLiftDriveUpTime?: number; - /** ID: 57365 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ - elkoLiftDriveDownTime?: number; - /** ID: 57366 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ - elkoTiltOpenCloseAndStepTime?: number; - /** ID: 57367 | Type: UINT8 | Specific to manufacturer: ADEO (4727) */ - elkoTiltPositionPercentageAfterMoveToLevel?: number; - /** ID: 64705 | Type: UINT16 | Specific to manufacturer: NIKO_NV (4703) */ + /** ID=0xfcc1 | type=UINT16 | manufacturerCode=NIKO_NV(0x125f) | write=true | max=65535 */ nikoCalibrationTimeUp?: number; - /** ID: 64706 | Type: UINT16 | Specific to manufacturer: NIKO_NV (4703) */ + /** ID=0xfcc2 | type=UINT16 | manufacturerCode=NIKO_NV(0x125f) | write=true | max=65535 */ nikoCalibrationTimeDown?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ upOpen: Record; - /** ID: 1 */ + /** ID=0x01 | required=true */ downClose: Record; - /** ID: 2 */ + /** ID=0x02 | required=true */ stop: Record; - /** ID: 4 */ + /** ID=0x04 */ goToLiftValue: { - /** Type: UINT16 */ + /** type=UINT16 */ liftvalue: number; }; - /** ID: 5 */ + /** ID=0x05 */ goToLiftPercentage: { - /** Type: UINT8 */ + /** type=UINT8 | max=100 */ percentageliftvalue: number; }; - /** ID: 7 */ + /** ID=0x07 */ goToTiltValue: { - /** Type: UINT16 */ + /** type=UINT16 */ tiltvalue: number; }; - /** ID: 8 */ + /** ID=0x08 */ goToTiltPercentage: { - /** Type: UINT8 */ + /** type=UINT8 | max=100 */ percentagetiltvalue: number; }; - /** ID: 128 */ + /** ID=0x80 */ elkoStopOrStepLiftPercentage: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ direction: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ stepvalue: number; }; }; @@ -2291,87 +2995,87 @@ export interface TClusters { }; barrierControl: { attributes: { - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | report=true | required=true */ movingState: number; - /** ID: 2 | Type: BITMAP16 */ + /** ID=0x0002 | type=BITMAP16 | report=true | required=true */ safetyStatus: number; - /** ID: 3 | Type: BITMAP8 */ + /** ID=0x0003 | type=BITMAP8 | required=true */ capabilities: number; - /** ID: 4 | Type: UINT16 */ + /** ID=0x0004 | type=UINT16 | write=true | max=65534 | default=0 */ openEvents: number; - /** ID: 5 | Type: UINT16 */ + /** ID=0x0005 | type=UINT16 | write=true | max=65534 | default=0 */ closeEvents: number; - /** ID: 6 | Type: UINT16 */ + /** ID=0x0006 | type=UINT16 | write=true | max=65534 | default=0 */ commandOpenEvents: number; - /** ID: 7 | Type: UINT16 */ + /** ID=0x0007 | type=UINT16 | write=true | max=65534 | default=0 */ commandCloseEvents: number; - /** ID: 8 | Type: UINT16 */ + /** ID=0x0008 | type=UINT16 | write=true | max=65534 */ openPeriod: number; - /** ID: 9 | Type: UINT16 */ + /** ID=0x0009 | type=UINT16 | write=true | max=65534 */ closePeriod: number; - /** ID: 10 | Type: UINT8 */ + /** ID=0x000a | type=UINT8 | report=true | scene=true | required=true | max=100 | special=PositionUnknown,ff */ barrierPosition: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ goToPercent: { - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=100 */ percentOpen: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ stop: Record; }; commandResponses: never; }; hvacPumpCfgCtrl: { attributes: { - /** ID: 0 | Type: INT16 */ + /** ID=0x0000 | type=INT16 | required=true | min=-32767 | max=32767 */ maxPressure: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65534 */ maxSpeed: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | max=65534 */ maxFlow: number; - /** ID: 3 | Type: INT16 */ + /** ID=0x0003 | type=INT16 | min=-32767 | max=32767 */ minConstPressure: number; - /** ID: 4 | Type: INT16 */ + /** ID=0x0004 | type=INT16 | min=-32767 | max=32767 */ maxConstPressure: number; - /** ID: 5 | Type: INT16 */ + /** ID=0x0005 | type=INT16 | min=-32767 | max=32767 */ minCompPressure: number; - /** ID: 6 | Type: INT16 */ + /** ID=0x0006 | type=INT16 | min=-32767 | max=32767 */ maxCompPressure: number; - /** ID: 7 | Type: UINT16 */ + /** ID=0x0007 | type=UINT16 | max=65534 */ minConstSpeed: number; - /** ID: 8 | Type: UINT16 */ + /** ID=0x0008 | type=UINT16 | max=65534 */ maxConstSpeed: number; - /** ID: 9 | Type: UINT16 */ + /** ID=0x0009 | type=UINT16 | max=65534 */ minConstFlow: number; - /** ID: 10 | Type: UINT16 */ + /** ID=0x000a | type=UINT16 | max=65534 */ maxConstFlow: number; - /** ID: 11 | Type: INT16 */ + /** ID=0x000b | type=INT16 | min=-27315 | max=32767 */ minConstTemp: number; - /** ID: 12 | Type: INT16 */ + /** ID=0x000c | type=INT16 | min=-27315 | max=32767 */ maxConstTemp: number; - /** ID: 16 | Type: BITMAP16 */ + /** ID=0x0010 | type=BITMAP16 | report=true */ pumpStatus: number; - /** ID: 17 | Type: ENUM8 */ + /** ID=0x0011 | type=ENUM8 | required=true | max=254 */ effectiveOperationMode: number; - /** ID: 18 | Type: ENUM8 */ + /** ID=0x0012 | type=ENUM8 | required=true | max=254 */ effectiveControlMode: number; - /** ID: 19 | Type: INT16 */ + /** ID=0x0013 | type=INT16 | report=true | required=true | min=0 | max=32767 */ capacity: number; - /** ID: 20 | Type: UINT16 */ + /** ID=0x0014 | type=UINT16 | max=65534 */ speed: number; - /** ID: 21 | Type: UINT24 */ + /** ID=0x0015 | type=UINT24 | write=true | max=16777214 | default=0 */ lifetimeRunningHours: number; - /** ID: 22 | Type: UINT24 */ + /** ID=0x0016 | type=UINT24 | write=true | max=16777214 */ power: number; - /** ID: 23 | Type: UINT32 */ + /** ID=0x0017 | type=UINT32 | max=4294967294 | default=0 */ lifetimeEnergyConsumed: number; - /** ID: 32 | Type: ENUM8 */ + /** ID=0x0020 | type=ENUM8 | write=true | required=true | max=254 | default=0 */ operationMode: number; - /** ID: 33 | Type: ENUM8 */ + /** ID=0x0021 | type=ENUM8 | write=true | max=254 | default=0 */ controlMode: number; - /** ID: 34 | Type: BITMAP16 */ + /** ID=0x0022 | type=BITMAP16 */ alarmMask: number; }; commands: never; @@ -2379,320 +3083,334 @@ export interface TClusters { }; hvacThermostat: { attributes: { - /** ID: 0 | Type: INT16 */ + /** ID=0x0000 | type=INT16 | report=true | required=true | min=-27315 | max=32767 */ localTemp: number; - /** ID: 1 | Type: INT16 */ + /** ID=0x0001 | type=INT16 | min=-27315 | max=32767 */ outdoorTemp: number; - /** ID: 2 | Type: BITMAP8 */ + /** ID=0x0002 | type=BITMAP8 | default=1 */ occupancy: number; - /** ID: 3 | Type: INT16 */ + /** ID=0x0003 | type=INT16 | min=-27315 | max=32767 | default=700 */ absMinHeatSetpointLimit: number; - /** ID: 4 | Type: INT16 */ + /** ID=0x0004 | type=INT16 | min=-27315 | max=32767 | default=3000 */ absMaxHeatSetpointLimit: number; - /** ID: 5 | Type: INT16 */ + /** ID=0x0005 | type=INT16 | min=-27315 | max=32767 | default=1600 */ absMinCoolSetpointLimit: number; - /** ID: 6 | Type: INT16 */ + /** ID=0x0006 | type=INT16 | min=-27315 | max=32767 | default=3200 */ absMaxCoolSetpointLimit: number; - /** ID: 7 | Type: UINT8 */ + /** ID=0x0007 | type=UINT8 | report=true | max=100 */ pICoolingDemand: number; - /** ID: 8 | Type: UINT8 */ + /** ID=0x0008 | type=UINT8 | report=true | max=100 */ pIHeatingDemand: number; - /** ID: 9 | Type: BITMAP8 */ + /** ID=0x0009 | type=BITMAP8 | write=true | writeOptional=true | default=0 */ systemTypeConfig: number; - /** ID: 16 | Type: INT8 */ + /** ID=0x0010 | type=INT8 | write=true | min=-25 | max=25 | default=0 */ localTemperatureCalibration: number; - /** ID: 17 | Type: INT16 */ + /** ID=0x0011 | type=INT16 | write=true | scene=true | default=2600 */ occupiedCoolingSetpoint: number; - /** ID: 18 | Type: INT16 */ + /** ID=0x0012 | type=INT16 | write=true | scene=true | default=2000 */ occupiedHeatingSetpoint: number; - /** ID: 19 | Type: INT16 */ + /** ID=0x0013 | type=INT16 | write=true | default=2600 */ unoccupiedCoolingSetpoint: number; - /** ID: 20 | Type: INT16 */ + /** ID=0x0014 | type=INT16 | write=true | default=2000 */ unoccupiedHeatingSetpoint: number; - /** ID: 21 | Type: INT16 */ + /** ID=0x0015 | type=INT16 | write=true | min=-27315 | max=32767 | default=700 */ minHeatSetpointLimit: number; - /** ID: 22 | Type: INT16 */ + /** ID=0x0016 | type=INT16 | write=true | min=-27315 | max=32767 | default=3000 */ maxHeatSetpointLimit: number; - /** ID: 23 | Type: INT16 */ + /** ID=0x0017 | type=INT16 | write=true | min=-27315 | max=32767 | default=1600 */ minCoolSetpointLimit: number; - /** ID: 24 | Type: INT16 */ + /** ID=0x0018 | type=INT16 | write=true | min=-27315 | max=32767 | default=3200 */ maxCoolSetpointLimit: number; - /** ID: 25 | Type: INT8 */ + /** ID=0x0019 | type=INT8 | write=true | writeOptional=true | min=10 | max=25 | default=25 */ minSetpointDeadBand: number; - /** ID: 26 | Type: BITMAP8 */ + /** ID=0x001a | type=BITMAP8 | write=true | default=0 */ remoteSensing: number; - /** ID: 27 | Type: ENUM8 */ + /** ID=0x001b | type=ENUM8 | write=true | required=true | default=4 */ ctrlSeqeOfOper: number; - /** ID: 28 | Type: ENUM8 */ + /** ID=0x001c | type=ENUM8 | write=true | required=true | default=1 */ systemMode: number; - /** ID: 29 | Type: BITMAP8 */ + /** ID=0x001d | type=BITMAP8 | default=0 */ alarmMask: number; - /** ID: 30 | Type: ENUM8 */ + /** ID=0x001e | type=ENUM8 | default=0 */ runningMode: number; - /** ID: 32 | Type: ENUM8 */ + /** ID=0x0020 | type=ENUM8 */ startOfWeek: number; - /** ID: 33 | Type: UINT8 */ + /** ID=0x0021 | type=UINT8 | max=255 | default=0 */ numberOfWeeklyTrans: number; - /** ID: 34 | Type: UINT8 */ + /** ID=0x0022 | type=UINT8 | max=255 | default=0 */ numberOfDailyTrans: number; - /** ID: 35 | Type: ENUM8 */ + /** ID=0x0023 | type=ENUM8 | write=true | default=0 */ tempSetpointHold: number; - /** ID: 36 | Type: UINT16 */ + /** ID=0x0024 | type=UINT16 | write=true | min=0 | max=1440 */ tempSetpointHoldDuration: number; - /** ID: 37 | Type: BITMAP8 */ + /** ID=0x0025 | type=BITMAP8 | write=true | report=true | default=0 */ programingOperMode: number; - /** ID: 41 | Type: BITMAP16 */ + /** ID=0x0029 | type=BITMAP16 */ runningState: number; - /** ID: 48 | Type: ENUM8 */ + /** ID=0x0030 | type=ENUM8 | default=0 */ setpointChangeSource: number; - /** ID: 49 | Type: INT16 */ + /** ID=0x0031 | type=INT16 | min=0 | max=65535 */ setpointChangeAmount: number; - /** ID: 50 | Type: UTC */ + /** ID=0x0032 | type=UTC | max=4294967294 | default=0 */ setpointChangeSourceTimeStamp: number; - /** ID: 64 | Type: ENUM8 */ + /** ID=0x0034 | type=UINT8 | write=true */ + occupiedSetback: number; + /** ID=0x0035 | type=UINT8 | min=0 */ + occupiedSetbackMin: number; + /** ID=0x0036 | type=UINT8 */ + occupiedSetbackMax: number; + /** ID=0x0037 | type=UINT8 | write=true */ + unoccupiedSetback: number; + /** ID=0x0038 | type=UINT8 | min=0 */ + unoccupiedSetbackMin: number; + /** ID=0x0039 | type=UINT8 */ + unoccupiedSetbackMax: number; + /** ID=0x003a | type=UINT8 | write=true */ + emergencyHeatDelta: number; + /** ID=0x0040 | type=ENUM8 | write=true | default=0 */ acType: number; - /** ID: 65 | Type: UINT16 */ + /** ID=0x0041 | type=UINT16 | write=true | max=65535 | default=0 */ acCapacity: number; - /** ID: 66 | Type: ENUM8 */ + /** ID=0x0042 | type=ENUM8 | write=true | default=0 */ acRefrigerantType: number; - /** ID: 67 | Type: ENUM8 */ + /** ID=0x0043 | type=ENUM8 | write=true | default=0 */ acConpressorType: number; - /** ID: 68 | Type: BITMAP32 */ + /** ID=0x0044 | type=BITMAP32 | write=true | max=4294967295 | default=0 */ acErrorCode: number; - /** ID: 69 | Type: ENUM8 */ + /** ID=0x0045 | type=ENUM8 | write=true | default=0 */ acLouverPosition: number; - /** ID: 70 | Type: INT16 */ + /** ID=0x0046 | type=INT16 | min=-27315 | max=32767 */ acCollTemp: number; - /** ID: 71 | Type: ENUM8 */ + /** ID=0x0047 | type=ENUM8 | write=true | default=0 */ acCapacityFormat: number; - /** ID: 1024 | Type: ENUM8 | Specific to manufacturer: SINOPE_TECHNOLOGIES (4508) */ + /** ID=0x0101 | type=UINT16 | manufacturerCode=ASTREL_GROUP_SRL(0x1071) | write=true | max=65535 */ + fourNoksHysteresisHigh?: number; + /** ID=0x0102 | type=UINT16 | manufacturerCode=ASTREL_GROUP_SRL(0x1071) | write=true | max=65535 */ + fourNoksHysteresisLow?: number; + /** ID=0x0400 | type=ENUM8 | manufacturerCode=SINOPE_TECHNOLOGIES(0x119c) | write=true | max=255 */ SinopeOccupancy?: number; - /** ID: 1025 | Type: UINT16 | Specific to manufacturer: SINOPE_TECHNOLOGIES (4508) */ + /** ID=0x0401 | type=UINT16 | write=true | max=65535 */ + elkoLoad: number; + /** ID=0x0401 | type=UINT16 | manufacturerCode=SINOPE_TECHNOLOGIES(0x119c) | write=true | max=65535 */ SinopeMainCycleOutput?: number; - /** ID: 1026 | Type: ENUM8 | Specific to manufacturer: SINOPE_TECHNOLOGIES (4508) */ + /** ID=0x0402 | type=CHAR_STR | write=true */ + elkoDisplayText: string; + /** ID=0x0402 | type=ENUM8 | manufacturerCode=SINOPE_TECHNOLOGIES(0x119c) | write=true | max=255 */ SinopeBacklight?: number; - /** ID: 1028 | Type: UINT16 | Specific to manufacturer: SINOPE_TECHNOLOGIES (4508) */ + /** ID=0x0403 | type=ENUM8 | write=true | max=255 */ + elkoSensor: number; + /** ID=0x0404 | type=UINT8 | write=true | max=255 */ + elkoRegulatorTime: number; + /** ID=0x0404 | type=UINT16 | manufacturerCode=SINOPE_TECHNOLOGIES(0x119c) | write=true | max=65535 */ SinopeAuxCycleOutput?: number; - /** ID: 16412 | Type: ENUM8 */ - StelproSystemMode: number; - /** ID: 16385 | Type: INT16 */ - StelproOutdoorTemp: number; - /** ID: 16384 | Type: ENUM8 | Specific to manufacturer: VIESSMANN_ELEKTRONIK_GMBH (4641) */ + /** ID=0x0405 | type=BOOLEAN | write=true */ + elkoRegulatorMode: number; + /** ID=0x0406 | type=BOOLEAN | write=true */ + elkoPowerStatus: number; + /** ID=0x0407 | type=OCTET_STR | write=true */ + elkoDateTime: Buffer; + /** ID=0x0408 | type=UINT16 | write=true | max=65535 */ + elkoMeanPower: number; + /** ID=0x0409 | type=INT16 | write=true | min=-32768 | max=32767 */ + elkoExternalTemp: number; + /** ID=0x0411 | type=BOOLEAN | write=true */ + elkoNightSwitching: number; + /** ID=0x0412 | type=BOOLEAN | write=true */ + elkoFrostGuard: number; + /** ID=0x0413 | type=BOOLEAN | write=true */ + elkoChildLock: number; + /** ID=0x0414 | type=UINT8 | write=true | max=255 */ + elkoMaxFloorTemp: number; + /** ID=0x0415 | type=BOOLEAN | write=true */ + elkoRelayState: number; + /** ID=0x0416 | type=OCTET_STR | write=true */ + elkoVersion: Buffer; + /** ID=0x0417 | type=INT8 | write=true | min=-128 | max=127 */ + elkoCalibration: number; + /** ID=0x0418 | type=UINT8 | write=true | max=255 */ + elkoLastMessageId: number; + /** ID=0x0419 | type=UINT8 | write=true | max=255 */ + elkoLastMessageStatus: number; + /** ID=0x4000 | type=ENUM8 | manufacturerCode=VIESSMANN_ELEKTRONIK_GMBH(0x1221) | write=true | max=255 */ viessmannWindowOpenInternal?: number; - /** ID: 16387 | Type: BOOLEAN | Specific to manufacturer: VIESSMANN_ELEKTRONIK_GMBH (4641) */ - viessmannWindowOpenForce?: number; - /** ID: 16402 | Type: BOOLEAN | Specific to manufacturer: VIESSMANN_ELEKTRONIK_GMBH (4641) */ - viessmannAssemblyMode?: number; - /** ID: 57616 | Type: ENUM8 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ - schneiderWiserSpecific?: number; - /** ID: 16384 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4000 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossWindowOpenInternal?: number; - /** ID: 16387 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4001 | type=INT16 | write=true | min=-32768 | max=32767 */ + StelproOutdoorTemp: number; + /** ID=0x4003 | type=BOOLEAN | manufacturerCode=VIESSMANN_ELEKTRONIK_GMBH(0x1221) | write=true */ + viessmannWindowOpenForce?: number; + /** ID=0x4003 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossWindowOpenExternal?: number; - /** ID: 16400 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4010 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossDayOfWeek?: number; - /** ID: 16401 | Type: UINT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4011 | type=UINT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=65535 */ danfossTriggerTime?: number; - /** ID: 16402 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4012 | type=BOOLEAN | manufacturerCode=VIESSMANN_ELEKTRONIK_GMBH(0x1221) | write=true */ + viessmannAssemblyMode?: number; + /** ID=0x4012 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossMountedModeActive?: number; - /** ID: 16403 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4013 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossMountedModeControl?: number; - /** ID: 16404 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4014 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossThermostatOrientation?: number; - /** ID: 16405 | Type: INT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4015 | type=INT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-32768 | max=32767 */ danfossExternalMeasuredRoomSensor?: number; - /** ID: 16406 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4016 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossRadiatorCovered?: number; - /** ID: 16416 | Type: UINT8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x401c | type=ENUM8 | write=true | max=255 */ + StelproSystemMode: number; + /** ID=0x4020 | type=UINT8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossAlgorithmScaleFactor?: number; - /** ID: 16432 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4030 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossHeatAvailable?: number; - /** ID: 16433 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4031 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossHeatRequired?: number; - /** ID: 16434 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4032 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossLoadBalancingEnable?: number; - /** ID: 16448 | Type: INT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4040 | type=INT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-32768 | max=32767 */ danfossLoadRoomMean?: number; - /** ID: 16458 | Type: INT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404a | type=INT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-32768 | max=32767 */ danfossLoadEstimate?: number; - /** ID: 16459 | Type: INT8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404b | type=INT8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-128 | max=127 */ danfossRegulationSetpointOffset?: number; - /** ID: 16460 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404c | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossAdaptionRunControl?: number; - /** ID: 16461 | Type: BITMAP8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404d | type=BITMAP8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossAdaptionRunStatus?: number; - /** ID: 16462 | Type: BITMAP8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404e | type=BITMAP8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossAdaptionRunSettings?: number; - /** ID: 16463 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x404f | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossPreheatStatus?: number; - /** ID: 16464 | Type: UINT32 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4050 | type=UINT32 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossPreheatTime?: number; - /** ID: 16465 | Type: BOOLEAN | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4051 | type=BOOLEAN | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossWindowOpenFeatureEnable?: number; - /** ID: 16640 | Type: BITMAP16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4100 | type=BITMAP16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossRoomStatusCode?: number; - /** ID: 16656 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4110 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossOutputStatus?: number; - /** ID: 16672 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4120 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossRoomFloorSensorMode?: number; - /** ID: 16673 | Type: INT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4121 | type=INT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-32768 | max=32767 */ danfossFloorMinSetpoint?: number; - /** ID: 16674 | Type: INT16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4122 | type=INT16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | min=-32768 | max=32767 */ danfossFloorMaxSetpoint?: number; - /** ID: 16688 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4130 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossScheduleTypeUsed?: number; - /** ID: 16689 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4131 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossIcon2PreHeat?: number; - /** ID: 16719 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x414f | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossIcon2PreHeatStatus?: number; - /** ID: 1025 | Type: UINT16 */ - elkoLoad: number; - /** ID: 1026 | Type: CHAR_STR */ - elkoDisplayText: string; - /** ID: 1027 | Type: ENUM8 */ - elkoSensor: number; - /** ID: 1028 | Type: UINT8 */ - elkoRegulatorTime: number; - /** ID: 1029 | Type: BOOLEAN */ - elkoRegulatorMode: number; - /** ID: 1030 | Type: BOOLEAN */ - elkoPowerStatus: number; - /** ID: 1031 | Type: OCTET_STR */ - elkoDateTime: Buffer; - /** ID: 1032 | Type: UINT16 */ - elkoMeanPower: number; - /** ID: 1033 | Type: INT16 */ - elkoExternalTemp: number; - /** ID: 1041 | Type: BOOLEAN */ - elkoNightSwitching: number; - /** ID: 1042 | Type: BOOLEAN */ - elkoFrostGuard: number; - /** ID: 1043 | Type: BOOLEAN */ - elkoChildLock: number; - /** ID: 1044 | Type: UINT8 */ - elkoMaxFloorTemp: number; - /** ID: 1045 | Type: BOOLEAN */ - elkoRelayState: number; - /** ID: 1046 | Type: OCTET_STR */ - elkoVersion: Buffer; - /** ID: 1047 | Type: INT8 */ - elkoCalibration: number; - /** ID: 1048 | Type: UINT8 */ - elkoLastMessageId: number; - /** ID: 1049 | Type: UINT8 */ - elkoLastMessageStatus: number; - /** ID: 257 | Type: UINT16 | Specific to manufacturer: ASTREL_GROUP_SRL (4209) */ - fourNoksHysteresisHigh?: number; - /** ID: 258 | Type: UINT16 | Specific to manufacturer: ASTREL_GROUP_SRL (4209) */ - fourNoksHysteresisLow?: number; + /** ID=0xe110 | type=ENUM8 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=255 */ + schneiderWiserSpecific?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ setpointRaiseLower: { - /** Type: UINT8 */ + /** type=ENUM8 */ mode: number; - /** Type: INT8 */ + /** type=INT8 */ amount: number; }; - /** ID: 1 */ + /** ID=0x01 */ setWeeklySchedule: { - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=10 */ numoftrans: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ dayofweek: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ mode: number; - /** Type: LIST_THERMO_TRANSITIONS */ + /** type=LIST_THERMO_TRANSITIONS */ transitions: ThermoTransition[]; }; - /** ID: 2 | Response ID: 0 */ + /** ID=0x02 | response=0 */ getWeeklySchedule: { - /** Type: UINT8 */ + /** type=BITMAP8 */ daystoreturn: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ modetoreturn: number; }; - /** ID: 3 */ + /** ID=0x03 */ clearWeeklySchedule: Record; - /** ID: 4 | Response ID: 1 */ + /** ID=0x04 | response=1 */ getRelayStatusLog: Record; - /** ID: 64 */ + /** ID=0x40 */ danfossSetpointCommand: { - /** Type: ENUM8 */ + /** type=ENUM8 | max=255 */ setpointType: number; - /** Type: INT16 */ + /** type=INT16 | min=-32768 | max=32767 */ setpoint: number; }; - /** ID: 128 */ + /** ID=0x80 */ schneiderWiserThermostatBoost: { - /** Type: ENUM8 */ + /** type=ENUM8 | max=255 */ command: number; - /** Type: ENUM8 */ + /** type=ENUM8 | max=255 */ enable: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ temperature: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ duration: number; }; - /** ID: 224 */ + /** ID=0xa0 */ + plugwiseCalibrateValve: Record; + /** ID=0xe0 */ wiserSmartSetSetpoint: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ operatingmode: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zonemode: number; - /** Type: INT16 */ + /** type=INT16 | min=-32768 | max=32767 */ setpoint: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ reserved: number; }; - /** ID: 225 */ + /** ID=0xe1 */ wiserSmartSetFipMode: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zonemode: number; - /** Type: ENUM8 */ + /** type=ENUM8 | max=255 */ fipmode: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ reserved: number; }; - /** ID: 226 */ + /** ID=0xe2 */ wiserSmartCalibrateValve: Record; - /** ID: 160 */ - plugwiseCalibrateValve: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ getWeeklyScheduleRsp: { - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=10 */ numoftrans: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ dayofweek: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ mode: number; - /** Type: LIST_THERMO_TRANSITIONS */ + /** type=LIST_THERMO_TRANSITIONS */ transitions: ThermoTransition[]; }; - /** ID: 1 */ + /** ID=0x01 */ getRelayStatusLogRsp: { - /** Type: UINT16 */ + /** type=UINT16 */ timeofday: number; - /** Type: UINT16 */ + /** type=BITMAP8 */ relaystatus: number; - /** Type: UINT16 */ + /** type=INT16 */ localtemp: number; - /** Type: UINT8 */ + /** type=UINT8 */ humidity: number; - /** Type: UINT16 */ + /** type=INT16 */ setpoint: number; - /** Type: UINT16 */ + /** type=UINT16 */ unreadentries: number; }; }; }; hvacFanCtrl: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | write=true | required=true | max=6 | default=5 */ fanMode: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | write=true | required=true | max=4 | default=2 */ fanModeSequence: number; }; commands: never; @@ -2700,21 +3418,21 @@ export interface TClusters { }; hvacDehumidificationCtrl: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | max=100 */ relativeHumidity: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | report=true | required=true */ dehumidCooling: number; - /** ID: 16 | Type: UINT8 */ + /** ID=0x0010 | type=UINT8 | write=true | required=true | min=30 | max=100 | default=50 */ rhDehumidSetpoint: number; - /** ID: 17 | Type: ENUM8 */ + /** ID=0x0011 | type=ENUM8 | write=true | default=0 */ relativeHumidityMode: number; - /** ID: 18 | Type: ENUM8 */ + /** ID=0x0012 | type=ENUM8 | write=true | default=1 */ dehumidLockout: number; - /** ID: 19 | Type: UINT8 */ + /** ID=0x0013 | type=UINT8 | write=true | required=true | min=2 | max=20 | default=2 */ dehumidHysteresis: number; - /** ID: 20 | Type: UINT8 */ + /** ID=0x0014 | type=UINT8 | write=true | required=true | min=20 | max=100 | default=20 */ dehumidMaxCool: number; - /** ID: 21 | Type: ENUM8 */ + /** ID=0x0015 | type=ENUM8 | write=true | max=1 | default=0 */ relativeHumidDisplay: number; }; commands: never; @@ -2722,13 +3440,13 @@ export interface TClusters { }; hvacUserInterfaceCfg: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | write=true | required=true | max=1 | default=0 */ tempDisplayMode: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | write=true | required=true | max=5 | default=0 */ keypadLockout: number; - /** ID: 2 | Type: ENUM8 */ + /** ID=0x0002 | type=ENUM8 | write=true | max=1 | default=0 */ programmingVisibility: number; - /** ID: 16384 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4000 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossViewingDirection?: number; }; commands: never; @@ -2736,340 +3454,404 @@ export interface TClusters { }; lightingColorCtrl: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | report=true | max=254 | default=0 */ currentHue: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | report=true | scene=true | max=254 | default=0 */ currentSaturation: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | max=65534 | default=0 */ remainingTime: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | report=true | scene=true | max=65279 | default=24939 */ currentX: number; - /** ID: 4 | Type: UINT16 */ + /** ID=0x0004 | type=UINT16 | report=true | scene=true | max=65279 | default=24701 */ currentY: number; - /** ID: 5 | Type: ENUM8 */ + /** ID=0x0005 | type=ENUM8 | max=4 */ driftCompensation: number; - /** ID: 6 | Type: CHAR_STR */ + /** ID=0x0006 | type=CHAR_STR | maxLen=254 */ compensationText: string; - /** ID: 7 | Type: UINT16 */ + /** ID=0x0007 | type=UINT16 | report=true | scene=true | max=65279 | default=250 | special=Undefined,0000 */ colorTemperature: number; - /** ID: 8 | Type: ENUM8 */ + /** ID=0x0008 | type=ENUM8 | required=true | max=2 | default=1 */ colorMode: number; - /** ID: 15 | Type: BITMAP8 */ + /** ID=0x000f | type=BITMAP8 | write=true | required=true | default=0 */ options: number; - /** ID: 16 | Type: UINT8 */ + /** ID=0x0010 | type=UINT8 | required=true | max=6 */ numPrimaries: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | max=65279 */ primary1X: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | max=65279 */ primary1Y: number; - /** ID: 19 | Type: UINT8 */ + /** ID=0x0013 | type=UINT8 | max=255 */ primary1Intensity: number; - /** ID: 21 | Type: UINT16 */ + /** ID=0x0015 | type=UINT16 | max=65279 */ primary2X: number; - /** ID: 22 | Type: UINT16 */ + /** ID=0x0016 | type=UINT16 | max=65279 */ primary2Y: number; - /** ID: 23 | Type: UINT8 */ + /** ID=0x0017 | type=UINT8 */ primary2Intensity: number; - /** ID: 25 | Type: UINT16 */ + /** ID=0x0019 | type=UINT16 | max=65279 */ primary3X: number; - /** ID: 26 | Type: UINT16 */ + /** ID=0x001a | type=UINT16 | max=65279 */ primary3Y: number; - /** ID: 27 | Type: UINT8 */ + /** ID=0x001b | type=UINT8 | max=255 */ primary3Intensity: number; - /** ID: 32 | Type: UINT16 */ + /** ID=0x0020 | type=UINT16 | max=65279 */ primary4X: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | max=65279 */ primary4Y: number; - /** ID: 34 | Type: UINT8 */ + /** ID=0x0022 | type=UINT8 | max=255 */ primary4Intensity: number; - /** ID: 36 | Type: UINT16 */ + /** ID=0x0024 | type=UINT16 | max=65279 */ primary5X: number; - /** ID: 37 | Type: UINT16 */ + /** ID=0x0025 | type=UINT16 | max=65279 */ primary5Y: number; - /** ID: 38 | Type: UINT8 */ + /** ID=0x0026 | type=UINT8 | max=255 */ primary5Intensity: number; - /** ID: 40 | Type: UINT16 */ + /** ID=0x0028 | type=UINT16 | max=65279 */ primary6X: number; - /** ID: 41 | Type: UINT16 */ + /** ID=0x0029 | type=UINT16 | max=65279 */ primary6Y: number; - /** ID: 42 | Type: UINT8 */ + /** ID=0x002a | type=UINT8 | max=255 */ primary6Intensity: number; - /** ID: 48 | Type: UINT16 */ + /** ID=0x0030 | type=UINT16 | write=true | max=65279 */ whitePointX: number; - /** ID: 49 | Type: UINT16 */ + /** ID=0x0031 | type=UINT16 | write=true | max=65279 */ whitePointY: number; - /** ID: 50 | Type: UINT16 */ + /** ID=0x0032 | type=UINT16 | write=true | max=65279 */ colorPointRX: number; - /** ID: 51 | Type: UINT16 */ + /** ID=0x0033 | type=UINT16 | write=true | max=65279 */ colorPointRY: number; - /** ID: 52 | Type: UINT8 */ + /** ID=0x0034 | type=UINT8 | write=true | max=255 */ colorPointRIntensity: number; - /** ID: 54 | Type: UINT16 */ + /** ID=0x0036 | type=UINT16 | write=true | max=65279 */ colorPointGX: number; - /** ID: 55 | Type: UINT16 */ + /** ID=0x0037 | type=UINT16 | write=true | max=65279 */ colorPointGY: number; - /** ID: 56 | Type: UINT8 */ + /** ID=0x0038 | type=UINT8 | write=true | max=255 */ colorPointGIntensity: number; - /** ID: 58 | Type: UINT16 */ + /** ID=0x003a | type=UINT16 | write=true | max=65279 */ colorPointBX: number; - /** ID: 59 | Type: UINT16 */ + /** ID=0x003b | type=UINT16 | write=true | max=65279 */ colorPointBY: number; - /** ID: 60 | Type: UINT8 */ + /** ID=0x003c | type=UINT8 | write=true | max=255 */ colorPointBIntensity: number; - /** ID: 16384 | Type: UINT16 */ + /** ID=0x4000 | type=UINT16 | scene=true | max=65535 | default=0 */ enhancedCurrentHue: number; - /** ID: 16385 | Type: ENUM8 */ + /** ID=0x4001 | type=ENUM8 | required=true | max=255 | default=1 */ enhancedColorMode: number; - /** ID: 16386 | Type: UINT8 */ + /** ID=0x4002 | type=UINT8 | scene=true | max=255 | default=0 */ colorLoopActive: number; - /** ID: 16387 | Type: UINT8 */ + /** ID=0x4003 | type=UINT8 | scene=true | max=255 | default=0 */ colorLoopDirection: number; - /** ID: 16388 | Type: UINT16 */ + /** ID=0x4004 | type=UINT16 | scene=true | max=65535 | default=25 */ colorLoopTime: number; - /** ID: 16389 | Type: UINT16 */ + /** ID=0x4005 | type=UINT16 | max=65535 | default=8960 */ colorLoopStartEnhancedHue: number; - /** ID: 16390 | Type: UINT16 */ + /** ID=0x4006 | type=UINT16 | max=65535 | default=0 */ colorLoopStoredEnhancedHue: number; - /** ID: 16394 | Type: UINT16 */ + /** ID=0x400a | type=BITMAP16 | required=true | max=31 | default=0 */ colorCapabilities: number; - /** ID: 16395 | Type: UINT16 */ + /** ID=0x400b | type=UINT16 | max=65279 | default=0 */ colorTempPhysicalMin: number; - /** ID: 16396 | Type: UINT16 */ + /** ID=0x400c | type=UINT16 | max=65279 | default=65279 */ colorTempPhysicalMax: number; - /** ID: 16397 | Type: UINT16 */ + /** ID=0x400d | type=UINT16 */ coupleColorTempToLevelMin: number; - /** ID: 16400 | Type: UINT16 */ + /** ID=0x4010 | type=UINT16 | write=true | max=65279 | special=SetColorTempToPreviousValue,ffff */ startUpColorTemperature: number; - /** ID: 61441 | Type: UINT8 */ - tuyaBrightness: number; - /** ID: 61440 | Type: UINT8 */ + /** ID=0xf000 | type=UINT8 | write=true | max=255 */ tuyaRgbMode: number; + /** ID=0xf001 | type=UINT8 | write=true | max=255 */ + tuyaBrightness: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 */ moveToHue: { - /** Type: UINT8 */ + /** type=UINT8 */ hue: number; - /** Type: UINT8 */ + /** type=ENUM8 */ direction: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 1 */ + /** ID=0x01 */ moveHue: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT8 */ + /** type=UINT8 */ rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 2 */ + /** ID=0x02 */ stepHue: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT8 */ + /** type=UINT8 */ stepsize: number; - /** Type: UINT8 */ + /** type=UINT8 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 3 */ + /** ID=0x03 */ moveToSaturation: { - /** Type: UINT8 */ + /** type=UINT8 */ saturation: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 4 */ + /** ID=0x04 */ moveSaturation: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT8 */ + /** type=UINT8 */ rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 5 */ + /** ID=0x05 */ stepSaturation: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT8 */ + /** type=UINT8 */ stepsize: number; - /** Type: UINT8 */ + /** type=UINT8 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 6 */ + /** ID=0x06 */ moveToHueAndSaturation: { - /** Type: UINT8 */ + /** type=UINT8 */ hue: number; - /** Type: UINT8 */ + /** type=UINT8 */ saturation: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 6 */ - tuyaMoveToHueAndSaturationBrightness: { - /** Type: UINT8 */ - hue: number; - /** Type: UINT8 */ - saturation: number; - /** Type: UINT16 */ - transtime: number; - /** Type: UINT8 */ - brightness: number; - }; - /** ID: 7 */ + /** ID=0x07 */ moveToColor: { - /** Type: UINT16 */ + /** type=UINT16 */ colorx: number; - /** Type: UINT16 */ + /** type=UINT16 */ colory: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 8 */ + /** ID=0x08 */ moveColor: { - /** Type: INT16 */ + /** type=INT16 */ ratex: number; - /** Type: INT16 */ + /** type=INT16 */ ratey: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 9 */ + /** ID=0x09 */ stepColor: { - /** Type: INT16 */ + /** type=INT16 */ stepx: number; - /** Type: INT16 */ + /** type=INT16 */ stepy: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 10 */ + /** ID=0x0a */ moveToColorTemp: { - /** Type: UINT16 */ + /** type=UINT16 */ colortemp: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 64 */ + /** ID=0x40 */ enhancedMoveToHue: { - /** Type: UINT16 */ + /** type=UINT16 */ enhancehue: number; - /** Type: UINT8 */ + /** type=ENUM8 */ direction: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 65 */ + /** ID=0x41 */ enhancedMoveHue: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT16 */ + /** type=UINT16 */ rate: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 66 */ + /** ID=0x42 */ enhancedStepHue: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT16 */ + /** type=UINT16 */ stepsize: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 67 */ + /** ID=0x43 */ enhancedMoveToHueAndSaturation: { - /** Type: UINT16 */ + /** type=UINT16 */ enhancehue: number; - /** Type: UINT8 */ + /** type=UINT8 */ saturation: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 68 */ + /** ID=0x44 */ colorLoopSet: { - /** Type: UINT8 */ + /** type=BITMAP8 */ updateflags: number; - /** Type: UINT8 */ + /** type=ENUM8 */ action: number; - /** Type: UINT8 */ + /** type=ENUM8 */ direction: number; - /** Type: UINT16 */ + /** type=UINT16 */ time: number; - /** Type: UINT16 */ + /** type=UINT16 */ starthue: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 71 */ + /** ID=0x47 */ stopMoveStep: { - /** Type: UINT8 */ - bits: number; - /** Type: UINT8 */ - bytee: number; - /** Type: UINT8 */ - action: number; - /** Type: UINT8 */ - direction: number; - /** Type: UINT16 */ - time: number; - /** Type: UINT16 */ - starthue: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 75 */ + /** ID=0x4b */ moveColorTemp: { - /** Type: UINT8 */ + /** type=ENUM8 */ movemode: number; - /** Type: UINT16 */ + /** type=UINT16 */ rate: number; - /** Type: UINT16 */ + /** type=UINT16 */ minimum: number; - /** Type: UINT16 */ + /** type=UINT16 */ maximum: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; }; - /** ID: 76 */ + /** ID=0x4c */ stepColorTemp: { - /** Type: UINT8 */ + /** type=ENUM8 */ stepmode: number; - /** Type: UINT16 */ + /** type=UINT16 */ stepsize: number; - /** Type: UINT16 */ + /** type=UINT16 */ transtime: number; - /** Type: UINT16 */ + /** type=UINT16 */ minimum: number; - /** Type: UINT16 */ + /** type=UINT16 */ maximum: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsMask?: number; + /** type=BITMAP8 | conditions=[{minimumRemainingBufferBytes value=1}] */ + optionsOverride?: number; + }; + /** ID=0x06 */ + tuyaMoveToHueAndSaturationBrightness: { + /** type=UINT8 | max=255 */ + hue: number; + /** type=UINT8 | max=255 */ + saturation: number; + /** type=UINT16 | max=65535 */ + transtime: number; + /** type=UINT8 | max=255 */ + brightness: number; }; - /** ID: 224 */ + /** ID=0xe0 */ tuyaSetMinimumBrightness: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ minimum: number; }; - /** ID: 225 */ + /** ID=0xe1 */ tuyaMoveToHueAndSaturationBrightness2: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ hue: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ saturation: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ brightness: number; }; - /** ID: 240 */ + /** ID=0xf0 */ tuyaRgbMode: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ enable: number; }; - /** ID: 249 */ + /** ID=0xf9 */ tuyaOnStartUp: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ mode: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ data: number[]; }; - /** ID: 250 */ + /** ID=0xfa */ tuyaDoNotDisturb: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ enable: number; }; - /** ID: 251 */ + /** ID=0xfb */ tuyaOnOffTransitionTime: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ unknown: number; - /** Type: BIG_ENDIAN_UINT24 */ + /** type=BIG_ENDIAN_UINT24 */ onTransitionTime: number; - /** Type: BIG_ENDIAN_UINT24 */ + /** type=BIG_ENDIAN_UINT24 */ offTransitionTime: number; }; }; @@ -3077,41 +3859,41 @@ export interface TClusters { }; lightingBallastCfg: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | required=true | min=1 | max=254 | default=1 */ physicalMinLevel: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | required=true | min=1 | max=254 | default=254 */ physicalMaxLevel: number; - /** ID: 2 | Type: BITMAP8 */ + /** ID=0x0002 | type=BITMAP8 | default=0 */ ballastStatus: number; - /** ID: 16 | Type: UINT8 */ + /** ID=0x0010 | type=UINT8 | write=true | required=true | min=1 | max=254 */ minLevel: number; - /** ID: 17 | Type: UINT8 */ + /** ID=0x0011 | type=UINT8 | write=true | required=true | min=1 | max=254 */ maxLevel: number; - /** ID: 18 | Type: UINT8 */ + /** ID=0x0012 | type=UINT8 | write=true | max=254 */ powerOnLevel: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | write=true | max=65534 | default=0 */ powerOnFadeTime: number; - /** ID: 20 | Type: UINT8 */ + /** ID=0x0014 | type=UINT8 | write=true | max=254 */ intrinsicBallastFactor: number; - /** ID: 21 | Type: UINT8 */ + /** ID=0x0015 | type=UINT8 | write=true | min=100 | default=255 */ ballastFactorAdjustment: number; - /** ID: 32 | Type: UINT8 */ + /** ID=0x0020 | type=UINT8 | max=254 */ lampQuantity: number; - /** ID: 48 | Type: CHAR_STR */ + /** ID=0x0030 | type=CHAR_STR | write=true | default= | maxLen=16 */ lampType: string; - /** ID: 49 | Type: CHAR_STR */ + /** ID=0x0031 | type=CHAR_STR | write=true | default= | maxLen=16 */ lampManufacturer: string; - /** ID: 50 | Type: UINT24 */ + /** ID=0x0032 | type=UINT24 | write=true | max=16777214 | default=16777215 */ lampRatedHours: number; - /** ID: 51 | Type: UINT24 */ + /** ID=0x0033 | type=UINT24 | write=true | max=16777214 | default=0 */ lampBurnHours: number; - /** ID: 52 | Type: BITMAP8 */ + /** ID=0x0034 | type=BITMAP8 | write=true | default=0 */ lampAlarmMode: number; - /** ID: 53 | Type: UINT24 */ + /** ID=0x0035 | type=UINT24 | write=true | max=16777214 | default=16777215 */ lampBurnHoursTripPoint: number; - /** ID: 57344 | Type: ENUM8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe000 | type=ENUM8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ elkoControlMode?: number; - /** ID: 57344 | Type: ENUM8 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0xe000 | type=ENUM8 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=255 */ wiserControlMode?: number; }; commands: never; @@ -3119,15 +3901,15 @@ export interface TClusters { }; msIlluminanceMeasurement: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true | max=65535 | default=0 | special=TooLowToBeMeasured,0000,Invalid,ffff */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | min=1 | max=65533 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=2 | max=65534 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; - /** ID: 4 | Type: ENUM8 */ + /** ID=0x0004 | type=ENUM8 | default=255 | special=Unknown,ff */ lightSensorType: number; }; commands: never; @@ -3135,11 +3917,11 @@ export interface TClusters { }; msIlluminanceLevelSensing: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | report=true | required=true | max=254 */ levelStatus: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | max=254 */ lightSensorType: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | write=true | required=true | max=65534 */ illuminanceTargetLevel: number; }; commands: never; @@ -3147,19 +3929,19 @@ export interface TClusters { }; msTemperatureMeasurement: { attributes: { - /** ID: 0 | Type: INT16 */ + /** ID=0x0000 | type=INT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: INT16 */ + /** ID=0x0001 | type=INT16 | required=true | min=-27315 | max=32766 */ minMeasuredValue: number; - /** ID: 2 | Type: INT16 */ + /** ID=0x0002 | type=INT16 | required=true | min=-27314 | max=32767 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; - /** ID: 16 | Type: UNKNOWN */ + /** ID=0x0010 | type=UNKNOWN | write=true */ minPercentChange: never; - /** ID: 17 | Type: UNKNOWN */ + /** ID=0x0011 | type=UNKNOWN | write=true */ minAbsoluteChange: never; - /** ID: 26112 | Type: INT16 | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ + /** ID=0x6600 | type=INT16 | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true | min=-32768 | max=32767 */ sprutTemperatureOffset?: number; }; commands: never; @@ -3167,23 +3949,23 @@ export interface TClusters { }; msPressureMeasurement: { attributes: { - /** ID: 0 | Type: INT16 */ + /** ID=0x0000 | type=INT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: INT16 */ + /** ID=0x0001 | type=INT16 | required=true | min=-32767 | max=32766 */ minMeasuredValue: number; - /** ID: 2 | Type: INT16 */ + /** ID=0x0002 | type=INT16 | required=true | min=-32766 | max=32767 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; - /** ID: 16 | Type: INT16 */ + /** ID=0x0010 | type=INT16 | default=0 */ scaledValue: number; - /** ID: 17 | Type: INT16 */ + /** ID=0x0011 | type=INT16 | min=-32767 | max=32766 */ minScaledValue: number; - /** ID: 18 | Type: INT16 */ + /** ID=0x0012 | type=INT16 | min=-32766 | max=32767 */ maxScaledValue: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | max=2048 */ scaledTolerance: number; - /** ID: 20 | Type: INT8 */ + /** ID=0x0014 | type=INT8 | min=-127 | max=127 */ scale: number; }; commands: never; @@ -3191,13 +3973,13 @@ export interface TClusters { }; msFlowMeasurement: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65533 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=65534 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; }; commands: never; @@ -3205,15 +3987,15 @@ export interface TClusters { }; msRelativeHumidity: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=9999 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=10000 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; - /** ID: 26112 | Type: BOOLEAN | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ + /** ID=0x6600 | type=BOOLEAN | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true */ sprutHeater?: number; }; commands: never; @@ -3221,55 +4003,55 @@ export interface TClusters { }; msOccupancySensing: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | report=true | required=true */ occupancy: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | required=true | default=0 */ occupancySensorType: number; - /** ID: 2 | Type: BITMAP8 */ + /** ID=0x0002 | type=BITMAP8 | required=true */ occupancySensorTypeBitmap: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | write=true | max=65534 | default=0 */ pirOToUDelay: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | write=true | max=65534 | default=0 */ pirUToODelay: number; - /** ID: 18 | Type: UINT8 */ + /** ID=0x0012 | type=UINT8 | write=true | min=1 | max=254 | default=1 */ pirUToOThreshold: number; - /** ID: 32 | Type: UINT16 */ + /** ID=0x0020 | type=UINT16 | write=true | max=65534 | default=0 */ ultrasonicOToUDelay: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | write=true | max=65534 | default=0 */ ultrasonicUToODelay: number; - /** ID: 34 | Type: UINT8 */ + /** ID=0x0022 | type=UINT8 | write=true | min=1 | max=254 | default=1 */ ultrasonicUToOThreshold: number; - /** ID: 48 | Type: UINT16 */ + /** ID=0x0030 | type=UINT16 | write=true | max=65534 | default=0 */ contactOToUDelay: number; - /** ID: 49 | Type: UINT16 */ + /** ID=0x0031 | type=UINT16 | write=true | max=65534 | default=0 */ contactUToODelay: number; - /** ID: 50 | Type: UINT8 */ + /** ID=0x0032 | type=UINT8 | write=true | min=1 | max=254 | default=1 */ contactUToOThreshold: number; - /** ID: 57344 | Type: ENUM8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0x6600 | type=UINT16 | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true | max=65535 */ + sprutOccupancyLevel?: number; + /** ID=0x6601 | type=UINT16 | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true | max=65535 */ + sprutOccupancySensitivity?: number; + /** ID=0xe000 | type=ENUM8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ elkoOccupancyDfltOperationMode?: number; - /** ID: 57345 | Type: ENUM8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe001 | type=ENUM8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ elkoOccupancyOperationMode?: number; - /** ID: 57346 | Type: UINT16 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe002 | type=UINT16 | manufacturerCode=ADEO(0x1277) | write=true | max=65535 */ elkoForceOffTimeout?: number; - /** ID: 57347 | Type: UINT8 | Specific to manufacturer: ADEO (4727) */ + /** ID=0xe003 | type=UINT8 | manufacturerCode=ADEO(0x1277) | write=true | max=255 */ elkoOccupancySensitivity?: number; - /** ID: 26112 | Type: UINT16 | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ - sprutOccupancyLevel?: number; - /** ID: 26113 | Type: UINT16 | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ - sprutOccupancySensitivity?: number; }; commands: never; commandResponses: never; }; msLeafWetness: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=9999 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=10000 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; }; commands: never; @@ -3277,13 +4059,13 @@ export interface TClusters { }; msSoilMoisture: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=9999 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=10000 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=2048 */ tolerance: number; }; commands: never; @@ -3291,13 +4073,13 @@ export interface TClusters { }; pHMeasurement: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=1399 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=1400 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=200 */ tolerance: number; }; commands: never; @@ -3305,13 +4087,13 @@ export interface TClusters { }; msElectricalConductivity: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65533 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=65534 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=100 */ tolerance: number; }; commands: never; @@ -3319,13 +4101,13 @@ export interface TClusters { }; msWindSpeed: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65533 */ minMeasuredValue: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | min=1 | max=65534 */ maxMeasuredValue: number; - /** ID: 3 | Type: UINT16 */ + /** ID=0x0003 | type=UINT16 | max=776 | default=0 */ tolerance: number; }; commands: never; @@ -3333,13 +4115,13 @@ export interface TClusters { }; msCarbonMonoxide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3347,17 +4129,17 @@ export interface TClusters { }; msCO2: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; - /** ID: 26112 | Type: BOOLEAN | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ + /** ID=0x6600 | type=BOOLEAN | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true */ sprutCO2Calibration?: number; - /** ID: 26113 | Type: BOOLEAN | Specific to manufacturer: CUSTOM_SPRUT_DEVICE (26214) */ + /** ID=0x6601 | type=BOOLEAN | manufacturerCode=CUSTOM_SPRUT_DEVICE(0x6666) | write=true */ sprutCO2AutoCalibration?: number; }; commands: never; @@ -3365,13 +4147,13 @@ export interface TClusters { }; msEthylene: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3379,13 +4161,13 @@ export interface TClusters { }; msEthyleneOxide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3393,13 +4175,13 @@ export interface TClusters { }; msHydrogen: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3407,13 +4189,13 @@ export interface TClusters { }; msHydrogenSulfide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3421,13 +4203,13 @@ export interface TClusters { }; msNitricOxide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3435,13 +4217,13 @@ export interface TClusters { }; msNitrogenDioxide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3449,13 +4231,13 @@ export interface TClusters { }; msOxygen: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3463,13 +4245,13 @@ export interface TClusters { }; msOzone: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3477,13 +4259,13 @@ export interface TClusters { }; msSulfurDioxide: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3491,13 +4273,13 @@ export interface TClusters { }; msDissolvedOxygen: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3505,13 +4287,13 @@ export interface TClusters { }; msBromate: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3519,13 +4301,13 @@ export interface TClusters { }; msChloramines: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3533,13 +4315,13 @@ export interface TClusters { }; msChlorine: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3547,13 +4329,13 @@ export interface TClusters { }; msFecalColiformAndEColi: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3561,13 +4343,13 @@ export interface TClusters { }; msFluoride: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3575,13 +4357,13 @@ export interface TClusters { }; msHaloaceticAcids: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3589,13 +4371,13 @@ export interface TClusters { }; msTotalTrihalomethanes: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3603,13 +4385,13 @@ export interface TClusters { }; msTotalColiformBacteria: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3617,13 +4399,13 @@ export interface TClusters { }; msTurbidity: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3631,13 +4413,13 @@ export interface TClusters { }; msCopper: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3645,13 +4427,13 @@ export interface TClusters { }; msLead: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3659,13 +4441,13 @@ export interface TClusters { }; msManganese: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3673,13 +4455,13 @@ export interface TClusters { }; msSulfate: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3687,13 +4469,13 @@ export interface TClusters { }; msBromodichloromethane: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3701,13 +4483,13 @@ export interface TClusters { }; msBromoform: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3715,13 +4497,13 @@ export interface TClusters { }; msChlorodibromomethane: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3729,13 +4511,13 @@ export interface TClusters { }; msChloroform: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3743,13 +4525,13 @@ export interface TClusters { }; msSodium: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3757,13 +4539,13 @@ export interface TClusters { }; pm25Measurement: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ measuredMinValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ measuredMaxValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3771,41 +4553,13 @@ export interface TClusters { }; msFormaldehyde: { attributes: { - /** ID: 0 | Type: SINGLE_PREC */ + /** ID=0x0000 | type=SINGLE_PREC | report=true | required=true */ measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ + /** ID=0x0001 | type=SINGLE_PREC | required=true | min=0 */ minMeasuredValue: number; - /** ID: 2 | Type: SINGLE_PREC */ + /** ID=0x0002 | type=SINGLE_PREC | required=true | max=1 */ maxMeasuredValue: number; - /** ID: 3 | Type: SINGLE_PREC */ - tolerance: number; - }; - commands: never; - commandResponses: never; - }; - pm1Measurement: { - attributes: { - /** ID: 0 | Type: SINGLE_PREC */ - measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ - measuredMinValue: number; - /** ID: 2 | Type: SINGLE_PREC */ - measuredMaxValue: number; - /** ID: 3 | Type: SINGLE_PREC */ - tolerance: number; - }; - commands: never; - commandResponses: never; - }; - pm10Measurement: { - attributes: { - /** ID: 0 | Type: SINGLE_PREC */ - measuredValue: number; - /** ID: 1 | Type: SINGLE_PREC */ - measuredMinValue: number; - /** ID: 2 | Type: SINGLE_PREC */ - measuredMaxValue: number; - /** ID: 3 | Type: SINGLE_PREC */ + /** ID=0x0003 | type=SINGLE_PREC */ tolerance: number; }; commands: never; @@ -3813,54 +4567,58 @@ export interface TClusters { }; ssIasZone: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | required=true | default=0 */ zoneState: number; - /** ID: 1 | Type: ENUM16 */ + /** ID=0x0001 | type=ENUM16 | required=true */ zoneType: number; - /** ID: 2 | Type: BITMAP16 */ + /** ID=0x0002 | type=BITMAP16 | required=true | default=0 */ zoneStatus: number; - /** ID: 16 | Type: IEEE_ADDR */ + /** ID=0x0010 | type=IEEE_ADDR | write=true | required=true */ iasCieAddr: string; - /** ID: 17 | Type: UINT8 */ + /** ID=0x0011 | type=UINT8 | required=true | max=255 | default=255 */ zoneId: number; - /** ID: 18 | Type: UINT8 */ + /** ID=0x0012 | type=UINT8 | min=2 | max=255 | default=2 */ numZoneSensitivityLevelsSupported: number; - /** ID: 19 | Type: UINT8 */ + /** ID=0x0013 | type=UINT8 | write=true | max=255 | default=0 */ currentZoneSensitivityLevel: number; - /** ID: 32769 | Type: UINT16 | Specific to manufacturer: DEVELCO (4117) */ + /** ID=0x8001 | type=UINT16 | manufacturerCode=DEVELCO(0x1015) | write=true | max=65535 */ develcoAlarmOffDelay?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ enrollRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ enrollrspcode: number; - /** Type: UINT8 */ + /** type=UINT8 */ zoneid: number; }; - /** ID: 1 */ + /** ID=0x01 */ initNormalOpMode: Record; - /** ID: 2 */ + /** ID=0x02 */ initTestMode: { - /** Type: UINT8 */ + /** type=UINT8 */ testModeDuration: number; - /** Type: UINT8 */ + /** type=UINT8 */ currentZoneSensitivityLevel: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ statusChangeNotification: { - /** Type: UINT16 */ + /** type=BITMAP16 */ zonestatus: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ extendedstatus: number; + /** type=UINT8 */ + zoneID: number; + /** type=UINT16 */ + delay: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ enrollReq: { - /** Type: UINT16 */ + /** type=ENUM16 */ zonetype: number; - /** Type: UINT16 */ + /** type=UINT16 */ manucode: number; }; }; @@ -3868,181 +4626,183 @@ export interface TClusters { ssIasAce: { attributes: never; commands: { - /** ID: 0 | Response ID: 0 */ + /** ID=0x00 | response=0 | required=true */ arm: { - /** Type: UINT8 */ + /** type=ENUM8 */ armmode: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ code: string; - /** Type: UINT8 */ + /** type=UINT8 */ zoneid: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ bypass: { - /** Type: UINT8 */ + /** type=UINT8 */ numofzones: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ zoneidlist: number[]; + /** type=CHAR_STR */ + armDisarmCode: string; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ emergency: Record; - /** ID: 3 */ + /** ID=0x03 | required=true */ fire: Record; - /** ID: 4 */ + /** ID=0x04 | required=true */ panic: Record; - /** ID: 5 | Response ID: 1 */ + /** ID=0x05 | response=1 | required=true */ getZoneIDMap: Record; - /** ID: 6 | Response ID: 2 */ + /** ID=0x06 | response=2 | required=true */ getZoneInfo: { - /** Type: UINT8 */ + /** type=UINT8 */ zoneid: number; }; - /** ID: 7 | Response ID: 5 */ + /** ID=0x07 | response=5 | required=true */ getPanelStatus: Record; - /** ID: 8 */ + /** ID=0x08 | required=true */ getBypassedZoneList: Record; - /** ID: 9 | Response ID: 8 */ + /** ID=0x09 | response=8 | required=true */ getZoneStatus: { - /** Type: UINT8 */ + /** type=UINT8 */ startzoneid: number; - /** Type: UINT8 */ + /** type=UINT8 */ maxnumzoneid: number; - /** Type: UINT8 */ + /** type=BOOLEAN */ zonestatusmaskflag: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zonestatusmask: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ armRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ armnotification: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ getZoneIDMapRsp: { - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection0: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection1: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection2: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection3: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection4: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection5: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection6: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection7: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection8: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection9: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection10: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection11: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection12: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection13: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection14: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ zoneidmapsection15: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ getZoneInfoRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ zoneid: number; - /** Type: UINT16 */ + /** type=ENUM16 */ zonetype: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ ieeeaddr: string; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ zonelabel: string; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ zoneStatusChanged: { - /** Type: UINT8 */ + /** type=UINT8 */ zoneid: number; - /** Type: UINT16 */ + /** type=ENUM16 */ zonestatus: number; - /** Type: UINT8 */ + /** type=ENUM8 */ audiblenotif: number; - /** Type: CHAR_STR */ + /** type=CHAR_STR */ zonelabel: string; }; - /** ID: 4 */ + /** ID=0x04 | required=true */ panelStatusChanged: { - /** Type: UINT8 */ + /** type=ENUM8 */ panelstatus: number; - /** Type: UINT8 */ + /** type=UINT8 */ secondsremain: number; - /** Type: UINT8 */ + /** type=ENUM8 */ audiblenotif: number; - /** Type: UINT8 */ + /** type=ENUM8 */ alarmstatus: number; }; - /** ID: 5 */ + /** ID=0x05 | required=true */ getPanelStatusRsp: { - /** Type: UINT8 */ + /** type=ENUM8 */ panelstatus: number; - /** Type: UINT8 */ + /** type=UINT8 */ secondsremain: number; - /** Type: UINT8 */ + /** type=ENUM8 */ audiblenotif: number; - /** Type: UINT8 */ + /** type=ENUM8 */ alarmstatus: number; }; - /** ID: 6 */ + /** ID=0x06 | required=true */ setBypassedZoneList: { - /** Type: UINT8 */ + /** type=UINT8 */ numofzones: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ zoneid: number[]; }; - /** ID: 7 */ + /** ID=0x07 | required=true */ bypassRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ numofzones: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ bypassresult: number[]; }; - /** ID: 8 */ + /** ID=0x08 | required=true */ getZoneStatusRsp: { - /** Type: UINT8 */ + /** type=BOOLEAN */ zonestatuscomplete: number; - /** Type: UINT8 */ + /** type=UINT8 */ numofzones: number; - /** Type: LIST_ZONEINFO */ + /** type=LIST_ZONEINFO */ zoneinfo: ZoneInfo[]; }; }; }; ssIasWd: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | write=true | required=true | max=65534 | default=240 */ maxDuration: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ startWarning: { - /** Type: UINT8 */ + /** type=BITMAP8 */ startwarninginfo: number; - /** Type: UINT16 */ + /** type=UINT16 */ warningduration: number; - /** Type: UINT8 */ + /** type=UINT8 | max=100 */ strobedutycycle: number; - /** Type: UINT8 */ + /** type=ENUM8 */ strobelevel: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ squawk: { - /** Type: UINT8 */ + /** type=BITMAP8 */ squawkinfo: number; }; }; @@ -4050,61 +4810,61 @@ export interface TClusters { }; piGenericTunnel: { attributes: { - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65535 */ maxIncomeTransSize: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | required=true | max=65535 */ maxOutgoTransSize: number; - /** ID: 3 | Type: OCTET_STR */ + /** ID=0x0003 | type=OCTET_STR | required=true | minLen=0 | maxLen=255 | default= */ protocolAddr: Buffer; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ matchProtocolAddr: { - /** Type: CHAR_STR */ - protocoladdr: string; + /** type=OCTET_STR */ + protocoladdr: Buffer; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ matchProtocolAddrRsp: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ devieeeaddr: string; - /** Type: CHAR_STR */ - protocoladdr: string; + /** type=OCTET_STR */ + protocoladdr: Buffer; }; - /** ID: 1 */ + /** ID=0x01 */ advertiseProtocolAddr: { - /** Type: CHAR_STR */ - protocoladdr: string; + /** type=OCTET_STR */ + protocoladdr: Buffer; }; }; }; piBacnetProtocolTunnel: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ transferNpdu: { - /** Type: UINT8 */ - npdu: number; + /** type=LIST_UINT8 */ + npdu: number[]; }; }; commandResponses: never; }; piAnalogInputReg: { attributes: { - /** ID: 22 | Type: SINGLE_PREC */ + /** ID=0x0016 | type=SINGLE_PREC | write=true | writeOptional=true */ covIncrement: number; - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 118 | Type: UINT8 */ + /** ID=0x0076 | type=UINT8 | write=true | writeOptional=true */ updateInterval: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | write=true | writeOptional=true | default= */ profileName: string; }; commands: never; @@ -4112,56 +4872,54 @@ export interface TClusters { }; piAnalogInputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | max=65535 | default=0 */ notificationClass: number; - /** ID: 25 | Type: SINGLE_PREC */ + /** ID=0x0019 | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ deadband: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 45 | Type: SINGLE_PREC */ + /** ID=0x002d | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ highLimit: number; - /** ID: 52 | Type: BITMAP8 */ + /** ID=0x0034 | type=BITMAP8 | required=true | write=true | writeOptional=true | max=17 | default=0 */ limitEnable: number; - /** ID: 59 | Type: SINGLE_PREC */ + /** ID=0x003b | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ lowLimit: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY */ eventTimeStamps: ZclArray | unknown[]; }; commands: { - /** ID: 0 */ + /** ID=0x00 */ transferApdu: Record; - /** ID: 1 */ + /** ID=0x01 */ connectReq: Record; - /** ID: 2 */ + /** ID=0x02 */ disconnectReq: Record; - /** ID: 3 */ + /** ID=0x03 */ connectStatusNoti: Record; }; commandResponses: never; }; piAnalogOutputReg: { attributes: { - /** ID: 22 | Type: SINGLE_PREC */ + /** ID=0x0016 | type=SINGLE_PREC | write=true | writeOptional=true | default=0 */ covIncrement: number; - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 118 | Type: UINT8 */ - updateInterval: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | write=true | writeOptional=true | default= */ profileName: string; }; commands: never; @@ -4169,27 +4927,27 @@ export interface TClusters { }; piAnalogOutputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | max=65535 | default=0 */ notificationClass: number; - /** ID: 25 | Type: SINGLE_PREC */ + /** ID=0x0019 | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ deadband: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 45 | Type: SINGLE_PREC */ + /** ID=0x002d | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ highLimit: number; - /** ID: 52 | Type: BITMAP8 */ + /** ID=0x0034 | type=BITMAP8 | required=true | write=true | writeOptional=true | max=17 | default=0 */ limitEnable: number; - /** ID: 59 | Type: SINGLE_PREC */ + /** ID=0x003b | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ lowLimit: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4197,15 +4955,15 @@ export interface TClusters { }; piAnalogValueReg: { attributes: { - /** ID: 22 | Type: SINGLE_PREC */ + /** ID=0x0016 | type=SINGLE_PREC | write=true | writeOptional=true | default=0 */ covIncrement: number; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4213,27 +4971,27 @@ export interface TClusters { }; piAnalogValueExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | max=65535 | default=0 */ notificationClass: number; - /** ID: 25 | Type: SINGLE_PREC */ + /** ID=0x0019 | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ deadband: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 45 | Type: SINGLE_PREC */ + /** ID=0x002d | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ highLimit: number; - /** ID: 52 | Type: BITMAP8 */ + /** ID=0x0034 | type=BITMAP8 | required=true | write=true | writeOptional=true | max=17 | default=0 */ limitEnable: number; - /** ID: 59 | Type: SINGLE_PREC */ + /** ID=0x003b | type=SINGLE_PREC | required=true | write=true | writeOptional=true | default=0 */ lowLimit: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4241,25 +4999,25 @@ export interface TClusters { }; piBinaryInputReg: { attributes: { - /** ID: 15 | Type: UINT32 */ + /** ID=0x000f | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ changeOfStateCount: number; - /** ID: 16 | Type: STRUCT */ + /** ID=0x0010 | type=STRUCT */ changeOfStateTime: Struct; - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 33 | Type: UINT32 */ + /** ID=0x0021 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ elapsedActiveTime: number; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectIdentifier: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 114 | Type: STRUCT */ + /** ID=0x0072 | type=STRUCT */ timeOfATReset: Struct; - /** ID: 115 | Type: STRUCT */ + /** ID=0x0073 | type=STRUCT */ timeOfSCReset: Struct; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4267,21 +5025,21 @@ export interface TClusters { }; piBinaryInputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 6 | Type: BOOLEAN */ + /** ID=0x0006 | type=BOOLEAN | required=true | write=true | writeOptional=true */ alarmValue: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 */ eventState: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4289,27 +5047,27 @@ export interface TClusters { }; piBinaryOutputReg: { attributes: { - /** ID: 15 | Type: UINT32 */ + /** ID=0x000f | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ changeOfStateCount: number; - /** ID: 16 | Type: STRUCT */ + /** ID=0x0010 | type=STRUCT */ changeOfStateTime: Struct; - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 33 | Type: UINT32 */ + /** ID=0x0021 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ elapsedActiveTime: number; - /** ID: 40 | Type: ENUM8 */ + /** ID=0x0028 | type=ENUM8 | max=1 | default=0 */ feedBackValue: number; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectIdentifier: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 114 | Type: STRUCT */ + /** ID=0x0072 | type=STRUCT */ timeOfATReset: Struct; - /** ID: 115 | Type: STRUCT */ + /** ID=0x0073 | type=STRUCT */ timeOfSCReset: Struct; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4317,19 +5075,19 @@ export interface TClusters { }; piBinaryOutputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4337,23 +5095,23 @@ export interface TClusters { }; piBinaryValueReg: { attributes: { - /** ID: 15 | Type: UINT32 */ + /** ID=0x000f | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ changeOfStateCount: number; - /** ID: 16 | Type: STRUCT */ + /** ID=0x0010 | type=STRUCT */ changeOfStateTime: Struct; - /** ID: 33 | Type: UINT32 */ + /** ID=0x0021 | type=UINT32 | write=true | writeOptional=true | default=4294967295 */ elapsedActiveTime: number; - /** ID: 75 | Type: BAC_OID */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ objectIdentifier: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 114 | Type: STRUCT */ + /** ID=0x0072 | type=STRUCT */ timeOfATReset: Struct; - /** ID: 115 | Type: STRUCT */ + /** ID=0x0073 | type=STRUCT */ timeOfSCReset: Struct; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4361,21 +5119,21 @@ export interface TClusters { }; piBinaryValueExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 6 | Type: BOOLEAN */ + /** ID=0x0006 | type=BOOLEAN | required=true | write=true | writeOptional=true */ alarmValue: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4383,15 +5141,15 @@ export interface TClusters { }; piMultistateInputReg: { attributes: { - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 75 | Type: BAC_OID */ - objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ + objectIdentifier: number; + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4399,23 +5157,23 @@ export interface TClusters { }; piMultistateInputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 6 | Type: UINT16 */ - alarmValue: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0006 | type=SET | required=true | write=true | writeOptional=true | max=65535 */ + alarmValues: ZclArray | unknown[]; + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 37 | Type: UINT16 */ - faultValues: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0025 | type=SET | required=true | write=true | writeOptional=true | max=65535 | default=0 */ + faultValues: ZclArray | unknown[]; + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4423,17 +5181,17 @@ export interface TClusters { }; piMultistateOutputReg: { attributes: { - /** ID: 31 | Type: CHAR_STR */ + /** ID=0x001f | type=CHAR_STR | default= */ deviceType: string; - /** ID: 40 | Type: ENUM8 */ + /** ID=0x0028 | type=ENUM8 | write=true | writeOptional=true | max=1 */ feedBackValue: number; - /** ID: 75 | Type: BAC_OID */ - objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ + objectIdentifier: number; + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4441,19 +5199,19 @@ export interface TClusters { }; piMultistateOutputExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | max=65535 | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 | default=0 */ eventState: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4461,13 +5219,13 @@ export interface TClusters { }; piMultistateValueReg: { attributes: { - /** ID: 75 | Type: BAC_OID */ - objectId: number; - /** ID: 77 | Type: CHAR_STR */ + /** ID=0x004b | type=BAC_OID | required=true | max=4294967295 */ + objectIdentifier: number; + /** ID=0x004d | type=CHAR_STR | required=true | default= */ objectName: string; - /** ID: 79 | Type: ENUM16 */ + /** ID=0x004f | type=ENUM16 | required=true */ objectType: number; - /** ID: 168 | Type: CHAR_STR */ + /** ID=0x00a8 | type=CHAR_STR | default= */ profileName: string; }; commands: never; @@ -4475,23 +5233,23 @@ export interface TClusters { }; piMultistateValueExt: { attributes: { - /** ID: 0 | Type: BITMAP8 */ + /** ID=0x0000 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ ackedTransitions: number; - /** ID: 6 | Type: UINT16 */ - alarmValue: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0006 | type=SET | required=true | write=true | writeOptional=true | max=65535 */ + alarmValues: ZclArray | unknown[]; + /** ID=0x0011 | type=UINT16 | required=true | write=true | writeOptional=true | max=65535 | default=0 */ notificationClass: number; - /** ID: 35 | Type: BITMAP8 */ + /** ID=0x0023 | type=BITMAP8 | required=true | write=true | writeOptional=true | default=0 */ eventEnable: number; - /** ID: 36 | Type: ENUM8 */ + /** ID=0x0024 | type=ENUM8 */ eventState: number; - /** ID: 37 | Type: UINT16 */ - faultValues: number; - /** ID: 72 | Type: ENUM8 */ + /** ID=0x0025 | type=SET | required=true | write=true | writeOptional=true | max=65535 | default=0 */ + faultValues: ZclArray | unknown[]; + /** ID=0x0048 | type=ENUM8 | required=true | write=true | writeOptional=true | default=0 */ notifyType: number; - /** ID: 113 | Type: UINT8 */ + /** ID=0x0071 | type=UINT8 | required=true | write=true | writeOptional=true | default=0 */ timeDelay: number; - /** ID: 130 | Type: ARRAY */ + /** ID=0x0082 | type=ARRAY | required=true */ eventTimeStamps: ZclArray | unknown[]; }; commands: never; @@ -4499,654 +5257,1367 @@ export interface TClusters { }; pi11073ProtocolTunnel: { attributes: { - /** ID: 0 | Type: ARRAY */ + /** ID=0x0000 | type=ARRAY | default=65535 */ deviceidList: ZclArray | unknown[]; - /** ID: 1 | Type: IEEE_ADDR */ + /** ID=0x0001 | type=IEEE_ADDR */ managerTarget: string; - /** ID: 2 | Type: UINT8 */ + /** ID=0x0002 | type=UINT8 | min=1 | max=255 */ managerEndpoint: number; - /** ID: 3 | Type: BOOLEAN */ + /** ID=0x0003 | type=BOOLEAN */ connected: number; - /** ID: 4 | Type: BOOLEAN */ + /** ID=0x0004 | type=BOOLEAN */ preemptible: number; - /** ID: 5 | Type: UINT16 */ + /** ID=0x0005 | type=UINT16 | min=1 | max=65535 | default=0 */ idleTimeout: number; }; commands: { - /** ID: 0 */ - transferApdu: Record; - /** ID: 1 */ - connectReq: Record; - /** ID: 2 */ - disconnectReq: Record; - /** ID: 3 */ - connectStatusNoti: Record; + /** ID=0x00 | required=true */ + transferApdu: { + /** type=OCTET_STR */ + apdu: Buffer; + }; + /** ID=0x01 */ + connectRequest: { + /** type=BITMAP8 */ + control: number; + /** type=UINT16 */ + idleTimeout: number; + /** type=IEEE_ADDR */ + managerTarget: string; + /** type=UINT8 */ + managerEndpoint: number; + }; + /** ID=0x02 */ + disconnectRequest: { + /** type=IEEE_ADDR */ + managerTarget: string; + }; + /** ID=0x03 */ + connectStatusNotification: { + /** type=ENUM8 */ + status: number; + }; }; commandResponses: never; }; piIso7818ProtocolTunnel: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | required=true | max=1 | default=0 */ status: number; }; - commands: never; - commandResponses: never; + commands: { + /** ID=0x00 | required=true */ + transferApdu: { + /** type=OCTET_STR */ + apdu: Buffer; + }; + /** ID=0x01 | required=true */ + insertSmartCard: Record; + /** ID=0x02 | required=true */ + extractSmartCard: Record; + }; + commandResponses: { + /** ID=0x00 | required=true */ + transferApdu: { + /** type=OCTET_STR */ + apdu: Buffer; + }; + }; }; - piRetailTunnel: { + retailTunnel: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | required=true | min=4096 | max=4351 */ manufacturerCode: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | min=49152 | max=65535 */ msProfile: number; }; - commands: never; + commands: { + /** ID=0x00 | required=true */ + transferApdu: { + /** type=OCTET_STR */ + apdu: Buffer; + }; + }; commandResponses: never; }; seMetering: { attributes: { - /** ID: 0 | Type: UINT48 */ + /** ID=0x0000 | type=UINT48 | required=true | max=281474976710655 */ currentSummDelivered: number; - /** ID: 1 | Type: UINT48 */ + /** ID=0x0001 | type=UINT48 | max=281474976710655 */ currentSummReceived: number; - /** ID: 2 | Type: UINT48 */ + /** ID=0x0002 | type=UINT48 | max=281474976710655 */ currentMaxDemandDelivered: number; - /** ID: 3 | Type: UINT48 */ + /** ID=0x0003 | type=UINT48 | max=281474976710655 */ currentMaxDemandReceived: number; - /** ID: 4 | Type: UINT48 */ + /** ID=0x0004 | type=UINT48 | max=281474976710655 */ dftSumm: number; - /** ID: 5 | Type: UINT16 */ + /** ID=0x0005 | type=UINT16 | max=5947 | default=0 */ dailyFreezeTime: number; - /** ID: 6 | Type: INT8 */ + /** ID=0x0006 | type=INT8 | min=-100 | max=100 | default=0 */ powerFactor: number; - /** ID: 7 | Type: UTC */ + /** ID=0x0007 | type=UTC */ readingSnapshotTime: number; - /** ID: 8 | Type: UTC */ + /** ID=0x0008 | type=UTC */ currentMaxDemandDeliverdTime: number; - /** ID: 9 | Type: UTC */ + /** ID=0x0009 | type=UTC */ currentMaxDemandReceivedTime: number; - /** ID: 10 | Type: UINT8 */ + /** ID=0x000a | type=UINT8 | max=255 | default=30 */ defaultUpdatePeriod: number; - /** ID: 11 | Type: UINT8 */ + /** ID=0x000b | type=UINT8 | max=255 | default=5 */ fastPollUpdatePeriod: number; - /** ID: 12 | Type: UINT48 */ + /** ID=0x000c | type=UINT48 | max=281474976710655 */ currentBlockPeriodConsumpDelivered: number; - /** ID: 13 | Type: UINT24 */ + /** ID=0x000d | type=UINT24 | max=16777215 */ dailyConsumpTarget: number; - /** ID: 14 | Type: ENUM8 */ + /** ID=0x000e | type=ENUM8 | max=16 */ currentBlock: number; - /** ID: 15 | Type: ENUM8 */ + /** ID=0x000f | type=ENUM8 | max=255 */ profileIntervalPeriod: number; - /** ID: 16 | Type: UINT16 */ - intervalReadReportingPeriod: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | max=5947 | default=0 */ presetReadingTime: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | max=65535 */ volumePerReport: number; - /** ID: 19 | Type: UINT8 */ + /** ID=0x0013 | type=UINT8 | max=255 */ flowRestriction: number; - /** ID: 20 | Type: ENUM8 */ + /** ID=0x0014 | type=ENUM8 | max=255 */ supplyStatus: number; - /** ID: 21 | Type: UINT48 */ + /** ID=0x0015 | type=UINT48 | max=281474976710655 */ currentInEnergyCarrierSumm: number; - /** ID: 22 | Type: UINT48 */ + /** ID=0x0016 | type=UINT48 | max=281474976710655 */ currentOutEnergyCarrierSumm: number; - /** ID: 23 | Type: INT24 */ + /** ID=0x0017 | type=INT24 | min=-8388607 | max=8388607 */ inletTempreature: number; - /** ID: 24 | Type: INT24 */ + /** ID=0x0018 | type=INT24 | min=-8388607 | max=8388607 */ outletTempreature: number; - /** ID: 25 | Type: INT24 */ + /** ID=0x0019 | type=INT24 | min=-8388607 | max=8388607 */ controlTempreature: number; - /** ID: 26 | Type: INT24 */ + /** ID=0x001a | type=INT24 | min=-8388607 | max=8388607 */ currentInEnergyCarrierDemand: number; - /** ID: 27 | Type: INT24 */ + /** ID=0x001b | type=INT24 | min=-8388607 | max=8388607 */ currentOutEnergyCarrierDemand: number; - /** ID: 29 | Type: UINT48 */ + /** ID=0x001c | type=UINT48 | max=281474976710655 */ + previousBlockPeriodConsumpReceived: number; + /** ID=0x001d | type=UINT48 | max=281474976710655 */ currentBlockPeriodConsumpReceived: number; - /** ID: 30 | Type: UINT48 */ + /** ID=0x001e | type=ENUM8 | max=255 */ currentBlockReceived: number; - /** ID: 31 | Type: UINT48 */ + /** ID=0x001f | type=UINT48 | max=281474976710655 */ DFTSummationReceived: number; - /** ID: 32 | Type: ENUM8 */ + /** ID=0x0020 | type=ENUM8 | max=48 */ activeRegisterTierDelivered: number; - /** ID: 33 | Type: ENUM8 */ + /** ID=0x0021 | type=ENUM8 | max=48 */ activeRegisterTierReceived: number; - /** ID: 256 | Type: UINT48 */ + /** ID=0x0022 | type=UTC */ + lastBlockSwitchTime: number; + /** ID=0x0100 | type=UINT48 | max=281474976710655 */ currentTier1SummDelivered: number; - /** ID: 257 | Type: UINT48 */ + /** ID=0x0101 | type=UINT48 | max=281474976710655 */ currentTier1SummReceived: number; - /** ID: 258 | Type: UINT48 */ + /** ID=0x0102 | type=UINT48 | max=281474976710655 */ currentTier2SummDelivered: number; - /** ID: 259 | Type: UINT48 */ + /** ID=0x0103 | type=UINT48 | max=281474976710655 */ currentTier2SummReceived: number; - /** ID: 260 | Type: UINT48 */ + /** ID=0x0104 | type=UINT48 | max=281474976710655 */ currentTier3SummDelivered: number; - /** ID: 261 | Type: UINT48 */ + /** ID=0x0105 | type=UINT48 | max=281474976710655 */ currentTier3SummReceived: number; - /** ID: 262 | Type: UINT48 */ + /** ID=0x0106 | type=UINT48 | max=281474976710655 */ currentTier4SummDelivered: number; - /** ID: 263 | Type: UINT48 */ + /** ID=0x0107 | type=UINT48 | max=281474976710655 */ currentTier4SummReceived: number; - /** ID: 264 | Type: UINT48 */ + /** ID=0x0108 | type=UINT48 | max=281474976710655 */ currentTier5SummDelivered: number; - /** ID: 265 | Type: UINT48 */ + /** ID=0x0109 | type=UINT48 | max=281474976710655 */ currentTier5SummReceived: number; - /** ID: 266 | Type: UINT48 */ + /** ID=0x010a | type=UINT48 | max=281474976710655 */ currentTier6SummDelivered: number; - /** ID: 267 | Type: UINT48 */ + /** ID=0x010b | type=UINT48 | max=281474976710655 */ currentTier6SummReceived: number; - /** ID: 268 | Type: UINT48 */ + /** ID=0x010c | type=UINT48 | max=281474976710655 */ currentTier7SummDelivered: number; - /** ID: 269 | Type: UINT48 */ + /** ID=0x010d | type=UINT48 | max=281474976710655 */ currentTier7SummReceived: number; - /** ID: 270 | Type: UINT48 */ + /** ID=0x010e | type=UINT48 | max=281474976710655 */ currentTier8SummDelivered: number; - /** ID: 271 | Type: UINT48 */ + /** ID=0x010f | type=UINT48 | max=281474976710655 */ currentTier8SummReceived: number; - /** ID: 272 | Type: UINT48 */ + /** ID=0x0110 | type=UINT48 | max=281474976710655 */ currentTier9SummDelivered: number; - /** ID: 273 | Type: UINT48 */ + /** ID=0x0111 | type=UINT48 | max=281474976710655 */ currentTier9SummReceived: number; - /** ID: 274 | Type: UINT48 */ + /** ID=0x0112 | type=UINT48 | max=281474976710655 */ currentTier10SummDelivered: number; - /** ID: 275 | Type: UINT48 */ + /** ID=0x0113 | type=UINT48 | max=281474976710655 */ currentTier10SummReceived: number; - /** ID: 276 | Type: UINT48 */ + /** ID=0x0114 | type=UINT48 | max=281474976710655 */ currentTier11SummDelivered: number; - /** ID: 277 | Type: UINT48 */ + /** ID=0x0115 | type=UINT48 | max=281474976710655 */ currentTier11SummReceived: number; - /** ID: 278 | Type: UINT48 */ + /** ID=0x0116 | type=UINT48 | max=281474976710655 */ currentTier12SummDelivered: number; - /** ID: 279 | Type: UINT48 */ + /** ID=0x0117 | type=UINT48 | max=281474976710655 */ currentTier12SummReceived: number; - /** ID: 280 | Type: UINT48 */ + /** ID=0x0118 | type=UINT48 | max=281474976710655 */ currentTier13SummDelivered: number; - /** ID: 281 | Type: UINT48 */ + /** ID=0x0119 | type=UINT48 | max=281474976710655 */ currentTier13SummReceived: number; - /** ID: 282 | Type: UINT48 */ + /** ID=0x011a | type=UINT48 | max=281474976710655 */ currentTier14SummDelivered: number; - /** ID: 283 | Type: UINT48 */ + /** ID=0x011b | type=UINT48 | max=281474976710655 */ currentTier14SummReceived: number; - /** ID: 284 | Type: UINT48 */ + /** ID=0x011c | type=UINT48 | max=281474976710655 */ currentTier15SummDelivered: number; - /** ID: 285 | Type: UINT48 */ + /** ID=0x011d | type=UINT48 | max=281474976710655 */ currentTier15SummReceived: number; - /** ID: 512 | Type: BITMAP8 */ + /** ID=0x01fc | type=UINT48 | max=281474976710655 */ + cpp1SummationDelivered: number; + /** ID=0x01fe | type=UINT48 | max=281474976710655 */ + cpp2SummationDelivered: number; + /** ID=0x0200 | type=BITMAP8 | required=true | max=255 | default=0 */ status: number; - /** ID: 513 | Type: UINT8 */ + /** ID=0x0201 | type=UINT8 | max=255 */ remainingBattLife: number; - /** ID: 514 | Type: UINT24 */ + /** ID=0x0202 | type=UINT24 | max=16777215 */ hoursInOperation: number; - /** ID: 515 | Type: UINT24 */ + /** ID=0x0203 | type=UINT24 | max=16777215 */ hoursInFault: number; - /** ID: 516 | Type: BITMAP64 */ + /** ID=0x0204 | type=BITMAP64 */ extendedStatus: bigint; - /** ID: 768 | Type: ENUM8 */ + /** ID=0x0205 | type=UINT16 | max=65535 */ + remainingBattLifeInDays: number; + /** ID=0x0206 | type=OCTET_STR */ + currentMeterId: Buffer; + /** ID=0x0207 | type=ENUM8 | max=2 */ + ambientConsumptionIndicator: number; + /** ID=0x0300 | type=ENUM8 | required=true | max=255 | default=0 */ unitOfMeasure: number; - /** ID: 769 | Type: UINT24 */ + /** ID=0x0301 | type=UINT24 | max=16777215 */ multiplier: number; - /** ID: 770 | Type: UINT24 */ + /** ID=0x0302 | type=UINT24 | max=16777215 */ divisor: number; - /** ID: 771 | Type: BITMAP8 */ + /** ID=0x0303 | type=BITMAP8 | required=true | max=255 */ summaFormatting: number; - /** ID: 772 | Type: BITMAP8 */ + /** ID=0x0304 | type=BITMAP8 | max=255 */ demandFormatting: number; - /** ID: 773 | Type: BITMAP8 */ + /** ID=0x0305 | type=BITMAP8 | max=255 */ historicalConsumpFormatting: number; - /** ID: 774 | Type: BITMAP8 */ + /** ID=0x0306 | type=BITMAP8 | max=255 */ meteringDeviceType: number; - /** ID: 775 | Type: OCTET_STR */ + /** ID=0x0307 | type=OCTET_STR | minLen=1 | maxLen=33 */ siteId: Buffer; - /** ID: 776 | Type: OCTET_STR */ + /** ID=0x0308 | type=OCTET_STR | minLen=1 | maxLen=25 */ meterSerialNumber: Buffer; - /** ID: 777 | Type: ENUM8 */ + /** ID=0x0309 | type=ENUM8 | max=255 */ energyCarrierUnitOfMeas: number; - /** ID: 778 | Type: BITMAP8 */ + /** ID=0x030a | type=BITMAP8 | max=255 */ energyCarrierSummFormatting: number; - /** ID: 779 | Type: BITMAP8 */ + /** ID=0x030b | type=BITMAP8 | max=255 */ energyCarrierDemandFormatting: number; - /** ID: 780 | Type: ENUM8 */ + /** ID=0x030c | type=ENUM8 | max=255 */ temperatureUnitOfMeas: number; - /** ID: 781 | Type: BITMAP8 */ + /** ID=0x030d | type=BITMAP8 | max=255 */ temperatureFormatting: number; - /** ID: 782 | Type: OCTET_STR */ + /** ID=0x030e | type=OCTET_STR | minLen=1 | maxLen=25 */ moduleSerialNumber: Buffer; - /** ID: 783 | Type: OCTET_STR */ - operatingTariffLevel: Buffer; - /** ID: 1024 | Type: INT24 */ + /** ID=0x030f | type=OCTET_STR | minLen=1 | maxLen=25 */ + operatingTariffLevelDelivered: Buffer; + /** ID=0x0310 | type=OCTET_STR | minLen=1 | maxLen=25 */ + operatingTariffLevelReceived: Buffer; + /** ID=0x0311 | type=OCTET_STR | minLen=1 | maxLen=25 */ + customIdNumber: Buffer; + /** ID=0x0312 | type=ENUM8 | default=0 */ + alternativeUnitOfMeasure: number; + /** ID=0x0312 | type=BITMAP8 | max=255 */ + alternativeDemandFormatting: number; + /** ID=0x0312 | type=BITMAP8 | max=255 */ + alternativeConsumptionFormatting: number; + /** ID=0x0400 | type=INT24 | min=-8388607 | max=8388607 | default=0 */ instantaneousDemand: number; - /** ID: 1025 | Type: UINT24 */ - currentdayConsumpDelivered: number; - /** ID: 1026 | Type: UINT24 */ - currentdayConsumpReceived: number; - /** ID: 1027 | Type: UINT24 */ - previousdayConsumpDelivered: number; - /** ID: 1028 | Type: UINT24 */ - previousdayConsumpReceived: number; - /** ID: 1029 | Type: UTC */ + /** ID=0x0401 | type=UINT24 | max=16777215 */ + currentDayConsumpDelivered: number; + /** ID=0x0402 | type=UINT24 | max=16777215 */ + currentDayConsumpReceived: number; + /** ID=0x0403 | type=UINT24 | max=16777215 */ + previousDayConsumpDelivered: number; + /** ID=0x0404 | type=UINT24 | max=16777215 */ + previousDayConsumpReceived: number; + /** ID=0x0405 | type=UTC */ curPartProfileIntStartTimeDelivered: number; - /** ID: 1030 | Type: UTC */ + /** ID=0x0406 | type=UTC */ curPartProfileIntStartTimeReceived: number; - /** ID: 1031 | Type: UINT24 */ + /** ID=0x0407 | type=UINT24 | max=16777215 */ curPartProfileIntValueDelivered: number; - /** ID: 1032 | Type: UINT24 */ + /** ID=0x0408 | type=UINT24 | max=16777215 */ curPartProfileIntValueReceived: number; - /** ID: 1033 | Type: UINT48 */ + /** ID=0x0409 | type=UINT48 | max=281474976710655 */ currentDayMaxPressure: number; - /** ID: 1034 | Type: UINT48 */ + /** ID=0x040a | type=UINT48 | max=281474976710655 */ currentDayMinPressure: number; - /** ID: 1035 | Type: UINT48 */ + /** ID=0x040b | type=UINT48 | max=281474976710655 */ previousDayMaxPressure: number; - /** ID: 1036 | Type: UINT48 */ + /** ID=0x040c | type=UINT48 | max=281474976710655 */ previousDayMinPressure: number; - /** ID: 1037 | Type: INT24 */ + /** ID=0x040d | type=INT24 | min=-8388607 | max=8388607 */ currentDayMaxDemand: number; - /** ID: 1038 | Type: INT24 */ + /** ID=0x040e | type=INT24 | min=-8388607 | max=8388607 */ previousDayMaxDemand: number; - /** ID: 1039 | Type: INT24 */ + /** ID=0x040f | type=INT24 | min=-8388607 | max=8388607 */ currentMonthMaxDemand: number; - /** ID: 1040 | Type: INT24 */ + /** ID=0x0410 | type=INT24 | min=-8388607 | max=8388607 */ currentYearMaxDemand: number; - /** ID: 1041 | Type: INT24 */ - currentdayMaxEnergyCarrDemand: number; - /** ID: 1042 | Type: INT24 */ - previousdayMaxEnergyCarrDemand: number; - /** ID: 1043 | Type: INT24 */ + /** ID=0x0411 | type=INT24 | min=-8388607 | max=8388607 */ + currentDayMaxEnergyCarrDemand: number; + /** ID=0x0412 | type=INT24 | min=-8388607 | max=8388607 */ + previousDayMaxEnergyCarrDemand: number; + /** ID=0x0413 | type=INT24 | min=-8388607 | max=8388607 */ curMonthMaxEnergyCarrDemand: number; - /** ID: 1044 | Type: INT24 */ + /** ID=0x0414 | type=INT24 | min=-8388607 | max=8388607 */ curMonthMinEnergyCarrDemand: number; - /** ID: 1045 | Type: INT24 */ + /** ID=0x0415 | type=INT24 | min=-8388607 | max=8388607 */ curYearMaxEnergyCarrDemand: number; - /** ID: 1046 | Type: INT24 */ + /** ID=0x0416 | type=INT24 | min=-8388607 | max=8388607 */ curYearMinEnergyCarrDemand: number; - /** ID: 1280 | Type: UINT8 */ + /** ID=0x0420 | type=UINT24 | max=16777215 */ + previousDay2ConsumptionDelivered: number; + /** ID=0x0421 | type=UINT24 | max=16777215 */ + previousDay2ConsumptionReceived: number; + /** ID=0x0422 | type=UINT24 | max=16777215 */ + previousDay3ConsumptionDelivered: number; + /** ID=0x0423 | type=UINT24 | max=16777215 */ + previousDay3ConsumptionReceived: number; + /** ID=0x0424 | type=UINT24 | max=16777215 */ + previousDay4ConsumptionDelivered: number; + /** ID=0x0425 | type=UINT24 | max=16777215 */ + previousDay4ConsumptionReceived: number; + /** ID=0x0426 | type=UINT24 | max=16777215 */ + previousDay5ConsumptionDelivered: number; + /** ID=0x0427 | type=UINT24 | max=16777215 */ + previousDay5ConsumptionReceived: number; + /** ID=0x0428 | type=UINT24 | max=16777215 */ + previousDay6ConsumptionDelivered: number; + /** ID=0x0420 | type=UINT24 | max=16777215 */ + previousDay6ConsumptionReceived: number; + /** ID=0x042a | type=UINT24 | max=16777215 */ + previousDay7ConsumptionDelivered: number; + /** ID=0x042b | type=UINT24 | max=16777215 */ + previousDay7ConsumptionReceived: number; + /** ID=0x042c | type=UINT24 | max=16777215 */ + previousDay8ConsumptionDelivered: number; + /** ID=0x042d | type=UINT24 | max=16777215 */ + previousDay8ConsumptionReceived: number; + /** ID=0x0430 | type=UINT24 | max=16777215 */ + currentWeekConsumptionDelivered: number; + /** ID=0x0431 | type=UINT24 | max=16777215 */ + currentWeekConsumptionReceived: number; + /** ID=0x0432 | type=UINT24 | max=16777215 */ + previousWeekConsumptionDelivered: number; + /** ID=0x0433 | type=UINT24 | max=16777215 */ + previousWeekConsumptionReceived: number; + /** ID=0x0434 | type=UINT24 | max=16777215 */ + previousWeek2ConsumptionDelivered: number; + /** ID=0x0435 | type=UINT24 | max=16777215 */ + previousWeek2ConsumptionReceived: number; + /** ID=0x0436 | type=UINT24 | max=16777215 */ + previousWeek3ConsumptionDelivered: number; + /** ID=0x0437 | type=UINT24 | max=16777215 */ + previousWeek3ConsumptionReceived: number; + /** ID=0x0438 | type=UINT24 | max=16777215 */ + previousWeek4ConsumptionDelivered: number; + /** ID=0x0439 | type=UINT24 | max=16777215 */ + previousWeek4ConsumptionReceived: number; + /** ID=0x043a | type=UINT24 | max=16777215 */ + previousWeek5ConsumptionDelivered: number; + /** ID=0x043b | type=UINT24 | max=16777215 */ + previousWeek5ConsumptionReceived: number; + /** ID=0x0440 | type=UINT32 | max=4294967295 */ + currentMonthConsumptionDelivered: number; + /** ID=0x0441 | type=UINT32 | max=4294967295 */ + currentMonthConsumptionReceived: number; + /** ID=0x0442 | type=UINT32 | max=4294967295 */ + previousMonthConsumptionDelivered: number; + /** ID=0x0443 | type=UINT32 | max=4294967295 */ + previousMonthConsumptionReceived: number; + /** ID=0x0444 | type=UINT32 | max=4294967295 */ + previousMonth2ConsumptionDelivered: number; + /** ID=0x0445 | type=UINT32 | max=4294967295 */ + previousMonth2ConsumptionReceived: number; + /** ID=0x0446 | type=UINT32 | max=4294967295 */ + previousMonth3ConsumptionDelivered: number; + /** ID=0x0447 | type=UINT32 | max=4294967295 */ + previousMonth3ConsumptionReceived: number; + /** ID=0x0448 | type=UINT32 | max=4294967295 */ + previousMonth4ConsumptionDelivered: number; + /** ID=0x0449 | type=UINT32 | max=4294967295 */ + previousMonth4ConsumptionReceived: number; + /** ID=0x044a | type=UINT32 | max=4294967295 */ + previousMonth5ConsumptionDelivered: number; + /** ID=0x044b | type=UINT32 | max=4294967295 */ + previousMonth5ConsumptionReceived: number; + /** ID=0x044c | type=UINT32 | max=4294967295 */ + previousMonth6ConsumptionDelivered: number; + /** ID=0x044d | type=UINT32 | max=4294967295 */ + previousMonth6ConsumptionReceived: number; + /** ID=0x044e | type=UINT32 | max=4294967295 */ + previousMonth7ConsumptionDelivered: number; + /** ID=0x044f | type=UINT32 | max=4294967295 */ + previousMonth7ConsumptionReceived: number; + /** ID=0x0450 | type=UINT32 | max=4294967295 */ + previousMonth8ConsumptionDelivered: number; + /** ID=0x0451 | type=UINT32 | max=4294967295 */ + previousMonth8ConsumptionReceived: number; + /** ID=0x0452 | type=UINT32 | max=4294967295 */ + previousMonth9ConsumptionDelivered: number; + /** ID=0x0453 | type=UINT32 | max=4294967295 */ + previousMonth9ConsumptionReceived: number; + /** ID=0x0454 | type=UINT32 | max=4294967295 */ + previousMonth10ConsumptionDelivered: number; + /** ID=0x0455 | type=UINT32 | max=4294967295 */ + previousMonth10ConsumptionReceived: number; + /** ID=0x0456 | type=UINT32 | max=4294967295 */ + previousMonth11ConsumptionDelivered: number; + /** ID=0x0457 | type=UINT32 | max=4294967295 */ + previousMonth11ConsumptionReceived: number; + /** ID=0x0458 | type=UINT32 | max=4294967295 */ + previousMonth12ConsumptionDelivered: number; + /** ID=0x0459 | type=UINT32 | max=4294967295 */ + previousMonth12ConsumptionReceived: number; + /** ID=0x045a | type=UINT32 | max=4294967295 */ + previousMonth13ConsumptionDelivered: number; + /** ID=0x045b | type=UINT32 | max=4294967295 */ + previousMonth13ConsumptionReceived: number; + /** ID=0x045c | type=UINT16 | max=5947 | default=0 */ + historicalFreezeTime: number; + /** ID=0x0500 | type=UINT8 | max=255 | default=24 */ maxNumberOfPeriodsDelivered: number; - /** ID: 1536 | Type: UINT24 */ + /** ID=0x0600 | type=UINT24 | max=16777215 */ currentDemandDelivered: number; - /** ID: 1537 | Type: UINT24 */ + /** ID=0x0601 | type=UINT24 | max=16777215 */ demandLimit: number; - /** ID: 1538 | Type: UINT8 */ + /** ID=0x0602 | type=UINT8 | min=1 | max=255 */ demandIntegrationPeriod: number; - /** ID: 1539 | Type: UINT8 */ + /** ID=0x0603 | type=UINT8 | min=1 | max=255 */ numberOfDemandSubintervals: number; - /** ID: 1540 | Type: UINT16 */ + /** ID=0x0604 | type=UINT16 | max=65535 | default=60 */ demandLimitArmDuration: number; - /** ID: 2048 | Type: BITMAP16 */ + /** ID=0x0605 | type=ENUM8 | max=255 | default=0 */ + loadLimitSupplyState: number; + /** ID=0x0606 | type=UINT8 | max=255 | default=1 */ + loadLimitCounter: number; + /** ID=0x0607 | type=ENUM8 | max=255 | default=0 */ + supplyTamperState: number; + /** ID=0x0608 | type=ENUM8 | max=255 | default=0 */ + supplyDepletionState: number; + /** ID=0x0609 | type=ENUM8 | max=255 | default=0 */ + supplyUncontrolledFlowState: number; + /** ID=0x0800 | type=BITMAP16 | max=65535 | default=65535 */ genericAlarmMask: number; - /** ID: 2049 | Type: BITMAP32 */ + /** ID=0x0801 | type=BITMAP32 | max=4294967295 | default=4294967295 */ electricityAlarmMask: number; - /** ID: 2050 | Type: BITMAP16 */ + /** ID=0x0802 | type=BITMAP16 | max=65535 | default=65535 */ genFlowPressureAlarmMask: number; - /** ID: 2051 | Type: BITMAP16 */ + /** ID=0x0803 | type=BITMAP16 | max=65535 | default=65535 */ waterSpecificAlarmMask: number; - /** ID: 2052 | Type: BITMAP16 */ + /** ID=0x0804 | type=BITMAP16 | max=65535 | default=65535 */ heatCoolSpecificAlarmMASK: number; - /** ID: 2053 | Type: BITMAP16 */ + /** ID=0x0805 | type=BITMAP16 | max=65535 | default=65535 */ gasSpecificAlarmMask: number; - /** ID: 2054 | Type: BITMAP48 */ + /** ID=0x0806 | type=BITMAP48 | max=281474976710655 | default=281474976710655 */ extendedGenericAlarmMask: number; - /** ID: 2055 | Type: BITMAP16 */ + /** ID=0x0807 | type=BITMAP16 | max=65535 | default=65535 */ manufactureAlarmMask: number; - /** ID: 2560 | Type: UINT32 */ - billToDate: number; - /** ID: 2561 | Type: UTC */ - billToDateTimeStamp: number; - /** ID: 2562 | Type: UINT32 */ - projectedBill: number; - /** ID: 2563 | Type: UTC */ - projectedBillTimeStamp: number; - /** ID: 768 | Type: UINT16 | Specific to manufacturer: DEVELCO (4117) */ + /** ID=0x0a00 | type=UINT32 | max=4294967295 | default=0 */ + billToDateDelivered: number; + /** ID=0x0a01 | type=UTC | default=0 */ + billToDateTimeStampDelivered: number; + /** ID=0x0a02 | type=UINT32 | max=4294967295 | default=0 */ + projectedBillDelivered: number; + /** ID=0x0a03 | type=UTC | default=0 */ + projectedBillTimeStampDelivered: number; + /** ID=0x0a04 | type=BITMAP8 */ + billDeliveredTrailingDigit: number; + /** ID=0x0a10 | type=UINT32 | max=4294967295 | default=0 */ + billToDateReceived: number; + /** ID=0x0a11 | type=UTC | default=0 */ + billToDateTimeStampReceived: number; + /** ID=0x0a12 | type=UINT32 | max=4294967295 | default=0 */ + projectedBillReceived: number; + /** ID=0x0a13 | type=UTC | default=0 */ + projectedBillTimeStampReceived: number; + /** ID=0x0a14 | type=BITMAP8 */ + billReceivedTrailingDigit: number; + /** ID=0x0300 | type=UINT16 | manufacturerCode=DEVELCO(0x1015) | write=true | max=65535 */ develcoPulseConfiguration?: number; - /** ID: 769 | Type: UINT48 | Specific to manufacturer: DEVELCO (4117) */ + /** ID=0x0301 | type=UINT48 | manufacturerCode=DEVELCO(0x1015) | write=true | max=281474976710655 */ develcoCurrentSummation?: number; - /** ID: 770 | Type: ENUM16 | Specific to manufacturer: DEVELCO (4117) */ + /** ID=0x0302 | type=ENUM16 | manufacturerCode=DEVELCO(0x1015) | write=true | max=65535 */ develcoInterfaceMode?: number; - /** ID: 8192 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2000 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL1PhasePower?: number; - /** ID: 8193 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2001 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL2PhasePower?: number; - /** ID: 8194 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2002 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL3PhasePower?: number; - /** ID: 8448 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2100 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL1PhaseReactivePower?: number; - /** ID: 8449 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2101 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL2PhaseReactivePower?: number; - /** ID: 8450 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2102 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonL3PhaseReactivePower?: number; - /** ID: 8451 | Type: INT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x2103 | type=INT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-8388608 | max=8388607 */ owonReactivePowerSum?: number; - /** ID: 12288 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3000 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL1PhaseVoltage?: number; - /** ID: 12289 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3001 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL2PhaseVoltage?: number; - /** ID: 12290 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3002 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL3PhaseVoltage?: number; - /** ID: 12544 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3100 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL1PhaseCurrent?: number; - /** ID: 12545 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3101 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL2PhaseCurrent?: number; - /** ID: 12546 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3102 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonL3PhaseCurrent?: number; - /** ID: 12547 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3103 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonCurrentSum?: number; - /** ID: 12548 | Type: UINT24 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x3104 | type=UINT24 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=16777215 */ owonLeakageCurrent?: number; - /** ID: 16384 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4000 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL1Energy?: number; - /** ID: 16385 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4001 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL2Energy?: number; - /** ID: 16386 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4002 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL3Energy?: number; - /** ID: 16640 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4100 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL1ReactiveEnergy?: number; - /** ID: 16641 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4101 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL2ReactiveEnergy?: number; - /** ID: 16642 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4102 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonL3ReactiveEnergy?: number; - /** ID: 16643 | Type: UINT48 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4103 | type=UINT48 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=281474976710655 */ owonReactiveEnergySum?: number; - /** ID: 16644 | Type: INT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4104 | type=INT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-128 | max=127 */ owonL1PowerFactor?: number; - /** ID: 16645 | Type: INT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4105 | type=INT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-128 | max=127 */ owonL2PowerFactor?: number; - /** ID: 16646 | Type: INT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x4106 | type=INT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | min=-128 | max=127 */ owonL3PowerFactor?: number; - /** ID: 20485 | Type: UINT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5005 | type=UINT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=255 */ owonFrequency?: number; - /** ID: 4096 | Type: BITMAP8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x1000 | type=BITMAP8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true */ owonReportMap?: number; - /** ID: 20480 | Type: UINT32 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5000 | type=UINT32 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=4294967295 */ owonLastHistoricalRecordTime?: number; - /** ID: 20481 | Type: UINT32 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5001 | type=UINT32 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=4294967295 */ owonOldestHistoricalRecordTime?: number; - /** ID: 20482 | Type: UINT32 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5002 | type=UINT32 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=4294967295 */ owonMinimumReportCycle?: number; - /** ID: 20483 | Type: UINT32 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5003 | type=UINT32 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=4294967295 */ owonMaximumReportCycle?: number; - /** ID: 20484 | Type: UINT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5004 | type=UINT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=255 */ owonSentHistoricalRecordState?: number; - /** ID: 20486 | Type: UINT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5006 | type=UINT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=255 */ owonAccumulativeEnergyThreshold?: number; - /** ID: 20487 | Type: UINT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5007 | type=UINT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=255 */ owonReportMode?: number; - /** ID: 20488 | Type: UINT8 | Specific to manufacturer: OWON_TECHNOLOGY_INC (4412) */ + /** ID=0x5008 | type=UINT8 | manufacturerCode=OWON_TECHNOLOGY_INC(0x113c) | write=true | max=255 */ owonPercentChangeInPower?: number; - /** ID: 16400 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4010 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderActiveEnergyTotal?: number; - /** ID: 16401 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4011 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderReactiveEnergyTotal?: number; - /** ID: 16402 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4012 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderApparentEnergyTotal?: number; - /** ID: 16404 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4014 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialActiveEnergyTotal?: number; - /** ID: 16405 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4015 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialReactiveEnergyTotal?: number; - /** ID: 16406 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4016 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialApparentEnergyTotal?: number; - /** ID: 16640 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4100 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialActiveEnergyL1Phase?: number; - /** ID: 16641 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4101 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialReactiveEnergyL1Phase?: number; - /** ID: 16642 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4102 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialApparentEnergyL1Phase?: number; - /** ID: 16643 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4103 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderActiveEnergyL1Phase?: number; - /** ID: 16644 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4104 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderReactiveEnergyL1Phase?: number; - /** ID: 16645 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4105 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderApparentEnergyL1Phase?: number; - /** ID: 16896 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4200 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialActiveEnergyL2Phase?: number; - /** ID: 16897 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4201 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialReactiveEnergyL2Phase?: number; - /** ID: 16898 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4202 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialApparentEnergyL2Phase?: number; - /** ID: 16899 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4203 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderActiveEnergyL2Phase?: number; - /** ID: 16900 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4204 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderReactiveEnergyL2Phase?: number; - /** ID: 16901 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4205 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderApparentEnergyL2Phase?: number; - /** ID: 17152 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4300 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialActiveEnergyL3Phase?: number; - /** ID: 17153 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4301 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialReactiveEnergyL3Phase?: number; - /** ID: 17154 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4302 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderPartialApparentEnergyL3Phase?: number; - /** ID: 17155 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4303 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderActiveEnergyL3Phase?: number; - /** ID: 17156 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4304 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderReactiveEnergyL3Phase?: number; - /** ID: 17157 | Type: INT48 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4305 | type=INT48 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-140737488355328 | max=140737488355327 */ schneiderApparentEnergyL3Phase?: number; - /** ID: 17408 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4400 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderActiveEnergyMultiplier?: number; - /** ID: 17409 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4401 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderActiveEnergyDivisor?: number; - /** ID: 17410 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4402 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderReactiveEnergyMultiplier?: number; - /** ID: 17411 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4403 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderReactiveEnergyDivisor?: number; - /** ID: 17412 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4404 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderApparentEnergyMultiplier?: number; - /** ID: 17413 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4405 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderApparentEnergyDivisor?: number; - /** ID: 17665 | Type: UTC | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4501 | type=UTC | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=4294967295 */ schneiderEnergyResetDateTime?: number; - /** ID: 17920 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4600 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderEnergyCountersReportingPeriod?: number; }; commands: { - /** ID: 0 */ - getProfile: Record; - /** ID: 1 */ - reqMirror: Record; - /** ID: 2 */ - mirrorRem: Record; - /** ID: 3 */ - reqFastPollMode: Record; - /** ID: 4 */ - getSnapshot: Record; - /** ID: 5 */ - takeSnapshot: Record; - /** ID: 6 */ - mirrorReportAttrRsp: Record; - /** ID: 32 */ + /** ID=0x00 | response=0 */ + getProfile: { + /** type=ENUM8 */ + intervalChannel: number; + /** type=UTC */ + endTime: number; + /** type=UINT8 */ + numberOfPeriods: number; + }; + /** ID=0x01 | response=1 */ + requestMirrorRsp: { + /** type=UINT16 */ + endpointId: number; + }; + /** ID=0x02 | response=2 */ + mirrorRemoved: { + /** type=UINT16 */ + removedEndpointId: number; + }; + /** ID=0x03 | response=3 */ + requestFastPollMode: { + /** type=UINT8 */ + fastPollUpdatePeriod: number; + /** type=UINT8 */ + duration: number; + }; + /** ID=0x04 | response=4 */ + schneduleSnapshot: { + /** type=UINT32 */ + issuerEventId: number; + /** type=UINT8 */ + commandIndex: number; + /** type=UINT8 */ + totalNumberOfCommands: number; + }; + /** ID=0x05 | response=5 */ + takeSnapshot: { + /** type=BITMAP32 */ + cause: number; + }; + /** ID=0x06 */ + getSnapshot: { + /** type=UTC */ + earliestStartTime: number; + /** type=UTC */ + latestEndTime: number; + /** type=UINT8 */ + offset: number; + /** type=BITMAP32 */ + cause: number; + }; + /** ID=0x07 | response=13 */ + startSampling: { + /** type=UINT32 */ + issuerEventId: number; + /** type=UTC */ + startTime: number; + /** type=ENUM8 */ + type: number; + /** type=UINT16 */ + requestInterval: number; + /** type=UINT16 */ + maxNumberOfSamples: number; + }; + /** ID=0x08 | response=7 */ + getSampledData: { + /** type=UINT16 */ + sampleId: number; + /** type=UTC */ + earliestSampleTime: number; + /** type=ENUM8 */ + type: number; + /** type=UINT16 */ + numberOfSamples: number; + }; + /** ID=0x09 */ + mirrorReportAttributeRsp: { + /** type=UINT8 */ + notificationScheme: number; + /** type=BITMAP32 */ + notificationFlags: number; + }; + /** ID=0x0a */ + resetLoadLimitCounter: { + /** type=UINT32 */ + providerId: number; + /** type=UINT32 */ + issuerEventId: number; + }; + /** ID=0x0b */ + changeSupply: { + /** type=UINT32 */ + providerId: number; + /** type=UINT32 */ + issuerEventId: number; + /** type=UTC */ + requestDateTime: number; + /** type=UTC */ + implDateTime: number; + /** type=ENUM8 */ + proposedSupplyStatusAfterImpl: number; + /** type=BITMAP8 */ + SupplyControlBits: number; + }; + /** ID=0x0c */ + localChangeSupply: { + /** type=ENUM8 */ + proposedSupplyStatus: number; + }; + /** ID=0x0d */ + setSupplyStatus: { + /** type=UINT32 */ + issuerEventId: number; + /** type=ENUM8 */ + tamperState: number; + /** type=ENUM8 */ + depletionState: number; + /** type=ENUM8 */ + uncontrolledFlowState: number; + /** type=ENUM8 */ + loadLimitSupplyState: number; + }; + /** ID=0x0e */ + setUncontrolledFlowThreshold: { + /** type=UINT32 */ + providerId: number; + /** type=UINT32 */ + issuerEventId: number; + /** type=UINT16 */ + uncontrolledFlowThreshold: number; + /** type=ENUM8 */ + unitOfMeasure: number; + /** type=UINT16 */ + multiplier: number; + /** type=UINT16 */ + divisor: number; + /** type=UINT8 */ + stabilisationPeriod: number; + /** type=UINT16 */ + measurementPeriod: number; + }; + /** ID=0x20 */ owonGetHistoryRecord: Record; - /** ID: 33 */ + /** ID=0x21 */ owonStopSendingHistoricalRecord: Record; }; commandResponses: { - /** ID: 0 */ - getProfileRsp: Record; - /** ID: 1 */ - reqMirrorRsp: Record; - /** ID: 2 */ - mirrorRemRsp: Record; - /** ID: 3 */ - reqFastPollModeRsp: Record; - /** ID: 4 */ - getSnapshotRsp: Record; - /** ID: 32 */ + /** ID=0x00 */ + getProfileRsp: { + /** type=UTC */ + endTime: number; + /** type=ENUM8 */ + status: number; + /** type=ENUM8 */ + profileIntervalPeriod: number; + /** type=UINT8 */ + numberOfPeriodsDelivered: number; + /** type=LIST_UINT24 */ + intervals: number[]; + }; + /** ID=0x01 */ + requestMirror: Record; + /** ID=0x02 */ + removeMirror: Record; + /** ID=0x03 */ + requestFastPollModeRsp: { + /** type=UINT8 */ + appliedUpdatePeriod: number; + /** type=UTC */ + fastPollModeEndTime: number; + }; + /** ID=0x04 */ + scheduleSnapshotRsp: { + /** type=UINT32 */ + issuerEventId: number; + }; + /** ID=0x05 */ + takeSnapshotRsp: { + /** type=UINT32 */ + id: number; + /** type=UINT8 */ + confirmation: number; + }; + /** ID=0x06 */ + publishSnapshot: { + /** type=UINT32 */ + id: number; + /** type=UTC */ + time: number; + /** type=UINT8 */ + totalSnapshotsFound: number; + /** type=UINT8 */ + commandIndex: number; + /** type=UINT8 */ + totalNumberOfCommands: number; + /** type=BITMAP32 */ + cause: number; + /** type=ENUM8 */ + payloadType: number; + }; + /** ID=0x07 */ + getSampledDataRsp: { + /** type=UINT16 */ + id: number; + /** type=UTC */ + startTime: number; + /** type=ENUM8 */ + type: number; + /** type=UINT16 */ + requestInterval: number; + /** type=UINT16 */ + numberOfSamples: number; + /** type=LIST_UINT24 */ + samples: number[]; + }; + /** ID=0x08 */ + configureMirror: { + /** type=UINT32 */ + issuerEventId: number; + /** type=UINT24 */ + reportingInterval: number; + /** type=BOOLEAN */ + mirrorNotificationReporting: number; + /** type=UINT8 */ + notificationScheme: number; + }; + /** ID=0x09 */ + configureNotificationScheme: { + /** type=UINT32 */ + issuerEventId: number; + /** type=UINT8 */ + notificationScheme: number; + /** type=BITMAP32 */ + notificationFlagOrder: number; + }; + /** ID=0x0a */ + configureNotificationFlag: { + /** type=UINT32 */ + issuerEventId: number; + /** type=UINT8 */ + notificationScheme: number; + /** type=UINT16 */ + notificationFlagAttributeId: number; + /** type=CLUSTER_ID */ + clusterId: number; + /** type=UINT16 */ + manufacturerCode: number; + /** type=UINT8 */ + numberOfCommands: number; + /** type=LIST_UINT8 */ + commandIds: number[]; + }; + /** ID=0x0b */ + getNotifiedMessage: { + /** type=UINT8 */ + notificationScheme: number; + /** type=UINT16 */ + notificationFlagAttributeId: number; + /** type=BITMAP32 */ + notificationFlags: number; + }; + /** ID=0x0c */ + supplyStatusRsp: { + /** type=UINT32 */ + providerId: number; + /** type=UINT32 */ + issuerEventId: number; + /** type=UTC */ + implDateTime: number; + /** type=ENUM8 */ + supplyStatusAfterImpl: number; + }; + /** ID=0x0d */ + startSamplingRsp: { + /** type=UINT16 */ + sampleId: number; + }; + /** ID=0x20 */ owonGetHistoryRecordRsp: Record; }; }; - tunneling: { - attributes: never; + seTunneling: { + attributes: { + /** ID=0x0000 | type=UINT16 | required=true | min=1 | default=65535 */ + closeTunnelTimeout: number; + }; commands: { - /** ID: 0 | Response ID: 0 */ + /** ID=0x00 | response=0 | required=true */ requestTunnel: { - /** Type: ENUM8 */ + /** type=ENUM8 | min=1 | max=255 */ protocolId: number; - /** Type: UINT16 */ - manufCode: number; - /** Type: BOOLEAN */ + /** type=UINT16 | max=65535 */ + manufacturerCode: number; + /** type=BOOLEAN */ flowControl: number; - /** Type: UINT16 */ - mtuSize: number; + /** type=UINT16 | max=65535 */ + maxIncomingTransferSize: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ closeTunnel: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ tunnelId: number; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ transferData: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ tunnelId: number; - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ transferDataError: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ tunnelId: number; - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; + /** ID=0x04 */ + ackTransferData: { + /** type=UINT16 | max=65535 */ + tunnelId: number; + /** type=UINT16 */ + numberOfBytesLeft: number; + }; + /** ID=0x05 */ + readyData: { + /** type=UINT16 | max=65535 */ + tunnelId: number; + /** type=UINT16 */ + numberOfOctetsLeft: number; + }; + /** ID=0x06 */ + getSupportedTunnelProtocols: { + /** type=UINT8 */ + protocolOffset: number; + }; }; commandResponses: { - /** ID: 0 */ - requestTunnelResp: { - /** Type: UINT16 */ + /** ID=0x00 | required=true */ + requestTunnelRsp: { + /** type=UINT16 | max=65535 */ tunnelId: number; - /** Type: UINT8 */ - tunnelStatus: number; - /** Type: UINT16 */ - mtuSize: number; - }; - /** ID: 1 */ - transferDataResp: { - /** Type: UINT16 */ + /** type=UINT8 */ + status: number; + /** type=UINT16 */ + maxIncomingTransferSize: number; + }; + /** ID=0x01 | required=true */ + transferData: { + /** type=UINT16 | max=65535 */ tunnelId: number; - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; - /** ID: 2 */ - transferDataErrorResp: { - /** Type: UINT16 */ + /** ID=0x02 | required=true */ + transferDataError: { + /** type=UINT16 | max=65535 */ tunnelId: number; - /** Type: UINT8 */ + /** type=UINT8 */ status: number; }; + /** ID=0x03 */ + ackTransferData: { + /** type=UINT16 | max=65535 */ + tunnelId: number; + /** type=UINT16 */ + numberOfBytesLeft: number; + }; + /** ID=0x04 */ + readyData: { + /** type=UINT16 | max=65535 */ + tunnelId: number; + /** type=UINT16 */ + numberOfOctetsLeft: number; + }; + /** ID=0x05 */ + supportedProtocolsRsp: { + /** type=BOOLEAN */ + listComplete: number; + /** type=UINT8 */ + count: number; + }; + /** ID=0x06 */ + closureNotification: { + /** type=UINT16 */ + tunnelId: number; + }; }; }; telecommunicationsInformation: { attributes: { - /** ID: 0 | Type: CHAR_STR */ + /** ID=0x0000 | type=CHAR_STR | required=true */ nodeDescription: string; - /** ID: 1 | Type: BOOLEAN */ + /** ID=0x0001 | type=BOOLEAN | required=true */ deliveryEnable: number; - /** ID: 2 | Type: UINT32 */ + /** ID=0x0002 | type=UINT32 */ pushInformationTimer: number; - /** ID: 3 | Type: BOOLEAN */ + /** ID=0x0003 | type=BOOLEAN | required=true */ enableSecureConfiguration: number; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | max=65535 */ numberOfContents: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | max=65535 */ contentRootID: number; }; - commands: never; - commandResponses: never; + commands: { + /** ID=0x00 | response=0 | required=true */ + requestInfo: Record; + /** ID=0x01 | required=true */ + pushInfoResponse: Record; + /** ID=0x02 | response=2 */ + sendPreference: Record; + /** ID=0x03 */ + requestPreferenceRsp: Record; + /** ID=0x04 | response=5 */ + update: Record; + /** ID=0x05 | response=6 */ + delete: Record; + /** ID=0x06 */ + configureNodeDescription: Record; + /** ID=0x07 */ + configureDeliveryEnable: Record; + /** ID=0x08 */ + configurePushInfoTimer: Record; + /** ID=0x09 */ + configureSetRootId: Record; + }; + commandResponses: { + /** ID=0x00 | required=true */ + requestInfoRsp: Record; + /** ID=0x01 | required=true */ + pushInfo: Record; + /** ID=0x02 | required=true */ + sendPreferenceRsp: Record; + /** ID=0x03 | required=true */ + serverRequestPreference: Record; + /** ID=0x04 | required=true */ + requestPreferenceConfirmation: Record; + /** ID=0x05 | required=true */ + updateRsp: Record; + /** ID=0x06 | required=true */ + deleteRsp: Record; + }; }; telecommunicationsVoiceOverZigbee: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | required=true | write=true */ codecType: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | required=true | write=true */ samplingFrequency: number; - /** ID: 2 | Type: ENUM8 */ + /** ID=0x0002 | type=ENUM8 | required=true | write=true */ codecrate: number; - /** ID: 3 | Type: UINT8 */ + /** ID=0x0003 | type=UINT8 | required=true | min=1 | max=255 */ establishmentTimeout: number; - /** ID: 4 | Type: ENUM8 */ + /** ID=0x0004 | type=ENUM8 | write=true */ codecTypeSub1: number; - /** ID: 5 | Type: ENUM8 */ + /** ID=0x0005 | type=ENUM8 | write=true */ codecTypeSub2: number; - /** ID: 6 | Type: ENUM8 */ + /** ID=0x0006 | type=ENUM8 | write=true */ codecTypeSub3: number; - /** ID: 7 | Type: ENUM8 */ + /** ID=0x0007 | type=ENUM8 */ compressionType: number; - /** ID: 8 | Type: ENUM8 */ + /** ID=0x0008 | type=ENUM8 */ compressionRate: number; - /** ID: 9 | Type: BITMAP8 */ + /** ID=0x0009 | type=BITMAP8 | write=true | max=255 */ optionFlags: number; - /** ID: 10 | Type: UINT8 */ + /** ID=0x000a | type=UINT8 | write=true | max=255 */ threshold: number; }; - commands: never; - commandResponses: never; + commands: { + /** ID=0x00 | response=0 | required=true */ + establishmentRequest: { + /** type=BITMAP8 */ + flag: number; + /** type=ENUM8 */ + codecType: number; + /** type=ENUM8 */ + sampFreq: number; + /** type=ENUM8 */ + codecRate: number; + /** type=ENUM8 */ + serviceType: number; + /** type=ENUM8 | conditions=[{bitMaskSet param=flag mask=1}] */ + codecTypeS1?: number; + /** type=ENUM8 | conditions=[{bitMaskSet param=flag mask=2}] */ + codecTypeS2?: number; + /** type=ENUM8 | conditions=[{bitMaskSet param=flag mask=4}] */ + codecTypeS3?: number; + /** type=ENUM8 | conditions=[{bitMaskSet param=flag mask=8}] */ + compType?: number; + /** type=ENUM8 | conditions=[{bitMaskSet param=flag mask=8}] */ + compRate?: number; + }; + /** ID=0x00 | required=true */ + voiceTransmission: { + /** type=UNKNOWN */ + voiceData: never; + }; + /** ID=0x00 */ + voiceTransmissionCompletion: { + /** type=UNKNOWN */ + zclHeader: never; + }; + /** ID=0x00 */ + controlResponse: { + /** type=ENUM8 */ + status: number; + }; + }; + commandResponses: { + /** ID=0x00 | required=true */ + establishmentRsp: { + /** type=ENUM8 */ + status: number; + /** type=ENUM8 */ + codecType: number; + }; + /** ID=0x01 | required=true */ + voiceTransmissionRsp: { + /** type=UINT8 */ + zclHeaderSeqNum: number; + /** type=ENUM8 */ + errorFlag: number; + }; + /** ID=0x02 */ + control: { + /** type=ENUM8 */ + controlType: number; + }; + }; }; telecommunicationsChatting: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | required=true | max=65535 */ uID: number; - /** ID: 1 | Type: CHAR_STR */ + /** ID=0x0001 | type=CHAR_STR | required=true */ nickname: string; - /** ID: 16 | Type: UINT16 */ + /** ID=0x0010 | type=UINT16 | required=true | max=65535 */ cID: number; - /** ID: 17 | Type: CHAR_STR */ + /** ID=0x0011 | type=CHAR_STR | required=true */ name: string; - /** ID: 18 | Type: BOOLEAN */ + /** ID=0x0012 | type=BOOLEAN */ enableAddChat: number; }; - commands: never; - commandResponses: never; + commands: { + /** ID=0x00 | response=1 | required=true */ + joinChatReq: { + /** type=UINT16 */ + uID: number; + /** type=CHAR_STR */ + nickname: string; + /** type=UINT16 */ + cID: number; + }; + /** ID=0x01 | required=true */ + leaveChatReq: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + }; + /** ID=0x02 | response=4 | required=true */ + searchChatReq: Record; + /** ID=0x03 */ + switchCharmanRsp: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + }; + /** ID=0x04 | response=0 */ + startChatReq: { + /** type=CHAR_STR */ + name: string; + /** type=UINT16 */ + uID: number; + /** type=CHAR_STR */ + nickname: string; + }; + /** ID=0x05 | required=true */ + chatMessage: { + /** type=UINT16 */ + destUID: number; + /** type=UINT16 */ + srcUID: number; + /** type=UINT16 */ + cID: number; + /** type=CHAR_STR */ + nickname: string; + /** type=CHAR_STR */ + message: string; + }; + /** ID=0x06 | response=8 */ + getNodeInfoReq: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + }; + }; + commandResponses: { + /** ID=0x00 | required=true */ + startChatRsp: { + /** type=ENUM8 */ + status: number; + /** type=UINT16 */ + cID: number; + }; + /** ID=0x01 | required=true */ + joinChatRsp: { + /** type=ENUM8 */ + status: number; + /** type=UINT16 */ + cID: number; + }; + /** ID=0x02 | required=true */ + userLeft: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + /** type=CHAR_STR */ + nickName: string; + }; + /** ID=0x03 | required=true */ + userJoined: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + /** type=CHAR_STR */ + nickName: string; + }; + /** ID=0x04 | required=true */ + searchChatRsp: { + /** type=BITMAP8 */ + options: number; + }; + /** ID=0x05 | required=true */ + switchChairmanReq: { + /** type=UINT16 */ + cID: number; + }; + /** ID=0x06 | required=true */ + switchChairmanConfirm: { + /** type=UINT16 */ + cID: number; + }; + /** ID=0x07 | required=true */ + switchChairmanNotification: { + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + /** type=DATA16 */ + address: number; + /** type=UINT8 */ + endpoint: number; + }; + /** ID=0x08 | required=true */ + getNodeInfoRsp: { + /** type=ENUM8 */ + status: number; + /** type=UINT16 */ + cID: number; + /** type=UINT16 */ + uID: number; + /** type=DATA16 */ + address: number; + /** type=UINT8 */ + endpoint: number; + /** type=CHAR_STR */ + nickName: string; + }; + }; }; haApplianceIdentification: { attributes: { - /** ID: 0 | Type: UINT56 */ + /** ID=0x0000 | type=UINT56 | required=true */ basicIdentification: bigint; - /** ID: 16 | Type: CHAR_STR */ + /** ID=0x0010 | type=CHAR_STR | maxLen=16 */ companyName: string; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | max=65535 */ companyId: number; - /** ID: 18 | Type: CHAR_STR */ + /** ID=0x0012 | type=CHAR_STR | maxLen=16 */ brandName: string; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | max=65535 */ brandId: number; - /** ID: 20 | Type: OCTET_STR */ + /** ID=0x0014 | type=OCTET_STR | maxLen=16 */ model: Buffer; - /** ID: 21 | Type: OCTET_STR */ + /** ID=0x0015 | type=OCTET_STR | maxLen=16 */ partNumber: Buffer; - /** ID: 22 | Type: OCTET_STR */ + /** ID=0x0016 | type=OCTET_STR | maxLen=6 */ productRevision: Buffer; - /** ID: 23 | Type: OCTET_STR */ + /** ID=0x0017 | type=OCTET_STR | maxLen=6 */ softwareRevision: Buffer; - /** ID: 24 | Type: OCTET_STR */ + /** ID=0x0018 | type=OCTET_STR | length=2 */ productTypeName: Buffer; - /** ID: 25 | Type: UINT16 */ + /** ID=0x0019 | type=UINT16 | max=65535 */ productTypeId: number; - /** ID: 26 | Type: UINT8 */ + /** ID=0x001a | type=UINT8 | max=255 */ cecedSpecificationVersion: number; }; commands: never; commandResponses: never; }; - haMeterIdentification: { + seMeterIdentification: { attributes: { - /** ID: 0 | Type: CHAR_STR */ + /** ID=0x0000 | type=CHAR_STR | required=true | minLen=0 | maxLen=16 */ companyName: string; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | required=true | max=65535 */ meterTypeId: number; - /** ID: 4 | Type: UINT16 */ + /** ID=0x0004 | type=UINT16 | required=true | max=65535 */ dataQualityId: number; - /** ID: 5 | Type: CHAR_STR */ + /** ID=0x0005 | type=CHAR_STR | write=true | minLen=0 | maxLen=16 */ customerName: string; - /** ID: 6 | Type: CHAR_STR */ - model: string; - /** ID: 7 | Type: CHAR_STR */ - partNumber: string; - /** ID: 8 | Type: CHAR_STR */ - productRevision: string; - /** ID: 10 | Type: CHAR_STR */ - softwareRevision: string; - /** ID: 11 | Type: CHAR_STR */ + /** ID=0x0006 | type=OCTET_STR | minLen=0 | maxLen=16 */ + model: Buffer; + /** ID=0x0007 | type=OCTET_STR | minLen=0 | maxLen=16 */ + partNumber: Buffer; + /** ID=0x0008 | type=OCTET_STR | minLen=0 | maxLen=16 */ + productRevision: Buffer; + /** ID=0x000a | type=OCTET_STR | minLen=0 | maxLen=16 */ + softwareRevision: Buffer; + /** ID=0x000b | type=CHAR_STR | minLen=0 | maxLen=16 */ utilityName: string; - /** ID: 12 | Type: CHAR_STR */ + /** ID=0x000c | type=CHAR_STR | required=true | minLen=0 | maxLen=16 */ pod: string; - /** ID: 13 | Type: INT24 */ + /** ID=0x000d | type=INT24 | required=true | max=16777215 */ availablePower: number; - /** ID: 14 | Type: INT24 */ + /** ID=0x000e | type=INT24 | required=true | max=16777215 */ powerThreshold: number; }; commands: never; @@ -5155,519 +6626,519 @@ export interface TClusters { haApplianceEventsAlerts: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ getAlerts: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ getAlertsRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ alertscount: number; - /** Type: LIST_UINT24 */ + /** type=LIST_UINT24 */ aalert: number[]; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ alertsNotification: { - /** Type: UINT8 */ + /** type=UINT8 */ alertscount: number; - /** Type: LIST_UINT24 */ + /** type=LIST_UINT24 */ aalert: number[]; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ eventNotification: { - /** Type: UINT8 */ + /** type=UINT8 */ eventheader: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ eventid: number; }; }; }; haApplianceStatistics: { attributes: { - /** ID: 0 | Type: UINT32 */ + /** ID=0x0000 | type=UINT32 | required=true | default=60 */ logMaxSize: number; - /** ID: 1 | Type: UINT8 */ + /** ID=0x0001 | type=UINT8 | required=true | default=1 */ logQueueMaxSize: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 | required=true */ log: { - /** Type: UINT32 */ + /** type=UINT32 */ logid: number; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ logQueue: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 | required=true */ logNotification: { - /** Type: UINT32 */ + /** type=UTC */ timestamp: number; - /** Type: UINT32 */ + /** type=UINT32 */ logid: number; - /** Type: UINT32 */ + /** type=UINT32 */ loglength: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ logpayload: number[]; }; - /** ID: 1 */ + /** ID=0x01 | required=true */ logRsp: { - /** Type: UINT32 */ + /** type=UTC */ timestamp: number; - /** Type: UINT32 */ + /** type=UINT32 */ logid: number; - /** Type: UINT32 */ + /** type=UINT32 */ loglength: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ logpayload: number[]; }; - /** ID: 2 */ + /** ID=0x02 | required=true */ logQueueRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ logqueuesize: number; - /** Type: LIST_UINT32 */ + /** type=LIST_UINT32 */ logid: number[]; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ statisticsAvailable: { - /** Type: UINT8 */ + /** type=UINT8 */ logqueuesize: number; - /** Type: LIST_UINT32 */ + /** type=LIST_UINT32 */ logid: number[]; }; }; }; haElectricalMeasurement: { attributes: { - /** ID: 0 | Type: BITMAP32 */ + /** ID=0x0000 | type=BITMAP32 | required=true | max=4294967295 | default=0 */ measurementType: number; - /** ID: 256 | Type: INT16 */ + /** ID=0x0100 | type=INT16 | report=true | min=-32767 */ dcVoltage: number; - /** ID: 257 | Type: INT16 */ + /** ID=0x0101 | type=INT16 | min=-32767 */ dcVoltageMin: number; - /** ID: 258 | Type: INT16 */ + /** ID=0x0102 | type=INT16 | min=-32767 */ dcvoltagemax: number; - /** ID: 259 | Type: INT16 */ + /** ID=0x0103 | type=INT16 | report=true | min=-32767 */ dcCurrent: number; - /** ID: 260 | Type: INT16 */ + /** ID=0x0104 | type=INT16 | min=-32767 */ dcCurrentMin: number; - /** ID: 261 | Type: INT16 */ + /** ID=0x0105 | type=INT16 | min=-32767 */ dcCurrentMax: number; - /** ID: 262 | Type: INT16 */ + /** ID=0x0106 | type=INT16 | report=true | min=-32767 */ dcPower: number; - /** ID: 263 | Type: INT16 */ + /** ID=0x0107 | type=INT16 | min=-32767 */ dcPowerMin: number; - /** ID: 264 | Type: INT16 */ + /** ID=0x0108 | type=INT16 | min=-32767 */ dcPowerMax: number; - /** ID: 512 | Type: UINT16 */ + /** ID=0x0200 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcVoltageMultiplier: number; - /** ID: 513 | Type: UINT16 */ + /** ID=0x0201 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcVoltageDivisor: number; - /** ID: 514 | Type: UINT16 */ + /** ID=0x0202 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcCurrentMultiplier: number; - /** ID: 515 | Type: UINT16 */ + /** ID=0x0203 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcCurrentDivisor: number; - /** ID: 516 | Type: UINT16 */ + /** ID=0x0204 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcPowerMultiplier: number; - /** ID: 517 | Type: UINT16 */ + /** ID=0x0205 | type=UINT16 | report=true | min=1 | max=65535 | default=1 */ dcPowerDivisor: number; - /** ID: 768 | Type: UINT16 */ + /** ID=0x0300 | type=UINT16 | report=true */ acFrequency: number; - /** ID: 769 | Type: UINT16 */ + /** ID=0x0301 | type=UINT16 */ acFrequencyMin: number; - /** ID: 770 | Type: UINT16 */ + /** ID=0x0302 | type=UINT16 */ acFrequencyMax: number; - /** ID: 771 | Type: UINT16 */ + /** ID=0x0303 | type=UINT16 | report=true */ neutralCurrent: number; - /** ID: 772 | Type: INT32 */ + /** ID=0x0304 | type=INT32 | report=true | min=-8388607 | max=8388607 */ totalActivePower: number; - /** ID: 773 | Type: INT32 */ + /** ID=0x0305 | type=INT32 | report=true | min=-8388607 | max=8388607 */ totalReactivePower: number; - /** ID: 774 | Type: UINT32 */ + /** ID=0x0306 | type=UINT32 | report=true | max=16777215 */ totalApparentPower: number; - /** ID: 775 | Type: INT16 */ + /** ID=0x0307 | type=INT16 | report=true */ meas1stHarmonicCurrent: number; - /** ID: 776 | Type: INT16 */ + /** ID=0x0308 | type=INT16 | report=true */ meas3rdHarmonicCurrent: number; - /** ID: 777 | Type: INT16 */ + /** ID=0x0309 | type=INT16 | report=true */ meas5thHarmonicCurrent: number; - /** ID: 778 | Type: INT16 */ + /** ID=0x030a | type=INT16 | report=true */ meas7thHarmonicCurrent: number; - /** ID: 779 | Type: INT16 */ + /** ID=0x030b | type=INT16 | report=true */ meas9thHarmonicCurrent: number; - /** ID: 780 | Type: INT16 */ + /** ID=0x030c | type=INT16 | report=true */ meas11thHarmonicCurrent: number; - /** ID: 781 | Type: INT16 */ + /** ID=0x030d | type=INT16 | report=true */ measPhase1stHarmonicCurrent: number; - /** ID: 782 | Type: INT16 */ + /** ID=0x030e | type=INT16 | report=true */ measPhase3rdHarmonicCurrent: number; - /** ID: 783 | Type: INT16 */ + /** ID=0x030f | type=INT16 | report=true */ measPhase5thHarmonicCurrent: number; - /** ID: 784 | Type: INT16 */ + /** ID=0x0310 | type=INT16 | report=true */ measPhase7thHarmonicCurrent: number; - /** ID: 785 | Type: INT16 */ + /** ID=0x0311 | type=INT16 | report=true */ measPhase9thHarmonicCurrent: number; - /** ID: 786 | Type: INT16 */ + /** ID=0x0312 | type=INT16 | report=true */ measPhase11thHarmonicCurrent: number; - /** ID: 1024 | Type: UINT16 */ + /** ID=0x0400 | type=UINT16 | report=true | min=1 | default=1 */ acFrequencyMultiplier: number; - /** ID: 1025 | Type: UINT16 */ + /** ID=0x0401 | type=UINT16 | report=true | min=1 | default=1 */ acFrequencyDivisor: number; - /** ID: 1026 | Type: UINT32 */ + /** ID=0x0402 | type=UINT32 | report=true | max=16777215 | default=1 */ powerMultiplier: number; - /** ID: 1027 | Type: UINT32 */ + /** ID=0x0403 | type=UINT32 | report=true | max=16777215 | default=1 */ powerDivisor: number; - /** ID: 1028 | Type: INT8 */ + /** ID=0x0404 | type=INT8 | report=true | min=-127 | default=0 */ harmonicCurrentMultiplier: number; - /** ID: 1029 | Type: INT8 */ + /** ID=0x0405 | type=INT8 | report=true | min=-127 | default=0 */ phaseHarmonicCurrentMultiplier: number; - /** ID: 1280 | Type: INT16 */ + /** ID=0x0500 | type=INT16 */ instantaneousVoltage: number; - /** ID: 1281 | Type: UINT16 */ + /** ID=0x0501 | type=UINT16 | report=true */ instantaneousLineCurrent: number; - /** ID: 1282 | Type: INT16 */ + /** ID=0x0502 | type=INT16 | report=true */ instantaneousActiveCurrent: number; - /** ID: 1283 | Type: INT16 */ + /** ID=0x0503 | type=INT16 | report=true */ instantaneousReactiveCurrent: number; - /** ID: 1284 | Type: INT16 */ + /** ID=0x0504 | type=INT16 */ instantaneousPower: number; - /** ID: 1285 | Type: UINT16 */ + /** ID=0x0505 | type=UINT16 | report=true */ rmsVoltage: number; - /** ID: 1286 | Type: UINT16 */ + /** ID=0x0506 | type=UINT16 */ rmsVoltageMin: number; - /** ID: 1287 | Type: UINT16 */ + /** ID=0x0507 | type=UINT16 */ rmsVoltageMax: number; - /** ID: 1288 | Type: UINT16 */ + /** ID=0x0508 | type=UINT16 | report=true */ rmsCurrent: number; - /** ID: 1289 | Type: UINT16 */ + /** ID=0x0509 | type=UINT16 */ rmsCurrentMin: number; - /** ID: 1290 | Type: UINT16 */ + /** ID=0x050a | type=UINT16 */ rmsCurrentMax: number; - /** ID: 1291 | Type: INT16 */ + /** ID=0x050b | type=INT16 | report=true */ activePower: number; - /** ID: 1292 | Type: INT16 */ + /** ID=0x050c | type=INT16 */ activePowerMin: number; - /** ID: 1293 | Type: INT16 */ + /** ID=0x050d | type=INT16 */ activePowerMax: number; - /** ID: 1294 | Type: INT16 */ + /** ID=0x050e | type=INT16 | report=true */ reactivePower: number; - /** ID: 1295 | Type: UINT16 */ + /** ID=0x050f | type=UINT16 | report=true */ apparentPower: number; - /** ID: 1296 | Type: INT8 */ + /** ID=0x0510 | type=INT8 | min=-100 | max=100 | default=0 */ powerFactor: number; - /** ID: 1297 | Type: UINT16 */ + /** ID=0x0511 | type=UINT16 | write=true | default=0 */ averageRmsVoltageMeasPeriod: number; - /** ID: 1298 | Type: UINT16 */ + /** ID=0x0512 | type=UINT16 | write=true | default=0 */ averageRmsOverVoltageCounter: number; - /** ID: 1299 | Type: UINT16 */ + /** ID=0x0513 | type=UINT16 | write=true | default=0 */ averageRmsUnderVoltageCounter: number; - /** ID: 1300 | Type: UINT16 */ + /** ID=0x0514 | type=UINT16 | write=true | default=0 */ rmsExtremeOverVoltagePeriod: number; - /** ID: 1301 | Type: UINT16 */ + /** ID=0x0515 | type=UINT16 | write=true | default=0 */ rmsExtremeUnderVoltagePeriod: number; - /** ID: 1302 | Type: UINT16 */ + /** ID=0x0516 | type=UINT16 | write=true | default=0 */ rmsVoltageSagPeriod: number; - /** ID: 1303 | Type: UINT16 */ + /** ID=0x0517 | type=UINT16 | write=true | default=0 */ rmsVoltageSwellPeriod: number; - /** ID: 1536 | Type: UINT16 */ + /** ID=0x0600 | type=UINT16 | report=true | min=1 | default=1 */ acVoltageMultiplier: number; - /** ID: 1537 | Type: UINT16 */ + /** ID=0x0601 | type=UINT16 | report=true | min=1 | default=1 */ acVoltageDivisor: number; - /** ID: 1538 | Type: UINT16 */ + /** ID=0x0602 | type=UINT16 | report=true | min=1 | default=1 */ acCurrentMultiplier: number; - /** ID: 1539 | Type: UINT16 */ + /** ID=0x0603 | type=UINT16 | report=true | min=1 | default=1 */ acCurrentDivisor: number; - /** ID: 1540 | Type: UINT16 */ + /** ID=0x0604 | type=UINT16 | report=true | min=1 | default=1 */ acPowerMultiplier: number; - /** ID: 1541 | Type: UINT16 */ + /** ID=0x0605 | type=UINT16 | report=true | min=1 | default=1 */ acPowerDivisor: number; - /** ID: 1792 | Type: BITMAP8 */ + /** ID=0x0700 | type=BITMAP8 | write=true | default=0 */ dcOverloadAlarmsMask: number; - /** ID: 1793 | Type: INT16 */ + /** ID=0x0701 | type=INT16 */ dcVoltageOverload: number; - /** ID: 1794 | Type: INT16 */ + /** ID=0x0702 | type=INT16 */ dcCurrentOverload: number; - /** ID: 2048 | Type: BITMAP16 */ + /** ID=0x0800 | type=BITMAP16 | write=true | default=0 */ acAlarmsMask: number; - /** ID: 2049 | Type: INT16 */ + /** ID=0x0801 | type=INT16 */ acVoltageOverload: number; - /** ID: 2050 | Type: INT16 */ + /** ID=0x0802 | type=INT16 */ acCurrentOverload: number; - /** ID: 2051 | Type: INT16 */ + /** ID=0x0803 | type=INT16 */ acActivePowerOverload: number; - /** ID: 2052 | Type: INT16 */ + /** ID=0x0804 | type=INT16 */ acReactivePowerOverload: number; - /** ID: 2053 | Type: INT16 */ + /** ID=0x0805 | type=INT16 */ averageRmsOverVoltage: number; - /** ID: 2054 | Type: INT16 */ + /** ID=0x0806 | type=INT16 */ averageRmsUnderVoltage: number; - /** ID: 2055 | Type: INT16 */ + /** ID=0x0807 | type=INT16 | write=true */ rmsExtremeOverVoltage: number; - /** ID: 2056 | Type: INT16 */ + /** ID=0x0808 | type=INT16 | write=true */ rmsExtremeUnderVoltage: number; - /** ID: 2057 | Type: INT16 */ + /** ID=0x0809 | type=INT16 | write=true */ rmsVoltageSag: number; - /** ID: 2058 | Type: INT16 */ + /** ID=0x080a | type=INT16 | write=true */ rmsVoltageSwell: number; - /** ID: 2305 | Type: UINT16 */ + /** ID=0x0901 | type=UINT16 | report=true */ lineCurrentPhB: number; - /** ID: 2306 | Type: INT16 */ + /** ID=0x0902 | type=INT16 | report=true */ activeCurrentPhB: number; - /** ID: 2307 | Type: INT16 */ + /** ID=0x0903 | type=INT16 | report=true */ reactiveCurrentPhB: number; - /** ID: 2309 | Type: UINT16 */ + /** ID=0x0905 | type=UINT16 | report=true */ rmsVoltagePhB: number; - /** ID: 2310 | Type: UINT16 */ + /** ID=0x0906 | type=UINT16 | default=32768 */ rmsVoltageMinPhB: number; - /** ID: 2311 | Type: UINT16 */ + /** ID=0x0907 | type=UINT16 | default=32768 */ rmsVoltageMaxPhB: number; - /** ID: 2312 | Type: UINT16 */ + /** ID=0x0908 | type=UINT16 | report=true */ rmsCurrentPhB: number; - /** ID: 2313 | Type: UINT16 */ + /** ID=0x0909 | type=UINT16 */ rmsCurrentMinPhB: number; - /** ID: 2314 | Type: UINT16 */ + /** ID=0x090a | type=UINT16 */ rmsCurrentMaxPhB: number; - /** ID: 2315 | Type: INT16 */ + /** ID=0x090b | type=INT16 | report=true */ activePowerPhB: number; - /** ID: 2316 | Type: INT16 */ + /** ID=0x090c | type=INT16 */ activePowerMinPhB: number; - /** ID: 2317 | Type: INT16 */ + /** ID=0x090d | type=INT16 */ activePowerMaxPhB: number; - /** ID: 2318 | Type: INT16 */ + /** ID=0x090e | type=INT16 | report=true */ reactivePowerPhB: number; - /** ID: 2319 | Type: UINT16 */ + /** ID=0x090f | type=UINT16 | report=true */ apparentPowerPhB: number; - /** ID: 2320 | Type: INT8 */ + /** ID=0x0910 | type=INT8 | min=-100 | max=100 | default=0 */ powerFactorPhB: number; - /** ID: 2321 | Type: UINT16 */ + /** ID=0x0911 | type=UINT16 | write=true | default=0 */ averageRmsVoltageMeasurePeriodPhB: number; - /** ID: 2322 | Type: UINT16 */ + /** ID=0x0912 | type=UINT16 | write=true | default=0 */ averageRmsOverVoltageCounterPhB: number; - /** ID: 2323 | Type: UINT16 */ + /** ID=0x0913 | type=UINT16 | write=true | default=0 */ averageUnderVoltageCounterPhB: number; - /** ID: 2324 | Type: UINT16 */ + /** ID=0x0914 | type=UINT16 | write=true | default=0 */ rmsExtremeOverVoltagePeriodPhB: number; - /** ID: 2325 | Type: UINT16 */ + /** ID=0x0915 | type=UINT16 | write=true | default=0 */ rmsExtremeUnderVoltagePeriodPhB: number; - /** ID: 2326 | Type: UINT16 */ + /** ID=0x0916 | type=UINT16 | write=true | default=0 */ rmsVoltageSagPeriodPhB: number; - /** ID: 2327 | Type: UINT16 */ + /** ID=0x0917 | type=UINT16 | write=true | default=0 */ rmsVoltageSwellPeriodPhB: number; - /** ID: 2561 | Type: UINT16 */ + /** ID=0x0a01 | type=UINT16 | report=true */ lineCurrentPhC: number; - /** ID: 2562 | Type: INT16 */ + /** ID=0x0a02 | type=INT16 | report=true */ activeCurrentPhC: number; - /** ID: 2563 | Type: INT16 */ + /** ID=0x0a03 | type=INT16 | report=true */ reactiveCurrentPhC: number; - /** ID: 2565 | Type: UINT16 */ + /** ID=0x0a05 | type=UINT16 | report=true */ rmsVoltagePhC: number; - /** ID: 2566 | Type: UINT16 */ + /** ID=0x0a06 | type=UINT16 | default=32768 */ rmsVoltageMinPhC: number; - /** ID: 2567 | Type: UINT16 */ + /** ID=0x0a07 | type=UINT16 | default=32768 */ rmsVoltageMaxPhC: number; - /** ID: 2568 | Type: UINT16 */ + /** ID=0x0a08 | type=UINT16 | report=true */ rmsCurrentPhC: number; - /** ID: 2569 | Type: UINT16 */ + /** ID=0x0a09 | type=UINT16 */ rmsCurrentMinPhC: number; - /** ID: 2570 | Type: UINT16 */ + /** ID=0x0a0a | type=UINT16 */ rmsCurrentMaxPhC: number; - /** ID: 2571 | Type: INT16 */ + /** ID=0x0a0b | type=INT16 | report=true */ activePowerPhC: number; - /** ID: 2572 | Type: INT16 */ + /** ID=0x0a0c | type=INT16 */ activePowerMinPhC: number; - /** ID: 2573 | Type: INT16 */ + /** ID=0x0a0d | type=INT16 */ activePowerMaxPhC: number; - /** ID: 2574 | Type: INT16 */ + /** ID=0x0a0e | type=INT16 | report=true */ reactivePowerPhC: number; - /** ID: 2575 | Type: UINT16 */ + /** ID=0x0a0f | type=UINT16 | report=true */ apparentPowerPhC: number; - /** ID: 2576 | Type: INT8 */ + /** ID=0x0a10 | type=INT8 | min=-100 | max=100 | default=0 */ powerFactorPhC: number; - /** ID: 2577 | Type: UINT16 */ + /** ID=0x0a11 | type=UINT16 | write=true | default=0 */ averageRmsVoltageMeasPeriodPhC: number; - /** ID: 2578 | Type: UINT16 */ + /** ID=0x0a12 | type=UINT16 | write=true | default=0 */ averageRmsOverVoltageCounterPhC: number; - /** ID: 2579 | Type: UINT16 */ + /** ID=0x0a13 | type=UINT16 | write=true | default=0 */ averageUnderVoltageCounterPhC: number; - /** ID: 2580 | Type: UINT16 */ + /** ID=0x0a14 | type=UINT16 | write=true | default=0 */ rmsExtremeOverVoltagePeriodPhC: number; - /** ID: 2581 | Type: UINT16 */ + /** ID=0x0a15 | type=UINT16 | write=true | default=0 */ rmsExtremeUnderVoltagePeriodPhC: number; - /** ID: 2582 | Type: UINT16 */ + /** ID=0x0a16 | type=UINT16 | write=true | default=0 */ rmsVoltageSagPeriodPhC: number; - /** ID: 2583 | Type: UINT16 */ + /** ID=0x0a17 | type=UINT16 | write=true | default=0 */ rmsVoltageSwellPeriodPhC: number; - /** ID: 17152 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4300 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderActivePowerDemandTotal?: number; - /** ID: 17155 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4303 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderReactivePowerDemandTotal?: number; - /** ID: 17176 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4318 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderApparentPowerDemandTotal?: number; - /** ID: 17177 | Type: UINT24 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4319 | type=UINT24 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=16777215 */ schneiderDemandIntervalDuration?: number; - /** ID: 17184 | Type: UTC | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4320 | type=UTC | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=4294967295 */ schneiderDemandDateTime?: number; - /** ID: 17673 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4509 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderActivePowerDemandPhase1?: number; - /** ID: 17674 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x450a | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderReactivePowerDemandPhase1?: number; - /** ID: 17675 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x450b | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderApparentPowerDemandPhase1?: number; - /** ID: 17680 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4510 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMinimalVoltageL1?: number; - /** ID: 17683 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4513 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMaximalCurrentI1?: number; - /** ID: 18697 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4909 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderActivePowerDemandPhase2?: number; - /** ID: 18698 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x490a | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderReactivePowerDemandPhase2?: number; - /** ID: 18699 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x490b | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderApparentPowerDemandPhase2?: number; - /** ID: 18704 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4910 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMinimalVoltageL2?: number; - /** ID: 18707 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4913 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMaximalCurrentI2?: number; - /** ID: 18953 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4a09 | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderActivePowerDemandPhase3?: number; - /** ID: 18954 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4a0a | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderReactivePowerDemandPhase3?: number; - /** ID: 18955 | Type: INT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4a0b | type=INT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | min=-2147483648 | max=2147483647 */ schneiderApparentPowerDemandPhase3?: number; - /** ID: 18960 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4a10 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMinimalVoltageL3?: number; - /** ID: 18963 | Type: UINT16 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4a13 | type=UINT16 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=65535 */ schneiderDemandIntervalMaximalCurrentI3?: number; - /** ID: 19968 | Type: UINT8 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0x4e00 | type=UINT8 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=255 */ schneiderCurrentSensorMultiplier?: number; }; commands: { - /** ID: 0 */ + /** ID=0x00 */ getProfileInfo: Record; - /** ID: 1 */ + /** ID=0x01 */ getMeasurementProfile: { - /** Type: UINT16 */ + /** type=ATTR_ID */ attrId: number; - /** Type: UINT32 */ + /** type=UTC */ starttime: number; - /** Type: UINT8 */ + /** type=UINT8 */ numofuntervals: number; }; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ getProfileInfoRsp: { - /** Type: UINT8 */ + /** type=UINT8 */ profilecount: number; - /** Type: UINT8 */ + /** type=ENUM8 */ profileintervalperiod: number; - /** Type: UINT8 */ + /** type=UINT8 */ maxnumofintervals: number; - /** Type: UINT8 */ + /** type=UINT8 */ numofattrs: number; - /** Type: LIST_UINT16 */ + /** type=LIST_UINT16 */ listofattr: number[]; }; - /** ID: 1 */ + /** ID=0x01 */ getMeasurementProfileRsp: { - /** Type: UINT32 */ + /** type=UTC */ starttime: number; - /** Type: UINT8 */ + /** type=ENUM8 */ status: number; - /** Type: UINT8 */ + /** type=ENUM8 */ profileintervalperiod: number; - /** Type: UINT8 */ + /** type=UINT8 */ numofintervalsdeliv: number; - /** Type: UINT16 */ + /** type=ATTR_ID */ attrId: number; - /** Type: LIST_UINT8 */ - intervals: number[]; + /** type=BUFFER */ + intervals: Buffer; }; }; }; haDiagnostic: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | max=65535 | default=0 */ numberOfResets: number; - /** ID: 1 | Type: UINT16 */ + /** ID=0x0001 | type=UINT16 | max=65535 | default=0 */ persistentMemoryWrites: number; - /** ID: 256 | Type: UINT32 */ + /** ID=0x0100 | type=UINT32 | max=4294967295 | default=0 */ macRxBcast: number; - /** ID: 257 | Type: UINT32 */ + /** ID=0x0101 | type=UINT32 | max=4294967295 | default=0 */ macTxBcast: number; - /** ID: 258 | Type: UINT32 */ + /** ID=0x0102 | type=UINT32 | max=4294967295 | default=0 */ macRxUcast: number; - /** ID: 259 | Type: UINT32 */ + /** ID=0x0103 | type=UINT32 | max=4294967295 | default=0 */ macTxUcast: number; - /** ID: 260 | Type: UINT16 */ + /** ID=0x0104 | type=UINT16 | max=65535 | default=0 */ macTxUcastRetry: number; - /** ID: 261 | Type: UINT16 */ + /** ID=0x0105 | type=UINT16 | max=65535 | default=0 */ macTxUcastFail: number; - /** ID: 262 | Type: UINT16 */ + /** ID=0x0106 | type=UINT16 | max=65535 | default=0 */ aPSRxBcast: number; - /** ID: 263 | Type: UINT16 */ + /** ID=0x0107 | type=UINT16 | max=65535 | default=0 */ aPSTxBcast: number; - /** ID: 264 | Type: UINT16 */ + /** ID=0x0108 | type=UINT16 | max=65535 | default=0 */ aPSRxUcast: number; - /** ID: 265 | Type: UINT16 */ + /** ID=0x0109 | type=UINT16 | max=65535 | default=0 */ aPSTxUcastSuccess: number; - /** ID: 266 | Type: UINT16 */ + /** ID=0x010a | type=UINT16 | max=65535 | default=0 */ aPSTxUcastRetry: number; - /** ID: 267 | Type: UINT16 */ + /** ID=0x010b | type=UINT16 | max=65535 | default=0 */ aPSTxUcastFail: number; - /** ID: 268 | Type: UINT16 */ + /** ID=0x010c | type=UINT16 | max=65535 | default=0 */ routeDiscInitiated: number; - /** ID: 269 | Type: UINT16 */ + /** ID=0x010d | type=UINT16 | max=65535 | default=0 */ neighborAdded: number; - /** ID: 270 | Type: UINT16 */ + /** ID=0x010e | type=UINT16 | max=65535 | default=0 */ neighborRemoved: number; - /** ID: 271 | Type: UINT16 */ + /** ID=0x010f | type=UINT16 | max=65535 | default=0 */ neighborStale: number; - /** ID: 272 | Type: UINT16 */ + /** ID=0x0110 | type=UINT16 | max=65535 | default=0 */ joinIndication: number; - /** ID: 273 | Type: UINT16 */ + /** ID=0x0111 | type=UINT16 | max=65535 | default=0 */ childMoved: number; - /** ID: 274 | Type: UINT16 */ + /** ID=0x0112 | type=UINT16 | max=65535 | default=0 */ nwkFcFailure: number; - /** ID: 275 | Type: UINT16 */ + /** ID=0x0113 | type=UINT16 | max=65535 | default=0 */ apsFcFailure: number; - /** ID: 276 | Type: UINT16 */ + /** ID=0x0114 | type=UINT16 | max=65535 | default=0 */ apsUnauthorizedKey: number; - /** ID: 277 | Type: UINT16 */ + /** ID=0x0115 | type=UINT16 | max=65535 | default=0 */ nwkDecryptFailures: number; - /** ID: 278 | Type: UINT16 */ + /** ID=0x0116 | type=UINT16 | max=65535 | default=0 */ apsDecryptFailures: number; - /** ID: 279 | Type: UINT16 */ + /** ID=0x0117 | type=UINT16 | max=65535 | default=0 */ packetBufferAllocateFailures: number; - /** ID: 280 | Type: UINT16 */ + /** ID=0x0118 | type=UINT16 | max=65535 | default=0 */ relayedUcast: number; - /** ID: 281 | Type: UINT16 */ + /** ID=0x0119 | type=UINT16 | max=65535 | default=0 */ phyToMacQueueLimitReached: number; - /** ID: 282 | Type: UINT16 */ + /** ID=0x011a | type=UINT16 | max=65535 | default=0 */ packetValidateDropCount: number; - /** ID: 283 | Type: UINT16 */ + /** ID=0x011b | type=UINT16 | max=65535 | default=0 */ averageMacRetryPerApsMessageSent: number; - /** ID: 284 | Type: UINT8 */ + /** ID=0x011c | type=UINT8 | max=255 | default=0 */ lastMessageLqi: number; - /** ID: 285 | Type: INT8 */ + /** ID=0x011d | type=INT8 | min=-127 | max=127 | default=0 */ lastMessageRssi: number; - /** ID: 16384 | Type: BITMAP16 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4000 | type=BITMAP16 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true */ danfossSystemStatusCode?: number; - /** ID: 16433 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4000 | type=UINT8 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=255 */ + schneiderCommunicationQuality?: number; + /** ID=0x4031 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossHeatSupplyRequest?: number; - /** ID: 16896 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4200 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossSystemStatusWater?: number; - /** ID: 16897 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4201 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossMultimasterRole?: number; - /** ID: 16912 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4210 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossIconApplication?: number; - /** ID: 16928 | Type: ENUM8 | Specific to manufacturer: DANFOSS_A_S (4678) */ + /** ID=0x4220 | type=ENUM8 | manufacturerCode=DANFOSS_A_S(0x1246) | write=true | max=255 */ danfossIconForcedHeatingCooling?: number; - /** ID: 65281 | Type: UINT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0xff01 | type=UINT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=4294967295 */ schneiderMeterStatus?: number; - /** ID: 65282 | Type: UINT32 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ + /** ID=0xff02 | type=UINT32 | manufacturerCode=SCHNEIDER_ELECTRIC(0x105e) | write=true | max=4294967295 */ schneiderDiagnosticRegister1?: number; - /** ID: 16384 | Type: UINT8 | Specific to manufacturer: SCHNEIDER_ELECTRIC (4190) */ - schneiderCommunicationQuality?: number; }; commands: never; commandResponses: never; @@ -5675,266 +7146,266 @@ export interface TClusters { touchlink: { attributes: never; commands: { - /** ID: 0 | Response ID: 1 */ + /** ID=0x00 | response=1 | required=true */ scanRequest: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: BITMAP8 */ + /** type=BITMAP8 */ zigbeeInformation: number; - /** Type: BITMAP8 */ + /** type=BITMAP8 */ touchlinkInformation: number; }; - /** ID: 2 | Response ID: 3 */ + /** ID=0x02 | response=3 | required=true */ deviceInformation: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; }; - /** ID: 6 */ + /** ID=0x06 | required=true */ identifyRequest: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 | special=ExitIdentifyMode,0000,IdentifyForReceiverKnownTime,ffff */ duration: number; }; - /** ID: 7 */ + /** ID=0x07 | required=true */ resetToFactoryNew: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; }; - /** ID: 16 | Response ID: 17 */ + /** ID=0x10 | response=17 | required=true */ networkStart: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPANID: string; - /** Type: UINT8 */ + /** type=UINT8 | max=15 */ keyIndex: number; - /** Type: SEC_KEY */ + /** type=SEC_KEY */ encryptedNetworkKey: Buffer; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65534 */ panID: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65527 */ nwkAddr: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeEnd: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ initiatorIEEE: string; - /** Type: UINT16 */ + /** type=UINT16 */ initiatorNwkAddr: number; }; - /** ID: 18 | Response ID: 19 */ + /** ID=0x12 | response=19 | required=true */ networkJoinRouter: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPANID: string; - /** Type: UINT8 */ + /** type=UINT8 | max=15 */ keyIndex: number; - /** Type: SEC_KEY */ + /** type=SEC_KEY */ encryptedNetworkKey: Buffer; - /** Type: UINT8 */ + /** type=UINT8 */ networkUpdateID: number; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65534 */ panID: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65527 */ nwkAddr: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeEnd: number; }; - /** ID: 20 | Response ID: 21 */ + /** ID=0x14 | response=21 | required=true */ networkJoinEndDevice: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPANID: string; - /** Type: UINT8 */ + /** type=UINT8 | max=15 */ keyIndex: number; - /** Type: SEC_KEY */ + /** type=SEC_KEY */ encryptedNetworkKey: Buffer; - /** Type: UINT8 */ + /** type=UINT8 */ networkUpdateID: number; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65534 */ panID: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65527 */ nwkAddr: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ groupIDsEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeNwkAddrRangeEnd: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeBegin: number; - /** Type: UINT16 */ + /** type=UINT16 */ freeGroupIDRangeEnd: number; }; - /** ID: 22 */ + /** ID=0x16 | required=true */ networkUpdate: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPANID: string; - /** Type: UINT8 */ + /** type=UINT8 */ networkUpdateID: number; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65534 */ panID: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65527 */ nwkAddr: number; }; - /** ID: 65 | Response ID: 65 */ + /** ID=0x41 | response=65 */ getGroupIdentifiers: { - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; }; - /** ID: 66 | Response ID: 66 */ + /** ID=0x42 | response=66 */ getEndpointList: { - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; }; }; commandResponses: { - /** ID: 1 */ + /** ID=0x01 | required=true */ scanResponse: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: UINT8 */ + /** type=UINT8 | min=0 | max=20 */ rssiCorrection: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ zigbeeInformation: number; - /** Type: UINT8 */ + /** type=BITMAP8 */ touchlinkInformation: number; - /** Type: UINT16 */ + /** type=BITMAP16 */ keyBitmask: number; - /** Type: UINT32 */ + /** type=UINT32 */ responseID: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPanID: string; - /** Type: UINT8 */ + /** type=UINT8 */ networkUpdateID: number; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 */ panID: number; - /** Type: UINT16 */ + /** type=UINT16 | min=1 | max=65527 */ networkAddress: number; - /** Type: UINT8 */ + /** type=UINT8 */ numberOfSubDevices: number; - /** Type: UINT8 */ + /** type=UINT8 */ totalGroupIdentifiers: number; - /** Type: UINT8, Conditions: [{fieldEquals field=numberOfSubDevices value=1}] */ + /** type=UINT8 | conditions=[{fieldEquals field=numberOfSubDevices value=1}] */ endpointID?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=numberOfSubDevices value=1}] */ + /** type=UINT16 | conditions=[{fieldEquals field=numberOfSubDevices value=1}] */ profileID?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=numberOfSubDevices value=1}] */ + /** type=UINT16 | conditions=[{fieldEquals field=numberOfSubDevices value=1}] */ deviceID?: number; - /** Type: UINT8, Conditions: [{fieldEquals field=numberOfSubDevices value=1}] */ + /** type=UINT8 | conditions=[{fieldEquals field=numberOfSubDevices value=1}] */ version?: number; - /** Type: UINT8, Conditions: [{fieldEquals field=numberOfSubDevices value=1}] */ + /** type=UINT8 | conditions=[{fieldEquals field=numberOfSubDevices value=1}] */ groupIDCount?: number; }; - /** ID: 3 */ + /** ID=0x03 | required=true */ deviceInformation: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: UINT8 */ + /** type=UINT8 */ numberOfSubDevices: number; - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; - /** Type: UINT8 */ + /** type=UINT8 | max=5 */ deviceInfoCount: number; }; - /** ID: 17 */ + /** ID=0x11 | required=true */ networkStart: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: ENUM8 */ + /** type=UINT8 */ status: number; - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ extendedPANID: string; - /** Type: UINT8 */ + /** type=UINT8 */ networkUpdateID: number; - /** Type: UINT8 */ + /** type=UINT8 */ logicalChannel: number; - /** Type: UINT16 */ + /** type=UINT16 */ panID: number; }; - /** ID: 19 */ + /** ID=0x13 | required=true */ networkJoinRouter: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: ENUM8 */ + /** type=UINT8 */ status: number; }; - /** ID: 21 */ + /** ID=0x15 | required=true */ networkJoinEndDevice: { - /** Type: UINT32 */ + /** type=UINT32 | min=1 */ transactionID: number; - /** Type: ENUM8 */ + /** type=UINT8 */ status: number; }; - /** ID: 64 */ + /** ID=0x40 */ endpointInformation: { - /** Type: IEEE_ADDR */ + /** type=IEEE_ADDR */ ieeeAddress: string; - /** Type: UINT16 */ + /** type=UINT16 */ networkAddress: number; - /** Type: UINT8 */ + /** type=UINT8 */ endpointID: number; - /** Type: UINT16 */ + /** type=UINT16 */ profileID: number; - /** Type: UINT16 */ + /** type=UINT16 */ deviceID: number; - /** Type: UINT8 */ + /** type=UINT8 */ version: number; }; - /** ID: 65 */ + /** ID=0x41 */ getGroupIdentifiers: { - /** Type: UINT8 */ + /** type=UINT8 */ total: number; - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; - /** Type: UINT8 */ + /** type=UINT8 */ count: number; }; - /** ID: 66 */ + /** ID=0x42 */ getEndpointList: { - /** Type: UINT8 */ + /** type=UINT8 */ total: number; - /** Type: UINT8 */ + /** type=UINT8 */ startIndex: number; - /** Type: UINT8 */ + /** type=UINT8 */ count: number; }; }; @@ -5942,7 +7413,7 @@ export interface TClusters { manuSpecificClusterAduroSmart: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ cmd0: Record; }; commandResponses: never; @@ -5950,49 +7421,49 @@ export interface TClusters { manuSpecificOsram: { attributes: never; commands: { - /** ID: 1 */ + /** ID=0x01 */ saveStartupParams: Record; - /** ID: 2 */ + /** ID=0x02 */ resetStartupParams: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ saveStartupParamsRsp: Record; }; }; manuSpecificPhilips: { attributes: { - /** ID: 49 | Type: BITMAP16 */ + /** ID=0x0031 | type=BITMAP16 | write=true */ config: number; }; commands: never; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ hueNotification: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ button: number; - /** Type: UINT24 */ + /** type=UINT24 | max=16777215 */ unknown1: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ type: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ unknown2: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ time: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ unknown3: number; }; }; }; manuSpecificPhilips2: { attributes: { - /** ID: 2 | Type: OCTET_STR */ + /** ID=0x0002 | type=OCTET_STR | write=true */ state: Buffer; }; commands: { - /** ID: 0 */ + /** ID=0x00 */ multiColor: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; }; @@ -6000,95 +7471,95 @@ export interface TClusters { }; manuSpecificSinope: { attributes: { - /** ID: 2 | Type: ENUM8 */ + /** ID=0x0002 | type=ENUM8 | write=true | max=255 */ keypadLockout: number; - /** ID: 4 | Type: CHAR_STR */ + /** ID=0x0004 | type=CHAR_STR | write=true */ firmwareVersion: string; - /** ID: 16 | Type: INT16 */ + /** ID=0x0010 | type=INT16 | write=true | max=65535 */ outdoorTempToDisplay: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | write=true | max=65535 */ outdoorTempToDisplayTimeout: number; - /** ID: 18 | Type: ENUM8 */ + /** ID=0x0012 | type=ENUM8 | write=true | max=255 */ secondScreenBehavior: number; - /** ID: 32 | Type: UINT32 */ + /** ID=0x0020 | type=UINT32 | write=true | max=4294967295 */ currentTimeToDisplay: number; - /** ID: 82 | Type: UINT8 */ + /** ID=0x0052 | type=UINT8 | write=true | max=255 */ ledIntensityOn: number; - /** ID: 83 | Type: UINT8 */ + /** ID=0x0053 | type=UINT8 | write=true | max=255 */ ledIntensityOff: number; - /** ID: 80 | Type: UINT24 */ + /** ID=0x0050 | type=UINT24 | write=true | max=16777215 */ ledColorOn: number; - /** ID: 81 | Type: UINT24 */ + /** ID=0x0051 | type=UINT24 | write=true | max=16777215 */ ledColorOff: number; - /** ID: 82 | Type: UINT8 */ + /** ID=0x0052 | type=UINT8 | write=true | max=255 */ onLedIntensity: number; - /** ID: 83 | Type: UINT8 */ + /** ID=0x0053 | type=UINT8 | write=true | max=255 */ offLedIntensity: number; - /** ID: 84 | Type: ENUM8 */ + /** ID=0x0054 | type=ENUM8 | write=true | max=255 */ actionReport: number; - /** ID: 85 | Type: UINT16 */ + /** ID=0x0055 | type=UINT16 | write=true | max=65535 */ minimumBrightness: number; - /** ID: 96 | Type: UINT16 */ + /** ID=0x0060 | type=UINT16 | write=true | max=65535 */ connectedLoadRM: number; - /** ID: 112 | Type: BITMAP8 */ + /** ID=0x0070 | type=BITMAP8 | write=true */ currentLoad: number; - /** ID: 113 | Type: INT8 */ + /** ID=0x0071 | type=INT8 | write=true | min=-128 | max=127 | default=-128 */ ecoMode: number; - /** ID: 114 | Type: UINT8 */ + /** ID=0x0072 | type=UINT8 | write=true | max=255 | default=255 */ ecoMode1: number; - /** ID: 115 | Type: UINT8 */ + /** ID=0x0073 | type=UINT8 | write=true | max=255 | default=255 */ ecoMode2: number; - /** ID: 117 | Type: BITMAP32 */ + /** ID=0x0075 | type=BITMAP32 | write=true | max=4294967295 */ unknown: number; - /** ID: 118 | Type: UINT8 */ + /** ID=0x0076 | type=UINT8 | write=true | max=255 */ drConfigWaterTempMin: number; - /** ID: 119 | Type: UINT8 */ + /** ID=0x0077 | type=UINT8 | write=true | max=255 | default=2 */ drConfigWaterTempTime: number; - /** ID: 120 | Type: UINT16 */ + /** ID=0x0078 | type=UINT16 | write=true | max=65535 */ drWTTimeOn: number; - /** ID: 128 | Type: UINT32 */ + /** ID=0x0080 | type=UINT32 | max=4294967295 */ unknown1: number; - /** ID: 160 | Type: UINT32 */ + /** ID=0x00a0 | type=UINT32 | write=true | max=4294967295 */ dimmerTimmer: number; - /** ID: 256 | Type: UINT8 */ + /** ID=0x0100 | type=UINT8 | max=255 */ unknown2: number; - /** ID: 261 | Type: ENUM8 */ + /** ID=0x0105 | type=ENUM8 | write=true | max=255 */ floorControlMode: number; - /** ID: 262 | Type: ENUM8 */ + /** ID=0x0106 | type=ENUM8 | write=true | max=255 */ auxOutputMode: number; - /** ID: 263 | Type: INT16 */ + /** ID=0x0107 | type=INT16 | write=true | max=65535 */ floorTemperature: number; - /** ID: 264 | Type: INT16 */ + /** ID=0x0108 | type=INT16 | write=true | max=65535 */ ambiantMaxHeatSetpointLimit: number; - /** ID: 265 | Type: INT16 */ + /** ID=0x0109 | type=INT16 | write=true | max=65535 */ floorMinHeatSetpointLimit: number; - /** ID: 266 | Type: INT16 */ + /** ID=0x010a | type=INT16 | write=true | max=65535 */ floorMaxHeatSetpointLimit: number; - /** ID: 267 | Type: ENUM8 */ + /** ID=0x010b | type=ENUM8 | write=true | max=255 */ temperatureSensor: number; - /** ID: 268 | Type: ENUM8 */ + /** ID=0x010c | type=ENUM8 | write=true | max=255 */ floorLimitStatus: number; - /** ID: 269 | Type: INT16 */ + /** ID=0x010d | type=INT16 | write=true | max=65535 */ roomTemperature: number; - /** ID: 276 | Type: ENUM8 */ + /** ID=0x0114 | type=ENUM8 | write=true | max=255 */ timeFormatToDisplay: number; - /** ID: 277 | Type: ENUM8 */ + /** ID=0x0115 | type=ENUM8 | write=true | max=255 */ GFCiStatus: number; - /** ID: 280 | Type: UINT16 */ + /** ID=0x0118 | type=UINT16 | write=true | max=255 */ auxConnectedLoad: number; - /** ID: 281 | Type: UINT16 */ + /** ID=0x0119 | type=UINT16 | write=true | max=65535 */ connectedLoad: number; - /** ID: 296 | Type: UINT8 */ + /** ID=0x0128 | type=UINT8 | write=true | max=255 */ pumpProtection: number; - /** ID: 298 | Type: ENUM8 */ + /** ID=0x012a | type=ENUM8 | write=true | max=255 | default=60 */ unknown3: number; - /** ID: 299 | Type: INT16 */ + /** ID=0x012b | type=INT16 | write=true | max=65535 */ currentSetpoint: number; - /** ID: 301 | Type: INT16 */ + /** ID=0x012d | type=INT16 | write=true | min=-32768 | max=32767 */ reportLocalTemperature: number; - /** ID: 576 | Type: ARRAY */ + /** ID=0x0240 | type=ARRAY | write=true */ flowMeterConfig: ZclArray | unknown[]; - /** ID: 643 | Type: UINT8 */ + /** ID=0x0283 | type=UINT8 | write=true | max=255 */ coldLoadPickupStatus: number; }; commands: never; @@ -6102,9 +7573,9 @@ export interface TClusters { manuSpecificLegrandDevices2: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ command0: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; }; @@ -6113,9 +7584,9 @@ export interface TClusters { manuSpecificLegrandDevices3: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ command0: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; }; @@ -6123,7 +7594,7 @@ export interface TClusters { }; wiserDeviceInfo: { attributes: { - /** ID: 32 | Type: CHAR_STR */ + /** ID=0x0020 | type=CHAR_STR | write=true */ deviceInfo: string; }; commands: never; @@ -6132,175 +7603,175 @@ export interface TClusters { manuSpecificTuya: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ dataRequest: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 3 */ + /** ID=0x03 */ dataQuery: Record; - /** ID: 16 */ + /** ID=0x10 */ mcuVersionRequest: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; }; - /** ID: 4 */ + /** ID=0x04 */ sendData: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 18 */ + /** ID=0x12 */ mcuOtaNotify: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_hi: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_lo: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ version: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ imageSize: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ crc: number; }; - /** ID: 20 */ + /** ID=0x14 */ mcuOtaBlockDataResponse: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_hi: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_lo: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ version: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ offset: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ imageData: number[]; }; - /** ID: 36 */ + /** ID=0x24 */ mcuSyncTime: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ payloadSize: number; - /** Type: LIST_UINT8 */ + /** type=LIST_UINT8 */ payload: number[]; }; - /** ID: 37 */ + /** ID=0x25 */ mcuGatewayConnectionStatus: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ payloadSize: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ payload: number; }; - /** ID: 96 */ - tuyaWeatherRequest: { - /** Type: BUFFER */ + /** ID=0x61 */ + tuyaWeatherSync: { + /** type=BUFFER */ payload: Buffer; }; }; commandResponses: { - /** ID: 1 */ + /** ID=0x01 */ dataResponse: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 2 */ + /** ID=0x02 */ dataReport: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 5 */ + /** ID=0x05 */ activeStatusReportAlt: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 6 */ + /** ID=0x06 */ activeStatusReport: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: LIST_TUYA_DATAPOINT_VALUES */ + /** type=LIST_TUYA_DATAPOINT_VALUES */ dpValues: TuyaDataPointValue[]; }; - /** ID: 17 */ + /** ID=0x11 */ mcuVersionResponse: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ version: number; }; - /** ID: 19 */ + /** ID=0x13 */ mcuOtaBlockDataRequest: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_hi: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_lo: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ version: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ offset: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ size: number; }; - /** ID: 21 */ + /** ID=0x15 */ mcuOtaResult: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_hi: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ key_lo: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ version: number; }; - /** ID: 36 */ + /** ID=0x24 */ mcuSyncTime: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ payloadSize: number; }; - /** ID: 37 */ + /** ID=0x25 */ mcuGatewayConnectionStatus: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ payloadSize: number; }; - /** ID: 97 */ - tuyaWeatherSync: { - /** Type: BUFFER */ + /** ID=0x60 */ + tuyaWeatherRequest: { + /** type=BUFFER */ payload: Buffer; }; }; }; manuSpecificLumi: { attributes: { - /** ID: 9 | Type: UINT8 */ + /** ID=0x0009 | type=UINT8 | write=true | max=255 */ mode: number; - /** ID: 274 | Type: UINT32 */ + /** ID=0x0112 | type=UINT32 | write=true | max=4294967295 */ illuminance: number; - /** ID: 276 | Type: UINT8 */ + /** ID=0x0114 | type=UINT8 | write=true | max=255 */ displayUnit: number; - /** ID: 297 | Type: UINT8 */ + /** ID=0x0129 | type=UINT8 | write=true | max=255 */ airQuality: number; - /** ID: 1024 | Type: BOOLEAN */ + /** ID=0x0400 | type=BOOLEAN | write=true */ curtainReverse: number; - /** ID: 1025 | Type: BOOLEAN */ + /** ID=0x0401 | type=BOOLEAN | write=true */ curtainHandOpen: number; - /** ID: 1026 | Type: BOOLEAN */ + /** ID=0x0402 | type=BOOLEAN | write=true */ curtainCalibrated: number; }; commands: never; @@ -6308,19 +7779,19 @@ export interface TClusters { }; manuSpecificTuya2: { attributes: { - /** ID: 53258 | Type: INT16 */ + /** ID=0xd00a | type=INT16 | write=true | min=-32768 | max=32767 */ alarm_temperature_max: number; - /** ID: 53259 | Type: INT16 */ + /** ID=0xd00b | type=INT16 | write=true | min=-32768 | max=32767 */ alarm_temperature_min: number; - /** ID: 53261 | Type: INT16 */ + /** ID=0xd00d | type=INT16 | write=true | min=-32768 | max=32767 */ alarm_humidity_max: number; - /** ID: 53262 | Type: INT16 */ + /** ID=0xd00e | type=INT16 | write=true | min=-32768 | max=32767 */ alarm_humidity_min: number; - /** ID: 53263 | Type: ENUM8 */ + /** ID=0xd00f | type=ENUM8 | write=true | max=255 */ alarm_humidity: number; - /** ID: 53254 | Type: ENUM8 */ + /** ID=0xd006 | type=ENUM8 | write=true | max=255 */ alarm_temperature: number; - /** ID: 53264 | Type: UINT8 */ + /** ID=0xd010 | type=UINT8 | write=true | max=255 */ unknown: number; }; commands: never; @@ -6328,27 +7799,27 @@ export interface TClusters { }; manuSpecificTuya3: { attributes: { - /** ID: 53264 | Type: ENUM8 */ + /** ID=0xd010 | type=ENUM8 | write=true | max=255 */ powerOnBehavior: number; - /** ID: 53280 | Type: ENUM8 */ + /** ID=0xd020 | type=ENUM8 | write=true | max=255 */ switchMode: number; - /** ID: 53296 | Type: ENUM8 */ + /** ID=0xd030 | type=ENUM8 | write=true | max=255 */ switchType: number; }; commands: { - /** ID: 229 */ + /** ID=0xe5 */ setOptions1: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; - /** ID: 230 */ + /** ID=0xe6 */ setOptions2: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; - /** ID: 231 */ + /** ID=0xe7 */ setOptions3: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; }; @@ -6356,7 +7827,7 @@ export interface TClusters { }; manuSpecificCentraliteHumidity: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | write=true | max=65535 */ measuredValue: number; }; commands: never; @@ -6366,181 +7837,62 @@ export interface TClusters { attributes: never; commands: never; commandResponses: { - /** ID: 1 */ + /** ID=0x01 */ arrivalSensorNotify: Record; }; }; manuSpecificSamsungAccelerometer: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | write=true | max=255 */ motion_threshold_multiplier: number; - /** ID: 2 | Type: UINT16 */ + /** ID=0x0002 | type=UINT16 | write=true | max=65535 */ motion_threshold: number; - /** ID: 16 | Type: BITMAP8 */ + /** ID=0x0010 | type=BITMAP8 | write=true | max=255 */ acceleration: number; - /** ID: 18 | Type: INT16 */ + /** ID=0x0012 | type=INT16 | write=true | min=-32768 | max=32767 */ x_axis: number; - /** ID: 19 | Type: INT16 */ + /** ID=0x0013 | type=INT16 | write=true | min=-32768 | max=32767 */ y_axis: number; - /** ID: 20 | Type: INT16 */ + /** ID=0x0014 | type=INT16 | write=true | min=-32768 | max=32767 */ z_axis: number; }; commands: never; commandResponses: never; }; - heimanSpecificAirQuality: { - attributes: { - /** ID: 61440 | Type: UINT8 */ - language: number; - /** ID: 61441 | Type: UINT8 */ - unitOfMeasure: number; - /** ID: 61442 | Type: UINT8 */ - batteryState: number; - /** ID: 61443 | Type: UINT16 */ - pm10measuredValue: number; - /** ID: 61444 | Type: UINT16 */ - tvocMeasuredValue: number; - /** ID: 61445 | Type: UINT16 */ - aqiMeasuredValue: number; - /** ID: 61446 | Type: INT16 */ - temperatureMeasuredMax: number; - /** ID: 61447 | Type: INT16 */ - temperatureMeasuredMin: number; - /** ID: 61448 | Type: UINT16 */ - humidityMeasuredMax: number; - /** ID: 61449 | Type: UINT16 */ - humidityMeasuredMin: number; - /** ID: 61450 | Type: UINT16 */ - alarmEnable: number; - }; - commands: { - /** ID: 283 */ - setLanguage: { - /** Type: UINT8 */ - languageCode: number; - }; - /** ID: 284 */ - setUnitOfTemperature: { - /** Type: UINT8 */ - unitsCode: number; - }; - /** ID: 285 */ - getTime: Record; - }; - commandResponses: never; - }; - heimanSpecificScenes: { - attributes: never; - commands: { - /** ID: 240 */ - cinema: Record; - /** ID: 241 */ - atHome: Record; - /** ID: 242 */ - sleep: Record; - /** ID: 243 */ - goOut: Record; - /** ID: 244 */ - repast: Record; - }; - commandResponses: never; - }; tradfriButton: { attributes: never; commands: { - /** ID: 1 */ + /** ID=0x01 */ action1: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ data: number; }; - /** ID: 2 */ + /** ID=0x02 */ action2: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ data: number; }; - /** ID: 3 */ + /** ID=0x03 */ action3: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ data: number; }; - /** ID: 4 */ + /** ID=0x04 */ action4: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ data: number; }; - /** ID: 6 */ + /** ID=0x06 */ action6: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ data: number; }; }; commandResponses: never; }; - heimanSpecificInfraRedRemote: { - attributes: never; - commands: { - /** ID: 240 */ - sendKey: { - /** Type: UINT8 */ - id: number; - /** Type: UINT8 */ - keyCode: number; - }; - /** ID: 241 */ - studyKey: { - /** Type: UINT8 */ - id: number; - /** Type: UINT8 */ - keyCode: number; - }; - /** ID: 243 */ - deleteKey: { - /** Type: UINT8 */ - id: number; - /** Type: UINT8 */ - keyCode: number; - }; - /** ID: 244 */ - createId: { - /** Type: UINT8 */ - modelType: number; - }; - /** ID: 246 */ - getIdAndKeyCodeList: Record; - }; - commandResponses: { - /** ID: 242 */ - studyKeyRsp: { - /** Type: UINT8 */ - id: number; - /** Type: UINT8 */ - keyCode: number; - /** Type: UINT8 */ - result: number; - }; - /** ID: 245 */ - createIdRsp: { - /** Type: UINT8 */ - id: number; - /** Type: UINT8 */ - modelType: number; - }; - /** ID: 247 */ - getIdAndKeyCodeListRsp: { - /** Type: UINT8 */ - packetsTotal: number; - /** Type: UINT8 */ - packetNumber: number; - /** Type: UINT8 */ - packetLength: number; - /** Type: LIST_UINT8 */ - learnedDevicesList: number[]; - }; - }; - }; schneiderSpecificPilotMode: { attributes: { - /** ID: 49 | Type: ENUM8 */ + /** ID=0x0031 | type=ENUM8 | write=true | max=255 */ pilotMode: number; }; commands: never; @@ -6548,13 +7900,13 @@ export interface TClusters { }; elkoOccupancySettingClusterServer: { attributes: { - /** ID: 0 | Type: UINT16 */ + /** ID=0x0000 | type=UINT16 | write=true | max=65535 */ AmbienceLightThreshold: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | write=true | max=255 */ OccupancyActions: number; - /** ID: 2 | Type: UINT8 */ + /** ID=0x0002 | type=UINT8 | write=true | max=255 */ UnoccupiedLevelDflt: number; - /** ID: 3 | Type: UINT8 */ + /** ID=0x0003 | type=UINT8 | write=true | max=255 */ UnoccupiedLevel: number; }; commands: never; @@ -6562,17 +7914,17 @@ export interface TClusters { }; elkoSwitchConfigurationClusterServer: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | write=true | max=255 */ SwitchIndication: number; - /** ID: 16 | Type: UINT8 */ + /** ID=0x0010 | type=UINT8 | write=true | max=255 */ UpSceneID: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | write=true | max=65535 */ UpGroupID: number; - /** ID: 32 | Type: UINT8 */ + /** ID=0x0020 | type=UINT8 | write=true | max=255 */ DownSceneID: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | write=true | max=65535 */ DownGroupID: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | write=true | max=255 */ SwitchActions: number; }; commands: never; @@ -6580,17 +7932,17 @@ export interface TClusters { }; manuSpecificSchneiderLightSwitchConfiguration: { attributes: { - /** ID: 0 | Type: ENUM8 */ + /** ID=0x0000 | type=ENUM8 | write=true | max=255 */ ledIndication: number; - /** ID: 16 | Type: UINT8 */ + /** ID=0x0010 | type=UINT8 | write=true | max=255 */ upSceneID: number; - /** ID: 17 | Type: UINT16 */ + /** ID=0x0011 | type=UINT16 | write=true | max=65535 */ upGroupID: number; - /** ID: 32 | Type: UINT8 */ + /** ID=0x0020 | type=UINT8 | write=true | max=255 */ downSceneID: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | write=true | max=65535 */ downGroupID: number; - /** ID: 1 | Type: ENUM8 */ + /** ID=0x0001 | type=ENUM8 | write=true | max=255 */ switchActions: number; }; commands: never; @@ -6598,9 +7950,9 @@ export interface TClusters { }; manuSpecificSchneiderFanSwitchConfiguration: { attributes: { - /** ID: 2 | Type: UINT8 */ + /** ID=0x0002 | type=UINT8 | write=true | max=255 */ ledIndication: number; - /** ID: 96 | Type: UINT8 */ + /** ID=0x0060 | type=UINT8 | write=true | max=255 */ ledOrientation: number; }; commands: never; @@ -6608,7 +7960,7 @@ export interface TClusters { }; sprutVoc: { attributes: { - /** ID: 26112 | Type: UINT16 */ + /** ID=0x6600 | type=UINT16 | write=true | max=65535 */ voc: number; }; commands: never; @@ -6616,13 +7968,13 @@ export interface TClusters { }; sprutNoise: { attributes: { - /** ID: 26112 | Type: SINGLE_PREC */ + /** ID=0x6600 | type=SINGLE_PREC | write=true */ noise: number; - /** ID: 26113 | Type: BITMAP8 */ + /** ID=0x6601 | type=BITMAP8 | write=true */ noiseDetected: number; - /** ID: 26114 | Type: SINGLE_PREC */ + /** ID=0x6602 | type=SINGLE_PREC | write=true */ noiseDetectLevel: number; - /** ID: 26115 | Type: UINT16 */ + /** ID=0x6603 | type=UINT16 | write=true | max=65535 */ noiseAfterDetectDelay: number; }; commands: never; @@ -6631,45 +7983,45 @@ export interface TClusters { sprutIrBlaster: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ playStore: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ param: number; }; - /** ID: 1 */ + /** ID=0x01 */ learnStart: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ value: number; }; - /** ID: 2 */ + /** ID=0x02 */ learnStop: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ value: number; }; - /** ID: 3 */ + /** ID=0x03 */ clearStore: Record; - /** ID: 4 */ + /** ID=0x04 */ playRam: Record; - /** ID: 5 */ + /** ID=0x05 */ learnRamStart: Record; - /** ID: 6 */ + /** ID=0x06 */ learnRamStop: Record; }; commandResponses: never; }; manuSpecificSiglisZigfred: { attributes: { - /** ID: 8 | Type: UINT32 */ + /** ID=0x0008 | type=UINT32 | write=true | max=4294967295 */ buttonEvent: number; }; commands: { - /** ID: 2 */ + /** ID=0x02 */ siglisZigfredButtonEvent: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ button: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ type: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ duration: number; }; }; @@ -6678,7 +8030,7 @@ export interface TClusters { owonClearMetering: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ owonClearMeasurementData: Record; }; commandResponses: never; @@ -6686,100 +8038,100 @@ export interface TClusters { zosungIRTransmit: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ zosungSendIRCode00: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ length: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ unk1: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ unk2: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ unk3: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ cmd: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ unk4: number; }; - /** ID: 1 */ + /** ID=0x01 */ zosungSendIRCode01: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zero: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ length: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ unk1: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ unk2: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ unk3: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ cmd: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ unk4: number; }; - /** ID: 2 */ + /** ID=0x02 */ zosungSendIRCode02: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ position: number; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ maxlen: number; }; - /** ID: 3 */ + /** ID=0x03 */ zosungSendIRCode03: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zero: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ position: number; - /** Type: OCTET_STR */ + /** type=OCTET_STR */ msgpart: Buffer; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ msgpartcrc: number; }; - /** ID: 4 */ + /** ID=0x04 */ zosungSendIRCode04: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zero0: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ zero1: number; }; - /** ID: 5 */ + /** ID=0x05 */ zosungSendIRCode05: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ zero: number; }; }; commandResponses: { - /** ID: 3 */ + /** ID=0x03 */ zosungSendIRCode03Resp: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ zero: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT32 */ + /** type=UINT32 | max=4294967295 */ position: number; - /** Type: OCTET_STR */ + /** type=OCTET_STR */ msgpart: Buffer; - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ msgpartcrc: number; }; - /** ID: 5 */ + /** ID=0x05 */ zosungSendIRCode05Resp: { - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ seq: number; - /** Type: UINT16 */ + /** type=UINT16 | max=65535 */ zero: number; }; }; @@ -6787,9 +8139,9 @@ export interface TClusters { zosungIRControl: { attributes: never; commands: { - /** ID: 0 */ + /** ID=0x00 */ zosungControlIRCommand00: { - /** Type: BUFFER */ + /** type=BUFFER */ data: Buffer; }; }; @@ -6797,141 +8149,141 @@ export interface TClusters { }; manuSpecificAssaDoorLock: { attributes: { - /** ID: 18 | Type: UINT8 */ + /** ID=0x0012 | type=UINT8 | write=true | max=255 */ autoLockTime: number; - /** ID: 19 | Type: UINT8 */ + /** ID=0x0013 | type=UINT8 | write=true | max=255 */ wrongCodeAttempts: number; - /** ID: 20 | Type: UINT8 */ + /** ID=0x0014 | type=UINT8 | write=true | max=255 */ shutdownTime: number; - /** ID: 21 | Type: UINT8 */ + /** ID=0x0015 | type=UINT8 | write=true | max=255 */ batteryLevel: number; - /** ID: 22 | Type: UINT8 */ + /** ID=0x0016 | type=UINT8 | write=true | max=255 */ insideEscutcheonLED: number; - /** ID: 23 | Type: UINT8 */ + /** ID=0x0017 | type=UINT8 | write=true | max=255 */ volume: number; - /** ID: 24 | Type: UINT8 */ + /** ID=0x0018 | type=UINT8 | write=true | max=255 */ lockMode: number; - /** ID: 25 | Type: UINT8 */ + /** ID=0x0019 | type=UINT8 | write=true | max=255 */ language: number; - /** ID: 26 | Type: BOOLEAN */ + /** ID=0x001a | type=BOOLEAN | write=true */ allCodesLockout: number; - /** ID: 27 | Type: BOOLEAN */ + /** ID=0x001b | type=BOOLEAN | write=true */ oneTouchLocking: number; - /** ID: 28 | Type: BOOLEAN */ + /** ID=0x001c | type=BOOLEAN | write=true */ privacyButtonSetting: number; - /** ID: 33 | Type: UINT16 */ + /** ID=0x0021 | type=UINT16 | write=true | max=65535 */ numberLogRecordsSupported: number; - /** ID: 48 | Type: UINT8 */ + /** ID=0x0030 | type=UINT8 | write=true | max=255 */ numberPinsSupported: number; - /** ID: 64 | Type: UINT8 */ + /** ID=0x0040 | type=UINT8 | write=true | max=255 */ numberScheduleSlotsPerUser: number; - /** ID: 80 | Type: UINT8 */ + /** ID=0x0050 | type=UINT8 | write=true | max=255 */ alarmMask: number; }; commands: { - /** ID: 16 | Response ID: 0 */ + /** ID=0x10 | response=0 */ getLockStatus: Record; - /** ID: 18 */ + /** ID=0x12 */ getBatteryLevel: Record; - /** ID: 19 */ + /** ID=0x13 */ setRFLockoutTime: Record; - /** ID: 48 */ + /** ID=0x30 */ userCodeSet: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 49 */ + /** ID=0x31 */ userCodeGet: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 50 */ + /** ID=0x32 */ userCodeClear: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 51 */ + /** ID=0x33 */ clearAllUserCodes: Record; - /** ID: 52 */ + /** ID=0x34 */ setUserCodeStatus: Record; - /** ID: 53 */ + /** ID=0x35 */ getUserCodeStatus: Record; - /** ID: 54 */ + /** ID=0x36 */ getLastUserIdEntered: Record; - /** ID: 55 */ + /** ID=0x37 */ userAdded: Record; - /** ID: 56 */ + /** ID=0x38 */ userDeleted: Record; - /** ID: 64 */ + /** ID=0x40 */ setScheduleSlot: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 65 */ + /** ID=0x41 */ getScheduleSlot: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 66 */ + /** ID=0x42 */ setScheduleSlotStatus: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 96 | Response ID: 1 */ + /** ID=0x60 | response=1 */ reflash: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 97 | Response ID: 2 */ + /** ID=0x61 | response=2 */ reflashData: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 98 | Response ID: 3 */ + /** ID=0x62 | response=3 */ reflashStatus: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 144 */ + /** ID=0x90 */ getReflashLock: Record; - /** ID: 160 */ + /** ID=0xa0 */ getHistory: Record; - /** ID: 161 */ + /** ID=0xa1 */ getLogin: Record; - /** ID: 162 */ + /** ID=0xa2 */ getUser: Record; - /** ID: 163 */ + /** ID=0xa3 */ getUsers: Record; - /** ID: 176 */ + /** ID=0xb0 */ getMandatoryAttributes: Record; - /** ID: 177 */ + /** ID=0xb1 */ readAttribute: Record; - /** ID: 178 */ + /** ID=0xb2 */ writeAttribute: Record; - /** ID: 179 */ + /** ID=0xb3 */ configureReporting: Record; - /** ID: 180 */ + /** ID=0xb4 */ getBasicClusterAttributes: Record; }; commandResponses: { - /** ID: 0 */ + /** ID=0x00 */ getLockStatusRsp: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; }; - /** ID: 1 */ + /** ID=0x01 */ reflashRsp: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; }; - /** ID: 2 */ + /** ID=0x02 */ reflashDataRsp: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; }; - /** ID: 3 */ + /** ID=0x03 */ reflashStatusRsp: { - /** Type: UINT8 */ + /** type=UINT8 | max=255 */ status: number; }; }; @@ -6939,24 +8291,24 @@ export interface TClusters { manuSpecificDoorman: { attributes: never; commands: { - /** ID: 252 */ + /** ID=0xfc */ getConfigurationParameter: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 253 */ + /** ID=0xfd */ setConfigurationParameter: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 37 */ + /** ID=0x25 */ integrationModeActivation: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; - /** ID: 78 */ + /** ID=0x4e */ armDisarm: { - /** Type: CHAR_STR */ + /** type=CHAR_STR */ payload: string; }; }; @@ -6964,7 +8316,7 @@ export interface TClusters { }; manuSpecificProfalux1: { attributes: { - /** ID: 0 | Type: UINT8 */ + /** ID=0x0000 | type=UINT8 | write=true | max=255 */ motorCoverType: number; }; commands: never; @@ -6972,47 +8324,47 @@ export interface TClusters { }; manuSpecificAmazonWWAH: { attributes: { - /** ID: 2 | Type: BOOLEAN */ + /** ID=0x0002 | type=BOOLEAN | write=true */ disableOTADowngrades: number; - /** ID: 3 | Type: BOOLEAN */ + /** ID=0x0003 | type=BOOLEAN | write=true */ mgmtLeaveWithoutRejoinEnabled: number; - /** ID: 4 | Type: UINT8 */ + /** ID=0x0004 | type=UINT8 | write=true | max=255 */ nwkRetryCount: number; - /** ID: 5 | Type: UINT8 */ + /** ID=0x0005 | type=UINT8 | write=true | max=255 */ macRetryCount: number; - /** ID: 6 | Type: BOOLEAN */ + /** ID=0x0006 | type=BOOLEAN | write=true */ routerCheckInEnabled: number; - /** ID: 7 | Type: BOOLEAN */ + /** ID=0x0007 | type=BOOLEAN | write=true */ touchlinkInterpanEnabled: number; - /** ID: 8 | Type: BOOLEAN */ + /** ID=0x0008 | type=BOOLEAN | write=true */ wwahParentClassificationEnabled: number; - /** ID: 9 | Type: BOOLEAN */ + /** ID=0x0009 | type=BOOLEAN | write=true */ wwahAppEventRetryEnabled: number; - /** ID: 10 | Type: UINT8 */ + /** ID=0x000a | type=UINT8 | write=true | max=255 */ wwahAppEventRetryQueueSize: number; - /** ID: 11 | Type: BOOLEAN */ + /** ID=0x000b | type=BOOLEAN | write=true */ wwahRejoinEnabled: number; - /** ID: 12 | Type: UINT8 */ + /** ID=0x000c | type=UINT8 | write=true | max=255 */ macPollFailureWaitTime: number; - /** ID: 13 | Type: BOOLEAN */ + /** ID=0x000d | type=BOOLEAN | write=true */ configurationModeEnabled: number; - /** ID: 14 | Type: UINT8 */ + /** ID=0x000e | type=UINT8 | write=true | max=255 */ currentDebugReportID: number; - /** ID: 15 | Type: BOOLEAN */ + /** ID=0x000f | type=BOOLEAN | write=true */ tcSecurityOnNwkKeyRotationEnabled: number; - /** ID: 16 | Type: BOOLEAN */ + /** ID=0x0010 | type=BOOLEAN | write=true */ wwahBadParentRecoveryEnabled: number; - /** ID: 17 | Type: UINT8 */ + /** ID=0x0011 | type=UINT8 | write=true | max=255 */ pendingNetworkUpdateChannel: number; - /** ID: 18 | Type: UINT16 */ + /** ID=0x0012 | type=UINT16 | write=true | max=65535 */ pendingNetworkUpdatePANID: number; - /** ID: 19 | Type: UINT16 */ + /** ID=0x0013 | type=UINT16 | write=true | max=65535 */ otaMaxOfflineDuration: number; - /** ID: 65533 | Type: UINT16 */ + /** ID=0xfffd | type=UINT16 | write=true | max=65535 */ clusterRevision: number; }; commands: { - /** ID: 10 */ + /** ID=0x0a */ clearBindingTable: Record; }; commandResponses: never; @@ -7022,127 +8374,127 @@ export interface TClusters { export interface TFoundation { /** ID: 0 */ read: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; }[]; /** ID: 1 */ readRsp: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ status: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}] */ + /** Type: DATA8 conditions=[{fieldEquals field=status value=0}] */ dataType?: number; - /** Type: USE_DATA_TYPE, Conditions: [{fieldEquals field=status value=0}] */ + /** Type: USE_DATA_TYPE conditions=[{fieldEquals field=status value=0}] */ attrData?: unknown; }[]; /** ID: 2 */ write: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; /** Type: USE_DATA_TYPE */ attrData: unknown; }[]; /** ID: 3 */ writeUndiv: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; /** Type: USE_DATA_TYPE */ attrData: unknown; }[]; /** ID: 4 */ writeRsp: { - /** Type: UINT8 */ + /** Type: ENUM8 */ status: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status reversed=true value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=status reversed=true value=0}] */ attrId?: number; }[]; /** ID: 5 */ writeNoRsp: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; /** Type: USE_DATA_TYPE */ attrData: unknown; }[]; /** ID: 6 */ configReport: { - /** Type: UINT8 */ + /** Type: DATA8 */ direction: number; - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8, Conditions: [{fieldEquals field=direction value=0}] */ + /** Type: DATA8 conditions=[{fieldEquals field=direction value=0}] */ dataType?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=direction value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=direction value=0}] */ minRepIntval?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=direction value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=direction value=0}] */ maxRepIntval?: number; - /** Type: USE_DATA_TYPE, Conditions: [{fieldEquals field=direction value=0}{dataTypeValueTypeEquals value=ANALOG}] */ + /** Type: USE_DATA_TYPE conditions=[{fieldEquals field=direction value=0}{dataTypeValueTypeEquals value=ANALOG}] */ repChange?: unknown; - /** Type: UINT16, Conditions: [{fieldEquals field=direction value=1}] */ + /** Type: DATA16 conditions=[{fieldEquals field=direction value=1}] */ timeout?: number; }[]; /** ID: 7 */ configReportRsp: { - /** Type: UINT8 */ + /** Type: ENUM8 */ status: number; - /** Type: UINT8, Conditions: [{minimumRemainingBufferBytes value=3}] */ + /** Type: DATA8 conditions=[{minimumRemainingBufferBytes value=3}] */ direction?: number; - /** Type: UINT16, Conditions: [{minimumRemainingBufferBytes value=2}] */ + /** Type: DATA16 conditions=[{minimumRemainingBufferBytes value=2}] */ attrId?: number; }[]; /** ID: 8 */ readReportConfig: { - /** Type: UINT8 */ + /** Type: DATA8 */ direction: number; - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; }[]; /** ID: 9 */ readReportConfigRsp: { - /** Type: UINT8 */ + /** Type: ENUM8 */ status: number; - /** Type: UINT8 */ + /** Type: DATA8 */ direction: number; - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8, Conditions: [{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ + /** Type: DATA8 conditions=[{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ dataType?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ minRepIntval?: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=status value=0}{fieldEquals field=direction value=0}] */ maxRepIntval?: number; - /** Type: USE_DATA_TYPE, Conditions: [{fieldEquals field=status value=0}{fieldEquals field=direction value=0}{dataTypeValueTypeEquals value=ANALOG}] */ + /** Type: USE_DATA_TYPE conditions=[{fieldEquals field=status value=0}{fieldEquals field=direction value=0}{dataTypeValueTypeEquals value=ANALOG}] */ repChange?: unknown; - /** Type: UINT16, Conditions: [{fieldEquals field=status value=0}{fieldEquals field=direction value=1}] */ + /** Type: DATA16 conditions=[{fieldEquals field=status value=0}{fieldEquals field=direction value=1}] */ timeout?: number; }[]; /** ID: 10 */ report: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; /** Type: USE_DATA_TYPE */ attrData: unknown; }[]; /** ID: 11 */ defaultRsp: { - /** Type: UINT8 */ + /** Type: DATA8 */ cmdId: number; - /** Type: UINT8 */ + /** Type: ENUM8 */ statusCode: number; }; /** ID: 12 */ discover: { - /** Type: UINT16 */ + /** Type: DATA16 */ startAttrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ maxAttrIds: number; }; /** ID: 13 */ @@ -7150,44 +8502,44 @@ export interface TFoundation { /** Type: UINT8 */ discComplete: number; attrInfos: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; }[]; }; /** ID: 14 */ readStructured: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; /** Type: STRUCTURED_SELECTOR */ selector: StructuredSelector; }[]; /** ID: 15 */ writeStructured: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; /** Type: STRUCTURED_SELECTOR */ selector: StructuredSelector; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; /** Type: USE_DATA_TYPE */ elementData: unknown; }[]; /** ID: 16 */ writeStructuredRsp: { - /** Type: UINT8 */ + /** Type: ENUM8 */ status: number; - /** Type: UINT16, Conditions: [{fieldEquals field=status reversed=true value=0}] */ + /** Type: DATA16 conditions=[{fieldEquals field=status reversed=true value=0}] */ attrId?: number; - /** Type: STRUCTURED_SELECTOR, Conditions: [{fieldEquals field=status reversed=true value=0}] */ + /** Type: STRUCTURED_SELECTOR conditions=[{fieldEquals field=status reversed=true value=0}] */ selector?: StructuredSelector; }[]; /** ID: 17 */ discoverCommands: { - /** Type: UINT8 */ + /** Type: DATA8 */ startCmdId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ maxCmdIds: number; }; /** ID: 18 */ @@ -7195,15 +8547,15 @@ export interface TFoundation { /** Type: UINT8 */ discComplete: number; attrInfos: { - /** Type: UINT8 */ + /** Type: DATA8 */ cmdId: number; }[]; }; /** ID: 19 */ discoverCommandsGen: { - /** Type: UINT8 */ + /** Type: DATA8 */ startCmdId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ maxCmdIds: number; }; /** ID: 20 */ @@ -7211,15 +8563,15 @@ export interface TFoundation { /** Type: UINT8 */ discComplete: number; attrInfos: { - /** Type: UINT8 */ + /** Type: DATA8 */ cmdId: number; }[]; }; /** ID: 21 */ discoverExt: { - /** Type: UINT16 */ + /** Type: DATA16 */ startAttrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ maxAttrIds: number; }; /** ID: 22 */ @@ -7227,11 +8579,11 @@ export interface TFoundation { /** Type: UINT8 */ discComplete: number; attrInfos: { - /** Type: UINT16 */ + /** Type: DATA16 */ attrId: number; - /** Type: UINT8 */ + /** Type: DATA8 */ dataType: number; - /** Type: UINT8 */ + /** Type: DATA8 */ access: number; }[]; }; diff --git a/src/zspec/zcl/definition/datatypes.ts b/src/zspec/zcl/definition/datatypes.ts new file mode 100644 index 0000000000..999e4d10f7 --- /dev/null +++ b/src/zspec/zcl/definition/datatypes.ts @@ -0,0 +1,2454 @@ +/** + * This file was automatically generated by scripts/zap-update-types.ts. Do NOT edit manually. + * + * ZCL data type definitions. + */ + +/** + * @type enum8 + */ +export enum ZclType { + Nodata = 0x00, + Data8 = 0x08, + Data16 = 0x09, + Data24 = 0x0a, + Data32 = 0x0b, + Data40 = 0x0c, + Data48 = 0x0d, + Data56 = 0x0e, + Data64 = 0x0f, + Bool = 0x10, + Map8 = 0x18, + Map16 = 0x19, + Map24 = 0x1a, + Map32 = 0x1b, + Map40 = 0x1c, + Map48 = 0x1d, + Map56 = 0x1e, + Map64 = 0x1f, + Uint8 = 0x20, + Uint16 = 0x21, + Uint24 = 0x22, + Uint32 = 0x23, + Uint40 = 0x24, + Uint48 = 0x25, + Uint56 = 0x26, + Uint64 = 0x27, + Int8 = 0x28, + Int16 = 0x29, + Int24 = 0x2a, + Int32 = 0x2b, + Int40 = 0x2c, + Int48 = 0x2d, + Int56 = 0x2e, + Int64 = 0x2f, + Enum8 = 0x30, + Enum16 = 0x31, + Semi = 0x38, + Single = 0x39, + Double = 0x3a, + Octstr = 0x41, + String = 0x42, + Octstr16 = 0x43, + String16 = 0x44, + Array = 0x48, + Struct = 0x4c, + Set = 0x50, + Bag = 0x51, + ToD = 0xe0, + Date = 0xe1, + Utc = 0xe2, + ClusterId = 0xe8, + AttribId = 0xe9, + BacOid = 0xea, + Eui64 = 0xf0, + Key128 = 0xf1, + Unk = 0xff, +} + +/** + * @type enum8 + */ +export enum AttributeReportingStatus { + Pending = 0x00, + Complete = 0x01, +} + +/** + * @type enum8 + */ +export enum ZclStatus { + Success = 0x00, + Failure = 0x01, + NotAuthorized = 0x7e, + MalformedCommand = 0x80, + UnsupClusterCommand = 0x81, + UnsupGeneralCommand = 0x82, + UnsupManufClusterCommand = 0x83, + UnsupManufGeneralCommand = 0x84, + InvalidField = 0x85, + UnsupportedAttribute = 0x86, + InvalidValue = 0x87, + ReadOnly = 0x88, + InsufficientSpace = 0x89, + DuplicateExists = 0x8a, + NotFound = 0x8b, + UnreportableAttribute = 0x8c, + InvalidDataType = 0x8d, + InvalidSelector = 0x8e, + WriteOnly = 0x8f, + InconsistentStartupState = 0x90, + DefinedOutOfBand = 0x91, + Inconsistent = 0x92, + ActionDenied = 0x93, + Timeout = 0x94, + Abort = 0x95, + InvalidImage = 0x96, + WaitForData = 0x97, + NoImageAvailable = 0x98, + RequireMoreImage = 0x99, + NotificationPending = 0x9a, + HardwareFailure = 0xc0, + SoftwareFailure = 0xc1, + CalibrationError = 0xc2, + UnsupportedCluster = 0xc3, + LimitReached = 0xc4, +} + +/** + * @type enum8 + */ +export enum ProfileIntervalPeriod { + Daily = 0x00, + Six0minutes = 0x01, + Three0minutes = 0x02, + One5minutes = 0x03, + One0minutes = 0x04, + Sevendot5minutes = 0x05, + Fiveminutes = 0x06, + Twodot5minutes = 0x07, +} + +/** + * @type enum16 + */ +export enum IasZoneType { + StandardCie = 0x0000, + MotionSensor = 0x000d, + ContactSwitch = 0x0015, + DoorOrWindowHandle = 0x0016, + FireSensor = 0x0028, + WaterSensor = 0x002a, + CarbonMonoxideSensor = 0x002b, + PersonalEmergencyDevice = 0x002c, + VibrationOrMovementSensor = 0x002d, + RemoteControl = 0x010f, + KeyFob = 0x0115, + Keypad = 0x021d, + StandardWarningDevice = 0x0225, + GlassBreakSensor = 0x0226, + SecurityRepeater = 0x0229, + Invalid = 0xffff, +} + +/** + * @type map16 + */ +export enum IasZoneStatusMask { + Alarm1 = 0x0001, + Alarm2 = 0x0002, + Tamper = 0x0004, + BatteryLow = 0x0008, + SupervisionNotify = 0x0010, + RestoreNotify = 0x0020, + Trouble = 0x0040, + AcmainsFault = 0x0080, + Test = 0x0100, + BatteryDefect = 0x0200, +} + +export enum IasZoneStatusShiftRight { + Alarm1 = 0x00, + Alarm2 = 0x01, + Tamper = 0x02, + BatteryLow = 0x03, + SupervisionNotify = 0x04, + RestoreNotify = 0x05, + Trouble = 0x06, + AcmainsFault = 0x07, + Test = 0x08, + BatteryDefect = 0x09, +} + +/** + * @type unk + */ +export interface AnyType { + type: number; + value: unknown; +} + +export interface ReadAttributeResponseRecord { + attributeIdentifier: number; + status: number; + atttribute?: AnyType; +} + +export interface WriteAttributeRecord { + attributeIdentifier: number; + attribute: AnyType; +} + +export interface WriteAttributeResponseRecord { + status: number; + attributeIdentifier?: number; +} + +/** + * @type enum8 + */ +export enum ReportingRole { + Generator = 0x00, + Recipient = 0x01, +} + +export interface ConfigureReportingRecord { + direction: number; + attributeIdentifier: number; + attributeType?: number; + minimumReportingInterval?: number; + maximumReportingInterval?: number; + reportableChange?: unknown; + timeout?: number; +} + +export interface ConfigureReportingResponseRecord { + status: number; + direction?: number; + attributeIdentifier?: number; +} + +export interface ReadReportingConfigurationRecord { + direction: number; + attributeIdentifier: number; +} + +export interface ReadReportingConfigurationResponseRecord { + direction: number; + attributeIdentifier: number; + attributeType?: number; + minimumReportingInterval?: number; + maximumReportingInterval?: number; + reportableChange?: unknown; + timeout?: number; +} + +export interface AttributeReportRecord { + attributeIdentifier: number; + attribute: AnyType; +} + +export interface DiscoverAtttributesResponseRecord { + attributeIdentifier: number; + attributeType: number; +} + +export interface ReadStructuredRecord { + attributeIdentifier: number; + index: number; +} + +export interface WriteStructuredRecord { + attributeIdentifier: number; + selector: number; + attribute: AnyType; +} + +export interface WriteStructuredResponseRecord { + status: number; + attributeIdentifier?: number; + selector?: number; +} + +export interface DiscoverAtttributesExtendedResponseRecord { + attributeIdentifier: number; + accessControl: number; +} + +/** + * @cluster Basic + * @type enum8 + */ +export enum PowerSource { + Unknown = 0x00, + SinglePhaseMains = 0x01, + ThreePhaseMains = 0x02, + Battery = 0x03, + Dcsource = 0x04, + EmergencyMainsConstantlyPowered = 0x05, + EmergencyMainsAndTransferSwitch = 0x06, + UnknownWithBatteryBackup = 0x80, + SinglePhaseMainsWithBatteryBackup = 0x81, + ThreePhaseMainsWithBatteryBackup = 0x82, + BatteryWithBatteryBackup = 0x83, + DcsourceWithBatteryBackup = 0x84, + EmergencyMainsConstantlyPoweredWithBatteryBackup = 0x85, + EmergencyMainsAndTransferSwitchWithBatteryBackup = 0x86, +} + +/** + * @cluster Basic + * @type enum8 + */ +export enum GenericDeviceClass { + Lighting = 0x00, +} + +/** + * @cluster Basic + * @type enum8 + */ +export enum GenericDeviceType { + Incandescent = 0x00, + SpotlightHalogen = 0x01, + HalogenBulb = 0x02, + Cfl = 0x03, + LinearFluorescent = 0x04, + Ledbulb = 0x05, + SpotlightLed = 0x06, + Ledstrip = 0x07, + Ledtube = 0x08, + GenericIndoorLuminaireOrLightFixture = 0x09, + GenericOutdoorLuminaireOrLightFixture = 0x0a, + PendantLuminaireOrLightFixture = 0x0b, + FloorStandingLuminaireOrLightFixture = 0x0c, + GenericController = 0xe0, + WallSwitch = 0xe1, + PortableRemoteController = 0xe2, + MotionSensorOrLightSensor = 0xe3, + GenericActuator = 0xf0, + WallSocket = 0xf1, + GatewayOrBridge = 0xf2, + PlugInUnit = 0xf3, + RetrofitActuator = 0xf4, + Unspecified = 0xff, +} + +/** + * @cluster Basic + * @type enum8 + */ +export enum PhysicalEnvironment { + UnspecifiedEnvironment = 0x00, + Deprecated = 0x01, + Bar = 0x02, + Courtyard = 0x03, + Bathroom = 0x04, + Bedroom = 0x05, + BilliardRoom = 0x06, + UtilityRoom = 0x07, + Cellar = 0x08, + StorageCloset = 0x09, + Theater = 0x0a, + Office = 0x0b, + Deck = 0x0c, + Den = 0x0d, + DiningRoom = 0x0e, + ElectricalRoom = 0x0f, + Elevator = 0x10, + Entry = 0x11, + FamilyRoom = 0x12, + MainFloor = 0x13, + Upstairs = 0x14, + Downstairs = 0x15, + BasementLowerLevel = 0x16, + Gallery = 0x17, + GameRoom = 0x18, + Garage = 0x19, + Gym = 0x1a, + Hallway = 0x1b, + House = 0x1c, + Kitchen = 0x1d, + LaundryRoom = 0x1e, + Library = 0x1f, + MasterBedroom = 0x20, + MudRoom = 0x21, + Nursery = 0x22, + Pantry = 0x23, + Office2 = 0x24, + Outside = 0x25, + Pool = 0x26, + Porch = 0x27, + SewingRoom = 0x28, + SittingRoom = 0x29, + Stairway = 0x2a, + Yard = 0x2b, + Attic = 0x2c, + HotTub = 0x2d, + LivingRoom = 0x2e, + Sauna = 0x2f, + ShopOrWorkshop = 0x30, + GuestBedroom = 0x31, + GuestBath = 0x32, + PowderRoom = 0x33, + BackYard = 0x34, + FrontYard = 0x35, + Patio = 0x36, + Driveway = 0x37, + SunRoom = 0x38, + LivingRoom2 = 0x39, + Spa = 0x3a, + Whirlpool = 0x3b, + Shed = 0x3c, + EquipmentStorage = 0x3d, + HobbyOrCraftRoom = 0x3e, + Fountain = 0x3f, + Pond = 0x40, + ReceptionRoom = 0x41, + BreakfastRoom = 0x42, + Nook = 0x43, + Garden = 0x44, + Balcony = 0x45, + PanicRoom = 0x46, + Terrace = 0x47, + Roof = 0x48, + Toilet = 0x49, + ToiletMain = 0x4a, + OutsideToilet = 0x4b, + ShowerRoom = 0x4c, + Study = 0x4d, + FrontGarden = 0x4e, + BackGarden = 0x4f, + Kettle = 0x50, + Television = 0x51, + Stove = 0x52, + Microwave = 0x53, + Toaster = 0x54, + Vacuum = 0x55, + Appliance = 0x56, + FrontDoor = 0x57, + BackDoor = 0x58, + FridgeDoor = 0x59, + MedicationCabinetDoor = 0x60, + WardrobeDoor = 0x61, + FrontCupboardDoor = 0x62, + OtherDoor = 0x63, + WaitingRoom = 0x64, + TriageRoom = 0x65, + DoctorsOffice = 0x66, + PatientsPrivateRoom = 0x67, + ConsultationRoom = 0x68, + NurseStation = 0x69, + Ward = 0x6a, + Corridor = 0x6b, + OperatingTheatre = 0x6c, + DentalSurgeryRoom = 0x6d, + MedicalImagingRoom = 0x6e, + DecontaminationRoom = 0x6f, + Atrium = 0x70, + Mirror = 0x71, + UnknownEnvironment = 0xff, +} + +/** + * @cluster Basic + * @type map8 + */ +export enum AlarmMask { + GeneralHardwareFault = 0x01, + GeneralSoftwareFault = 0x02, +} + +/** + * @cluster Basic + */ +export enum AlarmShiftRight { + GeneralSoftwareFault = 0x01, +} + +/** + * @cluster Basic + * @type map8 + */ +export enum DisableLocalConfigMask { + DisableResetToFactoryDefaults = 0x01, + DisableDeviceConfiguration = 0x02, +} + +/** + * @cluster Basic + */ +export enum DisableLocalConfigShiftRight { + DisableDeviceConfiguration = 0x01, +} + +/** + * @cluster PowerConfiguration + * @type enum8 + */ +export enum BatterySize { + NoBattery = 0x00, + BuiltIn = 0x01, + Other = 0x02, + Aa = 0x03, + Aaa = 0x04, + C = 0x05, + D = 0x06, + Cr2 = 0x07, + Cr123a = 0x08, + Unknown = 0xff, +} + +/** + * @cluster PowerConfiguration + * @type map8 + */ +export enum BatteryAlarmMask { + BatteryVoltageTooLow = 0x01, + BatteryAlarm1 = 0x02, + BatteryAlarm2 = 0x04, + BatteryAlarm3 = 0x08, +} + +/** + * @cluster PowerConfiguration + */ +export enum BatteryAlarmShiftRight { + BatteryAlarm1 = 0x01, + BatteryAlarm2 = 0x02, + BatteryAlarm3 = 0x03, +} + +/** + * @cluster PowerConfiguration + * @type map32 + */ +export enum BatteryAlarmStateMask { + Battery1minThreshold = 0x01, + Battery1threshold1 = 0x02, + Battery1threshold2 = 0x04, + Battery1threshold3 = 0x08, + Battery2minThreshold = 0x400, + Battery2threshold1 = 0x800, + Battery2threshold2 = 0x1000, + Battery2threshold3 = 0x2000, + Battery3minThreshold = 0x100000, + Battery3threshold1 = 0x200000, + Battery3threshold2 = 0x400000, + Battery3threshold3 = 0x800000, + MainsPowerSupplyLost = 0x40000000, +} + +/** + * @cluster PowerConfiguration + */ +export enum BatteryAlarmStateShiftRight { + Battery1threshold1 = 0x01, + Battery1threshold2 = 0x02, + Battery1threshold3 = 0x03, + Battery2minThreshold = 0x10, + Battery2threshold1 = 0x11, + Battery2threshold2 = 0x12, + Battery2threshold3 = 0x13, + Battery3minThreshold = 0x20, + Battery3threshold1 = 0x21, + Battery3threshold2 = 0x22, + Battery3threshold3 = 0x23, + MainsPowerSupplyLost = 0x30, +} + +/** + * @cluster PowerConfiguration + * @type map8 + */ +export enum MainsAlarmMask { + MainsVoltageTooLow = 0x01, + MainsVoltageTooHigh = 0x02, + MainsPowerSupplyLost = 0x04, +} + +/** + * @cluster PowerConfiguration + */ +export enum MainsAlarmShiftRight { + MainsVoltageTooHigh = 0x01, + MainsPowerSupplyLost = 0x02, +} + +/** + * @cluster DeviceTemperatureConfiguration + * @type map8 + */ +export enum DeviceTempAlarmMask { + DeviceTemperatureTooLow = 0x01, + DeviceTemperatureTooHigh = 0x02, +} + +/** + * @cluster DeviceTemperatureConfiguration + */ +export enum DeviceTempAlarmShiftRight { + DeviceTemperatureTooHigh = 0x01, +} + +/** + * @cluster Identify + * @type uint8 + */ +export enum EffectIdentifier { + Blink = 0x00, + Breathe = 0x01, + Okay = 0x02, + ChannelChange = 0x0b, + FinishEffect = 0xfe, + StopEffect = 0xff, +} + +/** + * @cluster Identify + * @type uint8 + */ +export enum EffectVariant { + Default = 0x00, +} + +/** + * @cluster Groups + * @type map8 + */ +export enum NameSupportMask { + Supported = 0x80, +} + +/** + * @cluster Groups + */ +export enum NameSupportShiftRight { + Supported = 0x07, +} + +/** + * @cluster Scenes + */ +export interface SExtensionFieldSetList { + clusterId: number; + extensionFieldSet: string; +} + +/** + * @cluster Scenes + * @type uint8 + */ +export enum ModeMask { + CopyAllScenes = 0x01, +} + +/** + * @cluster OnOff + * @type enum8 + */ +export enum StartUpOnOff { + SetOnOffTo0 = 0x00, + SetOnOffTo1 = 0x01, + TogglePreviousOnOff = 0x02, + SetPreviousOnOff = 0xff, +} + +/** + * @cluster OnOff + * @type uint8 + */ +export enum OnOffControlMask { + AcceptOnlyWhenOn = 0x01, +} + +/** + * @cluster Level + * @type map8 + */ +export enum LevelOptionsMask { + ExecuteIfOff = 0x01, + CoupleColorTempToLevel = 0x02, +} + +/** + * @cluster Level + */ +export enum LevelOptionsShiftRight { + CoupleColorTempToLevel = 0x01, +} + +/** + * @cluster Level + * @type enum8 + */ +export enum MoveStepMode { + Up = 0x00, + Down = 0x01, +} + +/** + * @cluster Time + * @type map8 + */ +export enum TimeStatusMask { + Master = 0x01, + Synchronized = 0x02, + MasterZoneDst = 0x04, + Superseding = 0x08, +} + +/** + * @cluster Time + */ +export enum TimeStatusShiftRight { + Synchronized = 0x01, + MasterZoneDst = 0x02, + Superseding = 0x03, +} + +/** + * @cluster IlluminanceMeasurement + * @type enum8 + */ +export enum LightSensorType { + Photodiode = 0x00, + Cmos = 0x01, + Unknown = 0xff, +} + +/** + * @cluster IlluminanceLevelSensing + * @type enum8 + */ +export enum LevelStatus { + IlluminanceOnTarget = 0x00, + IlluminanceBelowTarget = 0x01, + IlluminanceAboveTarget = 0x02, +} + +/** + * @cluster OccupancySensing + * @type map8 + */ +export enum OccupancyMask { + SensedOccupancy = 0x01, +} + +/** + * @cluster OccupancySensing + * @type enum8 + */ +export enum OccupancySensorType { + Pir = 0x00, + Ultrasonic = 0x01, + PirandUltrasonic = 0x02, + PhysicalContact = 0x03, +} + +/** + * @cluster OccupancySensing + * @type map8 + */ +export enum OccupancySensorTypeBitmapMask { + Pir = 0x01, + Ultrasonic = 0x02, + PhysicalContact = 0x04, +} + +/** + * @cluster OccupancySensing + */ +export enum OccupancySensorTypeBitmapShiftRight { + Ultrasonic = 0x01, + PhysicalContact = 0x02, +} + +/** + * @cluster ElectricalMeasurement + * @type map32 + */ +export enum MeasurementTypeMask { + ActiveMeasurementAc = 0x01, + ReactiveMeasurementAc = 0x02, + ApparentMeasurementAc = 0x04, + PhaseAmeasurement = 0x08, + PhaseBmeasurement = 0x10, + PhaseCmeasurement = 0x20, + Dcmeasurement = 0x40, + HarmonicsMeasurement = 0x80, + PowerQualityMeasurement = 0x100, +} + +/** + * @cluster ElectricalMeasurement + */ +export enum MeasurementTypeShiftRight { + ReactiveMeasurementAc = 0x01, + ApparentMeasurementAc = 0x02, + PhaseAmeasurement = 0x03, + PhaseBmeasurement = 0x04, + PhaseCmeasurement = 0x05, + Dcmeasurement = 0x06, + HarmonicsMeasurement = 0x07, + PowerQualityMeasurement = 0x08, +} + +/** + * @cluster ElectricalMeasurement + * @type map8 + */ +export enum DCOverloadAlarmsMask { + VoltageOverload = 0x01, + CurrentOverload = 0x02, +} + +/** + * @cluster ElectricalMeasurement + */ +export enum DCOverloadAlarmsShiftRight { + CurrentOverload = 0x01, +} + +/** + * @cluster ElectricalMeasurement + * @type map16 + */ +export enum ACAlarmsMask { + VoltageOverload = 0x0001, + CurrentOverload = 0x0002, + ActivePowerOverload = 0x0004, + ReactivePowerOverload = 0x0008, + AverageRmsoverVoltage = 0x0010, + AverageRmsunderVoltage = 0x0020, + RmsextremeOverVoltage = 0x0040, + RmsextremeUnderVoltage = 0x0080, + RmsvoltageSag = 0x0100, + RmsvoltageSwell = 0x0200, +} + +/** + * @cluster ElectricalMeasurement + */ +export enum ACAlarmsShiftRight { + CurrentOverload = 0x01, + ActivePowerOverload = 0x02, + ReactivePowerOverload = 0x03, + AverageRmsoverVoltage = 0x04, + AverageRmsunderVoltage = 0x05, + RmsextremeOverVoltage = 0x06, + RmsextremeUnderVoltage = 0x07, + RmsvoltageSag = 0x08, + RmsvoltageSwell = 0x09, +} + +/** + * @cluster ElectricalMeasurement + * @type enum8 + */ +export enum Status { + Success = 0x00, + AttributeProfileNotSupported = 0x01, + InvalidStartTime = 0x02, + MoreIntervalsRequestedThanCanBeReturned = 0x03, + NoIntervalsAvailableForTheRequestedTime = 0x04, +} + +/** + * @cluster ColorControl + * @type map8 + */ +export enum CCColorOptionsMask { + ExecuteIfOff = 0x01, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum ColorControlDirection { + ShortestDistance = 0x00, + LongestDistance = 0x01, + Up = 0x02, + Down = 0x03, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum ColorControlMoveMode { + Stop = 0x00, + Up = 0x01, + Down = 0x03, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum ColorControlStepMode { + Up = 0x01, + Down = 0x03, +} + +/** + * @cluster ColorControl + * @type uint8 + */ +export enum ColorControlColorLoopDirection { + DecrementEnhancedCurrentHue = 0x00, + IncrementEnhancedCurrentHue = 0x01, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum DriftCompensation { + None = 0x00, + OtherOrUnknown = 0x01, + TemperatureMonitoring = 0x02, + OpticalLuminanceMonitoringAndFeedback = 0x03, + OpticalColorMonitoringAndFeedback = 0x04, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum ColorMode { + CurrentHueAndCurrentSaturation = 0x00, + CurrentXandCurrentY = 0x01, + ColorTemperatureMireds = 0x02, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum EnhancedColorMode { + CurrentHueAndCurrentSaturation = 0x00, + CurrentXandCurrentY = 0x01, + ColorTemperatureMireds = 0x02, + EnhancedCurrentHueAndCurrentSaturation = 0x03, +} + +/** + * @cluster ColorControl + * @type uint8 + */ +export enum ColorLoopActive { + ColorLoopInactive = 0x00, + ColorLoopActive = 0x01, +} + +/** + * @cluster ColorControl + * @type map16 + */ +export enum ColorCapabilitiesMask { + HueSaturationSupported = 0x0001, + EnhancedHueSupported = 0x0002, + ColorLoopSupported = 0x0004, + Xysupported = 0x0008, + ColorTemperatureSupported = 0x0010, +} + +/** + * @cluster ColorControl + */ +export enum ColorCapabilitiesShiftRight { + EnhancedHueSupported = 0x01, + ColorLoopSupported = 0x02, + Xysupported = 0x03, + ColorTemperatureSupported = 0x04, +} + +/** + * @cluster ColorControl + * @type map8 + */ +export enum UpdateFlagsMask { + UpdateAction = 0x01, + UpdateDirection = 0x02, + UpdateTime = 0x04, + UpdateStartHue = 0x08, +} + +/** + * @cluster ColorControl + */ +export enum UpdateFlagsShiftRight { + UpdateDirection = 0x01, + UpdateTime = 0x02, + UpdateStartHue = 0x03, +} + +/** + * @cluster ColorControl + * @type enum8 + */ +export enum Action { + DeactivateColorLoop = 0x00, + ActivateColorLoopFromColorLoopStartEnhancedHue = 0x01, + ActivateColorLoopFromEnhancedCurrentHue = 0x02, +} + +/** + * @cluster BallastConfiguration + * @type map8 + */ +export enum BallastStatusMask { + BallastNonOperational = 0x01, + LampFailure = 0x02, +} + +/** + * @cluster BallastConfiguration + */ +export enum BallastStatusShiftRight { + LampFailure = 0x01, +} + +/** + * @cluster BallastConfiguration + * @type map8 + */ +export enum LampAlarmModeMask { + LampBurnHours = 0x01, +} + +/** + * @cluster PumpConfigurationAndControl + * @type enum8 + */ +export enum PumpOperationMode { + Normal = 0x00, + Minimum = 0x01, + Maximum = 0x02, + Local = 0x03, +} + +/** + * @cluster PumpConfigurationAndControl + * @type enum8 + */ +export enum PumpControlMode { + ConstantSpeed = 0x00, + ConstantPressure = 0x01, + ProportionalPressure = 0x02, + ConstantFlow = 0x03, + ConstantTemperature = 0x05, + Automatic = 0x07, +} + +/** + * @cluster PumpConfigurationAndControl + * @type map16 + */ +export enum PumpStatusMask { + DeviceFault = 0x0001, + SupplyFault = 0x0002, + SpeedLow = 0x0004, + SpeedHigh = 0x0008, + LocalOverride = 0x0010, + Running = 0x0020, + RemotePressure = 0x0040, + RemoteFlow = 0x0080, + RemoteTemperature = 0x0100, +} + +/** + * @cluster PumpConfigurationAndControl + */ +export enum PumpStatusShiftRight { + SupplyFault = 0x01, + SpeedLow = 0x02, + SpeedHigh = 0x03, + LocalOverride = 0x04, + Running = 0x05, + RemotePressure = 0x06, + RemoteFlow = 0x07, + RemoteTemperature = 0x08, +} + +/** + * @cluster Thermostat + */ +export interface TransitionType { + transitionTime: number; + heatSetPoint?: number; + coolSetPoint?: number; +} + +/** + * @cluster Thermostat + * @type map8 + */ +export enum TstatScheduleDOWMask { + Sunday = 0x01, + Monday = 0x02, + Tuesday = 0x04, + Wednesday = 0x08, + Thursday = 0x10, + Friday = 0x20, + Saturday = 0x40, + AwayOrVacation = 0x80, +} + +/** + * @cluster Thermostat + */ +export enum TstatScheduleDOWShiftRight { + Monday = 0x01, + Tuesday = 0x02, + Wednesday = 0x03, + Thursday = 0x04, + Friday = 0x05, + Saturday = 0x06, + AwayOrVacation = 0x07, +} + +/** + * @cluster Thermostat + * @type map8 + */ +export enum TstatScheduleModeMask { + Heat = 0x01, + Cool = 0x02, +} + +/** + * @cluster Thermostat + */ +export enum TstatScheduleModeShiftRight { + Cool = 0x01, +} + +/** + * @cluster Thermostat + * @type map8 + */ +export enum HVACSystemTypeConfigurationMask { + CoolingSystemStage = 0x03, + HeatingSystemStage = 0x0c, + HeatingSystemType = 0x10, + HeatingFuelSource = 0x20, +} + +/** + * @cluster Thermostat + */ +export enum HVACSystemTypeConfigurationShiftRight { + HeatingSystemStage = 0x02, + HeatingSystemType = 0x04, + HeatingFuelSource = 0x05, +} + +/** + * @cluster Thermostat + * @type map8 + */ +export enum RemoteSensingMask { + LocalTemperatureRemote = 0x01, + OutdoorTemperatureRemote = 0x02, + OccupancyRemote = 0x04, +} + +/** + * @cluster Thermostat + */ +export enum RemoteSensingShiftRight { + OutdoorTemperatureRemote = 0x01, + OccupancyRemote = 0x02, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ControlSequenceOfOperation { + CoolingOnly = 0x00, + CoolingWithReheat = 0x01, + HeatingOnly = 0x02, + HeatingWithReheat = 0x03, + CoolingAndHeating4pipes = 0x04, + CoolingAndHeating4pipesWithReheat = 0x05, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum SystemMode { + Off = 0x00, + Auto = 0x01, + Cool = 0x03, + Heat = 0x04, + EmergencyHeating = 0x05, + Precooling = 0x06, + FanOnly = 0x07, + Dry = 0x08, + Sleep = 0x09, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ThermostatRunningMode { + Off = 0x00, + Cool = 0x03, + Heat = 0x04, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum StartOfWeek { + Sunday = 0x00, + Monday = 0x01, + Tuesday = 0x02, + Wednesday = 0x03, + Thursday = 0x04, + Friday = 0x05, + Sunday2 = 0x06, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum TemperatureSetpointHold { + SetpointHoldOff = 0x00, + SetpointHoldOn = 0x01, +} + +/** + * @cluster Thermostat + * @type map8 + */ +export enum ThermostatProgrammingOperationModeMask { + ProgrammingMode = 0x01, + AutoOrRecovery = 0x02, + EconomyOrEnergyStar = 0x04, +} + +/** + * @cluster Thermostat + */ +export enum ThermostatProgrammingOperationModeShiftRight { + AutoOrRecovery = 0x01, + EconomyOrEnergyStar = 0x02, +} + +/** + * @cluster Thermostat + * @type map16 + */ +export enum ThermostatRunningStateMask { + HeatOn = 0x0001, + CoolOn = 0x0002, + FanOn = 0x0004, + HeatSecondStageOn = 0x0008, + CoolSecondStageOn = 0x0010, + FanSecondStageOn = 0x0020, + FanThirdStageOn = 0x0040, +} + +/** + * @cluster Thermostat + */ +export enum ThermostatRunningStateShiftRight { + CoolOn = 0x01, + FanOn = 0x02, + HeatSecondStageOn = 0x03, + CoolSecondStageOn = 0x04, + FanSecondStageOn = 0x05, + FanThirdStageOn = 0x06, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum SetpointChangeSource { + Manual = 0x00, + ScheduleOrInternalProgramming = 0x01, + External = 0x02, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ACType { + CoolingAndFixedSpeed = 0x01, + HeatPumpAndFixedSpeed = 0x02, + CoolingAndInverter = 0x03, + HeatPumpAndInverter = 0x04, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ACRefrigerantType { + R22 = 0x01, + R410a = 0x02, + R407c = 0x03, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ACCompressorType { + T1 = 0x01, + T2 = 0x02, + T3 = 0x03, +} + +/** + * @cluster Thermostat + * @type map32 + */ +export enum ACErrorCodeMask { + CompressorFailureOrRefrigerantLeakage = 0x01, + RoomTemperatureSensorFailure = 0x02, + OutdoorTemperatureSensorFailure = 0x04, + IndoorCoilTemperatureSensorFailure = 0x08, + FanFailure = 0x10, +} + +/** + * @cluster Thermostat + */ +export enum ACErrorCodeShiftRight { + RoomTemperatureSensorFailure = 0x01, + OutdoorTemperatureSensorFailure = 0x02, + IndoorCoilTemperatureSensorFailure = 0x03, + FanFailure = 0x04, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ACLouverPosition { + FullyClosed = 0x01, + FullyOpen = 0x02, + QuarterOpen = 0x03, + HalfOpen = 0x04, + ThreeQuartersOpen = 0x05, +} + +/** + * @cluster Thermostat + * @type enum8 + */ +export enum ACCapacityFormat { + Btuh = 0x00, +} + +/** + * @cluster FanControl + * @type enum8 + */ +export enum FanMode { + Off = 0x00, + Low = 0x01, + Medium = 0x02, + High = 0x03, + On = 0x04, + Auto = 0x05, + Smart = 0x06, +} + +/** + * @cluster FanControl + * @type enum8 + */ +export enum FanModeSequence { + LowMedHigh = 0x00, + LowHigh = 0x01, + LowMedHighAuto = 0x02, + LowHighAuto = 0x03, + OnAuto = 0x04, +} + +/** + * @cluster DehumidificationControl + * @type enum8 + */ +export enum RelativeHumidityMode { + MeasuredLocally = 0x00, + UpdatedOverTheNetwork = 0x01, +} + +/** + * @cluster DehumidificationControl + * @type enum8 + */ +export enum DehumidificationLockout { + DehumidificationNotAllowed = 0x00, + DehumidificationAllowed = 0x01, +} + +/** + * @cluster DehumidificationControl + * @type enum8 + */ +export enum RelativeHumidityDisplay { + NotDisplayed = 0x00, + Displayed = 0x01, +} + +/** + * @cluster ThermostatUserInterfaceConfiguration + * @type enum8 + */ +export enum TemperatureDisplayMode { + Celsius = 0x00, + Fahrenheit = 0x01, +} + +/** + * @cluster ThermostatUserInterfaceConfiguration + * @type enum8 + */ +export enum KeypadLockout { + None = 0x00, + Level1 = 0x01, + Level2 = 0x02, + Level3 = 0x03, + Level4 = 0x04, + Level5 = 0x05, +} + +/** + * @cluster ThermostatUserInterfaceConfiguration + * @type enum8 + */ +export enum ScheduleProgrammingVisibility { + LocalEnabled = 0x00, + LocalDisabled = 0x01, +} + +/** + * @cluster ShadeConfiguration + * @type enum8 + */ +export enum SHDCFGDirection { + Closing = 0x00, + Opening = 0x01, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum DrlkUserStatus { + Available = 0x00, + OccupiedEnabled = 0x01, + OccupiedDisabled = 0x03, + NotSupported = 0xff, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum DrlkSettableUserStatus { + OccupiedEnabled = 0x01, + OccupiedDisabled = 0x03, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum DrlkUserType { + UnrestrictedUser = 0x00, + YearDayScheduleUser = 0x01, + WeekDayScheduleUser = 0x02, + MasterUser = 0x03, + NonAccessUser = 0x04, + NotSupported = 0xff, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum DrlkOperMode { + Normal = 0x00, + Vacation = 0x01, + Privacy = 0x02, + NoRflockOrUnlock = 0x03, + Passage = 0x04, +} + +/** + * @cluster DoorLock + * @type map8 + */ +export enum DrlkDaysMask { + Sun = 0x01, + Mon = 0x02, + Tue = 0x04, + Wed = 0x08, + Thu = 0x10, + Fri = 0x20, + Sat = 0x40, + Enable = 0x80, +} + +/** + * @cluster DoorLock + */ +export enum DrlkDaysShiftRight { + Mon = 0x01, + Tue = 0x02, + Wed = 0x03, + Thu = 0x04, + Fri = 0x05, + Sat = 0x06, + Enable = 0x07, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum DrlkPassFailStatus { + Pass = 0x00, + Fail = 0x01, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum DrlkSetCodeStatus { + Success = 0x00, + GeneralFailure = 0x01, + MemoryFull = 0x02, + DuplicateCode = 0x03, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum DrlkOperEventSource { + Keypad = 0x00, + Rf = 0x01, + Manual = 0x02, + Rfid = 0x03, + Indeterminate = 0xff, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum LockState { + NotFullyLocked = 0x00, + Locked = 0x01, + Unlocked = 0x02, + Undefined = 0xff, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum LockType { + DeadBolt = 0x00, + Magnetic = 0x01, + Other = 0x02, + Mortise = 0x03, + Rim = 0x04, + LatchBolt = 0x05, + CylindricalLock = 0x06, + TubularLock = 0x07, + InterconnectedLock = 0x08, + DeadLatch = 0x09, + DoorFurniture = 0x0a, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum DoorState { + Open = 0x00, + Closed = 0x01, + ErrorJammed = 0x02, + ErrorForcedOpen = 0x03, + ErrorUnspecified = 0x04, + Undefined = 0xff, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum LEDSettings { + NeverUseLed = 0x00, + UseLedexceptForAccessAllowed = 0x01, + UseLedforAllEvents = 0x02, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum SoundVolume { + SilentMode = 0x00, + LowVolume = 0x01, + HighVolume = 0x02, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum SupportedOperatingModesMask { + NormalModeSupported = 0x0001, + VacationModeSupported = 0x0002, + PrivacyModeSupported = 0x0004, + NoRflockOrUnlockModeSupported = 0x0008, + PassageModeSupported = 0x0010, +} + +/** + * @cluster DoorLock + */ +export enum SupportedOperatingModesShiftRight { + VacationModeSupported = 0x01, + PrivacyModeSupported = 0x02, + NoRflockOrUnlockModeSupported = 0x03, + PassageModeSupported = 0x04, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum DefaultConfigurationRegisterMask { + DefaultEnableLocalProgrammingAttributeIsEnabled = 0x0001, + DefaultKeypadInterfaceIsEnabled = 0x0002, + DefaultRfinterfaceIsEnabled = 0x0004, + DefaultSoundVolumeIsEnabled = 0x0020, + DefaultAutoRelockTimeIsEnabled = 0x0040, + DefaultLedsettingsIsEnabled = 0x0080, +} + +/** + * @cluster DoorLock + */ +export enum DefaultConfigurationRegisterShiftRight { + DefaultKeypadInterfaceIsEnabled = 0x01, + DefaultRfinterfaceIsEnabled = 0x02, + DefaultSoundVolumeIsEnabled = 0x05, + DefaultAutoRelockTimeIsEnabled = 0x06, + DefaultLedsettingsIsEnabled = 0x07, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum SecurityLevel { + Network = 0x00, + Aps = 0x01, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum KeypadOperationEventMask { + KeypadOpUnknownOrMs = 0x0001, + KeypadOpLock = 0x0002, + KeypadOpUnlock = 0x0004, + KeypadOpLockErrorInvalidPin = 0x0008, + KeypadOpLockErrorInvalidSchedule = 0x0010, + KeypadOpUnlockInvalidPin = 0x0020, + KeypadOpUnlockInvalidSchedule = 0x0040, + KeypadOpNonAccessUser = 0x0080, +} + +/** + * @cluster DoorLock + */ +export enum KeypadOperationEventShiftRight { + KeypadOpLock = 0x01, + KeypadOpUnlock = 0x02, + KeypadOpLockErrorInvalidPin = 0x03, + KeypadOpLockErrorInvalidSchedule = 0x04, + KeypadOpUnlockInvalidPin = 0x05, + KeypadOpUnlockInvalidSchedule = 0x06, + KeypadOpNonAccessUser = 0x07, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum RFOperationEventMask { + RfopUnknownOrMs = 0x0001, + RfopLock = 0x0002, + RfopUnlock = 0x0004, + RfopLockErrorInvalidCode = 0x0008, + RfopLockErrorInvalidSchedule = 0x0010, + RfopUnlockInvalidCode = 0x0020, + RfopUnlockInvalidSchedule = 0x0040, +} + +/** + * @cluster DoorLock + */ +export enum RFOperationEventShiftRight { + RfopLock = 0x01, + RfopUnlock = 0x02, + RfopLockErrorInvalidCode = 0x03, + RfopLockErrorInvalidSchedule = 0x04, + RfopUnlockInvalidCode = 0x05, + RfopUnlockInvalidSchedule = 0x06, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum ManualOperationEventMask { + ManualOpUnknownOrMs = 0x0001, + ManualOpThumbturnLock = 0x0002, + ManualOpThumbturnUnlock = 0x0004, + ManualOpOneTouchLock = 0x0008, + ManualOpKeyLock = 0x0010, + ManualOpKeyUnlock = 0x0020, + ManualOpAutoLock = 0x0040, + ManualOpScheduleLock = 0x0080, + ManualOpScheduleUnlock = 0x0100, + ManualOpLock = 0x0200, + ManualOpUnlock = 0x0400, +} + +/** + * @cluster DoorLock + */ +export enum ManualOperationEventShiftRight { + ManualOpThumbturnLock = 0x01, + ManualOpThumbturnUnlock = 0x02, + ManualOpOneTouchLock = 0x03, + ManualOpKeyLock = 0x04, + ManualOpKeyUnlock = 0x05, + ManualOpAutoLock = 0x06, + ManualOpScheduleLock = 0x07, + ManualOpScheduleUnlock = 0x08, + ManualOpLock = 0x09, + ManualOpUnlock = 0x10, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum RFIDOperationEventMask { + RfidopUnknownOrMs = 0x0001, + RfidopLock = 0x0002, + RfidopUnlock = 0x0004, + RfidopLockErrorInvalidRfid = 0x0008, + RfidopLockErrorInvalidSchedule = 0x0010, + RfidopUnlockErrorInvalidRfid = 0x0020, + RfidopUnlockErrorInvalidSchedule = 0x0040, +} + +/** + * @cluster DoorLock + */ +export enum RFIDOperationEventShiftRight { + RfidopLock = 0x01, + RfidopUnlock = 0x02, + RfidopLockErrorInvalidRfid = 0x03, + RfidopLockErrorInvalidSchedule = 0x04, + RfidopUnlockErrorInvalidRfid = 0x05, + RfidopUnlockErrorInvalidSchedule = 0x06, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum KeypadProgrammingEventMask { + KeypadProgUnknownOrMs = 0x0001, + KeypadProgMasterCodeChanged = 0x0002, + KeypadProgPinadded = 0x0004, + KeypadProgPindeleted = 0x0008, + KeypadProgPinchanged = 0x0010, +} + +/** + * @cluster DoorLock + */ +export enum KeypadProgrammingEventShiftRight { + KeypadProgMasterCodeChanged = 0x01, + KeypadProgPinadded = 0x02, + KeypadProgPindeleted = 0x03, + KeypadProgPinchanged = 0x04, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum RFProgrammingEventMask { + RfprogUnknownOrMs = 0x0001, + RfprogPinadded = 0x0004, + RfprogPindeleted = 0x0008, + RfprogPinchanged = 0x0010, + RfprogRfidadded = 0x0020, + RfprogRfiddeleted = 0x0040, +} + +/** + * @cluster DoorLock + */ +export enum RFProgrammingEventShiftRight { + RfprogPinadded = 0x02, + RfprogPindeleted = 0x03, + RfprogPinchanged = 0x04, + RfprogRfidadded = 0x05, + RfprogRfiddeleted = 0x06, +} + +/** + * @cluster DoorLock + * @type map16 + */ +export enum RFIDProgrammingEventMask { + RfidprogUnknownOrMs = 0x0001, + RfidprogRfidadded = 0x0020, + RfidprogRfiddeleted = 0x0040, +} + +/** + * @cluster DoorLock + */ +export enum RFIDProgrammingEventShiftRight { + RfidprogRfidadded = 0x05, + RfidprogRfiddeleted = 0x06, +} + +/** + * @cluster DoorLock + * @type enum8 + */ +export enum EventType { + Operation = 0x00, + Programming = 0x01, + Alarm = 0x02, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum OperationEventCode { + UnknownOrMs = 0x00, + Lock = 0x01, + Unlock = 0x02, + LockFailureInvalidPinorId = 0x03, + LockFailureInvalidSchedule = 0x04, + UnlockFailureInvalidPinorId = 0x05, + UnlockFailureInvalidSchedule = 0x06, + OneTouchLock = 0x07, + KeyLock = 0x08, + KeyUnlock = 0x09, + AutoLock = 0x0a, + ScheduleLock = 0x0b, + ScheduleUnlock = 0x0c, + ManualLock = 0x0d, + ManualUnlock = 0x0e, + NonAccessUserOperationalEvent = 0x0e, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum ProgramEventSource { + Keypad = 0x00, + Rf = 0x01, + Rfid = 0x03, + Indeterminate = 0xff, +} + +/** + * @cluster DoorLock + * @type uint8 + */ +export enum ProgramEventCode { + UnknownOrMs = 0x00, + MasterCodeChanged = 0x01, + PincodeAdded = 0x02, + PincodeDeleted = 0x03, + PincodeChanged = 0x04, + RfidcodeAdded = 0x05, + RfidcodeDeleted = 0x06, +} + +/** + * @cluster WindowCovering + * @type enum8 + */ +export enum WindowCoveringType { + Rollershade = 0x00, + Rollershade2motor = 0x01, + RollershadeExterior = 0x02, + RollershadeExterior2motor = 0x03, + Drapery = 0x04, + Awning = 0x05, + Shutter = 0x06, + TiltBlindTiltOnly = 0x07, + TiltBlindLiftAndTilt = 0x08, + ProjectorScreen = 0x09, +} + +/** + * @cluster WindowCovering + * @type map8 + */ +export enum ConfigOrStatusMask { + Operational = 0x01, + Online = 0x02, + OpenAndUpCommandsReversed = 0x04, + LiftClosedLoop = 0x08, + TiltClosedLoop = 0x10, + LiftEncoderControlled = 0x20, + TiltEncoderControlled = 0x40, +} + +/** + * @cluster WindowCovering + */ +export enum ConfigOrStatusShiftRight { + Online = 0x01, + OpenAndUpCommandsReversed = 0x02, + LiftClosedLoop = 0x03, + TiltClosedLoop = 0x04, + LiftEncoderControlled = 0x05, + TiltEncoderControlled = 0x06, +} + +/** + * @cluster BarrierControl + * @type enum8 + */ +export enum MovingState { + Stopped = 0x00, + Closing = 0x01, + Opening = 0x02, +} + +/** + * @cluster BarrierControl + * @type map16 + */ +export enum SafetyStatusMask { + RemoteLockout = 0x0001, + TamperDetected = 0x0002, + FailedCommunication = 0x0004, + PositionFailure = 0x0008, +} + +/** + * @cluster BarrierControl + */ +export enum SafetyStatusShiftRight { + TamperDetected = 0x01, + FailedCommunication = 0x02, + PositionFailure = 0x03, +} + +/** + * @cluster BarrierControl + * @type map8 + */ +export enum CapabilitiesMask { + PartialBarrier = 0x01, +} + +/** + * @cluster IASZone + * @type enum8 + */ +export enum ZoneState { + NotEnrolled = 0x00, + Enrolled = 0x01, +} + +/** + * @cluster IASZone + * @type enum8 + */ +export enum EnrollResponseCode { + Success = 0x00, + NotSupported = 0x01, + NoEnrollPermit = 0x02, + TooManyZones = 0x03, +} + +/** + * @cluster IASACE + * @type enum8 + */ +export enum IasaceAudibleNotification { + Mute = 0x00, + DefaultSound = 0x01, +} + +/** + * @cluster IASACE + * @type enum8 + */ +export enum IasaceAlarmStatus { + NoAlarm = 0x00, + Burgler = 0x01, + Fire = 0x02, + Emergency = 0x03, + PolicePanic = 0x04, + FirePanic = 0x05, + EmergencyPanic = 0x06, +} + +/** + * @cluster IASACE + * @type enum8 + */ +export enum IasacPanelStatus { + PanelDisarmedReadyToArm = 0x00, + ArmedStay = 0x01, + ArmedNight = 0x02, + ArmedAway = 0x03, + ExitDelay = 0x04, + EntryDelay = 0x05, + NotReadyToArm = 0x06, + InAlarm = 0x07, + ArmingStay = 0x08, + ArmingNight = 0x09, + ArmingAway = 0x0a, +} + +/** + * @cluster IASACE + */ +export interface IasaceZoneStatusRecord { + zoneID: number; + zoneStatus: number; +} + +/** + * @cluster IASACE + * @type enum8 + */ +export enum ArmMode { + Disarm = 0x00, + ArmDayHomeZonesOnly = 0x01, + ArmNightSleepZonesOnly = 0x02, + ArmAllZones = 0x03, +} + +/** + * @cluster IASACE + * @type enum8 + */ +export enum ArmNotification { + AllZonesDisarmed = 0x00, + OnlyDayHomeZonesArmed = 0x01, + OnlyNightSleepZonesArmed = 0x02, + AllZonesArmed = 0x03, + InvalidArmDisarmCode = 0x04, + NotReadyToArm = 0x05, + AlreadyDisarmed = 0x06, +} + +/** + * @cluster IASACE + * @type uint8 + */ +export enum ZoneIDBypassResult { + ZoneBypassed = 0x00, + ZoneNotBypassed = 0x01, + NotAllowed = 0x02, + InvalidZoneId = 0x03, + UnknownZoneId = 0x04, + InvalidArmDisarmCode = 0x05, +} + +/** + * @cluster IASWD + * @type enum8 + */ +export enum IaswdLevel { + LowLevel = 0x00, + MediumLevel = 0x01, + HighLevel = 0x02, + VeryHighLevel = 0x03, +} + +/** + * @cluster IASWD + * @type map8 + */ +export enum SirenConfigurationMask { + SirenLevel = 0x03, + Strobe = 0x0c, + WarningMode = 0xf0, +} + +/** + * @cluster IASWD + */ +export enum SirenConfigurationShiftRight { + SirenLevel = 0x00, + Strobe = 0x02, + WarningMode = 0x04, +} + +/** + * @cluster IASWD + * @type map8 + */ +export enum SquawkConfigurationMask { + SquawkLevel = 0x03, + SquawkStrobeActive = 0x08, + SquawkMode = 0xf0, +} + +/** + * @cluster IASWD + */ +export enum SquawkConfigurationShiftRight { + SquawkLevel = 0x00, + SquawkStrobeActive = 0x03, + SquawkMode = 0x04, +} + +/** + * @cluster Commissioning + * @type uint8 + */ +export enum ProtocolVersion { + Zigbee2006orLater = 0x02, +} + +/** + * @cluster Commissioning + * @type uint8 + */ +export enum StackProfile { + ZigbeeStackProfile = 0x01, + ZigbeeProStackProfile = 0x02, +} + +/** + * @cluster Commissioning + * @type enum8 + */ +export enum StartupControl { + OnAnetwork = 0x00, + FormNetwork = 0x01, + RejoinNetwork = 0x02, + JoinUsingMacassociation = 0x03, +} + +/** + * @cluster Commissioning + * @type enum8 + */ +export enum NetworkKeyType { + StandardKey = 0x01, +} + +/** + * @cluster Commissioning + * @type map8 + */ +export enum OptionsMask { + StartupMode = 0x07, + Immediate = 0x08, +} + +/** + * @cluster Commissioning + */ +export enum OptionsShiftRight { + Immediate = 0x03, +} + +/** + * @cluster TouchlinkCommissioning + * @type uint8 + */ +export enum TLKeyIndex { + DevelopmentKey = 0x00, + MasterKey = 0x04, + CertificationKey = 0x0f, +} + +/** + * @cluster TouchlinkCommissioning + * @type map8 + */ +export enum TLZigbeeInformationMask { + LogicalType = 0x03, + RxOnWhenIdle = 0x04, +} + +/** + * @cluster TouchlinkCommissioning + */ +export enum TLZigbeeInformationShiftRight { + RxOnWhenIdle = 0x02, +} + +/** + * @cluster TouchlinkCommissioning + * @type map8 + */ +export enum TLTouchlinkInformationMask { + FactoryNew = 0x01, + AddressAssignment = 0x02, + LinkInitiator = 0x10, + TouchlinkPriorityRequest = 0x20, + ProfileInterop = 0x80, +} + +/** + * @cluster TouchlinkCommissioning + */ +export enum TLTouchlinkInformationShiftRight { + AddressAssignment = 0x01, + LinkInitiator = 0x04, + TouchlinkPriorityRequest = 0x05, + ProfileInterop = 0x07, +} + +/** + * @cluster TouchlinkCommissioning + * @type uint8 + */ +export enum TLVersionMask { + ApplicationDeviceVersion = 0x0f, +} + +/** + * @cluster TouchlinkCommissioning + */ +export interface TLDeviceInformationRecord { + iEEEAddress: string; + endpointIdentifier: number; + profileIndentifier: number; + deviceIdentifier: number; + version: number; + groupIdentifierCount: number; + sort: number; +} + +/** + * @cluster TouchlinkCommissioning + * @type uint8 + */ +export enum TLStatus { + Success = 0x00, + Failure = 0x01, +} + +/** + * @cluster TouchlinkCommissioning + */ +export interface TLGroupInformationRecord { + groupIdentifier: number; + groupType: number; +} + +/** + * @cluster TouchlinkCommissioning + */ +export interface TLEndpointInformationRecord { + networkAddress: number; + endpointIdentifier: number; + profileIdentifier: number; + deviceIdentifier: number; + version: number; +} + +/** + * @cluster TouchlinkCommissioning + * @type map16 + */ +export enum KeyBitmaskMask { + DevelopmentKey = 0x0001, + MasterKey = 0x0010, + CertificationKey = 0x8000, +} + +/** + * @cluster TouchlinkCommissioning + */ +export enum KeyBitmaskShiftRight { + MasterKey = 0x04, + CertificationKey = 0x15, +} + +/** + * @cluster OTAUpgrade + * @type uint16 + */ +export enum OTADeviceSpecificImageType { + ClientSecurityCredentials = 0xffc0, + ClientConfiguration = 0xffc1, + ServerLog = 0xffc2, + Picture = 0xffc3, +} + +/** + * @cluster OTAUpgrade + * @type map8 + */ +export enum FieldControlMask { + HardwareVersionPresent = 0x01, +} + +/** + * @cluster OTAUpgrade + * @type enum8 + */ +export enum ImageUpgradeStatus { + Normal = 0x00, + DownloadInProgress = 0x01, + DownloadComplete = 0x02, + WaitingToUpgrade = 0x03, + CountDown = 0x04, + WaitForMore = 0x05, + WaitingToUpgradeViaExternalEvent = 0x06, +} + +/** + * @cluster OTAUpgrade + * @type enum8 + */ +export enum UpgradeActivationPolicy { + OtaserverActivationAllowed = 0x00, + OutOfBandActivationOnly = 0x01, +} + +/** + * @cluster OTAUpgrade + * @type enum8 + */ +export enum UpgradeTimeoutPolicy { + ApplyUpgradeAfterTimeout = 0x00, + DoNotApplyUpgradeAfterTimeout = 0x01, +} + +/** + * @cluster OTAUpgrade + * @type enum8 + */ +export enum PayloadType { + QueryJitter = 0x00, + QueryJitterAndManufacturerCode = 0x01, + QueryJitterManufacturerCodeAndImageType = 0x02, + QueryJitterManufacturerCodeImageTypeAndNewFileVersion = 0x03, +} + +/** ZCL non-values by type name (key of `ZclType`). */ +export const ZCL_TYPE_INVALID_BY_TYPE_NAME: Readonly> = { + Bool: 255, + Uint8: 255, + Uint16: 65535, + Uint24: 16777215, + Uint32: 4294967295, + Uint40: 1099511627775, + Uint48: 281474976710655, + Uint56: 72057594037927935n, + Uint64: 18446744073709551615n, + Int8: -128, + Int16: -32768, + Int24: -8388608, + Int32: -2147483648, + Int40: -549755813888, + Int48: -140737488355328, + Int56: -36028797018963968n, + Int64: -9223372036854775808n, + Enum8: 255, + Enum16: 65535, + ToD: 4294967295, + Date: 4294967295, + Utc: 4294967295, + ClusterId: 65535, + AttribId: 65535, + BacOid: 4294967295, +}; + +/** ZCL non-values by type ID (value of `ZclType`). */ +export const ZCL_TYPE_INVALID_BY_TYPE: Readonly> = { + /** Bool */ + 16: 255, + /** Uint8 */ + 32: 255, + /** Uint16 */ + 33: 65535, + /** Uint24 */ + 34: 16777215, + /** Uint32 */ + 35: 4294967295, + /** Uint40 */ + 36: 1099511627775, + /** Uint48 */ + 37: 281474976710655, + /** Uint56 */ + 38: 72057594037927935n, + /** Uint64 */ + 39: 18446744073709551615n, + /** Int8 */ + 40: -128, + /** Int16 */ + 41: -32768, + /** Int24 */ + 42: -8388608, + /** Int32 */ + 43: -2147483648, + /** Int40 */ + 44: -549755813888, + /** Int48 */ + 45: -140737488355328, + /** Int56 */ + 46: -36028797018963968n, + /** Int64 */ + 47: -9223372036854775808n, + /** Enum8 */ + 48: 255, + /** Enum16 */ + 49: 65535, + /** ToD */ + 224: 4294967295, + /** Date */ + 225: 4294967295, + /** Utc */ + 226: 4294967295, + /** ClusterId */ + 232: 65535, + /** AttribId */ + 233: 65535, + /** BacOid */ + 234: 4294967295, +}; diff --git a/src/zspec/zcl/definition/foundation.ts b/src/zspec/zcl/definition/foundation.ts index 423c3e94ba..e8c465592b 100644 --- a/src/zspec/zcl/definition/foundation.ts +++ b/src/zspec/zcl/definition/foundation.ts @@ -39,7 +39,7 @@ export const Foundation: Readonly {} export interface ParameterDefinition extends Parameter { conditions?: ( @@ -180,10 +260,8 @@ export interface ParameterDefinition extends Parameter { )[]; } -export interface CommandDefinition { - ID: number; +export interface CommandDefinition extends Omit { parameters: readonly ParameterDefinition[]; - response?: number; } export interface Cluster { @@ -237,12 +315,17 @@ export type ClusterName = | "genMultistateOutput" | "genMultistateValue" | "genCommissioning" + | "piPartition" | "genOta" + | "powerProfile" + | "haApplianceControl" + | "pulseWidthModulation" | "genPollCtrl" | "greenPower" | "mobileDeviceCfg" | "neighborCleaning" | "nearestGateway" + | "keepAlive" | "closuresShadeCfg" | "closuresDoorLock" | "closuresWindowCovering" @@ -298,8 +381,6 @@ export type ClusterName = | "msSodium" | "pm25Measurement" | "msFormaldehyde" - | "pm1Measurement" - | "pm10Measurement" | "ssIasZone" | "ssIasAce" | "ssIasWd" @@ -325,14 +406,14 @@ export type ClusterName = | "piMultistateValueExt" | "pi11073ProtocolTunnel" | "piIso7818ProtocolTunnel" - | "piRetailTunnel" + | "retailTunnel" | "seMetering" - | "tunneling" + | "seTunneling" | "telecommunicationsInformation" | "telecommunicationsVoiceOverZigbee" | "telecommunicationsChatting" | "haApplianceIdentification" - | "haMeterIdentification" + | "seMeterIdentification" | "haApplianceEventsAlerts" | "haApplianceStatistics" | "haElectricalMeasurement" diff --git a/src/zspec/zcl/utils.ts b/src/zspec/zcl/utils.ts index 748b35e8f3..9c557dbb30 100644 --- a/src/zspec/zcl/utils.ts +++ b/src/zspec/zcl/utils.ts @@ -1,7 +1,8 @@ import {Clusters} from "./definition/cluster"; +import {ZCL_TYPE_INVALID_BY_TYPE} from "./definition/datatypes"; import {DataType, DataTypeClass} from "./definition/enums"; import {Foundation, type FoundationCommandName, type FoundationDefinition} from "./definition/foundation"; -import type {Attribute, Cluster, ClusterDefinition, ClusterName, Command, CustomClusters} from "./definition/tstype"; +import type {Attribute, Cluster, ClusterDefinition, ClusterName, Command, CustomClusters, Parameter} from "./definition/tstype"; const DATA_TYPE_CLASS_DISCRETE = [ DataType.DATA8, @@ -319,3 +320,151 @@ export function getFoundationCommand(id: number): FoundationDefinition { export function isFoundationDiscoverRsp(id: number): boolean { return FOUNDATION_DISCOVER_RSP_IDS.includes(id); } + +/** Check if value is equal to either min, max, minRef or maxRef */ +function isMinOrMax(entry: Attribute | Parameter, value: T): boolean { + if (value === entry.max || value === entry.min) { + return true; + } + + return false; +} + +function processRestrictions(entry: Attribute | Parameter, value: T): void { + if (entry.min !== undefined && (value as number) < entry.min) { + throw new Error(`${entry.name} requires min of ${entry.min}`); + } + + if (entry.minExcl !== undefined && (value as number) <= entry.minExcl) { + throw new Error(`${entry.name} requires min exclusive of ${entry.minExcl}`); + } + + if (entry.max !== undefined && (value as number) > entry.max) { + throw new Error(`${entry.name} requires max of ${entry.max}`); + } + + if (entry.maxExcl !== undefined && (value as number) >= entry.maxExcl) { + throw new Error(`${entry.name} requires max exclusive of ${entry.maxExcl}`); + } + + if (entry.length !== undefined && (value as string | unknown[] | Buffer).length !== entry.length) { + throw new Error(`${entry.name} requires length of ${entry.length}`); + } + + if (entry.minLen !== undefined && (value as string | unknown[] | Buffer).length < entry.minLen) { + throw new Error(`${entry.name} requires min length of ${entry.minLen}`); + } + + if (entry.maxLen !== undefined && (value as string | unknown[] | Buffer).length > entry.maxLen) { + throw new Error(`${entry.name} requires max length of ${entry.maxLen}`); + } +} + +export function processAttributeWrite(attribute: Attribute, value: T): T { + if (attribute.write !== true) { + throw new Error(`Attribute ${attribute.name} (${attribute.ID}) is not writable`); + } + + if (value == null) { + return attribute.default !== undefined ? (attribute.default as T) : value /* XXX: dangerous fallback */; + } + + // if default, always valid + if (attribute.default === value) { + return value; + } + + if (Number.isNaN(value)) { + if (attribute.default === undefined) { + const nonValue = ZCL_TYPE_INVALID_BY_TYPE[attribute.type]; + + if (nonValue === undefined) { + throw new Error(`Attribute ${attribute.name} (${attribute.ID}) does not have a default nor a non-value`); + } + + return nonValue as T; + } + + return attribute.default as T; + } + + processRestrictions(attribute, value); + + return value; +} + +export function processAttributePreRead(attribute: Attribute): void { + if (attribute.read === false) { + throw new Error(`Attribute ${attribute.name} (${attribute.ID}) is not readable`); + } +} + +export function processAttributePostRead(attribute: Attribute, value: T): T { + // should never happen? + if (value == null) { + return value; + } + + // if default, always valid + if (attribute.default === value) { + return value; + } + + // if type does not have an `invalid` (undefined) it won't match since value is checked above + if (value === ZCL_TYPE_INVALID_BY_TYPE[attribute.type]) { + // if value is same as max or min, ignore invalid sentinel + if (isMinOrMax(attribute, value)) { + return value; + } + + // return NaN for both number & bigint to keep logic consistent + return Number.NaN as T; + } + + processRestrictions(attribute, value); + + return value; +} + +export function processParameterWrite(parameter: Parameter, value: T): T { + // should never happen? + if (value == null) { + return value; + } + + if (Number.isNaN(value)) { + const nonValue = ZCL_TYPE_INVALID_BY_TYPE[parameter.type]; + + if (nonValue === undefined) { + throw new Error(`Parameter ${parameter.name} does not have a non-value`); + } + + return nonValue as T; + } + + processRestrictions(parameter, value); + + return value; +} + +export function processParameterRead(parameter: Parameter, value: T): T { + // should never happen? + if (value == null) { + return value; + } + + // if type does not have an `invalid` (undefined) it won't match since value is checked above + if (value === ZCL_TYPE_INVALID_BY_TYPE[parameter.type]) { + // if value is same as max or min, ignore invalid sentinel + if (isMinOrMax(parameter, value)) { + return value; + } + + // return NaN for both number & bigint to keep logic consistent + return Number.NaN as T; + } + + processRestrictions(parameter, value); + + return value; +} diff --git a/src/zspec/zcl/zclFrame.ts b/src/zspec/zcl/zclFrame.ts index 1336a27482..239d209adb 100644 --- a/src/zspec/zcl/zclFrame.ts +++ b/src/zspec/zcl/zclFrame.ts @@ -135,7 +135,9 @@ export class ZclFrame { throw new Error(`Parameter '${parameter.name}' is missing`); } - buffalo.write(parameter.type, this.payload[parameter.name], {}); + const valueToWrite = Utils.processParameterWrite(parameter, this.payload[parameter.name]); + + buffalo.write(parameter.type, valueToWrite, {}); } } @@ -195,7 +197,8 @@ export class ZclFrame { } try { - payload[parameter.name] = buffalo.read(parameter.type, options); + const valueToProcess = buffalo.read(parameter.type, options); + payload[parameter.name] = Utils.processParameterRead(parameter, valueToProcess); } catch (error) { throw new Error(`Cannot parse '${command.name}:${parameter.name}' (${(error as Error).message})`); } diff --git a/test/controller.test.ts b/test/controller.test.ts index 9bbb155849..d0844fe28c 100755 --- a/test/controller.test.ts +++ b/test/controller.test.ts @@ -756,12 +756,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(deepClone(mocksendZclFrameInterPANBroadcast.mock.calls[1][0])).toStrictEqual({ @@ -781,12 +778,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(mockRestoreChannelInterPAN).toHaveBeenCalledTimes(1); @@ -807,11 +801,9 @@ describe("Controller", () => { }, command: { ID: 6, - parameters: [ - {name: "transactionID", type: 35}, - {name: "duration", type: 33}, - ], + parameters: expect.any(Array), name: "identifyRequest", + required: true, }, }); expect(deepClone(mocksendZclFrameInterPANToIeeeAddr.mock.calls[1][0])).toStrictEqual({ @@ -828,7 +820,7 @@ describe("Controller", () => { commands: expect.any(Object), commandsResponse: expect.any(Object), }, - command: {ID: 7, parameters: [{name: "transactionID", type: 35}], name: "resetToFactoryNew"}, + command: {ID: 7, parameters: expect.any(Array), name: "resetToFactoryNew", required: true}, }); }); @@ -869,12 +861,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(deepClone(mocksendZclFrameInterPANBroadcast.mock.calls[1][0])).toStrictEqual({ @@ -894,12 +883,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(mockRestoreChannelInterPAN).toHaveBeenCalledTimes(1); @@ -954,12 +940,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(mockRestoreChannelInterPAN).toHaveBeenCalledTimes(1); @@ -980,11 +963,9 @@ describe("Controller", () => { }, command: { ID: 6, - parameters: [ - {name: "transactionID", type: 35}, - {name: "duration", type: 33}, - ], + parameters: expect.any(Array), name: "identifyRequest", + required: true, }, }); expect(deepClone(mocksendZclFrameInterPANToIeeeAddr.mock.calls[1][0])).toStrictEqual({ @@ -1001,7 +982,7 @@ describe("Controller", () => { commands: expect.any(Object), commandsResponse: expect.any(Object), }, - command: {ID: 7, parameters: [{name: "transactionID", type: 35}], name: "resetToFactoryNew"}, + command: {ID: 7, parameters: expect.any(Array), name: "resetToFactoryNew", required: true}, }); }); @@ -1032,12 +1013,9 @@ describe("Controller", () => { command: { ID: 0, response: 1, - parameters: [ - {name: "transactionID", type: 35}, - {name: "zigbeeInformation", type: 24}, - {name: "touchlinkInformation", type: 24}, - ], + parameters: expect.any(Array), name: "scanRequest", + required: true, }, }); expect(mockRestoreChannelInterPAN).toHaveBeenCalledTimes(1); @@ -1058,11 +1036,9 @@ describe("Controller", () => { }, command: { ID: 6, - parameters: [ - {name: "transactionID", type: 35}, - {name: "duration", type: 33}, - ], + parameters: expect.any(Array), name: "identifyRequest", + required: true, }, }); }); @@ -2311,71 +2287,14 @@ describe("Controller", () => { commandIdentifier: 2, }, payload: [{attrId: 16, attrData: "0x0000012300000000", dataType: 240}], - cluster: { + cluster: expect.objectContaining({ ID: 1280, - attributes: { - zoneState: {ID: 0, type: 48, name: "zoneState"}, - zoneType: {ID: 1, type: 49, name: "zoneType"}, - zoneStatus: {ID: 2, type: 25, name: "zoneStatus"}, - iasCieAddr: {ID: 16, type: 240, name: "iasCieAddr"}, - zoneId: {ID: 17, type: 32, name: "zoneId"}, - numZoneSensitivityLevelsSupported: {ID: 18, type: 32, name: "numZoneSensitivityLevelsSupported"}, - currentZoneSensitivityLevel: {ID: 19, type: 32, name: "currentZoneSensitivityLevel"}, - develcoAlarmOffDelay: {ID: 32769, type: 33, manufacturerCode: 4117, name: "develcoAlarmOffDelay"}, - }, name: "ssIasZone", - commands: { - enrollRsp: { - ID: 0, - parameters: [ - {name: "enrollrspcode", type: 32}, - {name: "zoneid", type: 32}, - ], - name: "enrollRsp", - }, - initNormalOpMode: {ID: 1, parameters: [], name: "initNormalOpMode"}, - initTestMode: { - ID: 2, - parameters: [ - { - name: "testModeDuration", - type: Zcl.DataType.UINT8, - }, - { - name: "currentZoneSensitivityLevel", - type: Zcl.DataType.UINT8, - }, - ], - name: "initTestMode", - }, - }, - commandsResponse: { - statusChangeNotification: { - ID: 0, - parameters: [ - {name: "zonestatus", type: 33}, - {name: "extendedstatus", type: 32}, - ], - name: "statusChangeNotification", - }, - enrollReq: { - ID: 1, - parameters: [ - {name: "zonetype", type: 33}, - {name: "manucode", type: 33}, - ], - name: "enrollReq", - }, - }, - }, + }), command: { ID: 2, name: "write", - parameters: [ - {name: "attrId", type: 33}, - {name: "dataType", type: 32}, - {name: "attrData", type: 1000}, - ], + parameters: expect.any(Array), response: 4, }, }); @@ -2391,70 +2310,15 @@ describe("Controller", () => { commandIdentifier: 0, }, payload: {enrollrspcode: 0, zoneid: 23}, - cluster: { + cluster: expect.objectContaining({ ID: 1280, - attributes: { - zoneState: {ID: 0, type: 48, name: "zoneState"}, - zoneType: {ID: 1, type: 49, name: "zoneType"}, - zoneStatus: {ID: 2, type: 25, name: "zoneStatus"}, - iasCieAddr: {ID: 16, type: 240, name: "iasCieAddr"}, - zoneId: {ID: 17, type: 32, name: "zoneId"}, - numZoneSensitivityLevelsSupported: {ID: 18, type: 32, name: "numZoneSensitivityLevelsSupported"}, - currentZoneSensitivityLevel: {ID: 19, type: 32, name: "currentZoneSensitivityLevel"}, - develcoAlarmOffDelay: {ID: 32769, type: 33, manufacturerCode: 4117, name: "develcoAlarmOffDelay"}, - }, name: "ssIasZone", - commands: { - enrollRsp: { - ID: 0, - parameters: [ - {name: "enrollrspcode", type: 32}, - {name: "zoneid", type: 32}, - ], - name: "enrollRsp", - }, - initNormalOpMode: {ID: 1, parameters: [], name: "initNormalOpMode"}, - initTestMode: { - ID: 2, - parameters: [ - { - name: "testModeDuration", - type: Zcl.DataType.UINT8, - }, - { - name: "currentZoneSensitivityLevel", - type: Zcl.DataType.UINT8, - }, - ], - name: "initTestMode", - }, - }, - commandsResponse: { - statusChangeNotification: { - ID: 0, - parameters: [ - {name: "zonestatus", type: 33}, - {name: "extendedstatus", type: 32}, - ], - name: "statusChangeNotification", - }, - enrollReq: { - ID: 1, - parameters: [ - {name: "zonetype", type: 33}, - {name: "manucode", type: 33}, - ], - name: "enrollReq", - }, - }, - }, + }), command: { ID: 0, - parameters: [ - {name: "enrollrspcode", type: 32}, - {name: "zoneid", type: 32}, - ], + parameters: expect.any(Array), name: "enrollRsp", + required: true, }, }); }); @@ -3543,7 +3407,7 @@ describe("Controller", () => { const device = controller.getDeviceByIeeeAddr("0x129")!; device.addCustomCluster("ssIasZone", { ID: Zcl.Clusters.ssIasZone.ID, - commands: {boschSmokeAlarmSiren: {ID: 0x80, parameters: [{name: "data", type: Zcl.DataType.UINT16}]}}, + commands: {boschSmokeAlarmSiren: {ID: 0x80, parameters: [{name: "data", type: Zcl.DataType.UINT16, max: 0xffff}]}}, commandsResponse: {}, attributes: {}, }); @@ -4391,7 +4255,7 @@ describe("Controller", () => { expect(endpoint.configuredReportings.length).toBe(1); expect({...endpoint.configuredReportings[0], cluster: undefined}).toStrictEqual({ - attribute: {ID: 16384, type: 48, manufacturerCode: 4641, name: "viessmannWindowOpenInternal"}, + attribute: expect.objectContaining({ID: 16384, type: 48, manufacturerCode: 4641, name: "viessmannWindowOpenInternal"}), minimumReportInterval: 1, maximumReportInterval: 10, reportableChange: 1, @@ -4438,7 +4302,7 @@ describe("Controller", () => { expect(endpoint.configuredReportings.length).toBe(1); expect({...endpoint.configuredReportings[0], cluster: undefined}).toStrictEqual({ - attribute: {ID: 16384, type: 48, manufacturerCode: 4641, name: "viessmannWindowOpenInternal"}, + attribute: expect.objectContaining({ID: 16384, type: 48, manufacturerCode: 4641, name: "viessmannWindowOpenInternal"}), minimumReportInterval: 1, maximumReportInterval: 10, reportableChange: 1, @@ -4707,14 +4571,18 @@ describe("Controller", () => { expect(deepClone(endpoint.configuredReportings)).toStrictEqual([ { cluster: deepClone(genPowerCfg), - attribute: {ID: genPowerCfg.attributes.mainsFrequency.ID, name: "mainsFrequency", type: Zcl.DataType.UINT8}, + attribute: expect.objectContaining({ID: genPowerCfg.attributes.mainsFrequency.ID, name: "mainsFrequency", type: Zcl.DataType.UINT8}), minimumReportInterval: 60, maximumReportInterval: 3600, reportableChange: 10, }, { cluster: deepClone(genPowerCfg), - attribute: {ID: genPowerCfg.attributes.batteryAHrRating.ID, name: "batteryAHrRating", type: Zcl.DataType.UINT16}, + attribute: expect.objectContaining({ + ID: genPowerCfg.attributes.batteryAHrRating.ID, + name: "batteryAHrRating", + type: Zcl.DataType.UINT16, + }), minimumReportInterval: 10, maximumReportInterval: 1800, reportableChange: 1, @@ -4759,14 +4627,14 @@ describe("Controller", () => { expect(deepClone(endpoint.configuredReportings)).toStrictEqual([ { cluster: deepClone(genPowerCfg), - attribute: {ID: genPowerCfg.attributes.mainsFrequency.ID, name: "mainsFrequency", type: Zcl.DataType.UINT8}, + attribute: expect.objectContaining({ID: genPowerCfg.attributes.mainsFrequency.ID, name: "mainsFrequency", type: Zcl.DataType.UINT8}), minimumReportInterval: 30, maximumReportInterval: 600, reportableChange: 2, }, { cluster: deepClone(genPowerCfg), - attribute: {ID: genPowerCfg.attributes.mainsVoltage.ID, name: "mainsVoltage", type: Zcl.DataType.UINT16}, + attribute: expect.objectContaining({ID: genPowerCfg.attributes.mainsVoltage.ID, name: "mainsVoltage", type: Zcl.DataType.UINT16}), minimumReportInterval: 0, maximumReportInterval: 30, reportableChange: 10, @@ -4894,12 +4762,12 @@ describe("Controller", () => { expect(deepClone(endpoint.configuredReportings)).toStrictEqual([ { cluster: deepClone(genBasic), - attribute: { + attribute: expect.objectContaining({ ID: genBasic.attributes.schneiderMeterRadioPower.ID, name: "schneiderMeterRadioPower", type: Zcl.DataType.INT8, manufacturerCode: Zcl.ManufacturerCode.SCHNEIDER_ELECTRIC, - }, + }), minimumReportInterval: 80, maximumReportInterval: 300, reportableChange: 10, @@ -4934,12 +4802,12 @@ describe("Controller", () => { expect(deepClone(endpoint.configuredReportings)).toStrictEqual([ { cluster: deepClone(genBasic), - attribute: { + attribute: expect.objectContaining({ ID: genBasic.attributes.schneiderMeterRadioPower.ID, name: "schneiderMeterRadioPower", type: Zcl.DataType.INT8, manufacturerCode: Zcl.ManufacturerCode.SCHNEIDER_ELECTRIC, - }, + }), minimumReportInterval: 15, maximumReportInterval: 213, reportableChange: 3, @@ -5084,10 +4952,7 @@ describe("Controller", () => { cluster: null, command: { ID: 64, - parameters: [ - {name: "effectid", type: 32}, - {name: "effectvariant", type: 32}, - ], + parameters: expect.any(Array), name: "offWithEffect", }, }); @@ -5112,7 +4977,7 @@ describe("Controller", () => { }, payload: {}, cluster: null, - command: {ID: 0, parameters: [], name: "off"}, + command: {ID: 0, parameters: expect.any(Array), name: "off", required: true}, }); expect(mocksendZclFrameToEndpoint.mock.calls[0][4]).toBe(10000); expect(mocksendZclFrameToEndpoint.mock.calls[0][5]).toBe(false); @@ -6712,13 +6577,13 @@ describe("Controller", () => { mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("timeout occurred")); let error; try { - await endpoint.write("genOnOff", {onOff: 1}); + await endpoint.write("genOnOff", {onTime: 1}); } catch (e) { error = e; } expect(error).toStrictEqual( new Error( - `ZCL command 0x129/1 genOnOff.write({"onOff":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (timeout occurred)`, + `ZCL command 0x129/1 genOnOff.write({"onTime":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (timeout occurred)`, ), ); }); @@ -6730,7 +6595,7 @@ describe("Controller", () => { const endpoint = device.getEndpoint(1)!; mocksendZclFrameToEndpoint.mockReturnValueOnce(null); - await endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true}); + await endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true}); }); it("Group command error", async () => { @@ -7949,7 +7814,7 @@ describe("Controller", () => { mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("Dogs barking too hard")); mocksendZclFrameToEndpoint.mockReturnValueOnce(null); const nextTick = new Promise(process.nextTick); - const result = endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true}); + const result = endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true}); expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(1); await nextTick; @@ -7977,10 +7842,10 @@ describe("Controller", () => { mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("Dogs barking too hard")); mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("Cats barking too hard")); try { - await endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true, sendPolicy: "immediate"}); + await endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true, sendPolicy: "immediate"}); } catch (error) { expect((error as Error).message).toStrictEqual( - `ZCL command 0x129/1 genOnOff.write({"onOff":1}, {"timeout":10000,"disableResponse":true,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false,"sendPolicy":"immediate"}) failed (Dogs barking too hard)`, + `ZCL command 0x129/1 genOnOff.write({"onTime":1}, {"timeout":10000,"disableResponse":true,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false,"sendPolicy":"immediate"}) failed (Dogs barking too hard)`, ); } expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(1); @@ -8040,7 +7905,7 @@ describe("Controller", () => { mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("Cats barking too hard")); mocksendZclFrameToEndpoint.mockRejectedValueOnce(new Error("Dogs barking too hard")); let nextTick = new Promise(process.nextTick); - const result = endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true}); + const result = endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true}); await nextTick; expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(1); @@ -8058,7 +7923,7 @@ describe("Controller", () => { } expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(2); expect((error as Error).message).toStrictEqual( - `ZCL command 0x129/1 genOnOff.write({"onOff":1}, {"timeout":10000,"disableResponse":true,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Dogs barking too hard)`, + `ZCL command 0x129/1 genOnOff.write({"onTime":1}, {"timeout":10000,"disableResponse":true,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Dogs barking too hard)`, ); }); @@ -8123,19 +7988,19 @@ describe("Controller", () => { // biome-ignore lint/correctness/noUnusedVariables: test let result2; const nextTick = new Promise(process.nextTick); - endpoint.write("genOnOff", {onOff: 0, startUpOnOff: 0}, {disableResponse: true}); + endpoint.write("genOnOff", {onTime: 0, startUpOnOff: 0}, {disableResponse: true}); await nextTick; // Queue content: // 1. empty - // 2. ZCL write 'genOnOff' {onOff: 0, startUpOnOff: 0} + // 2. ZCL write 'genOnOff' {onTime: 0, startUpOnOff: 0} // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(2); - result1 = endpoint.write("genOnOff", {onOff: 0}, {disableResponse: true}); + result1 = endpoint.write("genOnOff", {onTime: 0}, {disableResponse: true}); await new Promise(process.nextTick); // Queue content: // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} - // 3. ZCL write 'genOnOff' {onOff: 0} --> result1 + // 3. ZCL write 'genOnOff' {onTime: 0} --> result1 // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(3); expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(2); @@ -8154,7 +8019,7 @@ describe("Controller", () => { // Queue content: // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} - // 3. ZCL write 'genOnOff' {onOff: 0} + // 3. ZCL write 'genOnOff' {onTime: 0} // 4. add 1 // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(4); @@ -8162,30 +8027,30 @@ describe("Controller", () => { try { // Add the same ZCL request with different payload again, the first one should be rejected and removed from the queue - result2 = endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true}); + result2 = endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true}); await expect(await result1).rejects.toBe("asas"); } catch { // Queue content: // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} // 3. add 1 - // 4. ZCL write 'genOnOff' {onOff: 1} --> result2 + // 4. ZCL write 'genOnOff' {onTime: 1} --> result2 // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(4); } // Now add the same ZCL request with same payload again. The previous one should *not* be rejected but removed from the queue - endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true}); + endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true}); await new Promise(process.nextTick); // Queue content: // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} // 3. add 1 - // 4. ZCL write 'genOnOff' {onOff: 1} --> result2, result3 + // 4. ZCL write 'genOnOff' {onTime: 1} --> result2, result3 // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(4); // writeUndiv request should not be divided, so both should go to the queue - endpoint.write("genOnOff", {onOff: 0, startUpOnOff: 0}, {disableResponse: true, writeUndiv: true}); + endpoint.write("genOnOff", {onTime: 0, startUpOnOff: 0}, {disableResponse: true, writeUndiv: true}); await new Promise(process.nextTick); endpoint.write("genOnOff", {startUpOnOff: 1}, {disableResponse: true, writeUndiv: true}); await new Promise(process.nextTick); @@ -8193,23 +8058,23 @@ describe("Controller", () => { // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} // 3. add 1 - // 4. ZCL write 'genOnOff' {onOff: 1} --> result2, result3 - // 5. ZCL writeUndiv 'genOnOff' {onOff: 0, startUpOnOff: 0} + // 4. ZCL write 'genOnOff' {onTime: 1} --> result2, result3 + // 5. ZCL writeUndiv 'genOnOff' {onTime: 0, startUpOnOff: 0} // 6. ZCL writeUndiv 'genOnOff' {startUpOnOff: 1} // @ts-expect-error private expect(endpoint.pendingRequests.size).toStrictEqual(6); // read requests should be combined to one - const result4 = endpoint.read("genOnOff", ["onOff"], {disableResponse: false}); + const result4 = endpoint.read("genOnOff", ["onTime"], {disableResponse: false}); await new Promise(process.nextTick); - const result5 = endpoint.read("genOnOff", ["onOff"], {disableResponse: false}); + const result5 = endpoint.read("genOnOff", ["onTime"], {disableResponse: false}); await new Promise(process.nextTick); // Queue content: // 1. empty // 2. ZCL write 'genOnOff' {startUpOnOff: 0} // 3. add 1 - // 4. ZCL write 'genOnOff' {onOff: 1} --> result2, result3 - // 5. ZCL writeUndiv 'genOnOff' {onOff: 0, startUpOnOff: 0} + // 4. ZCL write 'genOnOff' {onTime: 1} --> result2, result3 + // 5. ZCL writeUndiv 'genOnOff' {onTime: 0, startUpOnOff: 0} // 6. ZCL writeUndiv 'genOnOff' {startUpOnOff: 1} // 7. ZCL read 'genOnOff' --> result4, result5 // @ts-expect-error private @@ -8234,9 +8099,9 @@ describe("Controller", () => { await expect(result5).resolves.toStrictEqual({onTime: 3}); expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(13); expect(mocksendZclFrameToEndpoint.mock.calls[8][3].payload).toStrictEqual([{attrData: 0, attrId: 16387, dataType: 48}]); - expect(mocksendZclFrameToEndpoint.mock.calls[9][3].payload).toStrictEqual([{attrData: 1, attrId: 0, dataType: 16}]); + expect(mocksendZclFrameToEndpoint.mock.calls[9][3].payload).toStrictEqual([{attrData: 1, attrId: 16385, dataType: 33}]); expect(mocksendZclFrameToEndpoint.mock.calls[10][3].payload).toStrictEqual([ - {attrData: 0, attrId: 0, dataType: 16}, + {attrData: 0, attrId: 16385, dataType: 33}, {attrData: 0, attrId: 16387, dataType: 48}, ]); expect(mocksendZclFrameToEndpoint.mock.calls[11][3].payload).toStrictEqual([{attrData: 1, attrId: 16387, dataType: 48}]); @@ -8291,7 +8156,7 @@ describe("Controller", () => { // @ts-expect-error mock new Request(async () => {}, {}, 100), ); - const result = endpoint.write("genOnOff", {onOff: 10}, {disableResponse: true}); + const result = endpoint.write("genOnOff", {onTime: 10}, {disableResponse: true}); expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(1); updatedMockedDate.setSeconds(updatedMockedDate.getSeconds() + 1001000); @@ -8337,7 +8202,7 @@ describe("Controller", () => { ), ); const nextTick = new Promise(process.nextTick); - const result = endpoint.write("genOnOff", {onOff: 10}, {disableResponse: true}); + const result = endpoint.write("genOnOff", {onTime: 10}, {disableResponse: true}); await nextTick; await endpoint.sendPendingRequests(false); await result; @@ -8365,7 +8230,7 @@ describe("Controller", () => { }; const nextTick = new Promise(process.nextTick); - const result = endpoint.write("genOnOff", {onOff: 1}, {disableResponse: true, sendPolicy: "bulk"}); + const result = endpoint.write("genOnOff", {onTime: 1}, {disableResponse: true, sendPolicy: "bulk"}); expect(mocksendZclFrameToEndpoint).toHaveBeenCalledTimes(0); const buffer = Buffer.from([24, 169, 10, 0, 0, 24, 1]); @@ -9359,7 +9224,7 @@ describe("Controller", () => { ID: 64513, commands: {}, commandsResponse: {}, - attributes: {customAttr: {ID: 0, type: Zcl.DataType.UINT8}}, + attributes: {customAttr: {ID: 0, type: Zcl.DataType.UINT8, write: true}}, }); const group = controller.createGroup(34); @@ -9601,7 +9466,7 @@ describe("Controller", () => { type: "commandIndividualLedEffect", data: { color: 0, - duration: 255, + duration: null, effect: 1, led: 5, level: 100, diff --git a/test/requests.bench.ts b/test/requests.bench.ts index 2e5ef8d5b5..206fe2b1da 100644 --- a/test/requests.bench.ts +++ b/test/requests.bench.ts @@ -158,7 +158,7 @@ describe("Requests", () => { sendZclFrameToEndpointResponse = undefined; sendZdoResponse = undefined; - await endpoint.write("genBasic", {modelId: "Herd-02", manufacturerName: "HerdsmanNew"}, {sendPolicy: "immediate"}); + await endpoint.write("genBasic", {physicalEnv: 2, deviceEnabled: 1}, {sendPolicy: "immediate"}); }, BENCH_OPTIONS, ); @@ -228,7 +228,7 @@ describe("Requests", () => { sendZclFrameToEndpointResponse = undefined; sendZdoResponse = undefined; - await group.write("genBasic", {modelId: "Herd-02", manufacturerName: "HerdsmanNew"}); + await group.write("genBasic", {physicalEnv: 2, deviceEnabled: 1}); }, BENCH_OPTIONS, ); diff --git a/test/zcl.test.ts b/test/zcl.test.ts index 274715e941..42643c48f4 100644 --- a/test/zcl.test.ts +++ b/test/zcl.test.ts @@ -35,7 +35,7 @@ describe("Zcl", () => { it("Get cluster attribute by ID", () => { const cluster = Zcl.Utils.getCluster(0, undefined, {}); const attribute = cluster.getAttribute(1); - expect(attribute).toStrictEqual({ID: 1, type: DataType.UINT8, name: "appVersion"}); + expect(attribute).toStrictEqual({ID: 1, type: DataType.UINT8, name: "appVersion", default: 0, max: 255}); }); it("Cluster has attribute", () => { @@ -738,11 +738,11 @@ describe("Zcl", () => { const payload = { srcID: 4650238, - commandFrame: {raw: Buffer.from([])}, + commandFrame: {}, commandID: 16, frameCounter: 1253, options: 5280, - payloadSize: 255, + payloadSize: Number.NaN, }; expect(frame.header).toStrictEqual(header); @@ -1936,7 +1936,7 @@ describe("Zcl", () => { it("Zcl utils get cluster attributes manufacturerCode", () => { const cluster = Zcl.Utils.getCluster("closuresWindowCovering", 0x1021, {}); const attribute = cluster.getAttribute(0xf004); - expect(attribute).toStrictEqual({ID: 0xf004, manufacturerCode: 0x1021, name: "stepPositionTilt", type: 48}); + expect(attribute).toStrictEqual(expect.objectContaining({ID: 0xf004, manufacturerCode: 0x1021, name: "stepPositionTilt", type: 48})); }); it("Zcl utils get cluster attributes manufacturerCode wrong", () => { diff --git a/test/zspec/zcl/buffalo.test.ts b/test/zspec/zcl/buffalo.test.ts index cf10b9165f..958b281ffd 100644 --- a/test/zspec/zcl/buffalo.test.ts +++ b/test/zspec/zcl/buffalo.test.ts @@ -202,57 +202,6 @@ describe("ZCL Buffalo", () => { }); it.each([ - // ["boolean", {value: Number.NaN, types: [Zcl.DataType.BOOLEAN]}, {written: 0xff, position: 1, write: "writeUInt8", read: "readUInt8"}], - // [ - // "uint8-like", - // {value: Number.NaN, types: [Zcl.DataType.DATA8, Zcl.DataType.BITMAP8, Zcl.DataType.UINT8, Zcl.DataType.ENUM8]}, - // {written: 0xff, position: 1, write: "writeUInt8", read: "readUInt8"}, - // ], - [ - "uint16-like", - { - value: Number.NaN, - types: [ - Zcl.DataType.DATA16, - Zcl.DataType.BITMAP16, - Zcl.DataType.UINT16, - Zcl.DataType.ENUM16, - Zcl.DataType.CLUSTER_ID, - Zcl.DataType.ATTR_ID, - ], - }, - {written: 0xffff, position: 2, write: "writeUInt16", read: "readUInt16"}, - ], - [ - "uint24-like", - {value: Number.NaN, types: [Zcl.DataType.DATA24, Zcl.DataType.BITMAP24, Zcl.DataType.UINT24]}, - {written: 0xffffff, position: 3, write: "writeUInt24", read: "readUInt24"}, - ], - [ - "uint32-like", - {value: Number.NaN, types: [Zcl.DataType.DATA32, Zcl.DataType.BITMAP32, Zcl.DataType.UINT32, Zcl.DataType.UTC, Zcl.DataType.BAC_OID]}, - {written: 0xffffffff, position: 4, write: "writeUInt32", read: "readUInt32"}, - ], - [ - "uint40-like", - {value: Number.NaN, types: [Zcl.DataType.DATA40, Zcl.DataType.BITMAP40, Zcl.DataType.UINT40]}, - {written: 0xffffffffff, position: 5, write: "writeUInt40", read: "readUInt40"}, - ], - [ - "uint48-like", - {value: Number.NaN, types: [Zcl.DataType.DATA48, Zcl.DataType.BITMAP48, Zcl.DataType.UINT48]}, - {written: 0xffffffffffff, position: 6, write: "writeUInt48", read: "readUInt48"}, - ], - [ - "uint56-like", - {value: undefined, types: [Zcl.DataType.DATA56, Zcl.DataType.BITMAP56, Zcl.DataType.UINT56]}, - {written: 0xffffffffffffffn, position: 7, write: "writeUInt56", read: "readUInt56"}, - ], - [ - "uint64-like", - {value: undefined, types: [Zcl.DataType.DATA64, Zcl.DataType.BITMAP64, Zcl.DataType.UINT64]}, - {written: 0xffffffffffffffffn, position: 8, write: "writeUInt64", read: "readUInt64"}, - ], [ "octectStr", {value: undefined, types: [Zcl.DataType.OCTET_STR]}, @@ -317,59 +266,6 @@ describe("ZCL Buffalo", () => { } }); - it.each([ - ["int8-like", {value: Number.NaN, type: Zcl.DataType.INT8}, {written: -0x80, position: 1, write: "writeInt8", read: "readInt8"}], - ["int16-like", {value: Number.NaN, type: Zcl.DataType.INT16}, {written: -0x8000, position: 2, write: "writeInt16", read: "readInt16"}], - ["int24-like", {value: Number.NaN, type: Zcl.DataType.INT24}, {written: -0x800000, position: 3, write: "writeInt24", read: "readInt24"}], - ["int32-like", {value: Number.NaN, type: Zcl.DataType.INT32}, {written: -0x80000000, position: 4, write: "writeInt32", read: "readInt32"}], - ["int40-like", {value: Number.NaN, type: Zcl.DataType.INT40}, {written: -0x8000000000, position: 5, write: "writeInt40", read: "readInt40"}], - [ - "int48-like", - {value: Number.NaN, type: Zcl.DataType.INT48}, - {written: -0x800000000000, position: 6, write: "writeInt48", read: "readInt48"}, - ], - [ - "int56-like", - {value: undefined, type: Zcl.DataType.INT56}, - {written: -0x80000000000000n, position: 7, write: "writeInt56", read: "readInt56"}, - ], - [ - "int64-like", - {value: undefined, type: Zcl.DataType.INT64}, - {written: -0x8000000000000000n, position: 8, write: "writeInt64", read: "readInt64"}, - ], - ])("Writes & Reads signed non-value for %s", (_name, payload, expected) => { - const buffer = Buffer.alloc(255); - const buffalo = new BuffaloZcl(buffer); - const writeSpy = vi.spyOn(buffalo, expected.write as keyof BuffaloZcl); - const readSpy = vi.spyOn(buffalo, expected.read as keyof BuffaloZcl); - - buffalo.write(payload.type, payload.value, {}); - expect(writeSpy).toHaveBeenCalledTimes(1); - expect(buffalo.getPosition()).toStrictEqual(expected.position); - const expectedWrittenBuf = Buffer.alloc(expected.position); - - if (typeof expected.written === "bigint") { - if (expected.position === 7) { - const unsignedValue = expected.written < 0n ? (1n << 56n) + expected.written : expected.written; - expectedWrittenBuf.writeUIntLE(Number(unsignedValue & 0xffffffffffffn), 0, 6); - expectedWrittenBuf.writeUInt8(Number(unsignedValue >> 48n), 0 + 6); - } else { - expectedWrittenBuf.writeBigInt64LE(expected.written, 0); - } - } else { - expectedWrittenBuf.writeIntLE(expected.written, 0, expected.position); - } - - expect(buffalo.getWritten()).toStrictEqual(expectedWrittenBuf); - - buffalo.setPosition(0); - - expect(buffalo.read(payload.type, {})).toStrictEqual("valueRead" in expected ? expected.valueRead : payload.value); - expect(readSpy).toHaveBeenCalledTimes(1); - expect(buffalo.getPosition()).toStrictEqual(expected.position); - }); - it("Reads whole buffer without length option", () => { const value = [1, 2, 3, 4]; const buffer = Buffer.alloc(4); @@ -706,14 +602,14 @@ describe("ZCL Buffalo", () => { }); it.each([ - // [ - // "time of day", - // {type: Zcl.DataType.TOD, position: 4, returned: {hours: Number.NaN, minutes: Number.NaN, seconds: Number.NaN, hundredths: Number.NaN}}, - // ], - // [ - // "date", - // {type: Zcl.DataType.DATE, position: 4, returned: {year: Number.NaN, month: Number.NaN, dayOfMonth: Number.NaN, dayOfWeek: Number.NaN}}, - // ], + [ + "time of day", + {type: Zcl.DataType.TOD, position: 4, returned: {hours: Number.NaN, minutes: Number.NaN, seconds: Number.NaN, hundredths: Number.NaN}}, + ], + [ + "date", + {type: Zcl.DataType.DATE, position: 4, returned: {year: Number.NaN, month: Number.NaN, dayOfMonth: Number.NaN, dayOfWeek: Number.NaN}}, + ], ["mi struct", {type: Zcl.BuffaloZclDataType.MI_STRUCT, position: 1, returned: {}}], ])("Reads Non-Value for %s", (_name, payload) => { const buffalo = new BuffaloZcl(Buffer.alloc(50, 0xff)); @@ -749,8 +645,8 @@ describe("ZCL Buffalo", () => { }); it.each([ - ["time of day", {type: Zcl.DataType.TOD, value: {hours: 1, minutes: 2, seconds: 0xff, hundredths: 3}, written: [1, 2, 0xff, 3]}], - ["date", {type: Zcl.DataType.DATE, value: {year: 1901, month: 2, dayOfMonth: 0xff, dayOfWeek: 3}, written: [1, 2, 0xff, 3]}], + ["time of day", {type: Zcl.DataType.TOD, value: {hours: 1, minutes: 2, seconds: Number.NaN, hundredths: 3}, written: [1, 2, 0xff, 3]}], + ["date", {type: Zcl.DataType.DATE, value: {year: 1901, month: 2, dayOfMonth: Number.NaN, dayOfWeek: 3}, written: [1, 2, 0xff, 3]}], ])("Writes & Reads partial Non-Value for %s", (_name, payload) => { const buffer = Buffer.alloc(10); const buffalo = new BuffaloZcl(buffer); diff --git a/test/zspec/zcl/frame.test.ts b/test/zspec/zcl/frame.test.ts index 8e68d15e8c..d61c204759 100644 --- a/test/zspec/zcl/frame.test.ts +++ b/test/zspec/zcl/frame.test.ts @@ -137,7 +137,7 @@ const GLOBAL_FRAME = Zcl.Frame.create( GLOBAL_HEADER.frameControl.reservedBits, ); const GLOBAL_FRAME_BUFFER = Buffer.concat([GLOBAL_HEADER_BUFFER, Buffer.from(uint16To8Array(256))]); -const GLOBAL_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":0},"payload":[{"attrId":256}],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":33}],"response":1}}`; +const GLOBAL_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":0},"payload":[{"attrId":256}],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":9}],"response":1}}`; /** Frame of Global type with BigInt */ const GLOBAL_FRAME_BIG_INT = Zcl.Frame.create( @@ -158,7 +158,7 @@ const GLOBAL_FRAME_BIG_INT_BUFFER = Buffer.concat([ Buffer.from([Zcl.DataType.UINT56]), Buffer.from(uint56To8Array(200n)), ]); -const GLOBAL_FRAME_BIG_INT_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":10},"payload":[{"attrId":0,"dataType":38,"attrData":"200"}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}}`; +const GLOBAL_FRAME_BIG_INT_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":10},"payload":[{"attrId":0,"dataType":38,"attrData":"200"}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":9},{"name":"dataType","type":8},{"name":"attrData","type":1000}]}}`; /** Frame of Global type and response command */ const GLOBAL_RSP_FRAME = Zcl.Frame.create( @@ -177,7 +177,7 @@ const GLOBAL_RSP_FRAME_BUFFER = Buffer.concat([ GLOBAL_RSP_HEADER_BUFFER, Buffer.from([...uint16To8Array(256), Zcl.Status.SUCCESS, Zcl.DataType.ENUM8, 127]), ]); -const GLOBAL_RSP_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":78,"commandIdentifier":1},"payload":[{"attrId":256,"status":0,"dataType":48,"attrData":127}],"command":{"ID":1,"name":"readRsp","parameters":[{"name":"attrId","type":33},{"name":"status","type":32},{"name":"dataType","type":32,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"attrData","type":1000,"conditions":[{"type":"fieldEquals","field":"status","value":0}]}]}}`; +const GLOBAL_RSP_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":78,"commandIdentifier":1},"payload":[{"attrId":256,"status":0,"dataType":48,"attrData":127}],"command":{"ID":1,"name":"readRsp","parameters":[{"name":"attrId","type":9},{"name":"status","type":8},{"name":"dataType","type":8,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"attrData","type":1000,"conditions":[{"type":"fieldEquals","field":"status","value":0}]}]}}`; /** Frame of Global type with no payload */ const GLOBAL_FRAME_NO_PAYLOAD = Zcl.Frame.create( @@ -193,7 +193,7 @@ const GLOBAL_FRAME_NO_PAYLOAD = Zcl.Frame.create( GLOBAL_HEADER.frameControl.reservedBits, ); const GLOBAL_FRAME_NO_PAYLOAD_BUFFER = Buffer.concat([GLOBAL_HEADER_BUFFER]); -const GLOBAL_FRAME_NO_PAYLOAD_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":0},"payload":[],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":33}],"response":1}}`; +const GLOBAL_FRAME_NO_PAYLOAD_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":123,"commandIdentifier":0},"payload":[],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":9}],"response":1}}`; /** Frame of Global type with condition-based parameters */ const GLOBAL_CONDITION_FRAME = Zcl.Frame.create( @@ -212,7 +212,7 @@ const GLOBAL_CONDITION_FRAME_BUFFER = Buffer.concat([ GLOBAL_CONDITION_HEADER_BUFFER, Buffer.from([Zcl.Direction.SERVER_TO_CLIENT, ...uint16To8Array(256), ...uint16To8Array(10000)]), ]); -const GLOBAL_CONDITION_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":78,"commandIdentifier":6},"payload":[{"direction":1,"attrId":256,"timeout":10000}],"command":{"ID":6,"name":"configReport","parameters":[{"name":"direction","type":32},{"name":"attrId","type":33},{"name":"dataType","type":32,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"minRepIntval","type":33,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"maxRepIntval","type":33,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"repChange","type":1000,"conditions":[{"type":"fieldEquals","field":"direction","value":0},{"type":"dataTypeValueTypeEquals","value":"ANALOG"}]},{"name":"timeout","type":33,"conditions":[{"type":"fieldEquals","field":"direction","value":1}]}],"response":7}}`; +const GLOBAL_CONDITION_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":78,"commandIdentifier":6},"payload":[{"direction":1,"attrId":256,"timeout":10000}],"command":{"ID":6,"name":"configReport","parameters":[{"name":"direction","type":8},{"name":"attrId","type":9},{"name":"dataType","type":8,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"minRepIntval","type":9,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"maxRepIntval","type":9,"conditions":[{"type":"fieldEquals","field":"direction","value":0}]},{"name":"repChange","type":1000,"conditions":[{"type":"fieldEquals","field":"direction","value":0},{"type":"dataTypeValueTypeEquals","value":"ANALOG"}]},{"name":"timeout","type":9,"conditions":[{"type":"fieldEquals","field":"direction","value":1}]}],"response":7}}`; /** Frame of Specific type */ const SPECIFIC_FRAME = Zcl.Frame.create( @@ -244,7 +244,7 @@ const SPECIFIC_RSP_FRAME = Zcl.Frame.create( SPECIFIC_RSP_HEADER.frameControl.reservedBits, ); const SPECIFIC_RSP_FRAME_BUFFER = Buffer.concat([SPECIFIC_RSP_HEADER_BUFFER, Buffer.from([246, ...uint16To8Array(3456)])]); -const SPECIFIC_RSP_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":53,"commandIdentifier":0},"payload":{"alarmcode":246,"clusterid":3456},"command":{"ID":0,"parameters":[{"name":"alarmcode","type":32},{"name":"clusterid","type":33}],"name":"alarm"}}`; +const SPECIFIC_RSP_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":53,"commandIdentifier":0},"payload":{"alarmcode":246,"clusterid":3456},"command":{"ID":0,"parameters":[{"name":"alarmcode","type":48},{"name":"clusterid","type":232}],"required":true,"name":"alarm"}}`; /** Frame of Specific type with condition-based parameters */ const SPECIFIC_CONDITION_FRAME = Zcl.Frame.create( @@ -260,7 +260,7 @@ const SPECIFIC_CONDITION_FRAME = Zcl.Frame.create( SPECIFIC_CONDITION_HEADER.frameControl.reservedBits, ); const SPECIFIC_CONDITION_FRAME_BUFFER = Buffer.concat([SPECIFIC_CONDITION_HEADER_BUFFER, Buffer.from([149])]); -const SPECIFIC_CONDITION_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":45,"commandIdentifier":2},"payload":{"status":149},"command":{"ID":2,"parameters":[{"name":"status","type":32},{"name":"manufacturerCode","type":33,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"imageType","type":33,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"fileVersion","type":35,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"imageSize","type":35,"conditions":[{"type":"fieldEquals","field":"status","value":0}]}],"name":"queryNextImageResponse"}}`; +const SPECIFIC_CONDITION_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":1,"disableDefaultResponse":false,"manufacturerSpecific":false},"transactionSequenceNumber":45,"commandIdentifier":2},"payload":{"status":149},"command":{"ID":2,"parameters":[{"name":"status","type":48},{"name":"manufacturerCode","type":33,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"imageType","type":33,"conditions":[{"type":"fieldEquals","field":"status","value":0}],"max":65471},{"name":"fileVersion","type":35,"conditions":[{"type":"fieldEquals","field":"status","value":0}]},{"name":"imageSize","type":35,"conditions":[{"type":"fieldEquals","field":"status","value":0}]}],"required":true,"name":"queryNextImageResponse"}}`; /** Frame manufacturer-specific */ const MANUF_SPE_FRAME = Zcl.Frame.create( @@ -276,7 +276,7 @@ const MANUF_SPE_FRAME = Zcl.Frame.create( MANUF_SPE_HEADER.frameControl.reservedBits, ); const MANUF_SPE_FRAME_BUFFER = Buffer.concat([MANUF_SPE_HEADER_BUFFER, Buffer.from(uint16To8Array(256))]); -const MANUF_SPE_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":true},"manufacturerCode":4344,"transactionSequenceNumber":234,"commandIdentifier":0},"payload":[{"attrId":256}],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":33}],"response":1}}`; +const MANUF_SPE_FRAME_STRING = `{"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":false,"manufacturerSpecific":true},"manufacturerCode":4344,"transactionSequenceNumber":234,"commandIdentifier":0},"payload":[{"attrId":256}],"command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":9}],"response":1}}`; describe("ZCL Frame", () => { describe("Validates Parameter Condition", () => { diff --git a/test/zspec/zcl/utils.test.ts b/test/zspec/zcl/utils.test.ts index f15aefd752..399ceabe21 100644 --- a/test/zspec/zcl/utils.test.ts +++ b/test/zspec/zcl/utils.test.ts @@ -1,6 +1,7 @@ import {describe, expect, it} from "vitest"; import * as Zcl from "../../../src/zspec/zcl"; -import type {Command, CustomClusters} from "../../../src/zspec/zcl/definition/tstype"; +import {ZCL_TYPE_INVALID_BY_TYPE} from "../../../src/zspec/zcl/definition/datatypes"; +import type {Attribute, Command, CustomClusters, Parameter} from "../../../src/zspec/zcl/definition/tstype"; const CUSTOM_CLUSTERS: CustomClusters = { genBasic: {ID: Zcl.Clusters.genBasic.ID, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}}, @@ -270,4 +271,380 @@ describe("ZCL Utils", () => { Zcl.Utils.getFoundationCommand(9999); }).toThrow(`Foundation command '9999' does not exist.`); }); + + function createAttribute(overrides: Partial = {}): Attribute { + // Provide a minimal, structurally valid Attribute (add fields here if the real type requires more) + const base: Attribute = { + ID: 0x0001, + name: "testAttr", + type: Zcl.DataType.UINT8, + // Optional fields spread afterwards + ...overrides, + }; + return base; + } + + function createParameter(overrides: Partial = {}): Parameter { + const base: Parameter = { + name: "testParam", + type: Zcl.DataType.UINT8, + ...overrides, + }; + return base; + } + + describe("processAttributeWrite specific", () => { + it("throws when attribute not writable", () => { + const attr = createAttribute(); + expect(() => Zcl.Utils.processAttributeWrite(attr, 1)).toThrow(/not writable/i); + }); + + it("returns default when value is null and default exists", () => { + const attr = createAttribute({write: true, default: 42}); + expect(Zcl.Utils.processAttributeWrite(attr, null)).toStrictEqual(42); + }); + + it("NaN with default returns default", () => { + const attr = createAttribute({write: true, default: 7}); + expect(Zcl.Utils.processAttributeWrite(attr, Number.NaN)).toStrictEqual(7); + }); + + it("NaN without default returns non-value sentinel", () => { + const type = Zcl.DataType.UINT8; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type}); + expect(Zcl.Utils.processAttributeWrite(attr, Number.NaN)).toStrictEqual(sentinel); + }); + + it("throws when trying to write non-value on unsupported datatype", () => { + const type = Zcl.DataType.DATA8; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).toBeUndefined(); + const attr = createAttribute({write: true, type}); + expect(() => Zcl.Utils.processAttributeWrite(attr, Number.NaN)).toThrow(/does not have a default nor a non-value/i); + }); + + it("level control for lighting attributes currentLevel and options", () => { + const cluster = Zcl.Utils.getCluster("genLevelCtrl"); + let result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("options")!, 0x00); + expect(result).toStrictEqual(0x00); + result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("options")!, 0xff); + expect(result).toStrictEqual(0xff); + expect(() => Zcl.Utils.processAttributeWrite(cluster.getAttribute("currentLevel")!, 0x01)).toThrow(/not writable/i); + }); + + it("rssi location attributes coordinate1 and pathLossExponent", () => { + const cluster = Zcl.Utils.getCluster("genRssiLocation"); + let result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("coordinate1")!, -0x8000); + expect(result).toStrictEqual(-0x8000); + result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("coordinate1")!, 0x7fff); + expect(result).toStrictEqual(0x7fff); + result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("coordinate1")!, 0x0012); + expect(result).toStrictEqual(0x0012); + result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("pathLossExponent")!, 0xff); + expect(result).toStrictEqual(0xff); + result = Zcl.Utils.processAttributeWrite(cluster.getAttribute("pathLossExponent")!, Number.NaN); + expect(result).toStrictEqual(0xffff); + }); + }); + + describe("processAttributePreRead specific", () => { + it("throws when attribute not writable", () => { + const attr = createAttribute({read: false}); + expect(() => Zcl.Utils.processAttributePreRead(attr)).toThrow(/not readable/i); + }); + }); + + describe("processAttributePostRead specific", () => { + it("maps invalid sentinel to NaN", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type}); + const result = Zcl.Utils.processAttributePostRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("maps invalid sentinel to NaN with different min", () => { + const type = Zcl.DataType.INT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type, min: (sentinel as number) + 1}); + const result = Zcl.Utils.processAttributePostRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("returns invalid sentinel unchanged if same as min (ignore invalid sentinel)", () => { + const type = Zcl.DataType.INT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type, min: sentinel as number}); + const result = Zcl.Utils.processAttributePostRead(attr, sentinel); + expect(result).toStrictEqual(sentinel); + }); + + it("maps invalid sentinel to NaN with different max", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type, max: (sentinel as number) - 1}); + const result = Zcl.Utils.processAttributePostRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("returns invalid sentinel unchanged if same as max (ignore invalid sentinel)", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createAttribute({write: true, type, max: sentinel as number}); + const result = Zcl.Utils.processAttributePostRead(attr, sentinel); + expect(result).toStrictEqual(sentinel); + }); + + it("basic attributes zclVersion and powerSource", () => { + const cluster = Zcl.Utils.getCluster("genBasic"); + // max: 0xff + let result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("zclVersion")!, 0xff); + expect(result).toStrictEqual(0xff); + // default: 0xff + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("powerSource")!, 0xff); + expect(result).toStrictEqual(0xff); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("zclVersion")!, 0x02); + expect(result).toStrictEqual(0x02); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("powerSource")!, 0x03); + expect(result).toStrictEqual(0x03); + }); + + it("device temperature config attribute currentTemperature", () => { + const cluster = Zcl.Utils.getCluster("genDeviceTempCfg"); + let result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentTemperature")!, -32768); + expect(Number.isNaN(result)).toStrictEqual(true); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentTemperature")!, 200); + expect(result).toStrictEqual(200); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentTemperature")!, -200); + expect(result).toStrictEqual(-200); + expect(() => Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentTemperature")!, 201)).toThrow(/requires max/i); + }); + + it("level control for lighting attributes currentLevel and options", () => { + const cluster = Zcl.Utils.getCluster("genLevelCtrl"); + let result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentLevel")!, 0xff); + expect(Number.isNaN(result)).toStrictEqual(false); // technically should be true for genLevelCtrlForLighting but handling left to ZHC + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentLevel")!, 0xfe); + expect(result).toStrictEqual(0xfe); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("currentLevel")!, 200); + expect(result).toStrictEqual(200); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("options")!, 0x00); + expect(result).toStrictEqual(0x00); + result = Zcl.Utils.processAttributePostRead(cluster.getAttribute("options")!, 0xff); + expect(result).toStrictEqual(0xff); + }); + }); + + describe("processParameterWrite specific", () => { + it("throws when trying to write non-value on unsupported datatype", () => { + const type = Zcl.DataType.DATA8; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).toBeUndefined(); + const param = createParameter({type}); + expect(() => Zcl.Utils.processParameterWrite(param, Number.NaN)).toThrow(/does not have a non-value/i); + }); + + it("rssi location cmd setAbsolute parameters coordinate1 and pathLossExponent", () => { + const cluster = Zcl.Utils.getCluster("genRssiLocation"); + const cmd = cluster.getCommand("setAbsolute")!; + const paramCoordinate1 = cmd.parameters.find((p) => p.name === "coordinate1")!; + const paramPathLossExponent = cmd.parameters.find((p) => p.name === "pathLossExponent")!; + let result = Zcl.Utils.processParameterWrite(paramCoordinate1, -0x8000); + expect(result).toStrictEqual(-0x8000); + result = Zcl.Utils.processParameterWrite(paramCoordinate1, 0x7fff); + expect(result).toStrictEqual(0x7fff); + result = Zcl.Utils.processParameterWrite(paramCoordinate1, 0x0012); + expect(result).toStrictEqual(0x0012); + result = Zcl.Utils.processParameterWrite(paramPathLossExponent, 0xff); + expect(result).toStrictEqual(0xff); + result = Zcl.Utils.processParameterWrite(paramPathLossExponent, Number.NaN); + expect(result).toStrictEqual(0xffff); + }); + }); + + describe("processParameterRead specific", () => { + it("maps invalid sentinel to NaN", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createParameter({type}); + const result = Zcl.Utils.processParameterRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("maps invalid sentinel to NaN with different min", () => { + const type = Zcl.DataType.INT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createParameter({type, min: (sentinel as number) + 1}); + const result = Zcl.Utils.processParameterRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("returns invalid sentinel unchanged if same as min (skips invalid sentinel)", () => { + const type = Zcl.DataType.INT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createParameter({type, min: sentinel as number}); + const result = Zcl.Utils.processParameterRead(attr, sentinel); + expect(result).toStrictEqual(sentinel); + }); + + it("maps invalid sentinel to NaN with different max", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createParameter({type, max: (sentinel as number) - 1}); + const result = Zcl.Utils.processParameterRead(attr, sentinel); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + + it("returns invalid sentinel unchanged if same as max (skips invalid sentinel)", () => { + const type = Zcl.DataType.UINT16; + const sentinel = ZCL_TYPE_INVALID_BY_TYPE[type]; + expect(sentinel).not.toBeUndefined(); + const attr = createParameter({type, max: sentinel as number}); + const result = Zcl.Utils.processParameterRead(attr, sentinel); + expect(result).toStrictEqual(sentinel); + }); + + it("rssi location cmd rsp locationDataNotification parameters coordinate1 and pathLossExponent", () => { + const cluster = Zcl.Utils.getCluster("genRssiLocation"); + const cmd = cluster.getCommandResponse("locationDataNotification")!; + const paramCoordinate1 = cmd.parameters.find((p) => p.name === "coordinate1")!; + const paramPathLossExponent = cmd.parameters.find((p) => p.name === "pathLossExponent")!; + let result = Zcl.Utils.processParameterRead(paramCoordinate1, -0x8000); + expect(Number.isNaN(result)).toStrictEqual(true); + result = Zcl.Utils.processParameterRead(paramCoordinate1, 0x7fff); + expect(result).toStrictEqual(0x7fff); + result = Zcl.Utils.processParameterRead(paramCoordinate1, 0x0012); + expect(result).toStrictEqual(0x0012); + result = Zcl.Utils.processParameterRead(paramPathLossExponent, 0xff); + expect(result).toStrictEqual(0xff); + result = Zcl.Utils.processParameterRead(paramPathLossExponent, 0xffff); + expect(Number.isNaN(result)).toStrictEqual(true); + }); + }); + + describe.each([ + ["write", Zcl.Utils.processAttributeWrite], + ["post read", Zcl.Utils.processAttributePostRead], + ])("process attribute for %s", (_name, fn) => { + it("returns null when value is null and no default", () => { + const attr = createAttribute({write: true}); + expect(fn(attr, null)).toBeNull(); + }); + + it("returns value unchanged when it equals default (skips restrictions)", () => { + const attr = createAttribute({write: true, default: 50, min: 60}); + expect(fn(attr, 50)).toStrictEqual(50); + }); + + it("throws below min", () => { + const attr = createAttribute({write: true, min: 10}); + expect(() => fn(attr, 5)).toThrow(/requires min/i); + }); + + it("throws below minExcl", () => { + const attr = createAttribute({write: true, minExcl: 10}); + expect(() => fn(attr, 5)).toThrow(/requires min exclusive/i); + }); + + it("throws at minExcl", () => { + const attr = createAttribute({write: true, minExcl: 10}); + expect(() => fn(attr, 10)).toThrow(/requires min exclusive/i); + }); + + it("throws above max", () => { + const attr = createAttribute({write: true, max: 20}); + expect(() => fn(attr, 30)).toThrow(/requires max/i); + }); + + it("throws above maxExcl", () => { + const attr = createAttribute({write: true, maxExcl: 20}); + expect(() => fn(attr, 30)).toThrow(/requires max exclusive/i); + }); + + it("throws at maxExcl", () => { + const attr = createAttribute({write: true, maxExcl: 20}); + expect(() => fn(attr, 20)).toThrow(/requires max exclusive/i); + }); + + it("throws not length", () => { + const attr = createAttribute({write: true, length: 10}); + expect(() => fn(attr, "abcde")).toThrow(/requires length/i); + }); + + it("throws below minLen", () => { + const attr = createAttribute({write: true, minLen: 10}); + expect(() => fn(attr, "abcde")).toThrow(/requires min length/i); + }); + + it("throws above maxLen", () => { + const attr = createAttribute({write: true, maxLen: 2}); + expect(() => fn(attr, "xyz")).toThrow(/requires max length/i); + }); + }); + + describe.each([ + ["write", Zcl.Utils.processParameterWrite], + ["read", Zcl.Utils.processParameterRead], + ])("process parameter for %s", (_name, fn) => { + it("returns value when null", () => { + const p = createParameter(); + expect(fn(p, null)).toBeNull(); + }); + + it("throws below min", () => { + const attr = createParameter({min: 10}); + expect(() => fn(attr, 5)).toThrow(/requires min/i); + }); + + it("throws below minExcl", () => { + const attr = createParameter({minExcl: 10}); + expect(() => fn(attr, 5)).toThrow(/requires min exclusive/i); + }); + + it("throws at minExcl", () => { + const attr = createParameter({minExcl: 10}); + expect(() => fn(attr, 10)).toThrow(/requires min exclusive/i); + }); + + it("throws above max", () => { + const attr = createParameter({max: 20}); + expect(() => fn(attr, 30)).toThrow(/requires max/i); + }); + + it("throws above maxExcl", () => { + const attr = createParameter({maxExcl: 20}); + expect(() => fn(attr, 30)).toThrow(/requires max exclusive/i); + }); + + it("throws at maxExcl", () => { + const attr = createParameter({maxExcl: 20}); + expect(() => fn(attr, 20)).toThrow(/requires max exclusive/i); + }); + + it("throws not length", () => { + const attr = createParameter({length: 10}); + expect(() => fn(attr, "abcde")).toThrow(/requires length/i); + }); + + it("throws below minLen", () => { + const attr = createParameter({minLen: 10}); + expect(() => fn(attr, "abcde")).toThrow(/requires min length/i); + }); + + it("throws above maxLen", () => { + const attr = createParameter({maxLen: 2}); + expect(() => fn(attr, "xyz")).toThrow(/requires max length/i); + }); + }); });