@zwave-js/cc 15.29.0 → 15.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +3 -1
- package/build/cjs/cc/AlarmSensorCC.js +22 -2
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +6 -3
- package/build/cjs/cc/BarrierOperatorCC.js +40 -6
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +4 -1
- package/build/cjs/cc/CentralSceneCC.js +34 -2
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +54 -6
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.d.ts +2 -1
- package/build/cjs/cc/ClockCC.js +19 -2
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/ConfigurationCC.js +61 -4
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +3 -1
- package/build/cjs/cc/DoorLockLoggingCC.js +35 -2
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +5 -1
- package/build/cjs/cc/EntryControlCC.js +57 -2
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +3 -1
- package/build/cjs/cc/HumidityControlModeCC.js +14 -2
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -1
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +8 -4
- package/build/cjs/cc/HumidityControlSetpointCC.js +51 -8
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +15 -9
- package/build/cjs/cc/IrrigationCC.js +260 -24
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +2 -1
- package/build/cjs/cc/LanguageCC.js +18 -2
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +2 -1
- package/build/cjs/cc/MultiChannelCC.js +14 -2
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +38 -5
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -4
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +3 -1
- package/build/cjs/cc/ThermostatFanModeCC.js +17 -2
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -1
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -0
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +2 -2
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.d.ts +1 -1
- package/build/cjs/cc/TimeCC.js +11 -2
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +2 -1
- package/build/cjs/cc/UserCodeCC.js +31 -2
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +1 -0
- package/build/cjs/cc/VersionCC.js +32 -0
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +2 -0
- package/build/cjs/cc/WakeUpCC.js +14 -0
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +2 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +30 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts +3 -1
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +25 -7
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +6 -3
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +45 -18
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +4 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +35 -6
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -3
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +57 -16
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +2 -1
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +20 -7
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -2
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +63 -12
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +3 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +39 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +5 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +64 -7
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +3 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +15 -7
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +5 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +8 -4
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +52 -25
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +15 -9
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +268 -61
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +2 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +18 -6
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +2 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +15 -7
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +3 -2
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +39 -13
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +3 -2
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +25 -12
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +3 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +18 -7
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +5 -1
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -2
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +1 -1
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +12 -7
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +2 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +31 -6
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +1 -0
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +34 -0
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +2 -0
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +14 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +2 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +34 -4
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/CentralSceneCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./CentralSceneCC._validateArgs.js\";\nconst { validateArgs_CentralSceneCCAPI_setConfiguration } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, getCCName, logDict, logList, logText, maybeUnknownToString, parseBitMask, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { CentralSceneCCValues } from \"./_CCValues.generated.js\";\nexport { CentralSceneCCValues };\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n public supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case CentralSceneCommand.SupportedGet:\n return this.isSinglecast(); // this is mandatory\n case CentralSceneCommand.ConfigurationGet:\n return this.version >= 3 && this.isSinglecast();\n case CentralSceneCommand.ConfigurationSet:\n return this.version >= 3;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getSupported() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.SupportedGet);\n const cc = new CentralSceneCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCSupportedReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"sceneCount\",\n \"supportsSlowRefresh\",\n \"supportedKeyAttributes\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getConfiguration() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationGet);\n const cc = new CentralSceneCCConfigurationGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCConfigurationReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"slowRefresh\"]);\n }\n }\n @validateArgs_CentralSceneCCAPI_setConfiguration()\n public async setConfiguration(slowRefresh: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationSet);\n const cc = new CentralSceneCCConfigurationSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n slowRefresh,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }, value) {\n if (property !== \"slowRefresh\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n return this.setConfiguration(value);\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }) {\n if (property === \"slowRefresh\") {\n return (await this.getConfiguration())?.[property];\n }\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n declare ccCommand: CentralSceneCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n CommandClasses[\"Association Group Information\"],\n ];\n }\n public skipEndpointInterview(): boolean {\n // Central scene notifications are issued by the root device\n return true;\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Central Scene\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // If one Association group issues CentralScene notifications,\n // we must associate ourselves with that channel\n try {\n await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, CentralSceneCommand.Notification);\n }\n catch {\n ctx.logNode(node.id, {\n endpoint: endpoint.index,\n message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,\n level: \"warn\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes...\",\n direction: \"outbound\",\n });\n const ccSupported = await api.getSupported();\n if (ccSupported) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(\"received supported scenes:\", {\n nested: logDict({\n \"# of scenes\": ccSupported.sceneCount,\n \"supports slow refresh\": ccSupported.supportsSlowRefresh,\n }),\n }),\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n // The slow refresh capability should be enabled whenever possible\n if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Enabling slow refresh capability...\",\n direction: \"outbound\",\n });\n await api.setConfiguration(true);\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n}\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n sequenceNumber: number;\n keyAttribute: CentralSceneKeys;\n sceneNumber: number;\n slowRefresh?: boolean;\n}\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCNotificationOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sequenceNumber = options.sequenceNumber;\n this.keyAttribute = options.keyAttribute;\n this.sceneNumber = options.sceneNumber;\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCNotification {\n validatePayload(raw.payload.length >= 3);\n const sequenceNumber = raw.payload[0];\n const keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n const sceneNumber = raw.payload[2];\n let slowRefresh: boolean | undefined;\n if (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n // A receiving node MUST ignore this field if the command is not\n // carrying the Key Held Down key attribute.\n slowRefresh = !!(raw.payload[1] & 128);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sequenceNumber,\n keyAttribute,\n sceneNumber,\n slowRefresh,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // In case the interview is not yet completed, we still create some basic metadata\n const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n // Get device configuration to check for custom scene labels\n const sceneConfig = ctx\n .getDeviceConfig?.(this.nodeId as number)\n ?.scenes?.get(this.sceneNumber);\n if (sceneConfig) {\n // Ensure metadata with custom label and description\n this.ensureMetadata(ctx, sceneValue, {\n ...sceneValue.meta,\n label: sceneConfig.label,\n description: sceneConfig.description,\n });\n }\n else {\n // Use default metadata\n this.ensureMetadata(ctx, sceneValue);\n }\n // The spec behavior is pretty complicated, so we cannot just store\n // the value and call it a day. Handling of these notifications will\n // happen in the receiving node class\n return true;\n }\n public readonly sequenceNumber: number;\n public readonly keyAttribute: CentralSceneKeys;\n public readonly sceneNumber: number;\n public readonly slowRefresh: boolean | undefined;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"sequence number\": this.sequenceNumber,\n \"key attribute\": getEnumMemberName(CentralSceneKeys, this.keyAttribute),\n \"scene number\": this.sceneNumber,\n };\n if (this.slowRefresh != undefined) {\n message[\"slow refresh\"] = this.slowRefresh;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n sceneCount: number;\n supportsSlowRefresh: MaybeNotKnown<boolean>;\n supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\"supportsSlowRefresh\", CentralSceneCCValues.supportsSlowRefresh)\n@ccValueProperty(\"supportedKeyAttributes\", CentralSceneCCValues.supportedKeyAttributes)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sceneCount = options.sceneCount;\n this.supportsSlowRefresh = options.supportsSlowRefresh;\n for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {\n this._supportedKeyAttributes.set(parseInt(scene), keys);\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCSupportedReport {\n validatePayload(raw.payload.length >= 2);\n const sceneCount = raw.payload[0];\n const supportsSlowRefresh: MaybeNotKnown<boolean> = !!(raw.payload[1] & 128);\n const bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n const identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n const numEntries = identicalKeyAttributes ? 1 : sceneCount;\n validatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n const supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]> = {};\n for (let i = 0; i < numEntries; i++) {\n const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);\n supportedKeyAttributes[i + 1] = parseBitMask(mask, CentralSceneKeys.KeyPressed);\n }\n if (identicalKeyAttributes) {\n // The key attributes are only transmitted for scene 1, copy them to the others\n for (let i = 2; i <= sceneCount; i++) {\n supportedKeyAttributes[i] = supportedKeyAttributes[1];\n }\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sceneCount,\n supportsSlowRefresh,\n supportedKeyAttributes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Get device configuration to check for custom scene labels\n const deviceConfig = ctx.getDeviceConfig?.(this.nodeId as number);\n // Create/extend metadata for all scenes\n for (let i = 1; i <= this.sceneCount; i++) {\n const sceneValue = CentralSceneCCValues.scene(i);\n const sceneMetadata = { ...sceneValue.meta };\n // Check if there's a custom configuration for this scene\n const sceneConfig = deviceConfig?.scenes?.get(i);\n if (sceneConfig) {\n // @ts-expect-error The label type is a literal\n sceneMetadata.label = sceneConfig.label;\n }\n if (sceneConfig?.description) {\n // @ts-expect-error The predefined metadata has no description\n sceneMetadata.description = sceneConfig.description;\n }\n this.setMetadata(ctx, sceneValue, {\n ...sceneMetadata,\n states: enumValuesToMetadataStates(CentralSceneKeys, this._supportedKeyAttributes.get(i)),\n });\n }\n return true;\n }\n public readonly sceneCount: number;\n // TODO: Only offer `slowRefresh` if this is true\n public readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n private _supportedKeyAttributes = new Map<number, readonly CentralSceneKeys[]>();\n public get supportedKeyAttributes(): ReadonlyMap<number, readonly CentralSceneKeys[]> {\n return this._supportedKeyAttributes;\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"scene count\": this.sceneCount,\n \"supports slow refresh\": maybeUnknownToString(this.supportsSlowRefresh),\n };\n for (const [scene, keys] of this.supportedKeyAttributes) {\n message[`supported attributes (scene #${scene})`] = logList(keys.map((k) => getEnumMemberName(CentralSceneKeys, k)));\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCConfigurationReport {\n validatePayload(raw.payload.length >= 1);\n const slowRefresh = !!(raw.payload[0] & 128);\n return new this({\n nodeId: ctx.sourceNodeId,\n slowRefresh,\n });\n }\n public readonly slowRefresh: boolean;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationSetOptions>) {\n super(options);\n this.slowRefresh = options.slowRefresh;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): CentralSceneCCConfigurationSet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new CentralSceneCCConfigurationSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public slowRefresh: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.slowRefresh ? 128 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./CentralSceneCC._validateArgs.js\";\nconst { validateArgs_CentralSceneCCAPI_setConfiguration } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, enumValuesToMetadataStates, encodeBitMask, getCCName, logDict, logList, logText, maybeUnknownToString, parseBitMask, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { CentralSceneCCValues } from \"./_CCValues.generated.js\";\nexport { CentralSceneCCValues };\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n public supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case CentralSceneCommand.SupportedGet:\n return this.isSinglecast(); // this is mandatory\n case CentralSceneCommand.ConfigurationGet:\n return this.version >= 3 && this.isSinglecast();\n case CentralSceneCommand.ConfigurationSet:\n return this.version >= 3;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getSupported() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.SupportedGet);\n const cc = new CentralSceneCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCSupportedReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"sceneCount\",\n \"supportsSlowRefresh\",\n \"supportedKeyAttributes\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getConfiguration() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationGet);\n const cc = new CentralSceneCCConfigurationGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCConfigurationReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"slowRefresh\"]);\n }\n }\n @validateArgs_CentralSceneCCAPI_setConfiguration()\n public async setConfiguration(slowRefresh: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationSet);\n const cc = new CentralSceneCCConfigurationSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n slowRefresh,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }, value) {\n if (property !== \"slowRefresh\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n return this.setConfiguration(value);\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }) {\n if (property === \"slowRefresh\") {\n return (await this.getConfiguration())?.[property];\n }\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n declare ccCommand: CentralSceneCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n CommandClasses[\"Association Group Information\"],\n ];\n }\n public skipEndpointInterview(): boolean {\n // Central scene notifications are issued by the root device\n return true;\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Central Scene\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // If one Association group issues CentralScene notifications,\n // we must associate ourselves with that channel\n try {\n await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, CentralSceneCommand.Notification);\n }\n catch {\n ctx.logNode(node.id, {\n endpoint: endpoint.index,\n message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,\n level: \"warn\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes...\",\n direction: \"outbound\",\n });\n const ccSupported = await api.getSupported();\n if (ccSupported) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(\"received supported scenes:\", {\n nested: logDict({\n \"# of scenes\": ccSupported.sceneCount,\n \"supports slow refresh\": ccSupported.supportsSlowRefresh,\n }),\n }),\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n // The slow refresh capability should be enabled whenever possible\n if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Enabling slow refresh capability...\",\n direction: \"outbound\",\n });\n await api.setConfiguration(true);\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n}\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n sequenceNumber: number;\n keyAttribute: CentralSceneKeys;\n sceneNumber: number;\n slowRefresh?: boolean;\n}\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCNotificationOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sequenceNumber = options.sequenceNumber;\n this.keyAttribute = options.keyAttribute;\n this.sceneNumber = options.sceneNumber;\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCNotification {\n validatePayload(raw.payload.length >= 3);\n const sequenceNumber = raw.payload[0];\n const keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n const sceneNumber = raw.payload[2];\n let slowRefresh: boolean | undefined;\n if (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n // A receiving node MUST ignore this field if the command is not\n // carrying the Key Held Down key attribute.\n slowRefresh = !!(raw.payload[1] & 128);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sequenceNumber,\n keyAttribute,\n sceneNumber,\n slowRefresh,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // In case the interview is not yet completed, we still create some basic metadata\n const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n // Get device configuration to check for custom scene labels\n const sceneConfig = ctx\n .getDeviceConfig?.(this.nodeId as number)\n ?.scenes?.get(this.sceneNumber);\n if (sceneConfig) {\n // Ensure metadata with custom label and description\n this.ensureMetadata(ctx, sceneValue, {\n ...sceneValue.meta,\n label: sceneConfig.label,\n description: sceneConfig.description,\n });\n }\n else {\n // Use default metadata\n this.ensureMetadata(ctx, sceneValue);\n }\n // The spec behavior is pretty complicated, so we cannot just store\n // the value and call it a day. Handling of these notifications will\n // happen in the receiving node class\n return true;\n }\n public readonly sequenceNumber: number;\n public readonly keyAttribute: CentralSceneKeys;\n public readonly sceneNumber: number;\n public readonly slowRefresh: boolean | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n let keyAttributeByte = this.keyAttribute & 0b111;\n if (this.slowRefresh)\n keyAttributeByte |= 0x80;\n this.payload = Bytes.from([\n this.sequenceNumber,\n keyAttributeByte,\n this.sceneNumber,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"sequence number\": this.sequenceNumber,\n \"key attribute\": getEnumMemberName(CentralSceneKeys, this.keyAttribute),\n \"scene number\": this.sceneNumber,\n };\n if (this.slowRefresh != undefined) {\n message[\"slow refresh\"] = this.slowRefresh;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n sceneCount: number;\n supportsSlowRefresh: MaybeNotKnown<boolean>;\n supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\"supportsSlowRefresh\", CentralSceneCCValues.supportsSlowRefresh)\n@ccValueProperty(\"supportedKeyAttributes\", CentralSceneCCValues.supportedKeyAttributes)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sceneCount = options.sceneCount;\n this.supportsSlowRefresh = options.supportsSlowRefresh;\n for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {\n this._supportedKeyAttributes.set(parseInt(scene), keys);\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCSupportedReport {\n validatePayload(raw.payload.length >= 2);\n const sceneCount = raw.payload[0];\n const supportsSlowRefresh: MaybeNotKnown<boolean> = !!(raw.payload[1] & 128);\n const bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n const identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n const numEntries = identicalKeyAttributes ? 1 : sceneCount;\n validatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n const supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]> = {};\n for (let i = 0; i < numEntries; i++) {\n const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);\n supportedKeyAttributes[i + 1] = parseBitMask(mask, CentralSceneKeys.KeyPressed);\n }\n if (identicalKeyAttributes) {\n // The key attributes are only transmitted for scene 1, copy them to the others\n for (let i = 2; i <= sceneCount; i++) {\n supportedKeyAttributes[i] = supportedKeyAttributes[1];\n }\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sceneCount,\n supportsSlowRefresh,\n supportedKeyAttributes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Get device configuration to check for custom scene labels\n const deviceConfig = ctx.getDeviceConfig?.(this.nodeId as number);\n // Create/extend metadata for all scenes\n for (let i = 1; i <= this.sceneCount; i++) {\n const sceneValue = CentralSceneCCValues.scene(i);\n const sceneMetadata = { ...sceneValue.meta };\n // Check if there's a custom configuration for this scene\n const sceneConfig = deviceConfig?.scenes?.get(i);\n if (sceneConfig) {\n // @ts-expect-error The label type is a literal\n sceneMetadata.label = sceneConfig.label;\n }\n if (sceneConfig?.description) {\n // @ts-expect-error The predefined metadata has no description\n sceneMetadata.description = sceneConfig.description;\n }\n this.setMetadata(ctx, sceneValue, {\n ...sceneMetadata,\n states: enumValuesToMetadataStates(CentralSceneKeys, this._supportedKeyAttributes.get(i)),\n });\n }\n return true;\n }\n public readonly sceneCount: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const masks: Bytes[] = [];\n for (let i = 1; i <= this.sceneCount; i++) {\n masks.push(encodeBitMask(this.supportedKeyAttributes.get(i) ?? [], 7, CentralSceneKeys.KeyPressed));\n }\n const bitMaskBytes = masks[0]?.length ?? 1;\n let byte1 = bitMaskBytes << 1;\n if (this.supportsSlowRefresh) {\n byte1 |= 0x80;\n }\n this.payload = Bytes.concat([[this.sceneCount, byte1], ...masks]);\n return super.serialize(ctx);\n }\n // TODO: Only offer `slowRefresh` if this is true\n public readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n private _supportedKeyAttributes = new Map<number, readonly CentralSceneKeys[]>();\n public get supportedKeyAttributes(): ReadonlyMap<number, readonly CentralSceneKeys[]> {\n return this._supportedKeyAttributes;\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"scene count\": this.sceneCount,\n \"supports slow refresh\": maybeUnknownToString(this.supportsSlowRefresh),\n };\n for (const [scene, keys] of this.supportedKeyAttributes) {\n message[`supported attributes (scene #${scene})`] = logList(keys.map((k) => getEnumMemberName(CentralSceneKeys, k)));\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCConfigurationReport {\n validatePayload(raw.payload.length >= 1);\n const slowRefresh = !!(raw.payload[0] & 128);\n return new this({\n nodeId: ctx.sourceNodeId,\n slowRefresh,\n });\n }\n public readonly slowRefresh: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.slowRefresh ? 0x80 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationSetOptions>) {\n super(options);\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCConfigurationSet {\n validatePayload(raw.payload.length >= 1);\n return new this({\n nodeId: ctx.sourceNodeId,\n slowRefresh: !!(raw.payload[0] & 0x80),\n });\n }\n public slowRefresh: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.slowRefresh ? 128 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAmU;AACnU,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAA4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AK,UAAU,oBAAM,KAAK,CAAC,KAAK,cAAc,MAAM,CAAC,CAAC;AACtD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,gBAAgB,KAAK,YAAW;;IAEnD;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,7 +26,7 @@ export interface ClimateControlScheduleCCSetOptions {
|
|
|
26
26
|
}
|
|
27
27
|
export declare class ClimateControlScheduleCCSet extends ClimateControlScheduleCC {
|
|
28
28
|
constructor(options: WithAddress<ClimateControlScheduleCCSetOptions>);
|
|
29
|
-
static from(
|
|
29
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCSet;
|
|
30
30
|
switchPoints: Switchpoint[];
|
|
31
31
|
weekday: Weekday;
|
|
32
32
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
@@ -41,6 +41,7 @@ export declare class ClimateControlScheduleCCReport extends ClimateControlSchedu
|
|
|
41
41
|
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCReport;
|
|
42
42
|
readonly weekday: Weekday;
|
|
43
43
|
readonly schedule: readonly Switchpoint[];
|
|
44
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
44
45
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
45
46
|
}
|
|
46
47
|
export interface ClimateControlScheduleCCGetOptions {
|
|
@@ -48,7 +49,7 @@ export interface ClimateControlScheduleCCGetOptions {
|
|
|
48
49
|
}
|
|
49
50
|
export declare class ClimateControlScheduleCCGet extends ClimateControlScheduleCC {
|
|
50
51
|
constructor(options: WithAddress<ClimateControlScheduleCCGetOptions>);
|
|
51
|
-
static from(
|
|
52
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCGet;
|
|
52
53
|
weekday: Weekday;
|
|
53
54
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
54
55
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -60,6 +61,7 @@ export declare class ClimateControlScheduleCCChangedReport extends ClimateContro
|
|
|
60
61
|
constructor(options: WithAddress<ClimateControlScheduleCCChangedReportOptions>);
|
|
61
62
|
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCChangedReport;
|
|
62
63
|
readonly changeCounter: number;
|
|
64
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
63
65
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
64
66
|
}
|
|
65
67
|
export declare class ClimateControlScheduleCCChangedGet extends ClimateControlScheduleCC {
|
|
@@ -73,6 +75,7 @@ export declare class ClimateControlScheduleCCOverrideReport extends ClimateContr
|
|
|
73
75
|
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCOverrideReport;
|
|
74
76
|
readonly overrideType: ScheduleOverrideType;
|
|
75
77
|
readonly overrideState: SetbackState;
|
|
78
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
76
79
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
77
80
|
}
|
|
78
81
|
export declare class ClimateControlScheduleCCOverrideGet extends ClimateControlScheduleCC {
|
|
@@ -83,7 +86,7 @@ export interface ClimateControlScheduleCCOverrideSetOptions {
|
|
|
83
86
|
}
|
|
84
87
|
export declare class ClimateControlScheduleCCOverrideSet extends ClimateControlScheduleCC {
|
|
85
88
|
constructor(options: WithAddress<ClimateControlScheduleCCOverrideSetOptions>);
|
|
86
|
-
static from(
|
|
89
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCOverrideSet;
|
|
87
90
|
overrideType: ScheduleOverrideType;
|
|
88
91
|
overrideState: SetbackState;
|
|
89
92
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
@@ -205,8 +205,19 @@ let ClimateControlScheduleCCSet = (() => {
|
|
|
205
205
|
this.switchPoints = options.switchPoints;
|
|
206
206
|
this.weekday = options.weekday;
|
|
207
207
|
}
|
|
208
|
-
static from(
|
|
209
|
-
|
|
208
|
+
static from(raw, ctx) {
|
|
209
|
+
(0, import_core.validatePayload)(raw.payload.length >= 28);
|
|
210
|
+
const switchPoints = [];
|
|
211
|
+
for (let i = 0; i < 9; i++) {
|
|
212
|
+
const sp = (0, import_serializers.decodeSwitchpoint)(raw.payload.subarray(1 + 3 * i));
|
|
213
|
+
if (sp.state !== "Unused")
|
|
214
|
+
switchPoints.push(sp);
|
|
215
|
+
}
|
|
216
|
+
return new this({
|
|
217
|
+
nodeId: ctx.sourceNodeId,
|
|
218
|
+
weekday: raw.payload[0] & 7,
|
|
219
|
+
switchPoints
|
|
220
|
+
});
|
|
210
221
|
}
|
|
211
222
|
switchPoints;
|
|
212
223
|
weekday;
|
|
@@ -279,6 +290,21 @@ let ClimateControlScheduleCCReport = (() => {
|
|
|
279
290
|
}
|
|
280
291
|
weekday;
|
|
281
292
|
schedule;
|
|
293
|
+
serialize(ctx) {
|
|
294
|
+
const switchpointBytes = [];
|
|
295
|
+
for (let i = 0; i < 9; i++) {
|
|
296
|
+
switchpointBytes.push((0, import_serializers.encodeSwitchpoint)(this.schedule[i] ?? {
|
|
297
|
+
hour: 0,
|
|
298
|
+
minute: 0,
|
|
299
|
+
state: "Unused"
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
this.payload = import_shared.Bytes.concat([
|
|
303
|
+
[this.weekday & 7],
|
|
304
|
+
...switchpointBytes
|
|
305
|
+
]);
|
|
306
|
+
return super.serialize(ctx);
|
|
307
|
+
}
|
|
282
308
|
toLogEntry(ctx) {
|
|
283
309
|
return {
|
|
284
310
|
...super.toLogEntry(ctx),
|
|
@@ -316,8 +342,12 @@ let ClimateControlScheduleCCGet = (() => {
|
|
|
316
342
|
super(options);
|
|
317
343
|
this.weekday = options.weekday;
|
|
318
344
|
}
|
|
319
|
-
static from(
|
|
320
|
-
|
|
345
|
+
static from(raw, ctx) {
|
|
346
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
347
|
+
return new this({
|
|
348
|
+
nodeId: ctx.sourceNodeId,
|
|
349
|
+
weekday: raw.payload[0] & 7
|
|
350
|
+
});
|
|
321
351
|
}
|
|
322
352
|
weekday;
|
|
323
353
|
serialize(ctx) {
|
|
@@ -366,6 +396,10 @@ let ClimateControlScheduleCCChangedReport = (() => {
|
|
|
366
396
|
});
|
|
367
397
|
}
|
|
368
398
|
changeCounter;
|
|
399
|
+
serialize(ctx) {
|
|
400
|
+
this.payload = import_shared.Bytes.from([this.changeCounter]);
|
|
401
|
+
return super.serialize(ctx);
|
|
402
|
+
}
|
|
369
403
|
toLogEntry(ctx) {
|
|
370
404
|
return {
|
|
371
405
|
...super.toLogEntry(ctx),
|
|
@@ -435,6 +469,13 @@ let ClimateControlScheduleCCOverrideReport = (() => {
|
|
|
435
469
|
}
|
|
436
470
|
overrideType;
|
|
437
471
|
overrideState;
|
|
472
|
+
serialize(ctx) {
|
|
473
|
+
this.payload = import_shared.Bytes.concat([
|
|
474
|
+
[this.overrideType & 3],
|
|
475
|
+
(0, import_serializers.encodeSetbackState)(this.overrideState)
|
|
476
|
+
]);
|
|
477
|
+
return super.serialize(ctx);
|
|
478
|
+
}
|
|
438
479
|
toLogEntry(ctx) {
|
|
439
480
|
return {
|
|
440
481
|
...super.toLogEntry(ctx),
|
|
@@ -495,8 +536,15 @@ let ClimateControlScheduleCCOverrideSet = (() => {
|
|
|
495
536
|
this.overrideType = options.overrideType;
|
|
496
537
|
this.overrideState = options.overrideState;
|
|
497
538
|
}
|
|
498
|
-
static from(
|
|
499
|
-
|
|
539
|
+
static from(raw, ctx) {
|
|
540
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
541
|
+
const overrideType = raw.payload[0] & 3;
|
|
542
|
+
const overrideState = (0, import_serializers.decodeSetbackState)(raw.payload, 1) ?? raw.payload.readInt8(1);
|
|
543
|
+
return new this({
|
|
544
|
+
nodeId: ctx.sourceNodeId,
|
|
545
|
+
overrideType,
|
|
546
|
+
overrideState
|
|
547
|
+
});
|
|
500
548
|
}
|
|
501
549
|
overrideType;
|
|
502
550
|
overrideState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ClimateControlScheduleCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./ClimateControlScheduleCC._validateArgs.js\";\nconst { validateArgs_ClimateControlScheduleCCAPI_set, validateArgs_ClimateControlScheduleCCAPI_get, validateArgs_ClimateControlScheduleCCAPI_setOverride } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ClimateControlScheduleCommand, ScheduleOverrideType, type SetbackState, type Switchpoint, Weekday, } from \"../lib/_Types.js\";\nimport { decodeSetbackState, decodeSwitchpoint, encodeSetbackState, encodeSwitchpoint, } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ClimateControlScheduleCCValues } from \"./_CCValues.generated.js\";\nexport { ClimateControlScheduleCCValues };\n@API(CommandClasses[\"Climate Control Schedule\"])\nexport class ClimateControlScheduleCCAPI extends CCAPI {\n public supportsCommand(cmd: ClimateControlScheduleCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ClimateControlScheduleCommand.Set:\n case ClimateControlScheduleCommand.OverrideSet:\n return true; // mandatory\n case ClimateControlScheduleCommand.Get:\n case ClimateControlScheduleCommand.ChangedGet:\n case ClimateControlScheduleCommand.OverrideGet:\n return this.isSinglecast();\n }\n return super.supportsCommand(cmd);\n }\n @validateArgs_ClimateControlScheduleCCAPI_set()\n public async set(weekday: Weekday, switchPoints: Switchpoint[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.Set);\n const cc = new ClimateControlScheduleCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n weekday,\n switchPoints,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_ClimateControlScheduleCCAPI_get()\n public async get(weekday: Weekday): Promise<MaybeNotKnown<readonly Switchpoint[]>> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.Get);\n const cc = new ClimateControlScheduleCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n weekday,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCReport>(cc, this.commandOptions);\n return response?.schedule;\n }\n public async getChangeCounter(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.ChangedGet);\n const cc = new ClimateControlScheduleCCChangedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCChangedReport>(cc, this.commandOptions);\n return response?.changeCounter;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getOverride() {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.OverrideGet);\n const cc = new ClimateControlScheduleCCOverrideGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCOverrideReport>(cc, this.commandOptions);\n if (response) {\n return {\n type: response.overrideType,\n state: response.overrideState,\n };\n }\n }\n @validateArgs_ClimateControlScheduleCCAPI_setOverride()\n public async setOverride(type: ScheduleOverrideType, state: SetbackState): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.OverrideSet);\n const cc = new ClimateControlScheduleCCOverrideSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n overrideType: type,\n overrideState: state,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Climate Control Schedule\"])\n@implementedVersion(1)\n@ccValues(ClimateControlScheduleCCValues)\nexport class ClimateControlScheduleCC extends CommandClass {\n declare ccCommand: ClimateControlScheduleCommand;\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCSetOptions {\n weekday: Weekday;\n switchPoints: Switchpoint[];\n}\n@CCCommand(ClimateControlScheduleCommand.Set)\n@useSupervision()\nexport class ClimateControlScheduleCCSet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCSetOptions>) {\n super(options);\n this.switchPoints = options.switchPoints;\n this.weekday = options.weekday;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ClimateControlScheduleCCSet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ClimateControlScheduleCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public switchPoints: Switchpoint[];\n public weekday: Weekday;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n // Make sure we have exactly 9 entries\n const allSwitchPoints = this.switchPoints.slice(0, 9); // maximum 9\n while (allSwitchPoints.length < 9) {\n allSwitchPoints.push({\n hour: 0,\n minute: 0,\n state: \"Unused\",\n });\n }\n this.payload = Bytes.concat([\n [this.weekday & 0b111],\n ...allSwitchPoints.map((sp) => encodeSwitchpoint(sp)),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n weekday: getEnumMemberName(Weekday, this.weekday),\n switchpoints: this.switchPoints\n .map((sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${sp.minute\n .toString()\n .padStart(2, \"0\")} --> ${sp.state}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCReportOptions {\n weekday: Weekday;\n schedule: Switchpoint[];\n}\n@CCCommand(ClimateControlScheduleCommand.Report)\n@ccValueProperty(\"schedule\", ClimateControlScheduleCCValues.schedule, (self) => [self.weekday])\nexport class ClimateControlScheduleCCReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.weekday = options.weekday;\n this.schedule = options.schedule;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCReport {\n validatePayload(raw.payload.length >= 28);\n const weekday: Weekday = raw.payload[0] & 0b111;\n const allSwitchpoints: Switchpoint[] = [];\n for (let i = 0; i <= 8; i++) {\n allSwitchpoints.push(decodeSwitchpoint(raw.payload.subarray(1 + 3 * i)));\n }\n const schedule: Switchpoint[] = allSwitchpoints.filter((sp) => sp.state !== \"Unused\");\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday,\n schedule,\n });\n }\n public readonly weekday: Weekday;\n public readonly schedule: readonly Switchpoint[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n weekday: getEnumMemberName(Weekday, this.weekday),\n schedule: this.schedule\n .map((sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${sp.minute\n .toString()\n .padStart(2, \"0\")} --> ${sp.state}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCGetOptions {\n weekday: Weekday;\n}\n@CCCommand(ClimateControlScheduleCommand.Get)\n@expectedCCResponse(ClimateControlScheduleCCReport)\nexport class ClimateControlScheduleCCGet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCGetOptions>) {\n super(options);\n this.weekday = options.weekday;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ClimateControlScheduleCCGet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ClimateControlScheduleCCGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public weekday: Weekday;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.weekday & 0b111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { weekday: getEnumMemberName(Weekday, this.weekday) },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCChangedReportOptions {\n changeCounter: number;\n}\n@CCCommand(ClimateControlScheduleCommand.ChangedReport)\nexport class ClimateControlScheduleCCChangedReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCChangedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.changeCounter = options.changeCounter;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCChangedReport {\n validatePayload(raw.payload.length >= 1);\n const changeCounter = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n changeCounter,\n });\n }\n public readonly changeCounter: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"change counter\": this.changeCounter },\n };\n }\n}\n@CCCommand(ClimateControlScheduleCommand.ChangedGet)\n@expectedCCResponse(ClimateControlScheduleCCChangedReport)\nexport class ClimateControlScheduleCCChangedGet extends ClimateControlScheduleCC {\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideReportOptions {\n overrideType: ScheduleOverrideType;\n overrideState: SetbackState;\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideReport)\n@ccValueProperty(\"overrideType\", ClimateControlScheduleCCValues.overrideType)\n@ccValueProperty(\"overrideState\", ClimateControlScheduleCCValues.overrideState)\nexport class ClimateControlScheduleCCOverrideReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCOverrideReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.overrideType = options.overrideType;\n this.overrideState = options.overrideState;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCOverrideReport {\n validatePayload(raw.payload.length >= 2);\n const overrideType: ScheduleOverrideType = raw.payload[0] & 0b11;\n const overrideState: SetbackState = decodeSetbackState(raw.payload, 1)\n // If we receive an unknown setback state, return the raw value\n || raw.payload.readInt8(1);\n return new this({\n nodeId: ctx.sourceNodeId,\n overrideType,\n overrideState,\n });\n }\n public readonly overrideType: ScheduleOverrideType;\n public readonly overrideState: SetbackState;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"override type\": getEnumMemberName(ScheduleOverrideType, this.overrideType),\n \"override state\": this.overrideState,\n },\n };\n }\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideGet)\n@expectedCCResponse(ClimateControlScheduleCCOverrideReport)\nexport class ClimateControlScheduleCCOverrideGet extends ClimateControlScheduleCC {\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideSetOptions {\n overrideType: ScheduleOverrideType;\n overrideState: SetbackState;\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideSet)\n@useSupervision()\nexport class ClimateControlScheduleCCOverrideSet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCOverrideSetOptions>) {\n super(options);\n this.overrideType = options.overrideType;\n this.overrideState = options.overrideState;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ClimateControlScheduleCCOverrideSet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ClimateControlScheduleCCOverrideSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public overrideType: ScheduleOverrideType;\n public overrideState: SetbackState;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.overrideType & 0b11],\n encodeSetbackState(this.overrideState),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"override type\": getEnumMemberName(ScheduleOverrideType, this.overrideType),\n \"override state\": this.overrideState,\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./ClimateControlScheduleCC._validateArgs.js\";\nconst { validateArgs_ClimateControlScheduleCCAPI_set, validateArgs_ClimateControlScheduleCCAPI_get, validateArgs_ClimateControlScheduleCCAPI_setOverride } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ClimateControlScheduleCommand, ScheduleOverrideType, type SetbackState, type Switchpoint, Weekday, } from \"../lib/_Types.js\";\nimport { decodeSetbackState, decodeSwitchpoint, encodeSetbackState, encodeSwitchpoint, } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ClimateControlScheduleCCValues } from \"./_CCValues.generated.js\";\nexport { ClimateControlScheduleCCValues };\n@API(CommandClasses[\"Climate Control Schedule\"])\nexport class ClimateControlScheduleCCAPI extends CCAPI {\n public supportsCommand(cmd: ClimateControlScheduleCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ClimateControlScheduleCommand.Set:\n case ClimateControlScheduleCommand.OverrideSet:\n return true; // mandatory\n case ClimateControlScheduleCommand.Get:\n case ClimateControlScheduleCommand.ChangedGet:\n case ClimateControlScheduleCommand.OverrideGet:\n return this.isSinglecast();\n }\n return super.supportsCommand(cmd);\n }\n @validateArgs_ClimateControlScheduleCCAPI_set()\n public async set(weekday: Weekday, switchPoints: Switchpoint[]): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.Set);\n const cc = new ClimateControlScheduleCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n weekday,\n switchPoints,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_ClimateControlScheduleCCAPI_get()\n public async get(weekday: Weekday): Promise<MaybeNotKnown<readonly Switchpoint[]>> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.Get);\n const cc = new ClimateControlScheduleCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n weekday,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCReport>(cc, this.commandOptions);\n return response?.schedule;\n }\n public async getChangeCounter(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.ChangedGet);\n const cc = new ClimateControlScheduleCCChangedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCChangedReport>(cc, this.commandOptions);\n return response?.changeCounter;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getOverride() {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.OverrideGet);\n const cc = new ClimateControlScheduleCCOverrideGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ClimateControlScheduleCCOverrideReport>(cc, this.commandOptions);\n if (response) {\n return {\n type: response.overrideType,\n state: response.overrideState,\n };\n }\n }\n @validateArgs_ClimateControlScheduleCCAPI_setOverride()\n public async setOverride(type: ScheduleOverrideType, state: SetbackState): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ClimateControlScheduleCommand, ClimateControlScheduleCommand.OverrideSet);\n const cc = new ClimateControlScheduleCCOverrideSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n overrideType: type,\n overrideState: state,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Climate Control Schedule\"])\n@implementedVersion(1)\n@ccValues(ClimateControlScheduleCCValues)\nexport class ClimateControlScheduleCC extends CommandClass {\n declare ccCommand: ClimateControlScheduleCommand;\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCSetOptions {\n weekday: Weekday;\n switchPoints: Switchpoint[];\n}\n@CCCommand(ClimateControlScheduleCommand.Set)\n@useSupervision()\nexport class ClimateControlScheduleCCSet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCSetOptions>) {\n super(options);\n this.switchPoints = options.switchPoints;\n this.weekday = options.weekday;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCSet {\n validatePayload(raw.payload.length >= 28);\n const switchPoints: Switchpoint[] = [];\n for (let i = 0; i < 9; i++) {\n const sp = decodeSwitchpoint(raw.payload.subarray(1 + 3 * i));\n if (sp.state !== \"Unused\")\n switchPoints.push(sp);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday: raw.payload[0] & 0b111,\n switchPoints,\n });\n }\n public switchPoints: Switchpoint[];\n public weekday: Weekday;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n // Make sure we have exactly 9 entries\n const allSwitchPoints = this.switchPoints.slice(0, 9); // maximum 9\n while (allSwitchPoints.length < 9) {\n allSwitchPoints.push({\n hour: 0,\n minute: 0,\n state: \"Unused\",\n });\n }\n this.payload = Bytes.concat([\n [this.weekday & 0b111],\n ...allSwitchPoints.map((sp) => encodeSwitchpoint(sp)),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n weekday: getEnumMemberName(Weekday, this.weekday),\n switchpoints: this.switchPoints\n .map((sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${sp.minute\n .toString()\n .padStart(2, \"0\")} --> ${sp.state}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCReportOptions {\n weekday: Weekday;\n schedule: Switchpoint[];\n}\n@CCCommand(ClimateControlScheduleCommand.Report)\n@ccValueProperty(\"schedule\", ClimateControlScheduleCCValues.schedule, (self) => [self.weekday])\nexport class ClimateControlScheduleCCReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.weekday = options.weekday;\n this.schedule = options.schedule;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCReport {\n validatePayload(raw.payload.length >= 28);\n const weekday: Weekday = raw.payload[0] & 0b111;\n const allSwitchpoints: Switchpoint[] = [];\n for (let i = 0; i <= 8; i++) {\n allSwitchpoints.push(decodeSwitchpoint(raw.payload.subarray(1 + 3 * i)));\n }\n const schedule: Switchpoint[] = allSwitchpoints.filter((sp) => sp.state !== \"Unused\");\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday,\n schedule,\n });\n }\n public readonly weekday: Weekday;\n public readonly schedule: readonly Switchpoint[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const switchpointBytes: Bytes[] = [];\n for (let i = 0; i < 9; i++) {\n // Pad unused switchpoint slots with the \"Unused\" encoding\n switchpointBytes.push(encodeSwitchpoint(this.schedule[i] ?? {\n hour: 0,\n minute: 0,\n state: \"Unused\",\n }));\n }\n this.payload = Bytes.concat([\n [this.weekday & 0b111],\n ...switchpointBytes,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n weekday: getEnumMemberName(Weekday, this.weekday),\n schedule: this.schedule\n .map((sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${sp.minute\n .toString()\n .padStart(2, \"0\")} --> ${sp.state}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCGetOptions {\n weekday: Weekday;\n}\n@CCCommand(ClimateControlScheduleCommand.Get)\n@expectedCCResponse(ClimateControlScheduleCCReport)\nexport class ClimateControlScheduleCCGet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCGetOptions>) {\n super(options);\n this.weekday = options.weekday;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCGet {\n validatePayload(raw.payload.length >= 1);\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday: raw.payload[0] & 0b111,\n });\n }\n public weekday: Weekday;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.weekday & 0b111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { weekday: getEnumMemberName(Weekday, this.weekday) },\n };\n }\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCChangedReportOptions {\n changeCounter: number;\n}\n@CCCommand(ClimateControlScheduleCommand.ChangedReport)\nexport class ClimateControlScheduleCCChangedReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCChangedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.changeCounter = options.changeCounter;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCChangedReport {\n validatePayload(raw.payload.length >= 1);\n const changeCounter = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n changeCounter,\n });\n }\n public readonly changeCounter: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.changeCounter]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"change counter\": this.changeCounter },\n };\n }\n}\n@CCCommand(ClimateControlScheduleCommand.ChangedGet)\n@expectedCCResponse(ClimateControlScheduleCCChangedReport)\nexport class ClimateControlScheduleCCChangedGet extends ClimateControlScheduleCC {\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideReportOptions {\n overrideType: ScheduleOverrideType;\n overrideState: SetbackState;\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideReport)\n@ccValueProperty(\"overrideType\", ClimateControlScheduleCCValues.overrideType)\n@ccValueProperty(\"overrideState\", ClimateControlScheduleCCValues.overrideState)\nexport class ClimateControlScheduleCCOverrideReport extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCOverrideReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.overrideType = options.overrideType;\n this.overrideState = options.overrideState;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCOverrideReport {\n validatePayload(raw.payload.length >= 2);\n const overrideType: ScheduleOverrideType = raw.payload[0] & 0b11;\n const overrideState: SetbackState = decodeSetbackState(raw.payload, 1)\n // If we receive an unknown setback state, return the raw value\n || raw.payload.readInt8(1);\n return new this({\n nodeId: ctx.sourceNodeId,\n overrideType,\n overrideState,\n });\n }\n public readonly overrideType: ScheduleOverrideType;\n public readonly overrideState: SetbackState;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.overrideType & 0b11],\n encodeSetbackState(this.overrideState),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"override type\": getEnumMemberName(ScheduleOverrideType, this.overrideType),\n \"override state\": this.overrideState,\n },\n };\n }\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideGet)\n@expectedCCResponse(ClimateControlScheduleCCOverrideReport)\nexport class ClimateControlScheduleCCOverrideGet extends ClimateControlScheduleCC {\n}\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideSetOptions {\n overrideType: ScheduleOverrideType;\n overrideState: SetbackState;\n}\n@CCCommand(ClimateControlScheduleCommand.OverrideSet)\n@useSupervision()\nexport class ClimateControlScheduleCCOverrideSet extends ClimateControlScheduleCC {\n public constructor(options: WithAddress<ClimateControlScheduleCCOverrideSetOptions>) {\n super(options);\n this.overrideType = options.overrideType;\n this.overrideState = options.overrideState;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClimateControlScheduleCCOverrideSet {\n validatePayload(raw.payload.length >= 2);\n const overrideType = raw.payload[0] & 0b11;\n // If we receive an unknown setback state, return the raw value\n const overrideState = decodeSetbackState(raw.payload, 1) ?? raw.payload.readInt8(1);\n return new this({\n nodeId: ctx.sourceNodeId,\n overrideType,\n overrideState,\n });\n }\n public overrideType: ScheduleOverrideType;\n public overrideState: SetbackState;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.overrideType & 0b11],\n encodeSetbackState(this.overrideState),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"override type\": getEnumMemberName(ScheduleOverrideType, this.overrideType),\n \"override state\": this.overrideState,\n },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAqM;AACrM,oBA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,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;IASA,uCAAmC,MAAA;8BAF/C,yCAAU,2CAA8B,WAAW,OACnD,8CAAc,CAAE;;;;oBACwC;2DAAA,YAAwB;WAAA;;;;;;;;AAAjF,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAgE;AAC/E,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;AAC5B,WAAK,gBAAgB,QAAQ;IACjC;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,eAAe,IAAI,QAAQ,CAAC,IAAI;AAEtC,YAAM,oBAAgB,uCAAmB,IAAI,SAAS,CAAC,KAAK,IAAI,QAAQ,SAAS,CAAC;AAClF,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,OAAO;QACxB,CAAC,KAAK,eAAe,CAAI;YACzB,uCAAmB,KAAK,aAAa;OACxC;AACD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,mCAAsB,KAAK,YAAY;UAC1E,kBAAkB,KAAK;;;IAGnC;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,7 +21,7 @@ export interface ClockCCSetOptions {
|
|
|
21
21
|
}
|
|
22
22
|
export declare class ClockCCSet extends ClockCC {
|
|
23
23
|
constructor(options: WithAddress<ClockCCSetOptions>);
|
|
24
|
-
static from(
|
|
24
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ClockCCSet;
|
|
25
25
|
weekday: Weekday;
|
|
26
26
|
hour: number;
|
|
27
27
|
minute: number;
|
|
@@ -39,6 +39,7 @@ export declare class ClockCCReport extends ClockCC {
|
|
|
39
39
|
readonly weekday: Weekday;
|
|
40
40
|
readonly hour: number;
|
|
41
41
|
readonly minute: number;
|
|
42
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
42
43
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
43
44
|
}
|
|
44
45
|
export declare class ClockCCGet extends ClockCC {
|
package/build/cjs/cc/ClockCC.js
CHANGED
|
@@ -187,8 +187,18 @@ let ClockCCSet = (() => {
|
|
|
187
187
|
this.hour = options.hour;
|
|
188
188
|
this.minute = options.minute;
|
|
189
189
|
}
|
|
190
|
-
static from(
|
|
191
|
-
|
|
190
|
+
static from(raw, ctx) {
|
|
191
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
192
|
+
const weekday = raw.payload[0] >>> 5;
|
|
193
|
+
const hour = raw.payload[0] & 31;
|
|
194
|
+
const minute = raw.payload[1];
|
|
195
|
+
(0, import_core.validatePayload)(weekday <= import_Types.Weekday.Sunday, hour <= 23, minute <= 59);
|
|
196
|
+
return new this({
|
|
197
|
+
nodeId: ctx.sourceNodeId,
|
|
198
|
+
weekday,
|
|
199
|
+
hour,
|
|
200
|
+
minute
|
|
201
|
+
});
|
|
192
202
|
}
|
|
193
203
|
weekday;
|
|
194
204
|
hour;
|
|
@@ -253,6 +263,13 @@ let ClockCCReport = (() => {
|
|
|
253
263
|
weekday;
|
|
254
264
|
hour;
|
|
255
265
|
minute;
|
|
266
|
+
serialize(ctx) {
|
|
267
|
+
this.payload = import_shared.Bytes.from([
|
|
268
|
+
(this.weekday & 7) << 5 | this.hour & 31,
|
|
269
|
+
this.minute
|
|
270
|
+
]);
|
|
271
|
+
return super.serialize(ctx);
|
|
272
|
+
}
|
|
256
273
|
toLogEntry(ctx) {
|
|
257
274
|
return {
|
|
258
275
|
...super.toLogEntry(ctx),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ClockCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./ClockCC._validateArgs.js\";\nconst { validateArgs_ClockCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, type WithAddress,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./ClockCC._validateArgs.js\";\nconst { validateArgs_ClockCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, type WithAddress, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { ClockCommand, Weekday } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\n// @noSetValueAPI - This CC has no simple value to set\n@API(CommandClasses.Clock)\nexport class ClockCCAPI extends CCAPI {\n public supportsCommand(cmd: ClockCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ClockCommand.Get:\n return this.isSinglecast();\n case ClockCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ClockCommand, ClockCommand.Get);\n const cc = new ClockCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ClockCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"weekday\", \"hour\", \"minute\"]);\n }\n }\n @validateArgs_ClockCCAPI_set()\n public async set(hour: number, minute: number, weekday?: Weekday): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ClockCommand, ClockCommand.Set);\n const cc = new ClockCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n hour,\n minute,\n weekday: weekday ?? Weekday.Unknown,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Clock)\n@implementedVersion(1)\nexport class ClockCC extends CommandClass {\n declare ccCommand: ClockCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Clock, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n ctx.logNode(node.id, {\n message: \"requesting current clock setting...\",\n direction: \"outbound\",\n });\n const response = await api.get();\n if (response) {\n const logMessage = `received current clock setting: ${response.weekday !== Weekday.Unknown\n ? Weekday[response.weekday] + \", \"\n : \"\"}${response.hour < 10 ? \"0\" : \"\"}${response.hour}:${response.minute < 10 ? \"0\" : \"\"}${response.minute}`;\n ctx.logNode(node.id, {\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ClockCCSetOptions {\n weekday: Weekday;\n hour: number;\n minute: number;\n}\n@CCCommand(ClockCommand.Set)\n@useSupervision()\nexport class ClockCCSet extends ClockCC {\n public constructor(options: WithAddress<ClockCCSetOptions>) {\n super(options);\n this.weekday = options.weekday;\n this.hour = options.hour;\n this.minute = options.minute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClockCCSet {\n validatePayload(raw.payload.length >= 2);\n const weekday: Weekday = raw.payload[0] >>> 5;\n const hour = raw.payload[0] & 0b11111;\n const minute = raw.payload[1];\n validatePayload(weekday <= Weekday.Sunday, hour <= 23, minute <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday,\n hour,\n minute,\n });\n }\n public weekday: Weekday;\n public hour: number;\n public minute: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n ((this.weekday & 0b111) << 5) | (this.hour & 0b11111),\n this.minute,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"clock setting\": `${getEnumMemberName(Weekday, this.weekday)}, ${this.hour.toString().padStart(2, \"0\")}:${this.minute\n .toString()\n .padStart(2, \"0\")}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface ClockCCReportOptions {\n weekday: Weekday;\n hour: number;\n minute: number;\n}\n@CCCommand(ClockCommand.Report)\nexport class ClockCCReport extends ClockCC {\n public constructor(options: WithAddress<ClockCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.weekday = options.weekday;\n this.hour = options.hour;\n this.minute = options.minute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ClockCCReport {\n validatePayload(raw.payload.length >= 2);\n const weekday: Weekday = raw.payload[0] >>> 5;\n const hour = raw.payload[0] & 0b11111;\n const minute = raw.payload[1];\n validatePayload(weekday <= Weekday.Sunday, hour <= 23, minute <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n weekday,\n hour,\n minute,\n });\n }\n public readonly weekday: Weekday;\n public readonly hour: number;\n public readonly minute: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n ((this.weekday & 0b111) << 5) | (this.hour & 0b11111),\n this.minute,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"clock setting\": `${getEnumMemberName(Weekday, this.weekday)}, ${this.hour.toString().padStart(2, \"0\")}:${this.minute\n .toString()\n .padStart(2, \"0\")}`,\n },\n };\n }\n}\n@CCCommand(ClockCommand.Get)\n@expectedCCResponse(ClockCCReport)\nexport class ClockCCGet extends ClockCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA2K;AAC3K,oBAA+C;AAC/C,iBAAsB;AACtB,0BAAuH;AACvH,oCAAsG;AACtG,mBAAsC;AANtC,MAAM,EAAE,4BAA2B,IAAK;IAU3B,cAAU,MAAA;8BADtB,mCAAI,2BAAe,KAAK,CAAC;;;;oBACM;;;kCAAA,YAAK;WAAA;;;;;;;;yBAsBhC,4BAA2B,CAAE;AAC9B,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAvBpB,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAAiB;AACpC,cAAQ,KAAK;QACT,KAAK,0BAAa;AACd,iBAAO,KAAK,aAAY;QAC5B,KAAK,0BAAa;AACd,iBAAO;MACf;AACA,aAAO,M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AAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,iBAAiB,OAAG,iCAAkB,sBAAS,KAAK,OAAO,CAAC,KAAK,KAAK,KAAK,SAAQ,EAAG,SAAS,GAAG,GAAG,CAAC,IAAI,KAAK,OAC1G,SAAQ,EACR,SAAS,GAAG,GAAG,CAAC;;;IAGjC;;;;IAIS,cAAU,MAAA;8BAFtB,yCAAU,0BAAa,GAAG,OAC1B,kDAAmB,aAAa,CAAC;;;;oBACF;kCAAA,YAAO;WAAA;;;;;;;;AAAvC,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -216,7 +216,7 @@ export type ConfigurationCCBulkSetOptions = {
|
|
|
216
216
|
});
|
|
217
217
|
export declare class ConfigurationCCBulkSet extends ConfigurationCC {
|
|
218
218
|
constructor(options: WithAddress<ConfigurationCCBulkSetOptions>);
|
|
219
|
-
static from(
|
|
219
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ConfigurationCCBulkSet;
|
|
220
220
|
private _parameters;
|
|
221
221
|
get parameters(): number[];
|
|
222
222
|
private _resetToDefault;
|
|
@@ -249,6 +249,7 @@ export declare class ConfigurationCCBulkReport extends ConfigurationCC {
|
|
|
249
249
|
valueSize: number;
|
|
250
250
|
private _values;
|
|
251
251
|
get values(): ReadonlyMap<number, ConfigValue>;
|
|
252
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
252
253
|
getPartialCCSessionId(): Record<string, any> | undefined;
|
|
253
254
|
getRemainingSegments(): number | undefined;
|
|
254
255
|
mergePartialCCs(partials: ConfigurationCCBulkReport[], _ctx: CCParsingContext): Promise<void>;
|
|
@@ -259,7 +260,7 @@ export interface ConfigurationCCBulkGetOptions {
|
|
|
259
260
|
}
|
|
260
261
|
export declare class ConfigurationCCBulkGet extends ConfigurationCC {
|
|
261
262
|
constructor(options: WithAddress<ConfigurationCCBulkGetOptions>);
|
|
262
|
-
static from(
|
|
263
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ConfigurationCCBulkGet;
|
|
263
264
|
private _parameters;
|
|
264
265
|
get parameters(): number[];
|
|
265
266
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|