@zwave-js/cc 15.3.2 → 15.5.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/DoorLockCC.d.ts +30 -0
- package/build/cjs/cc/DoorLockCC.js +42 -0
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/VersionCC._validateArgs.js +3 -3
- package/build/cjs/cc/VersionCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/VersionCC.d.ts +1 -1
- package/build/cjs/cc/VersionCC.js +2 -2
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BasicCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ClockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +30 -0
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +54 -0
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/LockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MeterCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/TimeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/VersionCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/VersionCC._validateArgs.js +3 -3
- package/build/esm/cc/VersionCC._validateArgs.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -2
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC._validateArgs.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -711,6 +711,36 @@ export declare class DoorLockCC extends CommandClass {
|
|
|
711
711
|
ccCommand: DoorLockCommand;
|
|
712
712
|
interview(ctx: InterviewContext): Promise<void>;
|
|
713
713
|
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
714
|
+
/**
|
|
715
|
+
* Returns whether the node supports auto relock.
|
|
716
|
+
* This only works AFTER the node has been interviewed.
|
|
717
|
+
*/
|
|
718
|
+
static supportsAutoRelockCached(ctx: GetValueDB, endpoint: EndpointId): boolean;
|
|
719
|
+
/**
|
|
720
|
+
* Returns whether the node supports hold and release.
|
|
721
|
+
* This only works AFTER the node has been interviewed.
|
|
722
|
+
*/
|
|
723
|
+
static supportsHoldAndReleaseCached(ctx: GetValueDB, endpoint: EndpointId): boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Returns whether the node supports twist assist.
|
|
726
|
+
* This only works AFTER the node has been interviewed.
|
|
727
|
+
*/
|
|
728
|
+
static supportsTwistAssistCached(ctx: GetValueDB, endpoint: EndpointId): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Returns whether the node supports block to block.
|
|
731
|
+
* This only works AFTER the node has been interviewed.
|
|
732
|
+
*/
|
|
733
|
+
static supportsBlockToBlockCached(ctx: GetValueDB, endpoint: EndpointId): boolean;
|
|
734
|
+
/**
|
|
735
|
+
* Returns the supported outside handles.
|
|
736
|
+
* This only works AFTER the node has been interviewed.
|
|
737
|
+
*/
|
|
738
|
+
static getSupportedOutsideHandlesCached(ctx: GetValueDB, endpoint: EndpointId): MaybeNotKnown<DoorHandleStatus>;
|
|
739
|
+
/**
|
|
740
|
+
* Returns the supported inside handles.
|
|
741
|
+
* This only works AFTER the node has been interviewed.
|
|
742
|
+
*/
|
|
743
|
+
static getSupportedInsideHandlesCached(ctx: GetValueDB, endpoint: EndpointId): MaybeNotKnown<DoorHandleStatus>;
|
|
714
744
|
}
|
|
715
745
|
export interface DoorLockCCOperationSetOptions {
|
|
716
746
|
mode: DoorLockMode;
|
|
@@ -530,6 +530,48 @@ latch status: ${status.latchStatus}`;
|
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Returns whether the node supports auto relock.
|
|
535
|
+
* This only works AFTER the node has been interviewed.
|
|
536
|
+
*/
|
|
537
|
+
static supportsAutoRelockCached(ctx, endpoint) {
|
|
538
|
+
return !!ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.autoRelockSupported.endpoint(endpoint.index));
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Returns whether the node supports hold and release.
|
|
542
|
+
* This only works AFTER the node has been interviewed.
|
|
543
|
+
*/
|
|
544
|
+
static supportsHoldAndReleaseCached(ctx, endpoint) {
|
|
545
|
+
return !!ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.holdAndReleaseSupported.endpoint(endpoint.index));
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Returns whether the node supports twist assist.
|
|
549
|
+
* This only works AFTER the node has been interviewed.
|
|
550
|
+
*/
|
|
551
|
+
static supportsTwistAssistCached(ctx, endpoint) {
|
|
552
|
+
return !!ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.twistAssistSupported.endpoint(endpoint.index));
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Returns whether the node supports block to block.
|
|
556
|
+
* This only works AFTER the node has been interviewed.
|
|
557
|
+
*/
|
|
558
|
+
static supportsBlockToBlockCached(ctx, endpoint) {
|
|
559
|
+
return !!ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.blockToBlockSupported.endpoint(endpoint.index));
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Returns the supported outside handles.
|
|
563
|
+
* This only works AFTER the node has been interviewed.
|
|
564
|
+
*/
|
|
565
|
+
static getSupportedOutsideHandlesCached(ctx, endpoint) {
|
|
566
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.supportedOutsideHandles.endpoint(endpoint.index));
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Returns the supported inside handles.
|
|
570
|
+
* This only works AFTER the node has been interviewed.
|
|
571
|
+
*/
|
|
572
|
+
static getSupportedInsideHandlesCached(ctx, endpoint) {
|
|
573
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.DoorLockCCValues.supportedInsideHandles.endpoint(endpoint.index));
|
|
574
|
+
}
|
|
533
575
|
};
|
|
534
576
|
return DoorLockCC2 = _classThis;
|
|
535
577
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/DoorLockCC.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype EndpointId,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { isArray } from \"alcalzone-shared/typeguards\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype DoorHandleStatus,\n\tDoorLockCommand,\n\tDoorLockMode,\n\tDoorLockOperationType,\n} from \"../lib/_Types.js\";\n\nexport const DoorLockCCValues = V.defineCCValues(CommandClasses[\"Door Lock\"], {\n\t...V.staticProperty(\n\t\t\"targetMode\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Target lock mode\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockMode),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"currentMode\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\tlabel: \"Current lock mode\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockMode),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"duration\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\tlabel: \"Remaining duration until target lock mode\",\n\t\t} as const,\n\t\t{ minVersion: 3 } as const,\n\t),\n\t...V.staticProperty(\"supportedOutsideHandles\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.Any,\n\t\t\tlabel: \"Which outside handles can open the door (configuration)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"outsideHandlesCanOpenDoor\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Which outside handles can open the door (actual status)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"supportedInsideHandles\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.Any,\n\t\t\tlabel: \"Which inside handles can open the door (configuration)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"insideHandlesCanOpenDoor\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Which inside handles can open the door (actual status)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"operationType\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Lock operation type\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockOperationType),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"lockTimeoutConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration of timed mode in seconds\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"lockTimeout\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyUInt16,\n\t\t\tlabel: \"Seconds until lock mode times out\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"autoRelockSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"autoRelockTime\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration in seconds until lock returns to secure state\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateAutoRelockConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"holdAndReleaseSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"holdAndReleaseTime\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration in seconds the latch stays retracted\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateHoldAndReleaseConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"twistAssistSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"twistAssist\",\n\t\t{\n\t\t\t...ValueMetadata.Boolean,\n\t\t\tlabel: \"Twist Assist enabled\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateTwistAssistConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"blockToBlockSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"blockToBlock\",\n\t\t{\n\t\t\t...ValueMetadata.Boolean,\n\t\t\tlabel: \"Block-to-block functionality enabled\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateBlockToBlockConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"latchSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"latchStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the latch\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateLatchStatusValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"boltSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"boltStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the bolt\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateBoltStatusValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"doorSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"doorStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the door\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateDoorStatusValue,\n\t\t} as const,\n\t),\n});\n\nexport function shouldAutoCreateLatchStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.latchSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateBoltStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.boltSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateDoorStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.doorSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateTwistAssistConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.twistAssistSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateBlockToBlockConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.blockToBlockSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateAutoRelockConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.autoRelockSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateHoldAndReleaseConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.holdAndReleaseSupported.endpoint(endpoint.index),\n\t);\n}\n\nconst configurationSetParameters = [\n\t\"operationType\",\n\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\"lockTimeoutConfiguration\",\n\t\"autoRelockTime\",\n\t\"holdAndReleaseTime\",\n\t\"twistAssist\",\n\t\"blockToBlock\",\n] as const;\n\n@API(CommandClasses[\"Door Lock\"])\nexport class DoorLockCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(cmd: DoorLockCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase DoorLockCommand.OperationSet:\n\t\t\tcase DoorLockCommand.OperationGet:\n\t\t\tcase DoorLockCommand.ConfigurationSet:\n\t\t\tcase DoorLockCommand.ConfigurationGet:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase DoorLockCommand.CapabilitiesGet:\n\t\t\t\treturn this.version >= 4;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: DoorLockCCAPI, { property }, value) {\n\t\t\tif (property === \"targetMode\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst result = await this.set(value);\n\n\t\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\t\tif (supervisedCommandSucceeded(result)) {\n\t\t\t\t\tthis.getValueDB().setValue(\n\t\t\t\t\t\tDoorLockCCValues.currentMode.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t} else if (\n\t\t\t\ttypeof property === \"string\"\n\t\t\t\t&& configurationSetParameters.includes(property as any)\n\t\t\t) {\n\t\t\t\t// checking every type here would create a LOT of duplicate code, so we don't\n\n\t\t\t\t// ConfigurationSet expects all parameters --> read the others from cache\n\t\t\t\tconst config = {\n\t\t\t\t\t[property]: value,\n\t\t\t\t} as DoorLockCCConfigurationSetOptions;\n\t\t\t\tfor (const param of configurationSetParameters) {\n\t\t\t\t\tif (param !== property) {\n\t\t\t\t\t\t(config as any)[param] = this.tryGetValueDB()?.getValue(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcommandClass: this.ccId,\n\t\t\t\t\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\t\t\t\t\tproperty: param,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fix insideHandlesCanOpenDoorConfiguration is not iterable\n\t\t\t\tconst allTrue: DoorHandleStatus = [true, true, true, true];\n\t\t\t\tif (!config.insideHandlesCanOpenDoorConfiguration) {\n\t\t\t\t\tconfig.insideHandlesCanOpenDoorConfiguration = allTrue;\n\t\t\t\t}\n\t\t\t\tif (!config.outsideHandlesCanOpenDoorConfiguration) {\n\t\t\t\t\tconfig.outsideHandlesCanOpenDoorConfiguration = allTrue;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this.setConfiguration(config);\n\n\t\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\t\tif (!supervisedCommandSucceeded(result)) {\n\t\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: DoorLockCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"currentMode\":\n\t\t\t\tcase \"targetMode\":\n\t\t\t\tcase \"duration\":\n\t\t\t\tcase \"outsideHandlesCanOpenDoor\":\n\t\t\t\tcase \"insideHandlesCanOpenDoor\":\n\t\t\t\tcase \"latchStatus\":\n\t\t\t\tcase \"boltStatus\":\n\t\t\t\tcase \"doorStatus\":\n\t\t\t\tcase \"lockTimeout\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tcase \"operationType\":\n\t\t\t\tcase \"outsideHandlesCanOpenDoorConfiguration\":\n\t\t\t\tcase \"insideHandlesCanOpenDoorConfiguration\":\n\t\t\t\tcase \"lockTimeoutConfiguration\":\n\t\t\t\tcase \"autoRelockTime\":\n\t\t\t\tcase \"holdAndReleaseTime\":\n\t\t\t\tcase \"twistAssist\":\n\t\t\t\tcase \"blockToBlock\":\n\t\t\t\t\treturn (await this.getConfiguration())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getCapabilities() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.CapabilitiesGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCCapabilitiesGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCCapabilitiesReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"autoRelockSupported\",\n\t\t\t\t\"blockToBlockSupported\",\n\t\t\t\t\"boltSupported\",\n\t\t\t\t\"doorSupported\",\n\t\t\t\t\"holdAndReleaseSupported\",\n\t\t\t\t\"latchSupported\",\n\t\t\t\t\"twistAssistSupported\",\n\t\t\t\t\"supportedDoorLockModes\",\n\t\t\t\t\"supportedInsideHandles\",\n\t\t\t\t\"supportedOperationTypes\",\n\t\t\t\t\"supportedOutsideHandles\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.OperationGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCOperationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCOperationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"currentMode\",\n\t\t\t\t\"targetMode\",\n\t\t\t\t\"duration\",\n\t\t\t\t\"outsideHandlesCanOpenDoor\",\n\t\t\t\t\"insideHandlesCanOpenDoor\",\n\t\t\t\t\"latchStatus\",\n\t\t\t\t\"boltStatus\",\n\t\t\t\t\"doorStatus\",\n\t\t\t\t\"lockTimeout\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: DoorLockMode,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.OperationSet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCOperationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tconfiguration: DoorLockCCConfigurationSetOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.ConfigurationSet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...configuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"operationType\",\n\t\t\t\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\t\t\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\t\t\t\"lockTimeoutConfiguration\",\n\t\t\t\t\"autoRelockTime\",\n\t\t\t\t\"holdAndReleaseTime\",\n\t\t\t\t\"twistAssist\",\n\t\t\t\t\"blockToBlock\",\n\t\t\t]);\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Door Lock\"])\n@implementedVersion(4)\n@ccValues(DoorLockCCValues)\nexport class DoorLockCC extends CommandClass {\n\tdeclare ccCommand: DoorLockCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Door Lock\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// By default, assume all status sensors to be supported\n\t\tlet doorSupported = true;\n\t\tlet boltSupported = true;\n\t\tlet latchSupported = true;\n\n\t\tif (api.version >= 4) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"requesting lock capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getCapabilities();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received lock capabilities:\nsupported operation types: ${\n\t\t\t\t\tresp.supportedOperationTypes\n\t\t\t\t\t\t.map((t) => getEnumMemberName(DoorLockOperationType, t))\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}\nsupported door lock modes: ${\n\t\t\t\t\tresp.supportedDoorLockModes\n\t\t\t\t\t\t.map((t) => getEnumMemberName(DoorLockMode, t))\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nsupported outside handles: ${\n\t\t\t\t\tresp.supportedOutsideHandles\n\t\t\t\t\t\t.map(String)\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}\nsupported inside handles: ${resp.supportedInsideHandles.map(String).join(\", \")}\nsupports door status: ${resp.doorSupported}\nsupports bolt status: ${resp.boltSupported}\nsupports latch status: ${resp.latchSupported}\nsupports auto-relock: ${resp.autoRelockSupported}\nsupports hold-and-release: ${resp.holdAndReleaseSupported}\nsupports twist assist: ${resp.twistAssistSupported}\nsupports block to block: ${resp.blockToBlockSupported}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\n\t\t\t\tdoorSupported = resp.doorSupported;\n\t\t\t\tboltSupported = resp.boltSupported;\n\t\t\t\tlatchSupported = resp.latchSupported;\n\n\t\t\t\t// Update metadata of settable states\n\t\t\t\tconst targetModeValue = DoorLockCCValues.targetMode;\n\t\t\t\tthis.setMetadata(ctx, targetModeValue, {\n\t\t\t\t\t...targetModeValue.meta,\n\t\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\t\tDoorLockMode,\n\t\t\t\t\t\tresp.supportedDoorLockModes,\n\t\t\t\t\t),\n\t\t\t\t});\n\n\t\t\t\tconst operationTypeValue = DoorLockCCValues.operationType;\n\t\t\t\tthis.setMetadata(ctx, operationTypeValue, {\n\t\t\t\t\t...operationTypeValue.meta,\n\t\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\t\tresp.supportedOperationTypes,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!hadCriticalTimeout) {\n\t\t\t// Save support information for the status values\n\t\t\tconst doorStatusValue = DoorLockCCValues.doorStatus;\n\t\t\tif (doorSupported) this.setMetadata(ctx, doorStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.doorSupported,\n\t\t\t\tdoorSupported,\n\t\t\t);\n\n\t\t\tconst latchStatusValue = DoorLockCCValues.latchStatus;\n\t\t\tif (latchSupported) this.setMetadata(ctx, latchStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.latchSupported,\n\t\t\t\tlatchSupported,\n\t\t\t);\n\n\t\t\tconst boltStatusValue = DoorLockCCValues.boltStatus;\n\t\t\tif (boltSupported) this.setMetadata(ctx, boltStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.boltSupported,\n\t\t\t\tboltSupported,\n\t\t\t);\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Door Lock\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting lock configuration...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst config = await api.getConfiguration();\n\t\tif (config) {\n\t\t\tlet logMessage = `received lock configuration:\noperation type: ${\n\t\t\t\tgetEnumMemberName(\n\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\tconfig.operationType,\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tif (config.operationType === DoorLockOperationType.Timed) {\n\t\t\t\tlogMessage += `\nlock timeout: ${config.lockTimeoutConfiguration} seconds\n`;\n\t\t\t}\n\t\t\tlogMessage += `\noutside handles can open door: ${\n\t\t\t\tconfig.outsideHandlesCanOpenDoorConfiguration\n\t\t\t\t\t.map(String)\n\t\t\t\t\t.join(\", \")\n\t\t\t}\ninside handles can open door: ${\n\t\t\t\tconfig.insideHandlesCanOpenDoorConfiguration\n\t\t\t\t\t.map(String)\n\t\t\t\t\t.join(\", \")\n\t\t\t}`;\n\t\t\tif (api.version >= 4) {\n\t\t\t\tlogMessage += `\nauto-relock time ${config.autoRelockTime ?? \"-\"} seconds\nhold-and-release time ${config.holdAndReleaseTime ?? \"-\"} seconds\ntwist assist ${!!config.twistAssist}\nblock to block ${!!config.blockToBlock}`;\n\t\t\t}\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting current lock status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst status = await api.get();\n\t\tif (status) {\n\t\t\tlet logMessage = `received lock status:\ncurrent mode: ${getEnumMemberName(DoorLockMode, status.currentMode)}`;\n\t\t\tif (status.targetMode != undefined) {\n\t\t\t\tlogMessage += `\ntarget mode: ${getEnumMemberName(DoorLockMode, status.targetMode)}\nremaining duration: ${status.duration?.toString() ?? \"undefined\"}`;\n\t\t\t}\n\t\t\tif (status.lockTimeout != undefined) {\n\t\t\t\tlogMessage += `\nlock timeout: ${status.lockTimeout} seconds`;\n\t\t\t}\n\t\t\tif (status.doorStatus != undefined) {\n\t\t\t\tlogMessage += `\ndoor status: ${status.doorStatus}`;\n\t\t\t}\n\t\t\tif (status.boltStatus != undefined) {\n\t\t\t\tlogMessage += `\nbolt status: ${status.boltStatus}`;\n\t\t\t}\n\t\t\tif (status.latchStatus != undefined) {\n\t\t\t\tlogMessage += `\nlatch status: ${status.latchStatus}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCOperationSetOptions {\n\tmode: DoorLockMode;\n}\n\n@CCCommand(DoorLockCommand.OperationSet)\n@useSupervision()\nexport class DoorLockCCOperationSet extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCOperationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.mode === DoorLockMode.Unknown) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Unknown is not a valid door lock target state!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.mode = options.mode;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockCCOperationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new DoorLockCCOperationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic mode: DoorLockMode;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.mode]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"target mode\": getEnumMemberName(DoorLockMode, this.mode),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCOperationReportOptions {\n\tcurrentMode: DoorLockMode;\n\toutsideHandlesCanOpenDoor: DoorHandleStatus;\n\tinsideHandlesCanOpenDoor: DoorHandleStatus;\n\tdoorStatus?: \"closed\" | \"open\";\n\tboltStatus?: \"unlocked\" | \"locked\";\n\tlatchStatus?: \"closed\" | \"open\";\n\tlockTimeout?: number;\n\ttargetMode?: DoorLockMode;\n\tduration?: Duration;\n}\n\n@CCCommand(DoorLockCommand.OperationReport)\n@ccValueProperty(\"currentMode\", DoorLockCCValues.currentMode)\n@ccValueProperty(\"targetMode\", DoorLockCCValues.targetMode)\n@ccValueProperty(\"duration\", DoorLockCCValues.duration)\n@ccValueProperty(\n\t\"outsideHandlesCanOpenDoor\",\n\tDoorLockCCValues.outsideHandlesCanOpenDoor,\n)\n@ccValueProperty(\n\t\"insideHandlesCanOpenDoor\",\n\tDoorLockCCValues.insideHandlesCanOpenDoor,\n)\n@ccValueProperty(\"lockTimeout\", DoorLockCCValues.lockTimeout)\nexport class DoorLockCCOperationReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCOperationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.currentMode = options.currentMode;\n\t\tthis.outsideHandlesCanOpenDoor = options.outsideHandlesCanOpenDoor;\n\t\tthis.insideHandlesCanOpenDoor = options.insideHandlesCanOpenDoor;\n\t\tthis.doorStatus = options.doorStatus;\n\t\tthis.boltStatus = options.boltStatus;\n\t\tthis.latchStatus = options.latchStatus;\n\t\tthis.lockTimeout = options.lockTimeout;\n\t\tthis.targetMode = options.targetMode;\n\t\tthis.duration = options.duration;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCOperationReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst currentMode: DoorLockMode = raw.payload[0];\n\t\tconst outsideHandlesCanOpenDoor: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001_0000),\n\t\t\t!!(raw.payload[1] & 0b0010_0000),\n\t\t\t!!(raw.payload[1] & 0b0100_0000),\n\t\t\t!!(raw.payload[1] & 0b1000_0000),\n\t\t];\n\t\tconst insideHandlesCanOpenDoor: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001),\n\t\t\t!!(raw.payload[1] & 0b0010),\n\t\t\t!!(raw.payload[1] & 0b0100),\n\t\t\t!!(raw.payload[1] & 0b1000),\n\t\t];\n\t\tconst doorStatus: \"closed\" | \"open\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b1)\n\t\t\t\t? \"closed\"\n\t\t\t\t: \"open\";\n\t\tconst boltStatus: \"unlocked\" | \"locked\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b10) ? \"unlocked\" : \"locked\";\n\t\tconst latchStatus: \"closed\" | \"open\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b100)\n\t\t\t\t? \"closed\"\n\t\t\t\t: \"open\";\n\t\t// Ignore invalid timeout values\n\t\tconst lockTimeoutMinutes = raw.payload[3];\n\t\tconst lockTimeoutSeconds = raw.payload[4];\n\t\tlet lockTimeout: number | undefined;\n\t\tif (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {\n\t\t\tlockTimeout = lockTimeoutSeconds + lockTimeoutMinutes * 60;\n\t\t}\n\n\t\tlet targetMode: DoorLockMode | undefined;\n\t\tlet duration: Duration | undefined;\n\t\tif (raw.payload.length >= 7) {\n\t\t\ttargetMode = raw.payload[5];\n\t\t\tduration = Duration.parseReport(raw.payload[6]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tcurrentMode,\n\t\t\toutsideHandlesCanOpenDoor,\n\t\t\tinsideHandlesCanOpenDoor,\n\t\t\tdoorStatus,\n\t\t\tboltStatus,\n\t\t\tlatchStatus,\n\t\t\tlockTimeout,\n\t\t\ttargetMode,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Only store the door/bolt/latch status if the lock supports it\n\t\tconst supportsDoorStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.doorSupported,\n\t\t);\n\t\tif (supportsDoorStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.doorStatus,\n\t\t\t\tthis.doorStatus,\n\t\t\t);\n\t\t}\n\t\tconst supportsBoltStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.boltSupported,\n\t\t);\n\t\tif (supportsBoltStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.boltStatus,\n\t\t\t\tthis.boltStatus,\n\t\t\t);\n\t\t}\n\t\tconst supportsLatchStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.latchSupported,\n\t\t);\n\t\tif (supportsLatchStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.latchStatus,\n\t\t\t\tthis.latchStatus,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly currentMode: DoorLockMode;\n\n\tpublic readonly targetMode?: DoorLockMode;\n\n\tpublic readonly duration?: Duration;\n\n\tpublic readonly outsideHandlesCanOpenDoor: DoorHandleStatus;\n\n\tpublic readonly insideHandlesCanOpenDoor: DoorHandleStatus;\n\n\tpublic readonly latchStatus?: \"open\" | \"closed\";\n\tpublic readonly boltStatus?: \"locked\" | \"unlocked\";\n\tpublic readonly doorStatus?: \"open\" | \"closed\";\n\n\tpublic readonly lockTimeout?: number; // in seconds\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"current mode\": getEnumMemberName(DoorLockMode, this.currentMode),\n\t\t\t\"active outside handles\": this.outsideHandlesCanOpenDoor.join(\", \"),\n\t\t\t\"active inside handles\": this.insideHandlesCanOpenDoor.join(\", \"),\n\t\t};\n\n\t\tif (this.latchStatus != undefined) {\n\t\t\tmessage[\"latch status\"] = this.latchStatus;\n\t\t}\n\t\tif (this.boltStatus != undefined) {\n\t\t\tmessage[\"bolt status\"] = this.boltStatus;\n\t\t}\n\t\tif (this.doorStatus != undefined) {\n\t\t\tmessage[\"door status\"] = this.doorStatus;\n\t\t}\n\n\t\tif (this.targetMode != undefined) {\n\t\t\tmessage[\"target mode\"] = getEnumMemberName(\n\t\t\t\tDoorLockMode,\n\t\t\t\tthis.targetMode,\n\t\t\t);\n\t\t}\n\t\tif (this.duration != undefined) {\n\t\t\tmessage[\"remaining duration\"] = this.duration.toString();\n\t\t}\n\t\tif (this.lockTimeout != undefined) {\n\t\t\tmessage[\"lock timeout\"] = `${this.lockTimeout} seconds`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.OperationGet)\n@expectedCCResponse(DoorLockCCOperationReport)\nexport class DoorLockCCOperationGet extends DoorLockCC {}\n\n// @publicAPI\nexport interface DoorLockCCConfigurationReportOptions {\n\toperationType: DoorLockOperationType;\n\toutsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tinsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tlockTimeoutConfiguration?: number;\n\tautoRelockTime?: number;\n\tholdAndReleaseTime?: number;\n\ttwistAssist?: boolean;\n\tblockToBlock?: boolean;\n}\n\n@CCCommand(DoorLockCommand.ConfigurationReport)\n@ccValueProperty(\"operationType\", DoorLockCCValues.operationType)\n@ccValueProperty(\n\t\"outsideHandlesCanOpenDoorConfiguration\",\n\tDoorLockCCValues.outsideHandlesCanOpenDoorConfiguration,\n)\n@ccValueProperty(\n\t\"insideHandlesCanOpenDoorConfiguration\",\n\tDoorLockCCValues.insideHandlesCanOpenDoorConfiguration,\n)\n@ccValueProperty(\n\t\"lockTimeoutConfiguration\",\n\tDoorLockCCValues.lockTimeoutConfiguration,\n)\nexport class DoorLockCCConfigurationReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.operationType = options.operationType;\n\t\tthis.outsideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.outsideHandlesCanOpenDoorConfiguration;\n\t\tthis.insideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.insideHandlesCanOpenDoorConfiguration;\n\t\tthis.lockTimeoutConfiguration = options.lockTimeoutConfiguration;\n\t\tthis.autoRelockTime = options.autoRelockTime;\n\t\tthis.holdAndReleaseTime = options.holdAndReleaseTime;\n\t\tthis.twistAssist = options.twistAssist;\n\t\tthis.blockToBlock = options.blockToBlock;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 4);\n\t\tconst operationType: DoorLockOperationType = raw.payload[0];\n\t\tconst outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001_0000),\n\t\t\t!!(raw.payload[1] & 0b0010_0000),\n\t\t\t!!(raw.payload[1] & 0b0100_0000),\n\t\t\t!!(raw.payload[1] & 0b1000_0000),\n\t\t];\n\t\tconst insideHandlesCanOpenDoorConfiguration: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001),\n\t\t\t!!(raw.payload[1] & 0b0010),\n\t\t\t!!(raw.payload[1] & 0b0100),\n\t\t\t!!(raw.payload[1] & 0b1000),\n\t\t];\n\t\tlet lockTimeoutConfiguration: number | undefined;\n\t\tif (operationType === DoorLockOperationType.Timed) {\n\t\t\tconst lockTimeoutMinutes = raw.payload[2];\n\t\t\tconst lockTimeoutSeconds = raw.payload[3];\n\t\t\tif (lockTimeoutMinutes <= 0xfd && lockTimeoutSeconds <= 59) {\n\t\t\t\tlockTimeoutConfiguration = lockTimeoutSeconds\n\t\t\t\t\t+ lockTimeoutMinutes * 60;\n\t\t\t}\n\t\t}\n\n\t\tlet autoRelockTime: number | undefined;\n\t\tlet holdAndReleaseTime: number | undefined;\n\t\tlet twistAssist: boolean | undefined;\n\t\tlet blockToBlock: boolean | undefined;\n\t\tif (raw.payload.length >= 5) {\n\t\t\tautoRelockTime = raw.payload.readUInt16BE(4);\n\t\t\tholdAndReleaseTime = raw.payload.readUInt16BE(6);\n\n\t\t\tconst flags = raw.payload[8];\n\t\t\ttwistAssist = !!(flags & 0b1);\n\t\t\tblockToBlock = !!(flags & 0b10);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\toperationType,\n\t\t\toutsideHandlesCanOpenDoorConfiguration,\n\t\t\tinsideHandlesCanOpenDoorConfiguration,\n\t\t\tlockTimeoutConfiguration,\n\t\t\tautoRelockTime,\n\t\t\tholdAndReleaseTime,\n\t\t\ttwistAssist,\n\t\t\tblockToBlock,\n\t\t});\n\t}\n\n\tpublic readonly operationType: DoorLockOperationType;\n\n\tpublic readonly outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\n\tpublic readonly insideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\n\tpublic readonly lockTimeoutConfiguration?: number;\n\n\t// These are not always supported and have to be persisted manually\n\t// to avoid unsupported values being exposed to the user\n\tpublic readonly autoRelockTime?: number;\n\tpublic readonly holdAndReleaseTime?: number;\n\tpublic readonly twistAssist?: boolean;\n\tpublic readonly blockToBlock?: boolean;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Only store the autoRelockTime etc. params if the lock supports it\n\t\tconst supportsAutoRelock = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.autoRelockSupported,\n\t\t);\n\t\tif (supportsAutoRelock) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.autoRelockTime,\n\t\t\t\tthis.autoRelockTime,\n\t\t\t);\n\t\t}\n\t\tconst supportsHoldAndRelease = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.holdAndReleaseSupported,\n\t\t);\n\t\tif (supportsHoldAndRelease) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.holdAndReleaseTime,\n\t\t\t\tthis.holdAndReleaseTime,\n\t\t\t);\n\t\t}\n\t\tconst supportsTwistAssist = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.twistAssistSupported,\n\t\t);\n\t\tif (supportsTwistAssist) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.twistAssist,\n\t\t\t\tthis.twistAssist,\n\t\t\t);\n\t\t}\n\t\tconst supportsBlockToBlock = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.blockToBlockSupported,\n\t\t);\n\t\tif (supportsBlockToBlock) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.blockToBlock,\n\t\t\t\tthis.blockToBlock,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"operation type\": getEnumMemberName(\n\t\t\t\tDoorLockOperationType,\n\t\t\t\tthis.operationType,\n\t\t\t),\n\t\t\t\"outside handle configuration\": this\n\t\t\t\t.outsideHandlesCanOpenDoorConfiguration.join(\", \"),\n\t\t\t\"inside handle configuration\": this\n\t\t\t\t.insideHandlesCanOpenDoorConfiguration.join(\", \"),\n\t\t};\n\t\tif (this.lockTimeoutConfiguration != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"timed mode duration\"\n\t\t\t] = `${this.lockTimeoutConfiguration} seconds`;\n\t\t}\n\t\tif (this.autoRelockTime != undefined) {\n\t\t\tmessage[\"auto-relock time\"] = `${this.autoRelockTime} seconds`;\n\t\t}\n\t\tif (this.holdAndReleaseTime != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"hold-and-release time\"\n\t\t\t] = `${this.holdAndReleaseTime} seconds`;\n\t\t}\n\t\tif (this.twistAssist != undefined) {\n\t\t\tmessage[\"twist assist enabled\"] = this.twistAssist;\n\t\t}\n\t\tif (this.blockToBlock != undefined) {\n\t\t\tmessage[\"block-to-block enabled\"] = this.blockToBlock;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.ConfigurationGet)\n@expectedCCResponse(DoorLockCCConfigurationReport)\nexport class DoorLockCCConfigurationGet extends DoorLockCC {}\n\n// @publicAPI\nexport type DoorLockCCConfigurationSetOptions =\n\t& (\n\t\t| {\n\t\t\toperationType: DoorLockOperationType.Timed;\n\t\t\tlockTimeoutConfiguration: number;\n\t\t}\n\t\t| {\n\t\t\toperationType: DoorLockOperationType.Constant;\n\t\t\tlockTimeoutConfiguration?: undefined;\n\t\t}\n\t)\n\t& {\n\t\toutsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\t\tinsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\t\t// V4+\n\t\tautoRelockTime?: number;\n\t\tholdAndReleaseTime?: number;\n\t\ttwistAssist?: boolean;\n\t\tblockToBlock?: boolean;\n\t};\n\n@CCCommand(DoorLockCommand.ConfigurationSet)\n@useSupervision()\nexport class DoorLockCCConfigurationSet extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.operationType = options.operationType;\n\t\tthis.outsideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.outsideHandlesCanOpenDoorConfiguration;\n\t\tthis.insideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.insideHandlesCanOpenDoorConfiguration;\n\t\tthis.lockTimeoutConfiguration = options.lockTimeoutConfiguration;\n\t\tthis.autoRelockTime = options.autoRelockTime;\n\t\tthis.holdAndReleaseTime = options.holdAndReleaseTime;\n\t\tthis.twistAssist = options.twistAssist;\n\t\tthis.blockToBlock = options.blockToBlock;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockCCConfigurationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new DoorLockCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic operationType: DoorLockOperationType;\n\tpublic outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tpublic insideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tpublic lockTimeoutConfiguration?: number;\n\tpublic autoRelockTime?: number;\n\tpublic holdAndReleaseTime?: number;\n\tpublic twistAssist?: boolean;\n\tpublic blockToBlock?: boolean;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst insideHandles = isArray(\n\t\t\t\tthis.insideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.insideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst outsideHandles = isArray(\n\t\t\t\tthis.outsideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.outsideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\n\t\tconst handles = [...insideHandles, ...outsideHandles]\n\t\t\t.map((val, i) => (val ? 1 << i : 0))\n\t\t\t.reduce((acc, cur) => acc | cur, 0);\n\n\t\tlet lockTimeoutMinutes: number;\n\t\tlet lockTimeoutSeconds: number;\n\t\tif (this.operationType === DoorLockOperationType.Constant) {\n\t\t\tlockTimeoutMinutes = lockTimeoutSeconds = 0xfe;\n\t\t} else {\n\t\t\tlockTimeoutMinutes = Math.floor(\n\t\t\t\tthis.lockTimeoutConfiguration! / 60,\n\t\t\t);\n\t\t\tlockTimeoutSeconds = this.lockTimeoutConfiguration! % 60;\n\t\t}\n\n\t\tconst flags = (this.twistAssist ? 0b1 : 0)\n\t\t\t| (this.blockToBlock ? 0b10 : 0);\n\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.operationType,\n\t\t\thandles,\n\t\t\tlockTimeoutMinutes,\n\t\t\tlockTimeoutSeconds,\n\t\t\t// placeholder for auto relock time\n\t\t\t0,\n\t\t\t0,\n\t\t\t// placeholder for hold and release time\n\t\t\t0,\n\t\t\t0,\n\t\t\tflags,\n\t\t]);\n\n\t\tthis.payload.writeUInt16BE((this.autoRelockTime ?? 0) & 0xffff, 4);\n\t\tthis.payload.writeUInt16BE(\n\t\t\t(this.holdAndReleaseTime ?? 0) & 0xffff,\n\t\t\t6,\n\t\t);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst insideHandles = isArray(\n\t\t\t\tthis.insideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.insideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst outsideHandles = isArray(\n\t\t\t\tthis.outsideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.outsideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst message: MessageRecord = {\n\t\t\t\"operation type\": getEnumMemberName(\n\t\t\t\tDoorLockOperationType,\n\t\t\t\tthis.operationType,\n\t\t\t),\n\t\t\t\"outside handle configuration\": outsideHandles.join(\", \"),\n\t\t\t\"inside handle configuration\": insideHandles.join(\", \"),\n\t\t};\n\t\tif (this.lockTimeoutConfiguration != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"timed mode duration\"\n\t\t\t] = `${this.lockTimeoutConfiguration} seconds`;\n\t\t}\n\t\tif (this.autoRelockTime != undefined) {\n\t\t\tmessage[\"auto-relock time\"] = `${this.autoRelockTime} seconds`;\n\t\t}\n\t\tif (this.holdAndReleaseTime != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"hold-and-release time\"\n\t\t\t] = `${this.holdAndReleaseTime} seconds`;\n\t\t}\n\t\tif (this.twistAssist != undefined) {\n\t\t\tmessage[\"enable twist assist\"] = this.twistAssist;\n\t\t}\n\t\tif (this.blockToBlock != undefined) {\n\t\t\tmessage[\"enable block-to-block\"] = this.blockToBlock;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCCapabilitiesReportOptions {\n\tsupportedOperationTypes: DoorLockOperationType[];\n\tsupportedDoorLockModes: DoorLockMode[];\n\tsupportedOutsideHandles: DoorHandleStatus;\n\tsupportedInsideHandles: DoorHandleStatus;\n\tdoorSupported: boolean;\n\tboltSupported: boolean;\n\tlatchSupported: boolean;\n\tblockToBlockSupported: boolean;\n\ttwistAssistSupported: boolean;\n\tholdAndReleaseSupported: boolean;\n\tautoRelockSupported: boolean;\n}\n\n@CCCommand(DoorLockCommand.CapabilitiesReport)\n@ccValueProperty(\n\t\"supportedOutsideHandles\",\n\tDoorLockCCValues.supportedOutsideHandles,\n)\n@ccValueProperty(\n\t\"supportedInsideHandles\",\n\tDoorLockCCValues.supportedInsideHandles,\n)\n@ccValueProperty(\"autoRelockSupported\", DoorLockCCValues.autoRelockSupported)\n@ccValueProperty(\n\t\"holdAndReleaseSupported\",\n\tDoorLockCCValues.holdAndReleaseSupported,\n)\n@ccValueProperty(\"twistAssistSupported\", DoorLockCCValues.twistAssistSupported)\n@ccValueProperty(\n\t\"blockToBlockSupported\",\n\tDoorLockCCValues.blockToBlockSupported,\n)\nexport class DoorLockCCCapabilitiesReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCCapabilitiesReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedOperationTypes = options.supportedOperationTypes;\n\t\tthis.supportedDoorLockModes = options.supportedDoorLockModes;\n\t\tthis.supportedOutsideHandles = options.supportedOutsideHandles;\n\t\tthis.supportedInsideHandles = options.supportedInsideHandles;\n\t\tthis.doorSupported = options.doorSupported;\n\t\tthis.boltSupported = options.boltSupported;\n\t\tthis.latchSupported = options.latchSupported;\n\t\tthis.blockToBlockSupported = options.blockToBlockSupported;\n\t\tthis.twistAssistSupported = options.twistAssistSupported;\n\t\tthis.holdAndReleaseSupported = options.holdAndReleaseSupported;\n\t\tthis.autoRelockSupported = options.autoRelockSupported;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCCapabilitiesReport {\n\t\t// parse variable length operation type bit mask\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst bitMaskLength = raw.payload[0] & 0b11111;\n\t\tlet offset = 1;\n\t\tvalidatePayload(raw.payload.length >= offset + bitMaskLength + 1);\n\t\tconst supportedOperationTypes: DoorLockOperationType[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + bitMaskLength),\n\t\t\t// bit 0 is reserved, bitmask starts at 1\n\t\t\t0,\n\t\t);\n\t\toffset += bitMaskLength;\n\t\t// parse variable length door lock mode list\n\t\tconst listLength = raw.payload[offset];\n\t\toffset += 1;\n\t\tvalidatePayload(raw.payload.length >= offset + listLength + 3);\n\t\tconst supportedDoorLockModes: DoorLockMode[] = [\n\t\t\t...raw.payload.subarray(offset, offset + listLength),\n\t\t];\n\t\toffset += listLength;\n\t\tconst supportedOutsideHandles: DoorHandleStatus = [\n\t\t\t!!(raw.payload[offset] & 0b0001_0000),\n\t\t\t!!(raw.payload[offset] & 0b0010_0000),\n\t\t\t!!(raw.payload[offset] & 0b0100_0000),\n\t\t\t!!(raw.payload[offset] & 0b1000_0000),\n\t\t];\n\t\tconst supportedInsideHandles: DoorHandleStatus = [\n\t\t\t!!(raw.payload[offset] & 0b0001),\n\t\t\t!!(raw.payload[offset] & 0b0010),\n\t\t\t!!(raw.payload[offset] & 0b0100),\n\t\t\t!!(raw.payload[offset] & 0b1000),\n\t\t];\n\t\tconst doorSupported = !!(raw.payload[offset + 1] & 0b1);\n\t\tconst boltSupported = !!(raw.payload[offset + 1] & 0b10);\n\t\tconst latchSupported = !!(raw.payload[offset + 1] & 0b100);\n\t\tconst blockToBlockSupported = !!(raw.payload[offset + 2] & 0b1);\n\t\tconst twistAssistSupported = !!(raw.payload[offset + 2] & 0b10);\n\t\tconst holdAndReleaseSupported = !!(raw.payload[offset + 2] & 0b100);\n\t\tconst autoRelockSupported = !!(raw.payload[offset + 2] & 0b1000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedOperationTypes,\n\t\t\tsupportedDoorLockModes,\n\t\t\tsupportedOutsideHandles,\n\t\t\tsupportedInsideHandles,\n\t\t\tdoorSupported,\n\t\t\tboltSupported,\n\t\t\tlatchSupported,\n\t\t\tblockToBlockSupported,\n\t\t\ttwistAssistSupported,\n\t\t\tholdAndReleaseSupported,\n\t\t\tautoRelockSupported,\n\t\t});\n\t}\n\n\tpublic readonly supportedOperationTypes: readonly DoorLockOperationType[];\n\tpublic readonly supportedDoorLockModes: readonly DoorLockMode[];\n\n\tpublic readonly supportedOutsideHandles: DoorHandleStatus;\n\n\tpublic readonly supportedInsideHandles: DoorHandleStatus;\n\n\t// These 3 are not automatically persisted because in CC version 3\n\t// we have to assume them to be supported. In v4 we can query this.\n\tpublic readonly latchSupported: boolean;\n\tpublic readonly boltSupported: boolean;\n\tpublic readonly doorSupported: boolean;\n\n\tpublic readonly autoRelockSupported: boolean;\n\n\tpublic readonly holdAndReleaseSupported: boolean;\n\n\tpublic readonly twistAssistSupported: boolean;\n\n\tpublic readonly blockToBlockSupported: boolean;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tdoor: this.doorSupported,\n\t\t\t\tbolt: this.boltSupported,\n\t\t\t\tlatch: this.latchSupported,\n\t\t\t\t\"block-to-block feature\": this.blockToBlockSupported,\n\t\t\t\t\"twist assist feature\": this.twistAssistSupported,\n\t\t\t\t\"hold-and-release feature\": this.holdAndReleaseSupported,\n\t\t\t\t\"auto-relock feature\": this.autoRelockSupported,\n\t\t\t\t\"operation types\": this.supportedOperationTypes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(t) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"door lock modes\": this.supportedDoorLockModes\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${getEnumMemberName(DoorLockMode, t)}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"outside handles\": this.supportedOutsideHandles.join(\", \"),\n\t\t\t\t\"inside handles\": this.supportedInsideHandles.join(\", \"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.CapabilitiesGet)\n@expectedCCResponse(DoorLockCCCapabilitiesReport)\nexport class DoorLockCCCapabilitiesGet extends DoorLockCC {}\n"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\ttype EndpointId,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { isArray } from \"alcalzone-shared/typeguards\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype DoorHandleStatus,\n\tDoorLockCommand,\n\tDoorLockMode,\n\tDoorLockOperationType,\n} from \"../lib/_Types.js\";\n\nexport const DoorLockCCValues = V.defineCCValues(CommandClasses[\"Door Lock\"], {\n\t...V.staticProperty(\n\t\t\"targetMode\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Target lock mode\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockMode),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"currentMode\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\tlabel: \"Current lock mode\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockMode),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"duration\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\tlabel: \"Remaining duration until target lock mode\",\n\t\t} as const,\n\t\t{ minVersion: 3 } as const,\n\t),\n\t...V.staticProperty(\"supportedOutsideHandles\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.Any,\n\t\t\tlabel: \"Which outside handles can open the door (configuration)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"outsideHandlesCanOpenDoor\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Which outside handles can open the door (actual status)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"supportedInsideHandles\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.Any,\n\t\t\tlabel: \"Which inside handles can open the door (configuration)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"insideHandlesCanOpenDoor\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Which inside handles can open the door (actual status)\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"operationType\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Lock operation type\",\n\t\t\tstates: enumValuesToMetadataStates(DoorLockOperationType),\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"lockTimeoutConfiguration\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration of timed mode in seconds\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"lockTimeout\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnlyUInt16,\n\t\t\tlabel: \"Seconds until lock mode times out\",\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"autoRelockSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"autoRelockTime\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration in seconds until lock returns to secure state\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateAutoRelockConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"holdAndReleaseSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"holdAndReleaseTime\",\n\t\t{\n\t\t\t...ValueMetadata.UInt16,\n\t\t\tlabel: \"Duration in seconds the latch stays retracted\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateHoldAndReleaseConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"twistAssistSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"twistAssist\",\n\t\t{\n\t\t\t...ValueMetadata.Boolean,\n\t\t\tlabel: \"Twist Assist enabled\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateTwistAssistConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"blockToBlockSupported\", undefined, {\n\t\tinternal: true,\n\t\tminVersion: 4,\n\t}),\n\t...V.staticProperty(\n\t\t\"blockToBlock\",\n\t\t{\n\t\t\t...ValueMetadata.Boolean,\n\t\t\tlabel: \"Block-to-block functionality enabled\",\n\t\t} as const,\n\t\t{\n\t\t\tminVersion: 4,\n\t\t\tautoCreate: shouldAutoCreateBlockToBlockConfigValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"latchSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"latchStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the latch\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateLatchStatusValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"boltSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"boltStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the bolt\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateBoltStatusValue,\n\t\t} as const,\n\t),\n\t...V.staticProperty(\"doorSupported\", undefined, { internal: true }),\n\t...V.staticProperty(\n\t\t\"doorStatus\",\n\t\t{\n\t\t\t...ValueMetadata.ReadOnly,\n\t\t\tlabel: \"Current status of the door\",\n\t\t} as const,\n\t\t{\n\t\t\tautoCreate: shouldAutoCreateDoorStatusValue,\n\t\t} as const,\n\t),\n});\n\nexport function shouldAutoCreateLatchStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.latchSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateBoltStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.boltSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateDoorStatusValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.doorSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateTwistAssistConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.twistAssistSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateBlockToBlockConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.blockToBlockSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateAutoRelockConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.autoRelockSupported.endpoint(endpoint.index),\n\t);\n}\n\nexport function shouldAutoCreateHoldAndReleaseConfigValue(\n\tctx: GetValueDB,\n\tendpoint: EndpointId,\n): boolean {\n\tconst valueDB = ctx.tryGetValueDB(endpoint.nodeId);\n\tif (!valueDB) return false;\n\treturn !!valueDB.getValue(\n\t\tDoorLockCCValues.holdAndReleaseSupported.endpoint(endpoint.index),\n\t);\n}\n\nconst configurationSetParameters = [\n\t\"operationType\",\n\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\"lockTimeoutConfiguration\",\n\t\"autoRelockTime\",\n\t\"holdAndReleaseTime\",\n\t\"twistAssist\",\n\t\"blockToBlock\",\n] as const;\n\n@API(CommandClasses[\"Door Lock\"])\nexport class DoorLockCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(cmd: DoorLockCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase DoorLockCommand.OperationSet:\n\t\t\tcase DoorLockCommand.OperationGet:\n\t\t\tcase DoorLockCommand.ConfigurationSet:\n\t\t\tcase DoorLockCommand.ConfigurationGet:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase DoorLockCommand.CapabilitiesGet:\n\t\t\t\treturn this.version >= 4;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: DoorLockCCAPI, { property }, value) {\n\t\t\tif (property === \"targetMode\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst result = await this.set(value);\n\n\t\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\t\tif (supervisedCommandSucceeded(result)) {\n\t\t\t\t\tthis.getValueDB().setValue(\n\t\t\t\t\t\tDoorLockCCValues.currentMode.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t} else if (\n\t\t\t\ttypeof property === \"string\"\n\t\t\t\t&& configurationSetParameters.includes(property as any)\n\t\t\t) {\n\t\t\t\t// checking every type here would create a LOT of duplicate code, so we don't\n\n\t\t\t\t// ConfigurationSet expects all parameters --> read the others from cache\n\t\t\t\tconst config = {\n\t\t\t\t\t[property]: value,\n\t\t\t\t} as DoorLockCCConfigurationSetOptions;\n\t\t\t\tfor (const param of configurationSetParameters) {\n\t\t\t\t\tif (param !== property) {\n\t\t\t\t\t\t(config as any)[param] = this.tryGetValueDB()?.getValue(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcommandClass: this.ccId,\n\t\t\t\t\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\t\t\t\t\tproperty: param,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fix insideHandlesCanOpenDoorConfiguration is not iterable\n\t\t\t\tconst allTrue: DoorHandleStatus = [true, true, true, true];\n\t\t\t\tif (!config.insideHandlesCanOpenDoorConfiguration) {\n\t\t\t\t\tconfig.insideHandlesCanOpenDoorConfiguration = allTrue;\n\t\t\t\t}\n\t\t\t\tif (!config.outsideHandlesCanOpenDoorConfiguration) {\n\t\t\t\t\tconfig.outsideHandlesCanOpenDoorConfiguration = allTrue;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this.setConfiguration(config);\n\n\t\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\t\tif (!supervisedCommandSucceeded(result)) {\n\t\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: DoorLockCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"currentMode\":\n\t\t\t\tcase \"targetMode\":\n\t\t\t\tcase \"duration\":\n\t\t\t\tcase \"outsideHandlesCanOpenDoor\":\n\t\t\t\tcase \"insideHandlesCanOpenDoor\":\n\t\t\t\tcase \"latchStatus\":\n\t\t\t\tcase \"boltStatus\":\n\t\t\t\tcase \"doorStatus\":\n\t\t\t\tcase \"lockTimeout\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tcase \"operationType\":\n\t\t\t\tcase \"outsideHandlesCanOpenDoorConfiguration\":\n\t\t\t\tcase \"insideHandlesCanOpenDoorConfiguration\":\n\t\t\t\tcase \"lockTimeoutConfiguration\":\n\t\t\t\tcase \"autoRelockTime\":\n\t\t\t\tcase \"holdAndReleaseTime\":\n\t\t\t\tcase \"twistAssist\":\n\t\t\t\tcase \"blockToBlock\":\n\t\t\t\t\treturn (await this.getConfiguration())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getCapabilities() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.CapabilitiesGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCCapabilitiesGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCCapabilitiesReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"autoRelockSupported\",\n\t\t\t\t\"blockToBlockSupported\",\n\t\t\t\t\"boltSupported\",\n\t\t\t\t\"doorSupported\",\n\t\t\t\t\"holdAndReleaseSupported\",\n\t\t\t\t\"latchSupported\",\n\t\t\t\t\"twistAssistSupported\",\n\t\t\t\t\"supportedDoorLockModes\",\n\t\t\t\t\"supportedInsideHandles\",\n\t\t\t\t\"supportedOperationTypes\",\n\t\t\t\t\"supportedOutsideHandles\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.OperationGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCOperationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCOperationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"currentMode\",\n\t\t\t\t\"targetMode\",\n\t\t\t\t\"duration\",\n\t\t\t\t\"outsideHandlesCanOpenDoor\",\n\t\t\t\t\"insideHandlesCanOpenDoor\",\n\t\t\t\t\"latchStatus\",\n\t\t\t\t\"boltStatus\",\n\t\t\t\t\"doorStatus\",\n\t\t\t\t\"lockTimeout\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: DoorLockMode,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.OperationSet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCOperationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tconfiguration: DoorLockCCConfigurationSetOptions,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.ConfigurationSet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...configuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockCommand,\n\t\t\tDoorLockCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new DoorLockCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"operationType\",\n\t\t\t\t\"outsideHandlesCanOpenDoorConfiguration\",\n\t\t\t\t\"insideHandlesCanOpenDoorConfiguration\",\n\t\t\t\t\"lockTimeoutConfiguration\",\n\t\t\t\t\"autoRelockTime\",\n\t\t\t\t\"holdAndReleaseTime\",\n\t\t\t\t\"twistAssist\",\n\t\t\t\t\"blockToBlock\",\n\t\t\t]);\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Door Lock\"])\n@implementedVersion(4)\n@ccValues(DoorLockCCValues)\nexport class DoorLockCC extends CommandClass {\n\tdeclare ccCommand: DoorLockCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Door Lock\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// By default, assume all status sensors to be supported\n\t\tlet doorSupported = true;\n\t\tlet boltSupported = true;\n\t\tlet latchSupported = true;\n\n\t\tif (api.version >= 4) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"requesting lock capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getCapabilities();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received lock capabilities:\nsupported operation types: ${\n\t\t\t\t\tresp.supportedOperationTypes\n\t\t\t\t\t\t.map((t) => getEnumMemberName(DoorLockOperationType, t))\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}\nsupported door lock modes: ${\n\t\t\t\t\tresp.supportedDoorLockModes\n\t\t\t\t\t\t.map((t) => getEnumMemberName(DoorLockMode, t))\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nsupported outside handles: ${\n\t\t\t\t\tresp.supportedOutsideHandles\n\t\t\t\t\t\t.map(String)\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}\nsupported inside handles: ${resp.supportedInsideHandles.map(String).join(\", \")}\nsupports door status: ${resp.doorSupported}\nsupports bolt status: ${resp.boltSupported}\nsupports latch status: ${resp.latchSupported}\nsupports auto-relock: ${resp.autoRelockSupported}\nsupports hold-and-release: ${resp.holdAndReleaseSupported}\nsupports twist assist: ${resp.twistAssistSupported}\nsupports block to block: ${resp.blockToBlockSupported}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\n\t\t\t\tdoorSupported = resp.doorSupported;\n\t\t\t\tboltSupported = resp.boltSupported;\n\t\t\t\tlatchSupported = resp.latchSupported;\n\n\t\t\t\t// Update metadata of settable states\n\t\t\t\tconst targetModeValue = DoorLockCCValues.targetMode;\n\t\t\t\tthis.setMetadata(ctx, targetModeValue, {\n\t\t\t\t\t...targetModeValue.meta,\n\t\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\t\tDoorLockMode,\n\t\t\t\t\t\tresp.supportedDoorLockModes,\n\t\t\t\t\t),\n\t\t\t\t});\n\n\t\t\t\tconst operationTypeValue = DoorLockCCValues.operationType;\n\t\t\t\tthis.setMetadata(ctx, operationTypeValue, {\n\t\t\t\t\t...operationTypeValue.meta,\n\t\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\t\tresp.supportedOperationTypes,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!hadCriticalTimeout) {\n\t\t\t// Save support information for the status values\n\t\t\tconst doorStatusValue = DoorLockCCValues.doorStatus;\n\t\t\tif (doorSupported) this.setMetadata(ctx, doorStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.doorSupported,\n\t\t\t\tdoorSupported,\n\t\t\t);\n\n\t\t\tconst latchStatusValue = DoorLockCCValues.latchStatus;\n\t\t\tif (latchSupported) this.setMetadata(ctx, latchStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.latchSupported,\n\t\t\t\tlatchSupported,\n\t\t\t);\n\n\t\t\tconst boltStatusValue = DoorLockCCValues.boltStatus;\n\t\t\tif (boltSupported) this.setMetadata(ctx, boltStatusValue);\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.boltSupported,\n\t\t\t\tboltSupported,\n\t\t\t);\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Door Lock\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting lock configuration...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst config = await api.getConfiguration();\n\t\tif (config) {\n\t\t\tlet logMessage = `received lock configuration:\noperation type: ${\n\t\t\t\tgetEnumMemberName(\n\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\tconfig.operationType,\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tif (config.operationType === DoorLockOperationType.Timed) {\n\t\t\t\tlogMessage += `\nlock timeout: ${config.lockTimeoutConfiguration} seconds\n`;\n\t\t\t}\n\t\t\tlogMessage += `\noutside handles can open door: ${\n\t\t\t\tconfig.outsideHandlesCanOpenDoorConfiguration\n\t\t\t\t\t.map(String)\n\t\t\t\t\t.join(\", \")\n\t\t\t}\ninside handles can open door: ${\n\t\t\t\tconfig.insideHandlesCanOpenDoorConfiguration\n\t\t\t\t\t.map(String)\n\t\t\t\t\t.join(\", \")\n\t\t\t}`;\n\t\t\tif (api.version >= 4) {\n\t\t\t\tlogMessage += `\nauto-relock time ${config.autoRelockTime ?? \"-\"} seconds\nhold-and-release time ${config.holdAndReleaseTime ?? \"-\"} seconds\ntwist assist ${!!config.twistAssist}\nblock to block ${!!config.blockToBlock}`;\n\t\t\t}\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting current lock status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst status = await api.get();\n\t\tif (status) {\n\t\t\tlet logMessage = `received lock status:\ncurrent mode: ${getEnumMemberName(DoorLockMode, status.currentMode)}`;\n\t\t\tif (status.targetMode != undefined) {\n\t\t\t\tlogMessage += `\ntarget mode: ${getEnumMemberName(DoorLockMode, status.targetMode)}\nremaining duration: ${status.duration?.toString() ?? \"undefined\"}`;\n\t\t\t}\n\t\t\tif (status.lockTimeout != undefined) {\n\t\t\t\tlogMessage += `\nlock timeout: ${status.lockTimeout} seconds`;\n\t\t\t}\n\t\t\tif (status.doorStatus != undefined) {\n\t\t\t\tlogMessage += `\ndoor status: ${status.doorStatus}`;\n\t\t\t}\n\t\t\tif (status.boltStatus != undefined) {\n\t\t\t\tlogMessage += `\nbolt status: ${status.boltStatus}`;\n\t\t\t}\n\t\t\tif (status.latchStatus != undefined) {\n\t\t\t\tlogMessage += `\nlatch status: ${status.latchStatus}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether the node supports auto relock.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static supportsAutoRelockCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): boolean {\n\t\treturn !!ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.autoRelockSupported.endpoint(endpoint.index),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns whether the node supports hold and release.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static supportsHoldAndReleaseCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): boolean {\n\t\treturn !!ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.holdAndReleaseSupported.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns whether the node supports twist assist.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static supportsTwistAssistCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): boolean {\n\t\treturn !!ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.twistAssistSupported.endpoint(endpoint.index),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns whether the node supports block to block.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static supportsBlockToBlockCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): boolean {\n\t\treturn !!ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.blockToBlockSupported.endpoint(endpoint.index),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns the supported outside handles.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static getSupportedOutsideHandlesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): MaybeNotKnown<DoorHandleStatus> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.supportedOutsideHandles.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns the supported inside handles.\n\t * This only works AFTER the node has been interviewed.\n\t */\n\tpublic static getSupportedInsideHandlesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): MaybeNotKnown<DoorHandleStatus> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tDoorLockCCValues.supportedInsideHandles.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCOperationSetOptions {\n\tmode: DoorLockMode;\n}\n\n@CCCommand(DoorLockCommand.OperationSet)\n@useSupervision()\nexport class DoorLockCCOperationSet extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCOperationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (options.mode === DoorLockMode.Unknown) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Unknown is not a valid door lock target state!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\t\tthis.mode = options.mode;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockCCOperationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new DoorLockCCOperationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic mode: DoorLockMode;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.mode]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"target mode\": getEnumMemberName(DoorLockMode, this.mode),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCOperationReportOptions {\n\tcurrentMode: DoorLockMode;\n\toutsideHandlesCanOpenDoor: DoorHandleStatus;\n\tinsideHandlesCanOpenDoor: DoorHandleStatus;\n\tdoorStatus?: \"closed\" | \"open\";\n\tboltStatus?: \"unlocked\" | \"locked\";\n\tlatchStatus?: \"closed\" | \"open\";\n\tlockTimeout?: number;\n\ttargetMode?: DoorLockMode;\n\tduration?: Duration;\n}\n\n@CCCommand(DoorLockCommand.OperationReport)\n@ccValueProperty(\"currentMode\", DoorLockCCValues.currentMode)\n@ccValueProperty(\"targetMode\", DoorLockCCValues.targetMode)\n@ccValueProperty(\"duration\", DoorLockCCValues.duration)\n@ccValueProperty(\n\t\"outsideHandlesCanOpenDoor\",\n\tDoorLockCCValues.outsideHandlesCanOpenDoor,\n)\n@ccValueProperty(\n\t\"insideHandlesCanOpenDoor\",\n\tDoorLockCCValues.insideHandlesCanOpenDoor,\n)\n@ccValueProperty(\"lockTimeout\", DoorLockCCValues.lockTimeout)\nexport class DoorLockCCOperationReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCOperationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.currentMode = options.currentMode;\n\t\tthis.outsideHandlesCanOpenDoor = options.outsideHandlesCanOpenDoor;\n\t\tthis.insideHandlesCanOpenDoor = options.insideHandlesCanOpenDoor;\n\t\tthis.doorStatus = options.doorStatus;\n\t\tthis.boltStatus = options.boltStatus;\n\t\tthis.latchStatus = options.latchStatus;\n\t\tthis.lockTimeout = options.lockTimeout;\n\t\tthis.targetMode = options.targetMode;\n\t\tthis.duration = options.duration;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCOperationReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst currentMode: DoorLockMode = raw.payload[0];\n\t\tconst outsideHandlesCanOpenDoor: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001_0000),\n\t\t\t!!(raw.payload[1] & 0b0010_0000),\n\t\t\t!!(raw.payload[1] & 0b0100_0000),\n\t\t\t!!(raw.payload[1] & 0b1000_0000),\n\t\t];\n\t\tconst insideHandlesCanOpenDoor: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001),\n\t\t\t!!(raw.payload[1] & 0b0010),\n\t\t\t!!(raw.payload[1] & 0b0100),\n\t\t\t!!(raw.payload[1] & 0b1000),\n\t\t];\n\t\tconst doorStatus: \"closed\" | \"open\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b1)\n\t\t\t\t? \"closed\"\n\t\t\t\t: \"open\";\n\t\tconst boltStatus: \"unlocked\" | \"locked\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b10) ? \"unlocked\" : \"locked\";\n\t\tconst latchStatus: \"closed\" | \"open\" | undefined =\n\t\t\t!!(raw.payload[2] & 0b100)\n\t\t\t\t? \"closed\"\n\t\t\t\t: \"open\";\n\t\t// Ignore invalid timeout values\n\t\tconst lockTimeoutMinutes = raw.payload[3];\n\t\tconst lockTimeoutSeconds = raw.payload[4];\n\t\tlet lockTimeout: number | undefined;\n\t\tif (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {\n\t\t\tlockTimeout = lockTimeoutSeconds + lockTimeoutMinutes * 60;\n\t\t}\n\n\t\tlet targetMode: DoorLockMode | undefined;\n\t\tlet duration: Duration | undefined;\n\t\tif (raw.payload.length >= 7) {\n\t\t\ttargetMode = raw.payload[5];\n\t\t\tduration = Duration.parseReport(raw.payload[6]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tcurrentMode,\n\t\t\toutsideHandlesCanOpenDoor,\n\t\t\tinsideHandlesCanOpenDoor,\n\t\t\tdoorStatus,\n\t\t\tboltStatus,\n\t\t\tlatchStatus,\n\t\t\tlockTimeout,\n\t\t\ttargetMode,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Only store the door/bolt/latch status if the lock supports it\n\t\tconst supportsDoorStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.doorSupported,\n\t\t);\n\t\tif (supportsDoorStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.doorStatus,\n\t\t\t\tthis.doorStatus,\n\t\t\t);\n\t\t}\n\t\tconst supportsBoltStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.boltSupported,\n\t\t);\n\t\tif (supportsBoltStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.boltStatus,\n\t\t\t\tthis.boltStatus,\n\t\t\t);\n\t\t}\n\t\tconst supportsLatchStatus = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.latchSupported,\n\t\t);\n\t\tif (supportsLatchStatus) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.latchStatus,\n\t\t\t\tthis.latchStatus,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly currentMode: DoorLockMode;\n\n\tpublic readonly targetMode?: DoorLockMode;\n\n\tpublic readonly duration?: Duration;\n\n\tpublic readonly outsideHandlesCanOpenDoor: DoorHandleStatus;\n\n\tpublic readonly insideHandlesCanOpenDoor: DoorHandleStatus;\n\n\tpublic readonly latchStatus?: \"open\" | \"closed\";\n\tpublic readonly boltStatus?: \"locked\" | \"unlocked\";\n\tpublic readonly doorStatus?: \"open\" | \"closed\";\n\n\tpublic readonly lockTimeout?: number; // in seconds\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"current mode\": getEnumMemberName(DoorLockMode, this.currentMode),\n\t\t\t\"active outside handles\": this.outsideHandlesCanOpenDoor.join(\", \"),\n\t\t\t\"active inside handles\": this.insideHandlesCanOpenDoor.join(\", \"),\n\t\t};\n\n\t\tif (this.latchStatus != undefined) {\n\t\t\tmessage[\"latch status\"] = this.latchStatus;\n\t\t}\n\t\tif (this.boltStatus != undefined) {\n\t\t\tmessage[\"bolt status\"] = this.boltStatus;\n\t\t}\n\t\tif (this.doorStatus != undefined) {\n\t\t\tmessage[\"door status\"] = this.doorStatus;\n\t\t}\n\n\t\tif (this.targetMode != undefined) {\n\t\t\tmessage[\"target mode\"] = getEnumMemberName(\n\t\t\t\tDoorLockMode,\n\t\t\t\tthis.targetMode,\n\t\t\t);\n\t\t}\n\t\tif (this.duration != undefined) {\n\t\t\tmessage[\"remaining duration\"] = this.duration.toString();\n\t\t}\n\t\tif (this.lockTimeout != undefined) {\n\t\t\tmessage[\"lock timeout\"] = `${this.lockTimeout} seconds`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.OperationGet)\n@expectedCCResponse(DoorLockCCOperationReport)\nexport class DoorLockCCOperationGet extends DoorLockCC {}\n\n// @publicAPI\nexport interface DoorLockCCConfigurationReportOptions {\n\toperationType: DoorLockOperationType;\n\toutsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tinsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tlockTimeoutConfiguration?: number;\n\tautoRelockTime?: number;\n\tholdAndReleaseTime?: number;\n\ttwistAssist?: boolean;\n\tblockToBlock?: boolean;\n}\n\n@CCCommand(DoorLockCommand.ConfigurationReport)\n@ccValueProperty(\"operationType\", DoorLockCCValues.operationType)\n@ccValueProperty(\n\t\"outsideHandlesCanOpenDoorConfiguration\",\n\tDoorLockCCValues.outsideHandlesCanOpenDoorConfiguration,\n)\n@ccValueProperty(\n\t\"insideHandlesCanOpenDoorConfiguration\",\n\tDoorLockCCValues.insideHandlesCanOpenDoorConfiguration,\n)\n@ccValueProperty(\n\t\"lockTimeoutConfiguration\",\n\tDoorLockCCValues.lockTimeoutConfiguration,\n)\nexport class DoorLockCCConfigurationReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.operationType = options.operationType;\n\t\tthis.outsideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.outsideHandlesCanOpenDoorConfiguration;\n\t\tthis.insideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.insideHandlesCanOpenDoorConfiguration;\n\t\tthis.lockTimeoutConfiguration = options.lockTimeoutConfiguration;\n\t\tthis.autoRelockTime = options.autoRelockTime;\n\t\tthis.holdAndReleaseTime = options.holdAndReleaseTime;\n\t\tthis.twistAssist = options.twistAssist;\n\t\tthis.blockToBlock = options.blockToBlock;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 4);\n\t\tconst operationType: DoorLockOperationType = raw.payload[0];\n\t\tconst outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001_0000),\n\t\t\t!!(raw.payload[1] & 0b0010_0000),\n\t\t\t!!(raw.payload[1] & 0b0100_0000),\n\t\t\t!!(raw.payload[1] & 0b1000_0000),\n\t\t];\n\t\tconst insideHandlesCanOpenDoorConfiguration: DoorHandleStatus = [\n\t\t\t!!(raw.payload[1] & 0b0001),\n\t\t\t!!(raw.payload[1] & 0b0010),\n\t\t\t!!(raw.payload[1] & 0b0100),\n\t\t\t!!(raw.payload[1] & 0b1000),\n\t\t];\n\t\tlet lockTimeoutConfiguration: number | undefined;\n\t\tif (operationType === DoorLockOperationType.Timed) {\n\t\t\tconst lockTimeoutMinutes = raw.payload[2];\n\t\t\tconst lockTimeoutSeconds = raw.payload[3];\n\t\t\tif (lockTimeoutMinutes <= 0xfd && lockTimeoutSeconds <= 59) {\n\t\t\t\tlockTimeoutConfiguration = lockTimeoutSeconds\n\t\t\t\t\t+ lockTimeoutMinutes * 60;\n\t\t\t}\n\t\t}\n\n\t\tlet autoRelockTime: number | undefined;\n\t\tlet holdAndReleaseTime: number | undefined;\n\t\tlet twistAssist: boolean | undefined;\n\t\tlet blockToBlock: boolean | undefined;\n\t\tif (raw.payload.length >= 5) {\n\t\t\tautoRelockTime = raw.payload.readUInt16BE(4);\n\t\t\tholdAndReleaseTime = raw.payload.readUInt16BE(6);\n\n\t\t\tconst flags = raw.payload[8];\n\t\t\ttwistAssist = !!(flags & 0b1);\n\t\t\tblockToBlock = !!(flags & 0b10);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\toperationType,\n\t\t\toutsideHandlesCanOpenDoorConfiguration,\n\t\t\tinsideHandlesCanOpenDoorConfiguration,\n\t\t\tlockTimeoutConfiguration,\n\t\t\tautoRelockTime,\n\t\t\tholdAndReleaseTime,\n\t\t\ttwistAssist,\n\t\t\tblockToBlock,\n\t\t});\n\t}\n\n\tpublic readonly operationType: DoorLockOperationType;\n\n\tpublic readonly outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\n\tpublic readonly insideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\n\tpublic readonly lockTimeoutConfiguration?: number;\n\n\t// These are not always supported and have to be persisted manually\n\t// to avoid unsupported values being exposed to the user\n\tpublic readonly autoRelockTime?: number;\n\tpublic readonly holdAndReleaseTime?: number;\n\tpublic readonly twistAssist?: boolean;\n\tpublic readonly blockToBlock?: boolean;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Only store the autoRelockTime etc. params if the lock supports it\n\t\tconst supportsAutoRelock = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.autoRelockSupported,\n\t\t);\n\t\tif (supportsAutoRelock) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.autoRelockTime,\n\t\t\t\tthis.autoRelockTime,\n\t\t\t);\n\t\t}\n\t\tconst supportsHoldAndRelease = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.holdAndReleaseSupported,\n\t\t);\n\t\tif (supportsHoldAndRelease) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.holdAndReleaseTime,\n\t\t\t\tthis.holdAndReleaseTime,\n\t\t\t);\n\t\t}\n\t\tconst supportsTwistAssist = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.twistAssistSupported,\n\t\t);\n\t\tif (supportsTwistAssist) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.twistAssist,\n\t\t\t\tthis.twistAssist,\n\t\t\t);\n\t\t}\n\t\tconst supportsBlockToBlock = !!this.getValue(\n\t\t\tctx,\n\t\t\tDoorLockCCValues.blockToBlockSupported,\n\t\t);\n\t\tif (supportsBlockToBlock) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tDoorLockCCValues.blockToBlock,\n\t\t\t\tthis.blockToBlock,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"operation type\": getEnumMemberName(\n\t\t\t\tDoorLockOperationType,\n\t\t\t\tthis.operationType,\n\t\t\t),\n\t\t\t\"outside handle configuration\": this\n\t\t\t\t.outsideHandlesCanOpenDoorConfiguration.join(\", \"),\n\t\t\t\"inside handle configuration\": this\n\t\t\t\t.insideHandlesCanOpenDoorConfiguration.join(\", \"),\n\t\t};\n\t\tif (this.lockTimeoutConfiguration != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"timed mode duration\"\n\t\t\t] = `${this.lockTimeoutConfiguration} seconds`;\n\t\t}\n\t\tif (this.autoRelockTime != undefined) {\n\t\t\tmessage[\"auto-relock time\"] = `${this.autoRelockTime} seconds`;\n\t\t}\n\t\tif (this.holdAndReleaseTime != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"hold-and-release time\"\n\t\t\t] = `${this.holdAndReleaseTime} seconds`;\n\t\t}\n\t\tif (this.twistAssist != undefined) {\n\t\t\tmessage[\"twist assist enabled\"] = this.twistAssist;\n\t\t}\n\t\tif (this.blockToBlock != undefined) {\n\t\t\tmessage[\"block-to-block enabled\"] = this.blockToBlock;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.ConfigurationGet)\n@expectedCCResponse(DoorLockCCConfigurationReport)\nexport class DoorLockCCConfigurationGet extends DoorLockCC {}\n\n// @publicAPI\nexport type DoorLockCCConfigurationSetOptions =\n\t& (\n\t\t| {\n\t\t\toperationType: DoorLockOperationType.Timed;\n\t\t\tlockTimeoutConfiguration: number;\n\t\t}\n\t\t| {\n\t\t\toperationType: DoorLockOperationType.Constant;\n\t\t\tlockTimeoutConfiguration?: undefined;\n\t\t}\n\t)\n\t& {\n\t\toutsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\t\tinsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\t\t// V4+\n\t\tautoRelockTime?: number;\n\t\tholdAndReleaseTime?: number;\n\t\ttwistAssist?: boolean;\n\t\tblockToBlock?: boolean;\n\t};\n\n@CCCommand(DoorLockCommand.ConfigurationSet)\n@useSupervision()\nexport class DoorLockCCConfigurationSet extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.operationType = options.operationType;\n\t\tthis.outsideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.outsideHandlesCanOpenDoorConfiguration;\n\t\tthis.insideHandlesCanOpenDoorConfiguration =\n\t\t\toptions.insideHandlesCanOpenDoorConfiguration;\n\t\tthis.lockTimeoutConfiguration = options.lockTimeoutConfiguration;\n\t\tthis.autoRelockTime = options.autoRelockTime;\n\t\tthis.holdAndReleaseTime = options.holdAndReleaseTime;\n\t\tthis.twistAssist = options.twistAssist;\n\t\tthis.blockToBlock = options.blockToBlock;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockCCConfigurationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new DoorLockCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic operationType: DoorLockOperationType;\n\tpublic outsideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tpublic insideHandlesCanOpenDoorConfiguration: DoorHandleStatus;\n\tpublic lockTimeoutConfiguration?: number;\n\tpublic autoRelockTime?: number;\n\tpublic holdAndReleaseTime?: number;\n\tpublic twistAssist?: boolean;\n\tpublic blockToBlock?: boolean;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst insideHandles = isArray(\n\t\t\t\tthis.insideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.insideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst outsideHandles = isArray(\n\t\t\t\tthis.outsideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.outsideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\n\t\tconst handles = [...insideHandles, ...outsideHandles]\n\t\t\t.map((val, i) => (val ? 1 << i : 0))\n\t\t\t.reduce((acc, cur) => acc | cur, 0);\n\n\t\tlet lockTimeoutMinutes: number;\n\t\tlet lockTimeoutSeconds: number;\n\t\tif (this.operationType === DoorLockOperationType.Constant) {\n\t\t\tlockTimeoutMinutes = lockTimeoutSeconds = 0xfe;\n\t\t} else {\n\t\t\tlockTimeoutMinutes = Math.floor(\n\t\t\t\tthis.lockTimeoutConfiguration! / 60,\n\t\t\t);\n\t\t\tlockTimeoutSeconds = this.lockTimeoutConfiguration! % 60;\n\t\t}\n\n\t\tconst flags = (this.twistAssist ? 0b1 : 0)\n\t\t\t| (this.blockToBlock ? 0b10 : 0);\n\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.operationType,\n\t\t\thandles,\n\t\t\tlockTimeoutMinutes,\n\t\t\tlockTimeoutSeconds,\n\t\t\t// placeholder for auto relock time\n\t\t\t0,\n\t\t\t0,\n\t\t\t// placeholder for hold and release time\n\t\t\t0,\n\t\t\t0,\n\t\t\tflags,\n\t\t]);\n\n\t\tthis.payload.writeUInt16BE((this.autoRelockTime ?? 0) & 0xffff, 4);\n\t\tthis.payload.writeUInt16BE(\n\t\t\t(this.holdAndReleaseTime ?? 0) & 0xffff,\n\t\t\t6,\n\t\t);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst insideHandles = isArray(\n\t\t\t\tthis.insideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.insideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst outsideHandles = isArray(\n\t\t\t\tthis.outsideHandlesCanOpenDoorConfiguration,\n\t\t\t)\n\t\t\t? this.outsideHandlesCanOpenDoorConfiguration\n\t\t\t: [];\n\t\tconst message: MessageRecord = {\n\t\t\t\"operation type\": getEnumMemberName(\n\t\t\t\tDoorLockOperationType,\n\t\t\t\tthis.operationType,\n\t\t\t),\n\t\t\t\"outside handle configuration\": outsideHandles.join(\", \"),\n\t\t\t\"inside handle configuration\": insideHandles.join(\", \"),\n\t\t};\n\t\tif (this.lockTimeoutConfiguration != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"timed mode duration\"\n\t\t\t] = `${this.lockTimeoutConfiguration} seconds`;\n\t\t}\n\t\tif (this.autoRelockTime != undefined) {\n\t\t\tmessage[\"auto-relock time\"] = `${this.autoRelockTime} seconds`;\n\t\t}\n\t\tif (this.holdAndReleaseTime != undefined) {\n\t\t\tmessage[\n\t\t\t\t\"hold-and-release time\"\n\t\t\t] = `${this.holdAndReleaseTime} seconds`;\n\t\t}\n\t\tif (this.twistAssist != undefined) {\n\t\t\tmessage[\"enable twist assist\"] = this.twistAssist;\n\t\t}\n\t\tif (this.blockToBlock != undefined) {\n\t\t\tmessage[\"enable block-to-block\"] = this.blockToBlock;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockCCCapabilitiesReportOptions {\n\tsupportedOperationTypes: DoorLockOperationType[];\n\tsupportedDoorLockModes: DoorLockMode[];\n\tsupportedOutsideHandles: DoorHandleStatus;\n\tsupportedInsideHandles: DoorHandleStatus;\n\tdoorSupported: boolean;\n\tboltSupported: boolean;\n\tlatchSupported: boolean;\n\tblockToBlockSupported: boolean;\n\ttwistAssistSupported: boolean;\n\tholdAndReleaseSupported: boolean;\n\tautoRelockSupported: boolean;\n}\n\n@CCCommand(DoorLockCommand.CapabilitiesReport)\n@ccValueProperty(\n\t\"supportedOutsideHandles\",\n\tDoorLockCCValues.supportedOutsideHandles,\n)\n@ccValueProperty(\n\t\"supportedInsideHandles\",\n\tDoorLockCCValues.supportedInsideHandles,\n)\n@ccValueProperty(\"autoRelockSupported\", DoorLockCCValues.autoRelockSupported)\n@ccValueProperty(\n\t\"holdAndReleaseSupported\",\n\tDoorLockCCValues.holdAndReleaseSupported,\n)\n@ccValueProperty(\"twistAssistSupported\", DoorLockCCValues.twistAssistSupported)\n@ccValueProperty(\n\t\"blockToBlockSupported\",\n\tDoorLockCCValues.blockToBlockSupported,\n)\nexport class DoorLockCCCapabilitiesReport extends DoorLockCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockCCCapabilitiesReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedOperationTypes = options.supportedOperationTypes;\n\t\tthis.supportedDoorLockModes = options.supportedDoorLockModes;\n\t\tthis.supportedOutsideHandles = options.supportedOutsideHandles;\n\t\tthis.supportedInsideHandles = options.supportedInsideHandles;\n\t\tthis.doorSupported = options.doorSupported;\n\t\tthis.boltSupported = options.boltSupported;\n\t\tthis.latchSupported = options.latchSupported;\n\t\tthis.blockToBlockSupported = options.blockToBlockSupported;\n\t\tthis.twistAssistSupported = options.twistAssistSupported;\n\t\tthis.holdAndReleaseSupported = options.holdAndReleaseSupported;\n\t\tthis.autoRelockSupported = options.autoRelockSupported;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockCCCapabilitiesReport {\n\t\t// parse variable length operation type bit mask\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst bitMaskLength = raw.payload[0] & 0b11111;\n\t\tlet offset = 1;\n\t\tvalidatePayload(raw.payload.length >= offset + bitMaskLength + 1);\n\t\tconst supportedOperationTypes: DoorLockOperationType[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + bitMaskLength),\n\t\t\t// bit 0 is reserved, bitmask starts at 1\n\t\t\t0,\n\t\t);\n\t\toffset += bitMaskLength;\n\t\t// parse variable length door lock mode list\n\t\tconst listLength = raw.payload[offset];\n\t\toffset += 1;\n\t\tvalidatePayload(raw.payload.length >= offset + listLength + 3);\n\t\tconst supportedDoorLockModes: DoorLockMode[] = [\n\t\t\t...raw.payload.subarray(offset, offset + listLength),\n\t\t];\n\t\toffset += listLength;\n\t\tconst supportedOutsideHandles: DoorHandleStatus = [\n\t\t\t!!(raw.payload[offset] & 0b0001_0000),\n\t\t\t!!(raw.payload[offset] & 0b0010_0000),\n\t\t\t!!(raw.payload[offset] & 0b0100_0000),\n\t\t\t!!(raw.payload[offset] & 0b1000_0000),\n\t\t];\n\t\tconst supportedInsideHandles: DoorHandleStatus = [\n\t\t\t!!(raw.payload[offset] & 0b0001),\n\t\t\t!!(raw.payload[offset] & 0b0010),\n\t\t\t!!(raw.payload[offset] & 0b0100),\n\t\t\t!!(raw.payload[offset] & 0b1000),\n\t\t];\n\t\tconst doorSupported = !!(raw.payload[offset + 1] & 0b1);\n\t\tconst boltSupported = !!(raw.payload[offset + 1] & 0b10);\n\t\tconst latchSupported = !!(raw.payload[offset + 1] & 0b100);\n\t\tconst blockToBlockSupported = !!(raw.payload[offset + 2] & 0b1);\n\t\tconst twistAssistSupported = !!(raw.payload[offset + 2] & 0b10);\n\t\tconst holdAndReleaseSupported = !!(raw.payload[offset + 2] & 0b100);\n\t\tconst autoRelockSupported = !!(raw.payload[offset + 2] & 0b1000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedOperationTypes,\n\t\t\tsupportedDoorLockModes,\n\t\t\tsupportedOutsideHandles,\n\t\t\tsupportedInsideHandles,\n\t\t\tdoorSupported,\n\t\t\tboltSupported,\n\t\t\tlatchSupported,\n\t\t\tblockToBlockSupported,\n\t\t\ttwistAssistSupported,\n\t\t\tholdAndReleaseSupported,\n\t\t\tautoRelockSupported,\n\t\t});\n\t}\n\n\tpublic readonly supportedOperationTypes: readonly DoorLockOperationType[];\n\tpublic readonly supportedDoorLockModes: readonly DoorLockMode[];\n\n\tpublic readonly supportedOutsideHandles: DoorHandleStatus;\n\n\tpublic readonly supportedInsideHandles: DoorHandleStatus;\n\n\t// These 3 are not automatically persisted because in CC version 3\n\t// we have to assume them to be supported. In v4 we can query this.\n\tpublic readonly latchSupported: boolean;\n\tpublic readonly boltSupported: boolean;\n\tpublic readonly doorSupported: boolean;\n\n\tpublic readonly autoRelockSupported: boolean;\n\n\tpublic readonly holdAndReleaseSupported: boolean;\n\n\tpublic readonly twistAssistSupported: boolean;\n\n\tpublic readonly blockToBlockSupported: boolean;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tdoor: this.doorSupported,\n\t\t\t\tbolt: this.boltSupported,\n\t\t\t\tlatch: this.latchSupported,\n\t\t\t\t\"block-to-block feature\": this.blockToBlockSupported,\n\t\t\t\t\"twist assist feature\": this.twistAssistSupported,\n\t\t\t\t\"hold-and-release feature\": this.holdAndReleaseSupported,\n\t\t\t\t\"auto-relock feature\": this.autoRelockSupported,\n\t\t\t\t\"operation types\": this.supportedOperationTypes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(t) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tDoorLockOperationType,\n\t\t\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"door lock modes\": this.supportedDoorLockModes\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${getEnumMemberName(DoorLockMode, t)}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"outside handles\": this.supportedOutsideHandles.join(\", \"),\n\t\t\t\t\"inside handles\": this.supportedInsideHandles.join(\", \"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(DoorLockCommand.CapabilitiesGet)\n@expectedCCResponse(DoorLockCCCapabilitiesReport)\nexport class DoorLockCCCapabilitiesGet extends DoorLockCC {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAkBO;AACP,oBAA+C;AAE/C,wBAAwB;AACxB,iBASO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAKO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoLD,SAAU,iCACf,KACA,UAAoB;AAEpB,QAAM,UAAU,IAAI,cAAc,SAAS,MAAM;AACjD,MAAI,CAAC;AAAS,WAAO;AACrB,SAAO,CAAC,CAAC,QAAQ,SAChB,2CAAiB,eAAe,SAAS,SAAS,KAAK,CAAC;AAE1D;AATgB;AAWV,SAAU,gCACf,KACA,UAAoB;AAEpB,QAAM,UAAU,IAAI,cAAc,SAAS,MAAM;AACjD,MAAI,CAAC;AAAS,WAAO;AACrB,SAAO,CAAC,CAAC,QAAQ,SAChB,2CAAiB,cAAc,SAAS,SAAS,KAAK,CAAC;AAEzD;AATgB;AAWV,SAAU,gCACf,KACA,UAAoB;AAEpB,QAAM,UAAU,IAAI,cAAc,SAAS,MAAM;AACjD,MAAI,CAAC;AAAS,WAAO;AACrB,SAAO,CAAC,CAAC,QAAQ,SAChB,2CAAiB,cAAc,SAAS,SAAS,KAAK,CAAC;AAEzD;AATgB;AAWV,SAAU,uCACf,KACA,UAAoB;AAEpB,QAAM,UAAU,IAAI,cAAc,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_reportCCVersion() {
|
|
61
61
|
return (__decoratedMethod, { kind }) => {
|
|
62
62
|
if (kind === "method") {
|
|
63
|
-
return /* @__PURE__ */ __name(function reportCCVersion(requestedCC) {
|
|
64
|
-
v.assert(v.enum({ kind: "parameter", name: "requestedCC" }, "CommandClasses")(requestedCC));
|
|
65
|
-
return __decoratedMethod.call(this, requestedCC);
|
|
63
|
+
return /* @__PURE__ */ __name(function reportCCVersion(requestedCC, version) {
|
|
64
|
+
v.assert(v.enum({ kind: "parameter", name: "requestedCC" }, "CommandClasses")(requestedCC), v.optional({ kind: "parameter", name: "version" }, v.primitive({ kind: "parameter", name: "version" }, "number"))(version));
|
|
65
|
+
return __decoratedMethod.call(this, requestedCC, version);
|
|
66
66
|
}, "reportCCVersion");
|
|
67
67
|
}
|
|
68
68
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/VersionCC._validateArgs.ts"],
|
|
4
4
|
"sourcesContent": [null],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,QAAmB;AAEb,SAAU,uCAAoC;AACnD,SAAO,CAAqB,mBAAsB,EAAE,KAAI,MAA6C;AACpG,QAAI,SAAS,UAAU;AACtB,aAAO,gCAAS,WAAsB,SAAgB;AACrD,UAAE,OACD,EAAE,OAAO,EAAE,MAAM,aAAa,MAAM,UAAS,GAAI,0BAA0B,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,YAAY,MAAM,cAAa,GAAI,mBAAmB,GAAG,mBAAmB,EAAE,UAAU,EAAE,MAAM,YAAY,MAAM,kBAAiB,GAAI,QAAQ,GAAG,oBAAoB,EAAE,MAAM,EAAE,MAAM,YAAY,MAAM,mBAAkB,GAAI,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,MAAM,mBAAkB,GAAI,QAAQ,CAAC,GAAG,mBAAmB,EAAE,SAAS,EAAE,MAAM,YAAY,MAAM,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,MAAM,YAAY,MAAM,kBAAiB,GAAI,QAAQ,CAAC,EAAC,CAAE,EAAE,OAAO,CAAC;AAEtjB,eAAO,kBAAkB,KAAK,MAAM,OAAO;MAC5C,GALO;IAMR;EACD;AACD;AAXgB;AAaV,SAAU,yCAAsC;AACrD,SAAO,CAAqB,mBAAsB,EAAE,KAAI,MAA6C;AACpG,QAAI,SAAS,UAAU;AACtB,aAAO,gCAAS,aAAwB,aAAoB;AAC3D,UAAE,OACD,EAAE,KAAK,EAAE,MAAM,aAAa,MAAM,cAAa,GAAI,gBAAgB,EAAE,WAAW,CAAC;AAElF,eAAO,kBAAkB,KAAK,MAAM,WAAW;MAChD,GALO;IAMR;EACD;AACD;AAXgB;AAaV,SAAU,4CAAyC;AACxD,SAAO,CAAqB,mBAAsB,EAAE,KAAI,MAA6C;AACpG,QAAI,SAAS,UAAU;AACtB,aAAO,gCAAS,gBAA2B,aAAsB,SAAgB;AAChF,UAAE,OACD,EAAE,KAAK,EAAE,MAAM,aAAa,MAAM,cAAa,GAAI,gBAAgB,EAAE,WAAW,GAEhF,EAAE,SAAS,EAAE,MAAM,aAAa,MAAM,UAAS,GAAI,EAAE,UAAU,EAAE,MAAM,aAAa,MAAM,UAAS,GAAI,QAAQ,CAAC,EAAE,OAAO,CAAC;AAE3H,eAAO,kBAAkB,KAAK,MAAM,aAAa,OAAO;MACzD,GAPO;IAQR;EACD;AACD;AAbgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -375,7 +375,7 @@ export declare class VersionCCAPI extends PhysicalCCAPI {
|
|
|
375
375
|
get(): Promise<Pick<VersionCCReport, "firmwareVersions" | "libraryType" | "protocolVersion" | "hardwareVersion"> | undefined>;
|
|
376
376
|
sendReport(options: VersionCCReportOptions): Promise<void>;
|
|
377
377
|
getCCVersion(requestedCC: CommandClasses): Promise<MaybeNotKnown<number>>;
|
|
378
|
-
reportCCVersion(requestedCC: CommandClasses): Promise<void>;
|
|
378
|
+
reportCCVersion(requestedCC: CommandClasses, version?: number): Promise<void>;
|
|
379
379
|
getCapabilities(): Promise<Pick<VersionCCCapabilitiesReport, "supportsZWaveSoftwareGet"> | undefined>;
|
|
380
380
|
reportCapabilities(): Promise<void>;
|
|
381
381
|
getZWaveSoftware(): Promise<Pick<VersionCCZWaveSoftwareReport, "sdkVersion" | "applicationFrameworkAPIVersion" | "applicationFrameworkBuildNumber" | "hostInterfaceVersion" | "hostInterfaceBuildNumber" | "zWaveProtocolVersion" | "zWaveProtocolBuildNumber" | "applicationVersion" | "applicationBuildNumber"> | undefined>;
|
|
@@ -182,7 +182,7 @@ let VersionCCAPI = (() => {
|
|
|
182
182
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
183
183
|
return response?.ccVersion;
|
|
184
184
|
}
|
|
185
|
-
async reportCCVersion(requestedCC) {
|
|
185
|
+
async reportCCVersion(requestedCC, version) {
|
|
186
186
|
this.assertSupportsCommand(import_Types.VersionCommand, import_Types.VersionCommand.CommandClassReport);
|
|
187
187
|
let ccVersion;
|
|
188
188
|
switch (requestedCC) {
|
|
@@ -195,7 +195,7 @@ let VersionCCAPI = (() => {
|
|
|
195
195
|
ccVersion = 0;
|
|
196
196
|
break;
|
|
197
197
|
default:
|
|
198
|
-
ccVersion = (0, import_CommandClassDecorators.getImplementedVersion)(requestedCC);
|
|
198
|
+
ccVersion = version ?? (0, import_CommandClassDecorators.getImplementedVersion)(requestedCC);
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
const cc = new VersionCCCommandClassReport({
|