@zwave-js/cc 15.25.1 → 15.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +15 -17
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +1 -1
- package/build/cjs/cc/AssociationCC.js +5 -2
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +23 -18
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js +9 -7
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.js +3 -2
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.js +3 -2
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.js +8 -6
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +3 -2
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.js +9 -7
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.js +3 -2
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +9 -6
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.js +27 -27
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.js +49 -63
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.js +3 -2
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.js +3 -2
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.js +5 -3
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +2 -1
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +9 -8
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +3 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +19 -17
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.js +5 -2
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.js +26 -27
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.js +3 -2
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.js +3 -2
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +4 -1
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.js +14 -13
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +5 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +1 -1
- package/build/cjs/cc/MultiChannelCC.js +19 -22
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js +13 -8
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.js +5 -3
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +3 -2
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.js +11 -11
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.js +16 -15
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +2 -1
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js +2 -1
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.js +15 -24
- package/build/cjs/cc/Security2CC.js.map +2 -2
- package/build/cjs/cc/SecurityCC.js +10 -17
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.js +2 -1
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.js +9 -7
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.js +3 -2
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +9 -7
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -4
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.js +3 -2
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.js +9 -5
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.js +2 -1
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.js +2 -1
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.js +6 -6
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/UserCredentialCC.js +5 -2
- package/build/cjs/cc/UserCredentialCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js +2 -1
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.js +2 -1
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +10 -7
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +2 -1
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +4 -4
- package/build/cjs/cc/_CCValues.generated.js +2 -2
- package/build/cjs/cc/_CCValues.generated.js.map +1 -1
- package/build/cjs/cc/index.d.ts +3 -3
- package/build/cjs/cc/index.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +1 -1
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +3 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +5 -1
- package/build/cjs/lib/CommandClass.js +25 -3
- package/build/cjs/lib/CommandClass.js.map +2 -2
- package/build/cjs/lib/CommandClassDecorators.d.ts +4 -4
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +6 -4
- package/build/cjs/lib/Security2/Extension.js +22 -20
- package/build/cjs/lib/Security2/Extension.js.map +2 -2
- package/build/cjs/lib/_Types.js.map +1 -1
- package/build/cjs/lib/utils.js +14 -8
- package/build/cjs/lib/utils.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +14 -18
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +3 -0
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +24 -22
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +8 -8
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -1
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -1
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +7 -7
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -1
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +9 -8
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +2 -1
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +8 -7
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +32 -29
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +73 -74
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -1
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +2 -1
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +3 -1
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +8 -9
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +18 -23
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +3 -0
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +29 -24
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -1
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -1
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +4 -1
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +15 -19
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +3 -0
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +19 -23
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +14 -19
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +3 -1
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -1
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +11 -14
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +15 -22
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +15 -32
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +10 -21
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +1 -0
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +8 -8
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -1
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +8 -8
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +4 -5
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +2 -1
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +8 -9
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -0
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -0
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +5 -7
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
- package/build/esm/cc/UserCredentialCC.js +4 -1
- package/build/esm/cc/UserCredentialCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +1 -0
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +1 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +9 -9
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +1 -0
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +4 -4
- package/build/esm/cc/_CCValues.generated.js +2 -2
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/index.d.ts +3 -3
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +2 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +5 -1
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +30 -4
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +4 -4
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +6 -4
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +23 -21
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/_Types.js +1 -1
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +15 -9
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/DoorLockLoggingCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./DoorLockLoggingCC._validateArgs.js\";\nconst { validateArgs_DoorLockLoggingCCAPI_getRecord } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, isPrintableASCII, num2hex } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { DoorLockLoggingCommand, DoorLockLoggingEventType, type DoorLockLoggingRecord, DoorLockLoggingRecordStatus, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { userCodeToLogString } from \"./UserCodeCC.js\";\ninterface DateSegments {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n}\nfunction segmentsToDate(segments: DateSegments): Date {\n return new Date(segments.year, segments.month - 1, // JS months are 0-based.\n segments.day, segments.hour, segments.minute, segments.second);\n}\nconst eventTypeLabel = {\n LockCode: \"Locked via Access Code\",\n UnlockCode: \"Unlocked via Access Code\",\n LockButton: \"Locked via Lock Button\",\n UnlockButton: \"Unlocked via Unlock Button\",\n LockCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Access Code\",\n UnlockCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Access Code\",\n IllegalCode: \"Illegal Access Code Entered\",\n LockManual: \"Manually Locked\",\n UnlockManual: \"Manually Unlocked\",\n LockAuto: \"Auto Locked\",\n UnlockAuto: \"Auto Unlocked\",\n LockRemoteCode: \"Locked via Remote Access Code\",\n UnlockRemoteCode: \"Unlocked via Remote Access Code\",\n LockRemote: \"Locked via Remote\",\n UnlockRemote: \"Unlocked via Remote\",\n LockRemoteCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Remote Access Code\",\n UnlockRemoteCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Remote Access Code\",\n RemoteIllegalCode: \"Illegal Remote Access Code\",\n LockManual2: \"Manually Locked (2)\",\n UnlockManual2: \"Manually Unlocked (2)\",\n LockSecured: \"Lock Secured\",\n LockUnsecured: \"Lock Unsecured\",\n UserCodeAdded: \"User Code Added\",\n UserCodeDeleted: \"User Code Deleted\",\n AllUserCodesDeleted: \"All User Codes Deleted\",\n AdminCodeChanged: \"Admin Code Changed\",\n UserCodeChanged: \"User Code Changed\",\n LockReset: \"Lock Reset\",\n ConfigurationChanged: \"Configuration Changed\",\n LowBattery: \"Low Battery\",\n NewBattery: \"New Battery Installed\",\n Unknown: \"Unknown\",\n} as const;\nconst LATEST_RECORD_NUMBER_KEY = 0;\nimport { DoorLockLoggingCCValues } from \"./_CCValues.generated.js\";\nexport { DoorLockLoggingCCValues };\n@API(CommandClasses[\"Door Lock Logging\"])\nexport class DoorLockLoggingCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: DoorLockLoggingCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case DoorLockLoggingCommand.RecordsSupportedGet:\n case DoorLockLoggingCommand.RecordsSupportedReport:\n case DoorLockLoggingCommand.RecordGet:\n case DoorLockLoggingCommand.RecordReport:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n public async getRecordsCount(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(DoorLockLoggingCommand, DoorLockLoggingCommand.RecordsSupportedGet);\n const cc = new DoorLockLoggingCCRecordsSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<DoorLockLoggingCCRecordsSupportedReport>(cc, this.commandOptions);\n return response?.recordsCount;\n }\n /** Retrieves the specified audit record. Defaults to the latest one. */\n @validateArgs_DoorLockLoggingCCAPI_getRecord()\n public async getRecord(recordNumber: number = LATEST_RECORD_NUMBER_KEY): Promise<MaybeNotKnown<DoorLockLoggingRecord>> {\n this.assertSupportsCommand(DoorLockLoggingCommand, DoorLockLoggingCommand.RecordGet);\n const cc = new DoorLockLoggingCCRecordGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n recordNumber,\n });\n const response = await this.host.sendCommand<DoorLockLoggingCCRecordReport>(cc, this.commandOptions);\n return response?.record;\n }\n}\n@commandClass(CommandClasses[\"Door Lock Logging\"])\n@implementedVersion(1)\n@ccValues(DoorLockLoggingCCValues)\nexport class DoorLockLoggingCC extends CommandClass {\n declare ccCommand: DoorLockLoggingCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Door Lock Logging\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported number of records...\",\n direction: \"outbound\",\n });\n const recordsCount = await api.getRecordsCount();\n if (!recordsCount) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Door Lock Logging records count query timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n const recordsCountLogMessage = `supports ${recordsCount} record${recordsCount === 1 ? \"\" : \"s\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: recordsCountLogMessage,\n direction: \"inbound\",\n });\n }\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordsSupportedReportOptions {\n recordsCount: number;\n}\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedReport)\n@ccValueProperty(\"recordsCount\", DoorLockLoggingCCValues.recordsCount)\nexport class DoorLockLoggingCCRecordsSupportedReport extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordsSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.recordsCount = options.recordsCount;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): DoorLockLoggingCCRecordsSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const recordsCount = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n recordsCount,\n });\n }\n public readonly recordsCount: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported no. of records\": this.recordsCount,\n },\n };\n }\n}\nfunction eventTypeToLabel(eventType: DoorLockLoggingEventType): string {\n return ((eventTypeLabel as any)[DoorLockLoggingEventType[eventType]]\n ?? `Unknown ${num2hex(eventType)}`);\n}\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedGet)\n@expectedCCResponse(DoorLockLoggingCCRecordsSupportedReport)\nexport class DoorLockLoggingCCRecordsSupportedGet extends DoorLockLoggingCC {\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordReportOptions {\n recordNumber: number;\n record?: DoorLockLoggingRecord;\n}\n@CCCommand(DoorLockLoggingCommand.RecordReport)\nexport class DoorLockLoggingCCRecordReport extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.recordNumber = options.recordNumber;\n this.record = options.record;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): DoorLockLoggingCCRecordReport {\n validatePayload(raw.payload.length >= 11);\n const recordNumber = raw.payload[0];\n const recordStatus = raw.payload[5] >>> 5;\n let record: DoorLockLoggingRecord | undefined;\n if (recordStatus !== DoorLockLoggingRecordStatus.Empty) {\n const dateSegments = {\n year: raw.payload.readUInt16BE(1),\n month: raw.payload[3],\n day: raw.payload[4],\n hour: raw.payload[5] & 0b11111,\n minute: raw.payload[6],\n second: raw.payload[7],\n };\n const eventType = raw.payload[8];\n const recordUserID = raw.payload[9];\n const userCodeLength = raw.payload[10];\n validatePayload(userCodeLength <= 10, raw.payload.length >= 11 + userCodeLength);\n const userCodeBuffer = raw.payload.subarray(11, 11 + userCodeLength);\n // See User Code CC for a detailed description. We try to parse the code as ASCII if possible\n // and fall back to a buffer otherwise.\n const userCodeString = userCodeBuffer.toString(\"utf8\");\n const userCode = isPrintableASCII(userCodeString)\n ? userCodeString\n : userCodeBuffer;\n record = {\n eventType: eventType,\n label: eventTypeToLabel(eventType),\n timestamp: segmentsToDate(dateSegments).toISOString(),\n userId: recordUserID,\n userCode,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n recordNumber,\n record,\n });\n }\n public readonly recordNumber: number;\n public readonly record?: DoorLockLoggingRecord;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (!this.record) {\n message = {\n \"record #\": `${this.recordNumber} (empty)`,\n };\n }\n else {\n message = {\n \"record #\": `${this.recordNumber}`,\n \"event type\": this.record.label,\n timestamp: this.record.timestamp,\n };\n if (this.record.userId) {\n message[\"user ID\"] = this.record.userId;\n }\n if (this.record.userCode) {\n message[\"user code\"] = userCodeToLogString(this.record.userCode);\n }\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordGetOptions {\n recordNumber: number;\n}\nfunction testResponseForDoorLockLoggingRecordGet(sent: DoorLockLoggingCCRecordGet, received: DoorLockLoggingCCRecordReport) {\n return (sent.recordNumber === LATEST_RECORD_NUMBER_KEY\n || sent.recordNumber === received.recordNumber);\n}\n@CCCommand(DoorLockLoggingCommand.RecordGet)\n@expectedCCResponse(DoorLockLoggingCCRecordReport, testResponseForDoorLockLoggingRecordGet)\nexport class DoorLockLoggingCCRecordGet extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordGetOptions>) {\n super(options);\n this.recordNumber = options.recordNumber;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): DoorLockLoggingCCRecordGet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new DoorLockLoggingCCRecordGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public recordNumber: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.recordNumber]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"record number\": this.recordNumber },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAoM;AACpM,oBAAiD;AACjD,iBAAqC;AACrC,0BAAuH;AACvH,oCAAiH;AAEjH,mBAA2H;AAE3H,wBAAoC;AAgDpC,gCAAwC;AAzDxC,MAAM,EAAE,4CAA2C,IAAK;AAkBxD,SAAS,eAAe,UAAsB;AAC1C,SAAO,IAAI;IAAK,SAAS;IAAM,SAAS,QAAQ;;IAChD,SAAS;IAAK,SAAS;IAAM,SAAS;IAAQ,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QAChD,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;OAChC;AACD,YAAM,WAAW,MAAM,KAAK,KAAK,YAAqD,IAAI,KAAK,cAAc;AAC7G,aAAO,UAAU;IACrB;;IAGO,MAAM,UAAU,eAAuB,0BAAwB;AAClE,WAAK,sBAAsB,qCAAwB,oCAAuB,SAAS;AACnF,YAAM,KAAK,IAAI,2BAA2B;QACtC,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;QAC7B;OACH;AACD,YAAM,WAAW,MAAM,KAAK,KAAK,YAA2C,IAAI,KAAK,cAAc;AACnG,aAAO,UAAU;IACrB;;;AA/BS,0CAAA,MAAA,0BAAA;;;;;IAoCA,qBAAiB,MAAA;8BAH7B,4CAAa,2BAAe,mBAAmB,CAAC,OAChD,kDAAmB,CAAC,OACpB,wCAAS,iDAAuB,CAAC;;;;oBACK;yCAAA,YAAY;WAAA;;;;;;;;AAAnD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IAEF,MAAM,UAAU,KAAqB;AACxC,YAAM,OAAO,KAAK,QAAQ,GAAG;AAC7B,UAAI,QAAQ,KAAK,IAAI;QACjB,UAAU,KAAK;QACf,SAAS,gBAAgB,KAAK,MAAM;QACpC,WAAW;OACd;AACD,YAAM,KAAK,cAAc,
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./DoorLockLoggingCC._validateArgs.js\";\nconst { validateArgs_DoorLockLoggingCCAPI_getRecord } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, isPrintableASCII, num2hex } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { DoorLockLoggingCommand, DoorLockLoggingEventType, type DoorLockLoggingRecord, DoorLockLoggingRecordStatus, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { userCodeToLogString } from \"./UserCodeCC.js\";\ninterface DateSegments {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n}\nfunction segmentsToDate(segments: DateSegments): Date {\n return new Date(segments.year, segments.month - 1, // JS months are 0-based.\n segments.day, segments.hour, segments.minute, segments.second);\n}\nconst eventTypeLabel = {\n LockCode: \"Locked via Access Code\",\n UnlockCode: \"Unlocked via Access Code\",\n LockButton: \"Locked via Lock Button\",\n UnlockButton: \"Unlocked via Unlock Button\",\n LockCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Access Code\",\n UnlockCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Access Code\",\n IllegalCode: \"Illegal Access Code Entered\",\n LockManual: \"Manually Locked\",\n UnlockManual: \"Manually Unlocked\",\n LockAuto: \"Auto Locked\",\n UnlockAuto: \"Auto Unlocked\",\n LockRemoteCode: \"Locked via Remote Access Code\",\n UnlockRemoteCode: \"Unlocked via Remote Access Code\",\n LockRemote: \"Locked via Remote\",\n UnlockRemote: \"Unlocked via Remote\",\n LockRemoteCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Remote Access Code\",\n UnlockRemoteCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Remote Access Code\",\n RemoteIllegalCode: \"Illegal Remote Access Code\",\n LockManual2: \"Manually Locked (2)\",\n UnlockManual2: \"Manually Unlocked (2)\",\n LockSecured: \"Lock Secured\",\n LockUnsecured: \"Lock Unsecured\",\n UserCodeAdded: \"User Code Added\",\n UserCodeDeleted: \"User Code Deleted\",\n AllUserCodesDeleted: \"All User Codes Deleted\",\n AdminCodeChanged: \"Admin Code Changed\",\n UserCodeChanged: \"User Code Changed\",\n LockReset: \"Lock Reset\",\n ConfigurationChanged: \"Configuration Changed\",\n LowBattery: \"Low Battery\",\n NewBattery: \"New Battery Installed\",\n Unknown: \"Unknown\",\n} as const;\nconst LATEST_RECORD_NUMBER_KEY = 0;\nimport { DoorLockLoggingCCValues } from \"./_CCValues.generated.js\";\nexport { DoorLockLoggingCCValues };\n@API(CommandClasses[\"Door Lock Logging\"])\nexport class DoorLockLoggingCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: DoorLockLoggingCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case DoorLockLoggingCommand.RecordsSupportedGet:\n case DoorLockLoggingCommand.RecordsSupportedReport:\n case DoorLockLoggingCommand.RecordGet:\n case DoorLockLoggingCommand.RecordReport:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n public async getRecordsCount(): Promise<MaybeNotKnown<number>> {\n this.assertSupportsCommand(DoorLockLoggingCommand, DoorLockLoggingCommand.RecordsSupportedGet);\n const cc = new DoorLockLoggingCCRecordsSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<DoorLockLoggingCCRecordsSupportedReport>(cc, this.commandOptions);\n return response?.recordsCount;\n }\n /** Retrieves the specified audit record. Defaults to the latest one. */\n @validateArgs_DoorLockLoggingCCAPI_getRecord()\n public async getRecord(recordNumber: number = LATEST_RECORD_NUMBER_KEY): Promise<MaybeNotKnown<DoorLockLoggingRecord>> {\n this.assertSupportsCommand(DoorLockLoggingCommand, DoorLockLoggingCommand.RecordGet);\n const cc = new DoorLockLoggingCCRecordGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n recordNumber,\n });\n const response = await this.host.sendCommand<DoorLockLoggingCCRecordReport>(cc, this.commandOptions);\n return response?.record;\n }\n}\n@commandClass(CommandClasses[\"Door Lock Logging\"])\n@implementedVersion(1)\n@ccValues(DoorLockLoggingCCValues)\nexport class DoorLockLoggingCC extends CommandClass {\n declare ccCommand: DoorLockLoggingCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Door Lock Logging\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported number of records...\",\n direction: \"outbound\",\n });\n const recordsCount = await api.getRecordsCount();\n if (!recordsCount) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Door Lock Logging records count query timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n const recordsCountLogMessage = `supports ${recordsCount} record${recordsCount === 1 ? \"\" : \"s\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: recordsCountLogMessage,\n direction: \"inbound\",\n });\n }\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordsSupportedReportOptions {\n recordsCount: number;\n}\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedReport)\n@ccValueProperty(\"recordsCount\", DoorLockLoggingCCValues.recordsCount)\nexport class DoorLockLoggingCCRecordsSupportedReport extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordsSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.recordsCount = options.recordsCount;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): DoorLockLoggingCCRecordsSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const recordsCount = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n recordsCount,\n });\n }\n public readonly recordsCount: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported no. of records\": this.recordsCount,\n },\n };\n }\n}\nfunction eventTypeToLabel(eventType: DoorLockLoggingEventType): string {\n return ((eventTypeLabel as any)[DoorLockLoggingEventType[eventType]]\n ?? `Unknown ${num2hex(eventType)}`);\n}\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedGet)\n@expectedCCResponse(DoorLockLoggingCCRecordsSupportedReport)\nexport class DoorLockLoggingCCRecordsSupportedGet extends DoorLockLoggingCC {\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordReportOptions {\n recordNumber: number;\n record?: DoorLockLoggingRecord;\n}\n@CCCommand(DoorLockLoggingCommand.RecordReport)\nexport class DoorLockLoggingCCRecordReport extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.recordNumber = options.recordNumber;\n this.record = options.record;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): DoorLockLoggingCCRecordReport {\n validatePayload(raw.payload.length >= 11);\n const recordNumber = raw.payload[0];\n const recordStatus = raw.payload[5] >>> 5;\n let record: DoorLockLoggingRecord | undefined;\n if (recordStatus !== DoorLockLoggingRecordStatus.Empty) {\n const dateSegments = {\n year: raw.payload.readUInt16BE(1),\n month: raw.payload[3],\n day: raw.payload[4],\n hour: raw.payload[5] & 0b11111,\n minute: raw.payload[6],\n second: raw.payload[7],\n };\n const eventType = raw.payload[8];\n const recordUserID = raw.payload[9];\n const userCodeLength = raw.payload[10];\n validatePayload(userCodeLength <= 10, raw.payload.length >= 11 + userCodeLength);\n const userCodeBuffer = raw.payload.subarray(11, 11 + userCodeLength);\n // See User Code CC for a detailed description. We try to parse the code as ASCII if possible\n // and fall back to a buffer otherwise.\n const userCodeString = userCodeBuffer.toString(\"utf8\");\n const userCode = isPrintableASCII(userCodeString)\n ? userCodeString\n : userCodeBuffer;\n record = {\n eventType: eventType,\n label: eventTypeToLabel(eventType),\n timestamp: segmentsToDate(dateSegments).toISOString(),\n userId: recordUserID,\n userCode,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n recordNumber,\n record,\n });\n }\n public readonly recordNumber: number;\n public readonly record?: DoorLockLoggingRecord;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (!this.record) {\n message = {\n \"record #\": `${this.recordNumber} (empty)`,\n };\n }\n else {\n message = {\n \"record #\": `${this.recordNumber}`,\n \"event type\": this.record.label,\n timestamp: this.record.timestamp,\n };\n if (this.record.userId) {\n message[\"user ID\"] = this.record.userId;\n }\n if (this.record.userCode) {\n message[\"user code\"] = userCodeToLogString(this.record.userCode);\n }\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface DoorLockLoggingCCRecordGetOptions {\n recordNumber: number;\n}\nfunction testResponseForDoorLockLoggingRecordGet(sent: DoorLockLoggingCCRecordGet, received: DoorLockLoggingCCRecordReport) {\n return (sent.recordNumber === LATEST_RECORD_NUMBER_KEY\n || sent.recordNumber === received.recordNumber);\n}\n@CCCommand(DoorLockLoggingCommand.RecordGet)\n@expectedCCResponse(DoorLockLoggingCCRecordReport, testResponseForDoorLockLoggingRecordGet)\nexport class DoorLockLoggingCCRecordGet extends DoorLockLoggingCC {\n public constructor(options: WithAddress<DoorLockLoggingCCRecordGetOptions>) {\n super(options);\n this.recordNumber = options.recordNumber;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): DoorLockLoggingCCRecordGet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new DoorLockLoggingCCRecordGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public recordNumber: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.recordNumber]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"record number\": this.recordNumber },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAoM;AACpM,oBAAiD;AACjD,iBAAqC;AACrC,0BAAuH;AACvH,oCAAiH;AAEjH,mBAA2H;AAE3H,wBAAoC;AAgDpC,gCAAwC;AAzDxC,MAAM,EAAE,4CAA2C,IAAK;AAkBxD,SAAS,eAAe,UAAsB;AAC1C,SAAO,IAAI;IAAK,SAAS;IAAM,SAAS,QAAQ;;IAChD,SAAS;IAAK,SAAS;IAAM,SAAS;IAAQ,SAAS;EAAM;AACjE;AAHS;AAIT,MAAM,iBAAiB;EACnB,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,uBAAuB;EACvB,yBAAyB;EACzB,aAAa;EACb,YAAY;EACZ,cAAc;EACd,UAAU;EACV,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,YAAY;EACZ,cAAc;EACd,6BAA6B;EAC7B,+BAA+B;EAC/B,mBAAmB;EACnB,aAAa;EACb,eAAe;EACf,aAAa;EACb,eAAe;EACf,eAAe;EACf,iBAAiB;EACjB,qBAAqB;EACrB,kBAAkB;EAClB,iBAAiB;EACjB,WAAW;EACX,sBAAsB;EACtB,YAAY;EACZ,YAAY;EACZ,SAAS;;AAEb,MAAM,2BAA2B;IAIpB,wBAAoB,MAAA;8BADhC,mCAAI,2BAAe,mBAAmB,CAAC,CAAC;;;;oBACC;;;4CAAA,YAAa;WAAA;;;;;;;;+BAqBlD,4CAA2C,CAAE;AAC9C,qCAAA,MAAA,MAAA,uBAAA,EAAA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,SAAS,wCAAwC,MAAkC,UAAuC;AACtH,SAAQ,KAAK,iBAAiB,4BACvB,KAAK,iBAAiB,SAAS;AAC1C;AAHS;IAMI,8BAA0B,MAAA;8BAFtC,yCAAU,oCAAuB,SAAS,OAC1C,kDAAmB,+BAA+B,uCAAuC,CAAC;;;;oBAC3C;kDAAA,YAAiB;WAAA;;;;;;;;AAAjE,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAuD;AACtE,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAChC;IACO,OAAO,KAAK,MAAa,MAAsB;AAClD,YAAM,IAAI,uBAAW,GAAG,KAAK,IAAI,qCAAqC,4BAAgB,8BAA8B;IAIxH;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,YAAY,CAAC;AAC7C,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,iBAAiB,KAAK,aAAY;;IAErD;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -136,14 +136,15 @@ let EnergyProductionCC = (() => {
|
|
|
136
136
|
message: `Interviewing ${this.ccName}...`,
|
|
137
137
|
direction: "none"
|
|
138
138
|
});
|
|
139
|
-
await this.refreshValues(ctx);
|
|
139
|
+
await this.refreshValues(ctx, { tag: "interview" });
|
|
140
140
|
this.setInterviewComplete(ctx, true);
|
|
141
141
|
}
|
|
142
142
|
async refreshValues(ctx, options) {
|
|
143
143
|
const node = this.getNode(ctx);
|
|
144
144
|
const endpoint = this.getEndpoint(ctx);
|
|
145
145
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Energy Production"], ctx, endpoint).withOptions({
|
|
146
|
-
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
146
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery,
|
|
147
|
+
tag: options?.tag
|
|
147
148
|
});
|
|
148
149
|
for (const parameter of [
|
|
149
150
|
import_Types.EnergyProductionParameter.Power,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/EnergyProductionCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./EnergyProductionCC._validateArgs.js\";\nconst { validateArgs_EnergyProductionCCAPI_get } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, encodeFloatWithScale, parseFloatWithScale, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { EnergyProductionCommand, EnergyProductionParameter, type EnergyProductionScale, getEnergyProductionScale, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { EnergyProductionCCValues } from \"./_CCValues.generated.js\";\nexport { EnergyProductionCCValues };\n@API(CommandClasses[\"Energy Production\"])\nexport class EnergyProductionCCAPI extends CCAPI {\n public supportsCommand(cmd: EnergyProductionCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case EnergyProductionCommand.Get:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: EnergyProductionCCAPI, { property, propertyKey }) {\n if (EnergyProductionCCValues.value.is({\n commandClass: this.ccId,\n property,\n propertyKey,\n })) {\n return (await this.get(property as EnergyProductionParameter))\n ?.value;\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_EnergyProductionCCAPI_get()\n public async get(parameter: EnergyProductionParameter): Promise<MaybeNotKnown<{\n value: number;\n scale: EnergyProductionScale;\n }>> {\n this.assertSupportsCommand(EnergyProductionCommand, EnergyProductionCommand.Get);\n const cc = new EnergyProductionCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n parameter,\n });\n const response = await this.host.sendCommand<EnergyProductionCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"value\", \"scale\"]);\n }\n }\n}\n@commandClass(CommandClasses[\"Energy Production\"])\n@implementedVersion(1)\n@ccValues(EnergyProductionCCValues)\nexport class EnergyProductionCC extends CommandClass {\n declare ccCommand: EnergyProductionCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query current values\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Energy Production\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n for (const parameter of [\n EnergyProductionParameter.Power,\n EnergyProductionParameter[\"Production Total\"],\n EnergyProductionParameter[\"Production Today\"],\n EnergyProductionParameter[\"Total Time\"],\n ] as const) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying energy production (${getEnumMemberName(EnergyProductionParameter, parameter)})...`,\n direction: \"outbound\",\n });\n await api.get(parameter);\n }\n }\n}\n// @publicAPI\nexport interface EnergyProductionCCReportOptions {\n parameter: EnergyProductionParameter;\n scale: EnergyProductionScale;\n value: number;\n}\n@CCCommand(EnergyProductionCommand.Report)\nexport class EnergyProductionCCReport extends EnergyProductionCC {\n public constructor(options: WithAddress<EnergyProductionCCReportOptions>) {\n super(options);\n this.parameter = options.parameter;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EnergyProductionCCReport {\n validatePayload(raw.payload.length >= 2);\n const parameter: EnergyProductionParameter = raw.payload[0];\n const { value, scale: rawScale } = parseFloatWithScale(raw.payload.subarray(1));\n const scale: EnergyProductionScale = getEnergyProductionScale(parameter, rawScale);\n return new this({\n nodeId: ctx.sourceNodeId,\n parameter,\n value,\n scale,\n });\n }\n public readonly parameter: EnergyProductionParameter;\n public readonly scale: EnergyProductionScale;\n public readonly value: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const valueValue = EnergyProductionCCValues.value(this.parameter);\n this.setMetadata(ctx, valueValue, {\n ...valueValue.meta,\n unit: this.scale.unit,\n ccSpecific: {\n parameter: this.parameter,\n scale: this.scale.key,\n },\n });\n this.setValue(ctx, valueValue, this.value);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.parameter],\n encodeFloatWithScale(this.value, this.scale.key),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n [getEnumMemberName(EnergyProductionParameter, this.parameter).toLowerCase()]: `${this.value} ${this.scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface EnergyProductionCCGetOptions {\n parameter: EnergyProductionParameter;\n}\nfunction testResponseForEnergyProductionGet(sent: EnergyProductionCCGet, received: EnergyProductionCCReport) {\n return received.parameter === sent.parameter;\n}\n@CCCommand(EnergyProductionCommand.Get)\n@expectedCCResponse(EnergyProductionCCReport, testResponseForEnergyProductionGet)\nexport class EnergyProductionCCGet extends EnergyProductionCC {\n public constructor(options: WithAddress<EnergyProductionCCGetOptions>) {\n super(options);\n this.parameter = options.parameter;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EnergyProductionCCGet {\n validatePayload(raw.payload.length >= 1);\n const parameter: EnergyProductionParameter = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n parameter,\n });\n }\n public parameter: EnergyProductionParameter;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.parameter]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n parameter: getEnumMemberName(EnergyProductionParameter, this.parameter),\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA6M;AAC7M,oBAA+C;AAC/C,iBAA2F;AAC3F,0BAAkJ;AAClJ,oCAAgG;AAEhG,mBAA0H;AAE1H,gCAAyC;AATzC,MAAM,EAAE,uCAAsC,IAAK;IAYtC,yBAAqB,MAAA;8BADjC,mCAAI,2BAAe,mBAAmB,CAAC,CAAC;;;;oBACE;;;6CAAA,YAAK;WAAA;;;;;;;;yBAuB3C,uCAAsC,CAAE;AACzC,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAxBpB,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gB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ateArgs.js\";\nconst { validateArgs_EnergyProductionCCAPI_get } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, encodeFloatWithScale, parseFloatWithScale, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { EnergyProductionCommand, EnergyProductionParameter, type EnergyProductionScale, getEnergyProductionScale, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { EnergyProductionCCValues } from \"./_CCValues.generated.js\";\nexport { EnergyProductionCCValues };\n@API(CommandClasses[\"Energy Production\"])\nexport class EnergyProductionCCAPI extends CCAPI {\n public supportsCommand(cmd: EnergyProductionCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case EnergyProductionCommand.Get:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: EnergyProductionCCAPI, { property, propertyKey }) {\n if (EnergyProductionCCValues.value.is({\n commandClass: this.ccId,\n property,\n propertyKey,\n })) {\n return (await this.get(property as EnergyProductionParameter))\n ?.value;\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_EnergyProductionCCAPI_get()\n public async get(parameter: EnergyProductionParameter): Promise<MaybeNotKnown<{\n value: number;\n scale: EnergyProductionScale;\n }>> {\n this.assertSupportsCommand(EnergyProductionCommand, EnergyProductionCommand.Get);\n const cc = new EnergyProductionCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n parameter,\n });\n const response = await this.host.sendCommand<EnergyProductionCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"value\", \"scale\"]);\n }\n }\n}\n@commandClass(CommandClasses[\"Energy Production\"])\n@implementedVersion(1)\n@ccValues(EnergyProductionCCValues)\nexport class EnergyProductionCC extends CommandClass {\n declare ccCommand: EnergyProductionCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query current values\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Energy Production\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n for (const parameter of [\n EnergyProductionParameter.Power,\n EnergyProductionParameter[\"Production Total\"],\n EnergyProductionParameter[\"Production Today\"],\n EnergyProductionParameter[\"Total Time\"],\n ] as const) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying energy production (${getEnumMemberName(EnergyProductionParameter, parameter)})...`,\n direction: \"outbound\",\n });\n await api.get(parameter);\n }\n }\n}\n// @publicAPI\nexport interface EnergyProductionCCReportOptions {\n parameter: EnergyProductionParameter;\n scale: EnergyProductionScale;\n value: number;\n}\n@CCCommand(EnergyProductionCommand.Report)\nexport class EnergyProductionCCReport extends EnergyProductionCC {\n public constructor(options: WithAddress<EnergyProductionCCReportOptions>) {\n super(options);\n this.parameter = options.parameter;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EnergyProductionCCReport {\n validatePayload(raw.payload.length >= 2);\n const parameter: EnergyProductionParameter = raw.payload[0];\n const { value, scale: rawScale } = parseFloatWithScale(raw.payload.subarray(1));\n const scale: EnergyProductionScale = getEnergyProductionScale(parameter, rawScale);\n return new this({\n nodeId: ctx.sourceNodeId,\n parameter,\n value,\n scale,\n });\n }\n public readonly parameter: EnergyProductionParameter;\n public readonly scale: EnergyProductionScale;\n public readonly value: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const valueValue = EnergyProductionCCValues.value(this.parameter);\n this.setMetadata(ctx, valueValue, {\n ...valueValue.meta,\n unit: this.scale.unit,\n ccSpecific: {\n parameter: this.parameter,\n scale: this.scale.key,\n },\n });\n this.setValue(ctx, valueValue, this.value);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.parameter],\n encodeFloatWithScale(this.value, this.scale.key),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n [getEnumMemberName(EnergyProductionParameter, this.parameter).toLowerCase()]: `${this.value} ${this.scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface EnergyProductionCCGetOptions {\n parameter: EnergyProductionParameter;\n}\nfunction testResponseForEnergyProductionGet(sent: EnergyProductionCCGet, received: EnergyProductionCCReport) {\n return received.parameter === sent.parameter;\n}\n@CCCommand(EnergyProductionCommand.Get)\n@expectedCCResponse(EnergyProductionCCReport, testResponseForEnergyProductionGet)\nexport class EnergyProductionCCGet extends EnergyProductionCC {\n public constructor(options: WithAddress<EnergyProductionCCGetOptions>) {\n super(options);\n this.parameter = options.parameter;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EnergyProductionCCGet {\n validatePayload(raw.payload.length >= 1);\n const parameter: EnergyProductionParameter = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n parameter,\n });\n }\n public parameter: EnergyProductionParameter;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.parameter]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n parameter: getEnumMemberName(EnergyProductionParameter, this.parameter),\n },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA6M;AAC7M,oBAA+C;AAC/C,iBAA2F;AAC3F,0BAAkJ;AAClJ,oCAAgG;AAEhG,mBAA0H;AAE1H,gCAAyC;AATzC,MAAM,EAAE,uCAAsC,IAAK;IAYtC,yBAAqB,MAAA;8BADjC,mCAAI,2BAAe,mBAAmB,CAAC,CAAC;;;;oBACE;;;6CAAA,YAAK;WAAA;;;;;;;;yBAuB3C,uCAAsC,CAAE;AACzC,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAxBpB,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAA4B;AAC/C,cAAQ,KAAK;QACT,KAAK,qCAAwB;AACzB,iBAAO;MACf;AACA,aAAO,MAAM,gBAAgB,GAAG;IACpC;IACA,KAAe,qBAAU,IAAC;AACtB,aAAO,eAA6C,EAAE,UAAU,YAAW,GAAE;AACzE,YAAI,mDAAyB,MAAM,GAAG;UAClC,cAAc,KAAK;UACnB;UACA;SACH,GAAG;AACA,kBAAQ,MAAM,KAAK,IAAI,QAAqC,IACtD;QACV,OACK;AACD,mDAAyB,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=> {
|
|
|
212
212
|
const node = this.getNode(ctx);
|
|
213
213
|
const endpoint = this.getEndpoint(ctx);
|
|
214
214
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
215
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
215
|
+
priority: import_core.MessagePriority.NodeQuery,
|
|
216
|
+
tag: "interview"
|
|
216
217
|
});
|
|
217
218
|
ctx.logNode(node.id, {
|
|
218
219
|
endpoint: this.endpointIndex,
|
|
@@ -260,14 +261,15 @@ max key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,
|
|
|
260
261
|
direction: "inbound"
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
|
-
await this.refreshValues(ctx);
|
|
264
|
+
await this.refreshValues(ctx, { tag: "interview" });
|
|
264
265
|
this.setInterviewComplete(ctx, true);
|
|
265
266
|
}
|
|
266
267
|
async refreshValues(ctx, options) {
|
|
267
268
|
const node = this.getNode(ctx);
|
|
268
269
|
const endpoint = this.getEndpoint(ctx);
|
|
269
270
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
270
|
-
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
271
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery,
|
|
272
|
+
tag: options?.tag
|
|
271
273
|
});
|
|
272
274
|
ctx.logNode(node.id, {
|
|
273
275
|
endpoint: this.endpointIndex,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/EntryControlCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./EntryControlCC._validateArgs.js\";\nconst { validateArgs_EntryControlCCAPI_setConfiguration } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, getCCName, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, buffer2hex, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { EntryControlCommand, EntryControlDataTypes, EntryControlEventTypes, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { EntryControlCCValues } from \"./_CCValues.generated.js\";\nexport { EntryControlCCValues };\n@API(CommandClasses[\"Entry Control\"])\nexport class EntryControlCCAPI extends CCAPI {\n public supportsCommand(cmd: EntryControlCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case EntryControlCommand.KeySupportedGet:\n case EntryControlCommand.EventSupportedGet:\n case EntryControlCommand.ConfigurationGet:\n return this.isSinglecast();\n case EntryControlCommand.ConfigurationSet:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getSupportedKeys() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.KeySupportedGet);\n const cc = new EntryControlCCKeySupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCKeySupportedReport>(cc, this.commandOptions);\n return response?.supportedKeys;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getEventCapabilities() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.EventSupportedGet);\n const cc = new EntryControlCCEventSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCEventSupportedReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"supportedDataTypes\",\n \"supportedEventTypes\",\n \"minKeyCacheSize\",\n \"maxKeyCacheSize\",\n \"minKeyCacheTimeout\",\n \"maxKeyCacheTimeout\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getConfiguration() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);\n const cc = new EntryControlCCConfigurationGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCConfigurationReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"keyCacheSize\", \"keyCacheTimeout\"]);\n }\n }\n @validateArgs_EntryControlCCAPI_setConfiguration()\n public async setConfiguration(keyCacheSize: number, keyCacheTimeout: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);\n const cc = new EntryControlCCConfigurationSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n keyCacheSize,\n keyCacheTimeout,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: EntryControlCCAPI, { property }, value) {\n if (property !== \"keyCacheSize\" && property !== \"keyCacheTimeout\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n let keyCacheSize = value;\n let keyCacheTimeout = 2;\n if (property === \"keyCacheTimeout\") {\n keyCacheTimeout = value;\n const oldKeyCacheSize = this.tryGetValueDB()?.getValue<number>(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));\n if (oldKeyCacheSize == undefined) {\n throw new ZWaveError(`The \"keyCacheTimeout\" property cannot be changed before the key cache size is known!`, ZWaveErrorCodes.Argument_Invalid);\n }\n keyCacheSize = oldKeyCacheSize;\n }\n const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);\n // Verify the change after a short delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value, { transition: \"fast\" });\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: EntryControlCCAPI, { property }) {\n switch (property) {\n case \"keyCacheSize\":\n case \"keyCacheTimeout\":\n return (await this.getConfiguration())?.[property];\n }\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses[\"Entry Control\"])\n@implementedVersion(1)\n@ccValues(EntryControlCCValues)\nexport class EntryControlCC extends CommandClass {\n declare ccCommand: EntryControlCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n CommandClasses[\"Association Group Information\"],\n ];\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Entry Control\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // If one Association group issues Entry Control notifications,\n // we must associate ourselves with that channel\n try {\n await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, EntryControlCommand.Notification);\n }\n catch {\n ctx.logNode(node.id, {\n endpoint: endpoint.index,\n message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,\n level: \"warn\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control supported keys...\",\n direction: \"outbound\",\n });\n const supportedKeys = await api.getSupportedKeys();\n if (supportedKeys) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control supported keys: ${supportedKeys.toString()}`,\n direction: \"inbound\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control supported events...\",\n direction: \"outbound\",\n });\n const eventCapabilities = await api.getEventCapabilities();\n if (eventCapabilities) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control supported keys:\ndata types: ${eventCapabilities.supportedDataTypes\n .map((e) => EntryControlDataTypes[e])\n .toString()}\nevent types: ${eventCapabilities.supportedEventTypes\n .map((e) => EntryControlEventTypes[e])\n .toString()}\nmin key cache size: ${eventCapabilities.minKeyCacheSize}\nmax key cache size: ${eventCapabilities.maxKeyCacheSize}\nmin key cache timeout: ${eventCapabilities.minKeyCacheTimeout} seconds\nmax key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,\n direction: \"inbound\",\n });\n }\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Entry Control\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control configuration...\",\n direction: \"outbound\",\n });\n const conf = await api.getConfiguration();\n if (conf) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control configuration:\nkey cache size: ${conf.keyCacheSize}\nkey cache timeout: ${conf.keyCacheTimeout} seconds`,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface EntryControlCCNotificationOptions {\n sequenceNumber: number;\n dataType: EntryControlDataTypes;\n eventType: EntryControlEventTypes;\n eventData?: string | Bytes;\n}\n@CCCommand(EntryControlCommand.Notification)\nexport class EntryControlCCNotification extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCNotificationOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sequenceNumber = options.sequenceNumber;\n this.dataType = options.dataType;\n this.eventType = options.eventType;\n this.eventData = options.eventData;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCNotification {\n validatePayload(raw.payload.length >= 4);\n const sequenceNumber = raw.payload[0];\n let dataType: EntryControlDataTypes = raw.payload[1] & 0b11;\n const eventType: EntryControlEventTypes = raw.payload[2];\n const eventDataLength = raw.payload[3];\n validatePayload(eventDataLength >= 0 && eventDataLength <= 32);\n const offset = 4;\n validatePayload(raw.payload.length >= offset + eventDataLength);\n let eventData: string | Bytes | undefined;\n if (eventDataLength > 0) {\n // We shouldn't need to check this, since the specs are pretty clear which format to expect.\n // But as always - manufacturers don't care and send ASCII data with 0 bytes...\n // We also need to disable the strict validation for some devices to make them work\n const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;\n eventData = Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));\n switch (dataType) {\n case EntryControlDataTypes.Raw:\n // RAW 1 to 32 bytes of arbitrary binary data\n if (!noStrictValidation) {\n validatePayload(eventDataLength >= 1 && eventDataLength <= 32);\n }\n break;\n case EntryControlDataTypes.ASCII:\n // ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.\n // The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.\n // However, some devices do not follow this requirement, so we accept unpadded strings as well.\n // Trim 0xff padding bytes\n let paddingStart = eventDataLength;\n while (paddingStart > 0\n && eventData[paddingStart - 1] === 0xff) {\n paddingStart--;\n }\n eventData = eventData.subarray(0, paddingStart).toString(\"ascii\");\n if (!noStrictValidation) {\n validatePayload(/^[\\u0000-\\u007f]+$/.test(eventData));\n }\n break;\n case EntryControlDataTypes.MD5:\n // MD5 16 byte binary data encoded as a MD5 hash value.\n if (!noStrictValidation) {\n validatePayload(eventDataLength === 16);\n }\n break;\n }\n }\n else {\n dataType = EntryControlDataTypes.None;\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sequenceNumber,\n dataType,\n eventType,\n eventData,\n });\n }\n public readonly sequenceNumber: number;\n public readonly dataType: EntryControlDataTypes;\n public readonly eventType: EntryControlEventTypes;\n public readonly eventData?: BytesView | string;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"sequence number\": this.sequenceNumber,\n \"data type\": this.dataType,\n \"event type\": this.eventType,\n };\n if (this.eventData) {\n switch (this.eventType) {\n case EntryControlEventTypes.CachedKeys:\n case EntryControlEventTypes.Enter:\n // The event data is likely the user's PIN code, hide it from logs\n message[\"event data\"] = \"*\".repeat(this.eventData.length);\n break;\n default:\n message[\"event data\"] = typeof this.eventData === \"string\"\n ? this.eventData\n : buffer2hex(this.eventData);\n }\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface EntryControlCCKeySupportedReportOptions {\n supportedKeys: number[];\n}\n@CCCommand(EntryControlCommand.KeySupportedReport)\n@ccValueProperty(\"supportedKeys\", EntryControlCCValues.supportedKeys)\nexport class EntryControlCCKeySupportedReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCKeySupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedKeys = options.supportedKeys;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCKeySupportedReport {\n validatePayload(raw.payload.length >= 1);\n const length = raw.payload[0];\n validatePayload(raw.payload.length >= 1 + length);\n const supportedKeys = parseBitMask(raw.payload.subarray(1, 1 + length), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedKeys,\n });\n }\n public readonly supportedKeys: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"supported keys\": this.supportedKeys.toString() },\n };\n }\n}\n@CCCommand(EntryControlCommand.KeySupportedGet)\n@expectedCCResponse(EntryControlCCKeySupportedReport)\nexport class EntryControlCCKeySupportedGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCEventSupportedReportOptions {\n supportedDataTypes: EntryControlDataTypes[];\n supportedEventTypes: EntryControlEventTypes[];\n minKeyCacheSize: number;\n maxKeyCacheSize: number;\n minKeyCacheTimeout: number;\n maxKeyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.EventSupportedReport)\n@ccValueProperty(\"supportedDataTypes\", EntryControlCCValues.supportedDataTypes)\n@ccValueProperty(\"supportedEventTypes\", EntryControlCCValues.supportedEventTypes)\nexport class EntryControlCCEventSupportedReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCEventSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedDataTypes = options.supportedDataTypes;\n this.supportedEventTypes = options.supportedEventTypes;\n this.minKeyCacheSize = options.minKeyCacheSize;\n this.maxKeyCacheSize = options.maxKeyCacheSize;\n this.minKeyCacheTimeout = options.minKeyCacheTimeout;\n this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCEventSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const dataTypeLength = raw.payload[0] & 0b11;\n let offset = 1;\n validatePayload(raw.payload.length >= offset + dataTypeLength);\n const supportedDataTypes: EntryControlDataTypes[] = parseBitMask(raw.payload.subarray(offset, offset + dataTypeLength), EntryControlDataTypes.None);\n offset += dataTypeLength;\n validatePayload(raw.payload.length >= offset + 1);\n const eventTypeLength = raw.payload[offset] & 0b11111;\n offset += 1;\n validatePayload(raw.payload.length >= offset + eventTypeLength);\n const supportedEventTypes: EntryControlEventTypes[] = parseBitMask(raw.payload.subarray(offset, offset + eventTypeLength), EntryControlEventTypes.Caching);\n offset += eventTypeLength;\n validatePayload(raw.payload.length >= offset + 4);\n const minKeyCacheSize = raw.payload[offset];\n validatePayload(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);\n const maxKeyCacheSize = raw.payload[offset + 1];\n validatePayload(maxKeyCacheSize >= minKeyCacheSize\n && maxKeyCacheSize <= 32);\n const minKeyCacheTimeout = raw.payload[offset + 2];\n const maxKeyCacheTimeout = raw.payload[offset + 3];\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedDataTypes,\n supportedEventTypes,\n minKeyCacheSize,\n maxKeyCacheSize,\n minKeyCacheTimeout,\n maxKeyCacheTimeout,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Store min/max cache size and timeout as metadata\n const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;\n this.setMetadata(ctx, keyCacheSizeValue, {\n ...keyCacheSizeValue.meta,\n min: this.minKeyCacheSize,\n max: this.maxKeyCacheSize,\n });\n const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;\n this.setMetadata(ctx, keyCacheTimeoutValue, {\n ...keyCacheTimeoutValue.meta,\n min: this.minKeyCacheTimeout,\n max: this.maxKeyCacheTimeout,\n });\n return true;\n }\n public readonly supportedDataTypes: readonly EntryControlDataTypes[];\n public readonly supportedEventTypes: readonly EntryControlEventTypes[];\n public readonly minKeyCacheSize: number;\n public readonly maxKeyCacheSize: number;\n public readonly minKeyCacheTimeout: number;\n public readonly maxKeyCacheTimeout: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported data types\": this.supportedDataTypes\n .map((dt) => EntryControlDataTypes[dt])\n .toString(),\n \"supported event types\": this.supportedEventTypes\n .map((et) => EntryControlEventTypes[et])\n .toString(),\n \"min key cache size\": this.minKeyCacheSize,\n \"max key cache size\": this.maxKeyCacheSize,\n \"min key cache timeout\": this.minKeyCacheTimeout,\n \"max key cache timeout\": this.maxKeyCacheTimeout,\n },\n };\n }\n}\n@CCCommand(EntryControlCommand.EventSupportedGet)\n@expectedCCResponse(EntryControlCCEventSupportedReport)\nexport class EntryControlCCEventSupportedGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCConfigurationReportOptions {\n keyCacheSize: number;\n keyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.ConfigurationReport)\n@ccValueProperty(\"keyCacheSize\", EntryControlCCValues.keyCacheSize)\n@ccValueProperty(\"keyCacheTimeout\", EntryControlCCValues.keyCacheTimeout)\nexport class EntryControlCCConfigurationReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCConfigurationReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.keyCacheSize = options.keyCacheSize;\n this.keyCacheTimeout = options.keyCacheTimeout;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCConfigurationReport {\n validatePayload(raw.payload.length >= 2);\n const keyCacheSize = raw.payload[0];\n validatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);\n const keyCacheTimeout = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n keyCacheSize,\n keyCacheTimeout,\n });\n }\n public readonly keyCacheSize: number;\n public readonly keyCacheTimeout: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"key cache size\": this.keyCacheSize,\n \"key cache timeout\": this.keyCacheTimeout,\n },\n };\n }\n}\n@CCCommand(EntryControlCommand.ConfigurationGet)\n@expectedCCResponse(EntryControlCCConfigurationReport)\nexport class EntryControlCCConfigurationGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCConfigurationSetOptions {\n keyCacheSize: number;\n keyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.ConfigurationSet)\n@useSupervision()\nexport class EntryControlCCConfigurationSet extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCConfigurationSetOptions>) {\n super(options);\n this.keyCacheSize = options.keyCacheSize;\n this.keyCacheTimeout = options.keyCacheTimeout;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): EntryControlCCConfigurationSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new EntryControlCCConfigurationSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public readonly keyCacheSize: number;\n public readonly keyCacheTimeout: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"key cache size\": this.keyCacheSize,\n \"key cache timeout\": this.keyCacheTimeout,\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAgS;AAChS,oBAAwD;AACxD,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAAoF;AAEpF,cAAyB;AACzB,gCAAqC;AAVrC,MAAM,EAAE,gDAA+C,IAAK;IAa/C,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AAsDxC,qCAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,sBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,kBAAb,OAA6B,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAtDjC,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAAwB;AAC3C,cAAQ,KAAK;QACT,KAAK,iCAAoB;QACzB,KAAK,iCAAoB;QACzB,KAAK,iCAA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A,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAA2D;AAC1E,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;AAC5B,WAAK,kBAAkB,QAAQ;IACnC;IACO,OAAO,KAAK,MAAa,MAAsB;AAElD,YAAM,IAAI,uBAAW,GAAG,KAAK,IAAI,qCAAqC,4BAAgB,8BAA8B;IAIxH;IACgB;IACA;IACT,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,cAAc,KAAK,eAAe,CAAC;AACnE,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,kBAAkB,KAAK;UACvB,qBAAqB,KAAK;;;IAGtC;;;;",
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./EntryControlCC._validateArgs.js\";\nconst { validateArgs_EntryControlCCAPI_setConfiguration } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, getCCName, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, buffer2hex, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { EntryControlCommand, EntryControlDataTypes, EntryControlEventTypes, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { EntryControlCCValues } from \"./_CCValues.generated.js\";\nexport { EntryControlCCValues };\n@API(CommandClasses[\"Entry Control\"])\nexport class EntryControlCCAPI extends CCAPI {\n public supportsCommand(cmd: EntryControlCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case EntryControlCommand.KeySupportedGet:\n case EntryControlCommand.EventSupportedGet:\n case EntryControlCommand.ConfigurationGet:\n return this.isSinglecast();\n case EntryControlCommand.ConfigurationSet:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getSupportedKeys() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.KeySupportedGet);\n const cc = new EntryControlCCKeySupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCKeySupportedReport>(cc, this.commandOptions);\n return response?.supportedKeys;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getEventCapabilities() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.EventSupportedGet);\n const cc = new EntryControlCCEventSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCEventSupportedReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"supportedDataTypes\",\n \"supportedEventTypes\",\n \"minKeyCacheSize\",\n \"maxKeyCacheSize\",\n \"minKeyCacheTimeout\",\n \"maxKeyCacheTimeout\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getConfiguration() {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);\n const cc = new EntryControlCCConfigurationGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<EntryControlCCConfigurationReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"keyCacheSize\", \"keyCacheTimeout\"]);\n }\n }\n @validateArgs_EntryControlCCAPI_setConfiguration()\n public async setConfiguration(keyCacheSize: number, keyCacheTimeout: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(EntryControlCommand, EntryControlCommand.ConfigurationGet);\n const cc = new EntryControlCCConfigurationSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n keyCacheSize,\n keyCacheTimeout,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: EntryControlCCAPI, { property }, value) {\n if (property !== \"keyCacheSize\" && property !== \"keyCacheTimeout\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n let keyCacheSize = value;\n let keyCacheTimeout = 2;\n if (property === \"keyCacheTimeout\") {\n keyCacheTimeout = value;\n const oldKeyCacheSize = this.tryGetValueDB()?.getValue<number>(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));\n if (oldKeyCacheSize == undefined) {\n throw new ZWaveError(`The \"keyCacheTimeout\" property cannot be changed before the key cache size is known!`, ZWaveErrorCodes.Argument_Invalid);\n }\n keyCacheSize = oldKeyCacheSize;\n }\n const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);\n // Verify the change after a short delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value, { transition: \"fast\" });\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: EntryControlCCAPI, { property }) {\n switch (property) {\n case \"keyCacheSize\":\n case \"keyCacheTimeout\":\n return (await this.getConfiguration())?.[property];\n }\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses[\"Entry Control\"])\n@implementedVersion(1)\n@ccValues(EntryControlCCValues)\nexport class EntryControlCC extends CommandClass {\n declare ccCommand: EntryControlCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n CommandClasses[\"Association Group Information\"],\n ];\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Entry Control\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // If one Association group issues Entry Control notifications,\n // we must associate ourselves with that channel\n try {\n await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, EntryControlCommand.Notification);\n }\n catch {\n ctx.logNode(node.id, {\n endpoint: endpoint.index,\n message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,\n level: \"warn\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control supported keys...\",\n direction: \"outbound\",\n });\n const supportedKeys = await api.getSupportedKeys();\n if (supportedKeys) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control supported keys: ${supportedKeys.toString()}`,\n direction: \"inbound\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control supported events...\",\n direction: \"outbound\",\n });\n const eventCapabilities = await api.getEventCapabilities();\n if (eventCapabilities) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control supported keys:\ndata types: ${eventCapabilities.supportedDataTypes\n .map((e) => EntryControlDataTypes[e])\n .toString()}\nevent types: ${eventCapabilities.supportedEventTypes\n .map((e) => EntryControlEventTypes[e])\n .toString()}\nmin key cache size: ${eventCapabilities.minKeyCacheSize}\nmax key cache size: ${eventCapabilities.maxKeyCacheSize}\nmin key cache timeout: ${eventCapabilities.minKeyCacheTimeout} seconds\nmax key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,\n direction: \"inbound\",\n });\n }\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Entry Control\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"requesting entry control configuration...\",\n direction: \"outbound\",\n });\n const conf = await api.getConfiguration();\n if (conf) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received entry control configuration:\nkey cache size: ${conf.keyCacheSize}\nkey cache timeout: ${conf.keyCacheTimeout} seconds`,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface EntryControlCCNotificationOptions {\n sequenceNumber: number;\n dataType: EntryControlDataTypes;\n eventType: EntryControlEventTypes;\n eventData?: string | Bytes;\n}\n@CCCommand(EntryControlCommand.Notification)\nexport class EntryControlCCNotification extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCNotificationOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sequenceNumber = options.sequenceNumber;\n this.dataType = options.dataType;\n this.eventType = options.eventType;\n this.eventData = options.eventData;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCNotification {\n validatePayload(raw.payload.length >= 4);\n const sequenceNumber = raw.payload[0];\n let dataType: EntryControlDataTypes = raw.payload[1] & 0b11;\n const eventType: EntryControlEventTypes = raw.payload[2];\n const eventDataLength = raw.payload[3];\n validatePayload(eventDataLength >= 0 && eventDataLength <= 32);\n const offset = 4;\n validatePayload(raw.payload.length >= offset + eventDataLength);\n let eventData: string | Bytes | undefined;\n if (eventDataLength > 0) {\n // We shouldn't need to check this, since the specs are pretty clear which format to expect.\n // But as always - manufacturers don't care and send ASCII data with 0 bytes...\n // We also need to disable the strict validation for some devices to make them work\n const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;\n eventData = Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));\n switch (dataType) {\n case EntryControlDataTypes.Raw:\n // RAW 1 to 32 bytes of arbitrary binary data\n if (!noStrictValidation) {\n validatePayload(eventDataLength >= 1 && eventDataLength <= 32);\n }\n break;\n case EntryControlDataTypes.ASCII:\n // ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.\n // The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.\n // However, some devices do not follow this requirement, so we accept unpadded strings as well.\n // Trim 0xff padding bytes\n let paddingStart = eventDataLength;\n while (paddingStart > 0\n && eventData[paddingStart - 1] === 0xff) {\n paddingStart--;\n }\n eventData = eventData.subarray(0, paddingStart).toString(\"ascii\");\n if (!noStrictValidation) {\n validatePayload(/^[\\u0000-\\u007f]+$/.test(eventData));\n }\n break;\n case EntryControlDataTypes.MD5:\n // MD5 16 byte binary data encoded as a MD5 hash value.\n if (!noStrictValidation) {\n validatePayload(eventDataLength === 16);\n }\n break;\n }\n }\n else {\n dataType = EntryControlDataTypes.None;\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sequenceNumber,\n dataType,\n eventType,\n eventData,\n });\n }\n public readonly sequenceNumber: number;\n public readonly dataType: EntryControlDataTypes;\n public readonly eventType: EntryControlEventTypes;\n public readonly eventData?: BytesView | string;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"sequence number\": this.sequenceNumber,\n \"data type\": this.dataType,\n \"event type\": this.eventType,\n };\n if (this.eventData) {\n switch (this.eventType) {\n case EntryControlEventTypes.CachedKeys:\n case EntryControlEventTypes.Enter:\n // The event data is likely the user's PIN code, hide it from logs\n message[\"event data\"] = \"*\".repeat(this.eventData.length);\n break;\n default:\n message[\"event data\"] = typeof this.eventData === \"string\"\n ? this.eventData\n : buffer2hex(this.eventData);\n }\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface EntryControlCCKeySupportedReportOptions {\n supportedKeys: number[];\n}\n@CCCommand(EntryControlCommand.KeySupportedReport)\n@ccValueProperty(\"supportedKeys\", EntryControlCCValues.supportedKeys)\nexport class EntryControlCCKeySupportedReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCKeySupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedKeys = options.supportedKeys;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCKeySupportedReport {\n validatePayload(raw.payload.length >= 1);\n const length = raw.payload[0];\n validatePayload(raw.payload.length >= 1 + length);\n const supportedKeys = parseBitMask(raw.payload.subarray(1, 1 + length), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedKeys,\n });\n }\n public readonly supportedKeys: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"supported keys\": this.supportedKeys.toString() },\n };\n }\n}\n@CCCommand(EntryControlCommand.KeySupportedGet)\n@expectedCCResponse(EntryControlCCKeySupportedReport)\nexport class EntryControlCCKeySupportedGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCEventSupportedReportOptions {\n supportedDataTypes: EntryControlDataTypes[];\n supportedEventTypes: EntryControlEventTypes[];\n minKeyCacheSize: number;\n maxKeyCacheSize: number;\n minKeyCacheTimeout: number;\n maxKeyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.EventSupportedReport)\n@ccValueProperty(\"supportedDataTypes\", EntryControlCCValues.supportedDataTypes)\n@ccValueProperty(\"supportedEventTypes\", EntryControlCCValues.supportedEventTypes)\nexport class EntryControlCCEventSupportedReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCEventSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedDataTypes = options.supportedDataTypes;\n this.supportedEventTypes = options.supportedEventTypes;\n this.minKeyCacheSize = options.minKeyCacheSize;\n this.maxKeyCacheSize = options.maxKeyCacheSize;\n this.minKeyCacheTimeout = options.minKeyCacheTimeout;\n this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCEventSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const dataTypeLength = raw.payload[0] & 0b11;\n let offset = 1;\n validatePayload(raw.payload.length >= offset + dataTypeLength);\n const supportedDataTypes: EntryControlDataTypes[] = parseBitMask(raw.payload.subarray(offset, offset + dataTypeLength), EntryControlDataTypes.None);\n offset += dataTypeLength;\n validatePayload(raw.payload.length >= offset + 1);\n const eventTypeLength = raw.payload[offset] & 0b11111;\n offset += 1;\n validatePayload(raw.payload.length >= offset + eventTypeLength);\n const supportedEventTypes: EntryControlEventTypes[] = parseBitMask(raw.payload.subarray(offset, offset + eventTypeLength), EntryControlEventTypes.Caching);\n offset += eventTypeLength;\n validatePayload(raw.payload.length >= offset + 4);\n const minKeyCacheSize = raw.payload[offset];\n validatePayload(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);\n const maxKeyCacheSize = raw.payload[offset + 1];\n validatePayload(maxKeyCacheSize >= minKeyCacheSize\n && maxKeyCacheSize <= 32);\n const minKeyCacheTimeout = raw.payload[offset + 2];\n const maxKeyCacheTimeout = raw.payload[offset + 3];\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedDataTypes,\n supportedEventTypes,\n minKeyCacheSize,\n maxKeyCacheSize,\n minKeyCacheTimeout,\n maxKeyCacheTimeout,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Store min/max cache size and timeout as metadata\n const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;\n this.setMetadata(ctx, keyCacheSizeValue, {\n ...keyCacheSizeValue.meta,\n min: this.minKeyCacheSize,\n max: this.maxKeyCacheSize,\n });\n const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;\n this.setMetadata(ctx, keyCacheTimeoutValue, {\n ...keyCacheTimeoutValue.meta,\n min: this.minKeyCacheTimeout,\n max: this.maxKeyCacheTimeout,\n });\n return true;\n }\n public readonly supportedDataTypes: readonly EntryControlDataTypes[];\n public readonly supportedEventTypes: readonly EntryControlEventTypes[];\n public readonly minKeyCacheSize: number;\n public readonly maxKeyCacheSize: number;\n public readonly minKeyCacheTimeout: number;\n public readonly maxKeyCacheTimeout: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported data types\": this.supportedDataTypes\n .map((dt) => EntryControlDataTypes[dt])\n .toString(),\n \"supported event types\": this.supportedEventTypes\n .map((et) => EntryControlEventTypes[et])\n .toString(),\n \"min key cache size\": this.minKeyCacheSize,\n \"max key cache size\": this.maxKeyCacheSize,\n \"min key cache timeout\": this.minKeyCacheTimeout,\n \"max key cache timeout\": this.maxKeyCacheTimeout,\n },\n };\n }\n}\n@CCCommand(EntryControlCommand.EventSupportedGet)\n@expectedCCResponse(EntryControlCCEventSupportedReport)\nexport class EntryControlCCEventSupportedGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCConfigurationReportOptions {\n keyCacheSize: number;\n keyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.ConfigurationReport)\n@ccValueProperty(\"keyCacheSize\", EntryControlCCValues.keyCacheSize)\n@ccValueProperty(\"keyCacheTimeout\", EntryControlCCValues.keyCacheTimeout)\nexport class EntryControlCCConfigurationReport extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCConfigurationReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.keyCacheSize = options.keyCacheSize;\n this.keyCacheTimeout = options.keyCacheTimeout;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): EntryControlCCConfigurationReport {\n validatePayload(raw.payload.length >= 2);\n const keyCacheSize = raw.payload[0];\n validatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);\n const keyCacheTimeout = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n keyCacheSize,\n keyCacheTimeout,\n });\n }\n public readonly keyCacheSize: number;\n public readonly keyCacheTimeout: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"key cache size\": this.keyCacheSize,\n \"key cache timeout\": this.keyCacheTimeout,\n },\n };\n }\n}\n@CCCommand(EntryControlCommand.ConfigurationGet)\n@expectedCCResponse(EntryControlCCConfigurationReport)\nexport class EntryControlCCConfigurationGet extends EntryControlCC {\n}\n// @publicAPI\nexport interface EntryControlCCConfigurationSetOptions {\n keyCacheSize: number;\n keyCacheTimeout: number;\n}\n@CCCommand(EntryControlCommand.ConfigurationSet)\n@useSupervision()\nexport class EntryControlCCConfigurationSet extends EntryControlCC {\n public constructor(options: WithAddress<EntryControlCCConfigurationSetOptions>) {\n super(options);\n this.keyCacheSize = options.keyCacheSize;\n this.keyCacheTimeout = options.keyCacheTimeout;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): EntryControlCCConfigurationSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new EntryControlCCConfigurationSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public readonly keyCacheSize: number;\n public readonly keyCacheTimeout: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"key cache size\": this.keyCacheSize,\n \"key cache timeout\": this.keyCacheTimeout,\n },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;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QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,kBAAkB,KAAK;UACvB,qBAAqB,KAAK;;;IAGtC;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -255,7 +255,8 @@ let FirmwareUpdateMetaDataCC = (() => {
|
|
|
255
255
|
const node = this.getNode(ctx);
|
|
256
256
|
const endpoint = this.getEndpoint(ctx);
|
|
257
257
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Firmware Update Meta Data"], ctx, endpoint).withOptions({
|
|
258
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
258
|
+
priority: import_core.MessagePriority.NodeQuery,
|
|
259
|
+
tag: "interview"
|
|
259
260
|
});
|
|
260
261
|
ctx.logNode(node.id, {
|
|
261
262
|
endpoint: this.endpointIndex,
|