@zwave-js/cc 15.1.1 → 15.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +7 -7
- package/build/cjs/cc/AlarmSensorCC.js +22 -23
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.d.ts +8 -9
- package/build/cjs/cc/AssociationCC.js +29 -29
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/cjs/cc/AssociationGroupInfoCC.js +31 -32
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/cjs/cc/BarrierOperatorCC.js +35 -36
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.d.ts +4 -4
- package/build/cjs/cc/BasicCC.js +23 -24
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.d.ts +4 -7
- package/build/cjs/cc/BatteryCC.js +18 -20
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.d.ts +5 -5
- package/build/cjs/cc/BinarySensorCC.js +20 -21
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC._validateArgs.js +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +6 -6
- package/build/cjs/cc/BinarySwitchCC.js +26 -26
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.d.ts +3 -3
- package/build/cjs/cc/CRC16CC.js +15 -15
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.d.ts +8 -8
- package/build/cjs/cc/CentralSceneCC.js +23 -24
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/cjs/cc/ClimateControlScheduleCC.js +19 -20
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.d.ts +3 -4
- package/build/cjs/cc/ClockCC.js +13 -14
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.d.ts +3 -4
- package/build/cjs/cc/ColorSwitchCC.js +22 -24
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -3
- package/build/cjs/cc/ConfigurationCC.js +114 -115
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +5 -5
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +29 -29
- package/build/cjs/cc/DoorLockCC.js +39 -40
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/cjs/cc/DoorLockLoggingCC.js +13 -14
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -3
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +8 -8
- package/build/cjs/cc/EntryControlCC.js +41 -42
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +52 -53
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +2 -2
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/cjs/cc/HumidityControlModeCC.js +20 -21
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +9 -9
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/cjs/cc/HumidityControlSetpointCC.js +43 -44
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.d.ts +2 -3
- package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +3 -3
- package/build/cjs/cc/IndicatorCC.js +50 -52
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.d.ts +3 -3
- package/build/cjs/cc/IrrigationCC.js +74 -75
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.d.ts +5 -6
- package/build/cjs/cc/LanguageCC.js +14 -15
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.d.ts +4 -4
- package/build/cjs/cc/LockCC.js +10 -10
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -10
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/cjs/cc/ManufacturerSpecificCC.js +20 -21
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.d.ts +4 -6
- package/build/cjs/cc/MeterCC.js +52 -54
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/cjs/cc/MultiChannelAssociationCC.js +34 -35
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.d.ts +11 -11
- package/build/cjs/cc/MultiChannelCC.js +53 -53
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.d.ts +3 -3
- package/build/cjs/cc/MultiCommandCC.js +13 -13
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/cjs/cc/MultilevelSensorCC.js +26 -28
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC._validateArgs.js +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/cjs/cc/MultilevelSwitchCC.js +36 -37
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +4 -4
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +5 -5
- package/build/cjs/cc/NodeNamingCC.js +20 -20
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.d.ts +4 -5
- package/build/cjs/cc/NotificationCC.js +66 -68
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.d.ts +3 -3
- package/build/cjs/cc/PowerlevelCC.js +25 -26
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC._validateArgs.js +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +11 -11
- package/build/cjs/cc/ProtectionCC.js +35 -36
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +5 -6
- package/build/cjs/cc/SceneActivationCC.js +10 -10
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +19 -20
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -26
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +3 -4
- package/build/cjs/cc/Security2CC.js +60 -62
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.d.ts +3 -4
- package/build/cjs/cc/SecurityCC.js +25 -26
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.d.ts +7 -7
- package/build/cjs/cc/SoundSwitchCC.js +28 -29
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.d.ts +4 -4
- package/build/cjs/cc/SupervisionCC.js +28 -29
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatFanModeCC.js +21 -22
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +9 -9
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatModeCC.js +30 -31
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/cjs/cc/ThermostatOperatingStateCC.js +9 -9
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +14 -15
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatSetpointCC.js +48 -49
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.d.ts +3 -4
- package/build/cjs/cc/TimeCC.js +9 -10
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.d.ts +3 -4
- package/build/cjs/cc/TimeParametersCC.js +2 -2
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.d.ts +3 -3
- package/build/cjs/cc/TransportServiceCC.js +44 -45
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.d.ts +19 -19
- package/build/cjs/cc/UserCodeCC.js +102 -103
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.d.ts +17 -17
- package/build/cjs/cc/VersionCC.js +46 -47
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.d.ts +6 -6
- package/build/cjs/cc/WakeUpCC.js +16 -17
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.d.ts +3 -4
- package/build/cjs/cc/WindowCoveringCC.js +17 -18
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWavePlusCC.d.ts +8 -8
- package/build/cjs/cc/ZWavePlusCC.js +15 -16
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +35 -35
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.js +24 -26
- package/build/cjs/cc/_CCValues.generated.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +14 -14
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/cjs/lib/API.d.ts +3 -3
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +5 -6
- package/build/cjs/lib/CommandClass.js +45 -45
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +2 -2
- package/build/cjs/lib/CommandClassDecorators.js +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +2 -2
- package/build/cjs/lib/Security2/Extension.js +17 -17
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/cjs/lib/SetValueResult.d.ts +1 -1
- package/build/cjs/lib/SetValueResult.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +3 -3
- package/build/cjs/lib/Values.js +6 -6
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_Types.d.ts +2 -2
- package/build/cjs/lib/_Types.js +3 -3
- package/build/cjs/lib/_Types.js.map +1 -1
- package/build/cjs/lib/serializers.d.ts +1 -1
- package/build/cjs/lib/serializers.js +5 -5
- package/build/cjs/lib/serializers.js.map +2 -2
- package/build/cjs/lib/traits.d.ts +2 -2
- package/build/cjs/lib/utils.d.ts +2 -2
- package/build/cjs/lib/utils.js +60 -60
- package/build/cjs/lib/utils.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +7 -7
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -3
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +8 -9
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -2
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -3
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -3
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +4 -4
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -3
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +4 -7
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -4
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +5 -5
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -3
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +6 -6
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +3 -3
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +2 -2
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +8 -8
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -3
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -3
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +3 -4
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +2 -3
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +3 -4
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -4
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -3
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -3
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +29 -29
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +2 -3
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -3
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -3
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +8 -8
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -3
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -3
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -1
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -3
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -3
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.d.ts +2 -3
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +3 -3
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -4
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +3 -3
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +2 -3
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +5 -6
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -3
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +4 -4
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -2
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -3
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +4 -6
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +2 -4
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -3
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +11 -11
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -2
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts +3 -3
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +2 -2
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -4
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +2 -3
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -1
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +5 -5
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -2
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +4 -5
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +2 -4
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +3 -3
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +2 -3
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +11 -11
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -3
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +5 -6
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -2
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -3
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -3
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +3 -4
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +2 -4
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +3 -4
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -2
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +7 -7
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -3
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +4 -4
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -3
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -3
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -2
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +2 -3
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -3
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +3 -4
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -2
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +3 -4
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -1
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts +3 -3
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +2 -3
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +19 -19
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -3
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +17 -17
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -3
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +6 -6
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -3
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +3 -4
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +1 -2
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +8 -8
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -3
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +2 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/API.d.ts +3 -3
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +5 -6
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +2 -2
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +2 -2
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +2 -2
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -2
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/SetValueResult.d.ts +1 -1
- package/build/esm/lib/SetValueResult.d.ts.map +1 -1
- package/build/esm/lib/Values.d.ts +3 -3
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_Types.d.ts +2 -2
- package/build/esm/lib/_Types.d.ts.map +1 -1
- package/build/esm/lib/_Types.js +1 -1
- package/build/esm/lib/_Types.js.map +1 -1
- package/build/esm/lib/serializers.d.ts +1 -1
- package/build/esm/lib/serializers.d.ts.map +1 -1
- package/build/esm/lib/serializers.js +1 -1
- package/build/esm/lib/serializers.js.map +1 -1
- package/build/esm/lib/traits.d.ts +2 -2
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/build/esm/lib/utils.d.ts +2 -2
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +2 -2
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/EnergyProductionCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
|
4
|
+
"sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeFloatWithScale,\n\tparseFloatWithScale,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tEnergyProductionCommand,\n\tEnergyProductionParameter,\n\ttype EnergyProductionScale,\n\tgetEnergyProductionScale,\n} from \"../lib/_Types.js\";\n\nexport const EnergyProductionCCValues = V.defineCCValues(\n\tCommandClasses[\"Energy Production\"],\n\t{\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"value\",\n\t\t\t\"value\",\n\t\t\t(parameter: EnergyProductionParameter) => parameter,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"value\" && typeof propertyKey === \"number\",\n\t\t\t(parameter: EnergyProductionParameter) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyNumber,\n\t\t\t\tlabel: getEnumMemberName(\n\t\t\t\t\tEnergyProductionParameter,\n\t\t\t\t\tparameter,\n\t\t\t\t),\n\t\t\t\t// unit and ccSpecific are set dynamically\n\t\t\t} as const),\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Energy Production\"])\nexport class EnergyProductionCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: EnergyProductionCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase EnergyProductionCommand.Get:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(\n\t\t\tthis: EnergyProductionCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t) {\n\t\t\tif (\n\t\t\t\tEnergyProductionCCValues.value.is({\n\t\t\t\t\tcommandClass: this.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\tpropertyKey,\n\t\t\t\t})\n\t\t\t) {\n\t\t\t\treturn (await this.get(property as EnergyProductionParameter))\n\t\t\t\t\t?.value;\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async get(\n\t\tparameter: EnergyProductionParameter,\n\t): Promise<MaybeNotKnown<{ value: number; scale: EnergyProductionScale }>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tEnergyProductionCommand,\n\t\t\tEnergyProductionCommand.Get,\n\t\t);\n\n\t\tconst cc = new EnergyProductionCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tparameter,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEnergyProductionCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"value\", \"scale\"]);\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Energy Production\"])\n@implementedVersion(1)\n@ccValues(EnergyProductionCCValues)\nexport class EnergyProductionCC extends CommandClass {\n\tdeclare ccCommand: EnergyProductionCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// Query current values\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Energy Production\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tfor (\n\t\t\tconst parameter of [\n\t\t\t\tEnergyProductionParameter.Power,\n\t\t\t\tEnergyProductionParameter[\"Production Total\"],\n\t\t\t\tEnergyProductionParameter[\"Production Today\"],\n\t\t\t\tEnergyProductionParameter[\"Total Time\"],\n\t\t\t] as const\n\t\t) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `querying energy production (${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tEnergyProductionParameter,\n\t\t\t\t\t\tparameter,\n\t\t\t\t\t)\n\t\t\t\t})...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\n\t\t\tawait api.get(parameter);\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface EnergyProductionCCReportOptions {\n\tparameter: EnergyProductionParameter;\n\tscale: EnergyProductionScale;\n\tvalue: number;\n}\n\n@CCCommand(EnergyProductionCommand.Report)\nexport class EnergyProductionCCReport extends EnergyProductionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EnergyProductionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.parameter = options.parameter;\n\t\tthis.value = options.value;\n\t\tthis.scale = options.scale;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EnergyProductionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst parameter: EnergyProductionParameter = raw.payload[0];\n\t\tconst { value, scale: rawScale } = parseFloatWithScale(\n\t\t\traw.payload.subarray(1),\n\t\t);\n\t\tconst scale: EnergyProductionScale = getEnergyProductionScale(\n\t\t\tparameter,\n\t\t\trawScale,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tparameter,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t}\n\n\tpublic readonly parameter: EnergyProductionParameter;\n\tpublic readonly scale: EnergyProductionScale;\n\tpublic readonly value: number;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tconst valueValue = EnergyProductionCCValues.value(this.parameter);\n\t\tthis.setMetadata(ctx, valueValue, {\n\t\t\t...valueValue.meta,\n\t\t\tunit: this.scale.unit,\n\t\t\tccSpecific: {\n\t\t\t\tparameter: this.parameter,\n\t\t\t\tscale: this.scale.key,\n\t\t\t},\n\t\t});\n\t\tthis.setValue(ctx, valueValue, this.value);\n\n\t\treturn true;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.parameter]),\n\t\t\tencodeFloatWithScale(this.value, this.scale.key),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t[\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tEnergyProductionParameter,\n\t\t\t\t\t\tthis.parameter,\n\t\t\t\t\t).toLowerCase()\n\t\t\t\t]: `${this.value} ${this.scale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface EnergyProductionCCGetOptions {\n\tparameter: EnergyProductionParameter;\n}\n\nfunction testResponseForEnergyProductionGet(\n\tsent: EnergyProductionCCGet,\n\treceived: EnergyProductionCCReport,\n) {\n\treturn received.parameter === sent.parameter;\n}\n\n@CCCommand(EnergyProductionCommand.Get)\n@expectedCCResponse(\n\tEnergyProductionCCReport,\n\ttestResponseForEnergyProductionGet,\n)\nexport class EnergyProductionCCGet extends EnergyProductionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EnergyProductionCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.parameter = options.parameter;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EnergyProductionCCGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst parameter: EnergyProductionParameter = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tparameter,\n\t\t});\n\t}\n\n\tpublic parameter: EnergyProductionParameter;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.parameter]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tparameter: getEnumMemberName(\n\t\t\t\t\tEnergyProductionParameter,\n\t\t\t\t\tthis.parameter,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAWO;AACP,oBAA+C;AAE/C,iBAKO;AACP,0BAMO;AACP,oCAOO;AACP,oBAAkB;AAClB,mBAKO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBM,yBAAqB,M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AAA,YAAkB;WAAA;;;;;;;;AAA7D,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAkD;AAElD,YAAM,OAAO;AACb,WAAK,YAAY,QAAQ;IAC1B;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,YAAuC,IAAI,QAAQ,CAAC;AAE1D,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,SAAS,CAAC;AAC1C,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,eAAW,iCACV,wCACA,KAAK,SAAS;;;IAIlB;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core
|
|
3
|
-
import { Bytes } from "@zwave-js/shared
|
|
1
|
+
import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
|
|
3
|
+
import { Bytes } from "@zwave-js/shared";
|
|
4
4
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
5
5
|
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
6
6
|
import { EntryControlCommand, EntryControlDataTypes, EntryControlEventTypes } from "../lib/_Types.js";
|
|
@@ -15,7 +15,7 @@ export declare const EntryControlCCValues: Readonly<{
|
|
|
15
15
|
readonly endpoint: number;
|
|
16
16
|
readonly property: "keyCacheSize";
|
|
17
17
|
};
|
|
18
|
-
is: (valueId: import("@zwave-js/core
|
|
18
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
19
19
|
readonly meta: {
|
|
20
20
|
readonly label: "Key cache size";
|
|
21
21
|
readonly description: "Number of character that must be stored before sending";
|
|
@@ -44,7 +44,7 @@ export declare const EntryControlCCValues: Readonly<{
|
|
|
44
44
|
readonly endpoint: number;
|
|
45
45
|
readonly property: "keyCacheTimeout";
|
|
46
46
|
};
|
|
47
|
-
is: (valueId: import("@zwave-js/core
|
|
47
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
48
48
|
readonly meta: {
|
|
49
49
|
readonly label: "Key cache timeout";
|
|
50
50
|
readonly unit: "seconds";
|
|
@@ -74,7 +74,7 @@ export declare const EntryControlCCValues: Readonly<{
|
|
|
74
74
|
readonly endpoint: number;
|
|
75
75
|
readonly property: "supportedDataTypes";
|
|
76
76
|
};
|
|
77
|
-
is: (valueId: import("@zwave-js/core
|
|
77
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
78
78
|
readonly meta: Readonly<{
|
|
79
79
|
readonly type: "any";
|
|
80
80
|
readonly readable: true;
|
|
@@ -99,7 +99,7 @@ export declare const EntryControlCCValues: Readonly<{
|
|
|
99
99
|
readonly endpoint: number;
|
|
100
100
|
readonly property: "supportedEventTypes";
|
|
101
101
|
};
|
|
102
|
-
is: (valueId: import("@zwave-js/core
|
|
102
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
103
103
|
readonly meta: Readonly<{
|
|
104
104
|
readonly type: "any";
|
|
105
105
|
readonly readable: true;
|
|
@@ -124,7 +124,7 @@ export declare const EntryControlCCValues: Readonly<{
|
|
|
124
124
|
readonly endpoint: number;
|
|
125
125
|
readonly property: "supportedKeys";
|
|
126
126
|
};
|
|
127
|
-
is: (valueId: import("@zwave-js/core
|
|
127
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
128
128
|
readonly meta: Readonly<{
|
|
129
129
|
readonly type: "any";
|
|
130
130
|
readonly readable: true;
|
|
@@ -43,9 +43,8 @@ __export(EntryControlCC_exports, {
|
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(EntryControlCC_exports);
|
|
45
45
|
var __validateArgs = __toESM(require("./EntryControlCC._validateArgs.js"), 1);
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var import_safe3 = require("@zwave-js/shared/safe");
|
|
46
|
+
var import_core = require("@zwave-js/core");
|
|
47
|
+
var import_shared = require("@zwave-js/shared");
|
|
49
48
|
var import_API = require("../lib/API.js");
|
|
50
49
|
var import_CommandClass = require("../lib/CommandClass.js");
|
|
51
50
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
@@ -95,7 +94,7 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
95
94
|
};
|
|
96
95
|
const { validateArgs_EntryControlCCAPI_setConfiguration } = __validateArgs;
|
|
97
96
|
let EntryControlCCAPI = (() => {
|
|
98
|
-
let _classDecorators = [(0, import_CommandClassDecorators.API)(
|
|
97
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Entry Control"])];
|
|
99
98
|
let _classDescriptor;
|
|
100
99
|
let _classExtraInitializers = [];
|
|
101
100
|
let _classThis;
|
|
@@ -147,7 +146,7 @@ let EntryControlCCAPI = (() => {
|
|
|
147
146
|
});
|
|
148
147
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
149
148
|
if (response) {
|
|
150
|
-
return (0,
|
|
149
|
+
return (0, import_shared.pick)(response, [
|
|
151
150
|
"supportedDataTypes",
|
|
152
151
|
"supportedEventTypes",
|
|
153
152
|
"minKeyCacheSize",
|
|
@@ -166,7 +165,7 @@ let EntryControlCCAPI = (() => {
|
|
|
166
165
|
});
|
|
167
166
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
168
167
|
if (response) {
|
|
169
|
-
return (0,
|
|
168
|
+
return (0, import_shared.pick)(response, ["keyCacheSize", "keyCacheTimeout"]);
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
async setConfiguration(keyCacheSize, keyCacheTimeout) {
|
|
@@ -193,12 +192,12 @@ let EntryControlCCAPI = (() => {
|
|
|
193
192
|
keyCacheTimeout = value;
|
|
194
193
|
const oldKeyCacheSize = this.tryGetValueDB()?.getValue(import_CCValues_generated.EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
|
|
195
194
|
if (oldKeyCacheSize == void 0) {
|
|
196
|
-
throw new
|
|
195
|
+
throw new import_core.ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
197
196
|
}
|
|
198
197
|
keyCacheSize = oldKeyCacheSize;
|
|
199
198
|
}
|
|
200
199
|
const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
|
|
201
|
-
if (this.isSinglecast() && !(0,
|
|
200
|
+
if (this.isSinglecast() && !(0, import_core.supervisedCommandSucceeded)(result)) {
|
|
202
201
|
this.schedulePoll({ property }, value, { transition: "fast" });
|
|
203
202
|
}
|
|
204
203
|
return result;
|
|
@@ -222,7 +221,7 @@ let EntryControlCCAPI = (() => {
|
|
|
222
221
|
return EntryControlCCAPI2 = _classThis;
|
|
223
222
|
})();
|
|
224
223
|
let EntryControlCC = (() => {
|
|
225
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(
|
|
224
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Entry Control"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.EntryControlCCValues)];
|
|
226
225
|
let _classDescriptor;
|
|
227
226
|
let _classExtraInitializers = [];
|
|
228
227
|
let _classThis;
|
|
@@ -244,16 +243,16 @@ let EntryControlCC = (() => {
|
|
|
244
243
|
determineRequiredCCInterviews() {
|
|
245
244
|
return [
|
|
246
245
|
...super.determineRequiredCCInterviews(),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
import_core.CommandClasses.Association,
|
|
247
|
+
import_core.CommandClasses["Multi Channel Association"],
|
|
248
|
+
import_core.CommandClasses["Association Group Information"]
|
|
250
249
|
];
|
|
251
250
|
}
|
|
252
251
|
async interview(ctx) {
|
|
253
252
|
const node = this.getNode(ctx);
|
|
254
253
|
const endpoint = this.getEndpoint(ctx);
|
|
255
|
-
const api = import_API.CCAPI.create(
|
|
256
|
-
priority:
|
|
254
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
255
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
257
256
|
});
|
|
258
257
|
ctx.logNode(node.id, {
|
|
259
258
|
endpoint: this.endpointIndex,
|
|
@@ -265,7 +264,7 @@ let EntryControlCC = (() => {
|
|
|
265
264
|
} catch {
|
|
266
265
|
ctx.logNode(node.id, {
|
|
267
266
|
endpoint: endpoint.index,
|
|
268
|
-
message: `Configuring associations to receive ${(0,
|
|
267
|
+
message: `Configuring associations to receive ${(0, import_core.getCCName)(this.ccId)} commands failed!`,
|
|
269
268
|
level: "warn"
|
|
270
269
|
});
|
|
271
270
|
}
|
|
@@ -307,8 +306,8 @@ max key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,
|
|
|
307
306
|
async refreshValues(ctx) {
|
|
308
307
|
const node = this.getNode(ctx);
|
|
309
308
|
const endpoint = this.getEndpoint(ctx);
|
|
310
|
-
const api = import_API.CCAPI.create(
|
|
311
|
-
priority:
|
|
309
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
310
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
312
311
|
});
|
|
313
312
|
ctx.logNode(node.id, {
|
|
314
313
|
endpoint: this.endpointIndex,
|
|
@@ -357,27 +356,27 @@ let EntryControlCCNotification = (() => {
|
|
|
357
356
|
this.eventData = options.eventData;
|
|
358
357
|
}
|
|
359
358
|
static from(raw, ctx) {
|
|
360
|
-
(0,
|
|
359
|
+
(0, import_core.validatePayload)(raw.payload.length >= 4);
|
|
361
360
|
const sequenceNumber = raw.payload[0];
|
|
362
361
|
let dataType = raw.payload[1] & 3;
|
|
363
362
|
const eventType = raw.payload[2];
|
|
364
363
|
const eventDataLength = raw.payload[3];
|
|
365
|
-
(0,
|
|
364
|
+
(0, import_core.validatePayload)(eventDataLength >= 0 && eventDataLength <= 32);
|
|
366
365
|
const offset = 4;
|
|
367
|
-
(0,
|
|
366
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + eventDataLength);
|
|
368
367
|
let eventData;
|
|
369
368
|
if (eventDataLength > 0) {
|
|
370
369
|
const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
|
|
371
|
-
eventData =
|
|
370
|
+
eventData = import_shared.Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
|
|
372
371
|
switch (dataType) {
|
|
373
372
|
case import_Types.EntryControlDataTypes.Raw:
|
|
374
373
|
if (!noStrictValidation) {
|
|
375
|
-
(0,
|
|
374
|
+
(0, import_core.validatePayload)(eventDataLength >= 1 && eventDataLength <= 32);
|
|
376
375
|
}
|
|
377
376
|
break;
|
|
378
377
|
case import_Types.EntryControlDataTypes.ASCII:
|
|
379
378
|
if (!noStrictValidation) {
|
|
380
|
-
(0,
|
|
379
|
+
(0, import_core.validatePayload)(eventDataLength === 16 || eventDataLength === 32);
|
|
381
380
|
}
|
|
382
381
|
let paddingStart = eventDataLength;
|
|
383
382
|
while (paddingStart > 0 && eventData[paddingStart - 1] === 255) {
|
|
@@ -385,12 +384,12 @@ let EntryControlCCNotification = (() => {
|
|
|
385
384
|
}
|
|
386
385
|
eventData = eventData.subarray(0, paddingStart).toString("ascii");
|
|
387
386
|
if (!noStrictValidation) {
|
|
388
|
-
(0,
|
|
387
|
+
(0, import_core.validatePayload)(/^[\u0000-\u007f]+$/.test(eventData));
|
|
389
388
|
}
|
|
390
389
|
break;
|
|
391
390
|
case import_Types.EntryControlDataTypes.MD5:
|
|
392
391
|
if (!noStrictValidation) {
|
|
393
|
-
(0,
|
|
392
|
+
(0, import_core.validatePayload)(eventDataLength === 16);
|
|
394
393
|
}
|
|
395
394
|
break;
|
|
396
395
|
}
|
|
@@ -422,7 +421,7 @@ let EntryControlCCNotification = (() => {
|
|
|
422
421
|
message["event data"] = "*".repeat(this.eventData.length);
|
|
423
422
|
break;
|
|
424
423
|
default:
|
|
425
|
-
message["event data"] = typeof this.eventData === "string" ? this.eventData : (0,
|
|
424
|
+
message["event data"] = typeof this.eventData === "string" ? this.eventData : (0, import_shared.buffer2hex)(this.eventData);
|
|
426
425
|
}
|
|
427
426
|
}
|
|
428
427
|
return {
|
|
@@ -458,10 +457,10 @@ let EntryControlCCKeySupportedReport = (() => {
|
|
|
458
457
|
this.supportedKeys = options.supportedKeys;
|
|
459
458
|
}
|
|
460
459
|
static from(raw, ctx) {
|
|
461
|
-
(0,
|
|
460
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
462
461
|
const length = raw.payload[0];
|
|
463
|
-
(0,
|
|
464
|
-
const supportedKeys = (0,
|
|
462
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1 + length);
|
|
463
|
+
const supportedKeys = (0, import_core.parseBitMask)(raw.payload.subarray(1, 1 + length), 0);
|
|
465
464
|
return new this({
|
|
466
465
|
nodeId: ctx.sourceNodeId,
|
|
467
466
|
supportedKeys
|
|
@@ -530,23 +529,23 @@ let EntryControlCCEventSupportedReport = (() => {
|
|
|
530
529
|
this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
|
|
531
530
|
}
|
|
532
531
|
static from(raw, ctx) {
|
|
533
|
-
(0,
|
|
532
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
534
533
|
const dataTypeLength = raw.payload[0] & 3;
|
|
535
534
|
let offset = 1;
|
|
536
|
-
(0,
|
|
537
|
-
const supportedDataTypes = (0,
|
|
535
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + dataTypeLength);
|
|
536
|
+
const supportedDataTypes = (0, import_core.parseBitMask)(raw.payload.subarray(offset, offset + dataTypeLength), import_Types.EntryControlDataTypes.None);
|
|
538
537
|
offset += dataTypeLength;
|
|
539
|
-
(0,
|
|
538
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 1);
|
|
540
539
|
const eventTypeLength = raw.payload[offset] & 31;
|
|
541
540
|
offset += 1;
|
|
542
|
-
(0,
|
|
543
|
-
const supportedEventTypes = (0,
|
|
541
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + eventTypeLength);
|
|
542
|
+
const supportedEventTypes = (0, import_core.parseBitMask)(raw.payload.subarray(offset, offset + eventTypeLength), import_Types.EntryControlEventTypes.Caching);
|
|
544
543
|
offset += eventTypeLength;
|
|
545
|
-
(0,
|
|
544
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 4);
|
|
546
545
|
const minKeyCacheSize = raw.payload[offset];
|
|
547
|
-
(0,
|
|
546
|
+
(0, import_core.validatePayload)(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
|
|
548
547
|
const maxKeyCacheSize = raw.payload[offset + 1];
|
|
549
|
-
(0,
|
|
548
|
+
(0, import_core.validatePayload)(maxKeyCacheSize >= minKeyCacheSize && maxKeyCacheSize <= 32);
|
|
550
549
|
const minKeyCacheTimeout = raw.payload[offset + 2];
|
|
551
550
|
const maxKeyCacheTimeout = raw.payload[offset + 3];
|
|
552
551
|
return new this({
|
|
@@ -647,9 +646,9 @@ let EntryControlCCConfigurationReport = (() => {
|
|
|
647
646
|
this.keyCacheTimeout = options.keyCacheTimeout;
|
|
648
647
|
}
|
|
649
648
|
static from(raw, ctx) {
|
|
650
|
-
(0,
|
|
649
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
651
650
|
const keyCacheSize = raw.payload[0];
|
|
652
|
-
(0,
|
|
651
|
+
(0, import_core.validatePayload)(keyCacheSize >= 1 && keyCacheSize <= 32);
|
|
653
652
|
const keyCacheTimeout = raw.payload[1];
|
|
654
653
|
return new this({
|
|
655
654
|
nodeId: ctx.sourceNodeId,
|
|
@@ -720,12 +719,12 @@ let EntryControlCCConfigurationSet = (() => {
|
|
|
720
719
|
this.keyCacheTimeout = options.keyCacheTimeout;
|
|
721
720
|
}
|
|
722
721
|
static from(_raw, _ctx) {
|
|
723
|
-
throw new
|
|
722
|
+
throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
724
723
|
}
|
|
725
724
|
keyCacheSize;
|
|
726
725
|
keyCacheTimeout;
|
|
727
726
|
serialize(ctx) {
|
|
728
|
-
this.payload =
|
|
727
|
+
this.payload = import_shared.Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
|
|
729
728
|
return super.serialize(ctx);
|
|
730
729
|
}
|
|
731
730
|
toLogEntry(ctx) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/EntryControlCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tgetCCName,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { buffer2hex, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tEntryControlCommand,\n\tEntryControlDataTypes,\n\tEntryControlEventTypes,\n} from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\n\nexport const EntryControlCCValues = V.defineCCValues(\n\tCommandClasses[\"Entry Control\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"keyCacheSize\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"Key cache size\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Number of character that must be stored before sending\",\n\t\t\t\tmin: 1,\n\t\t\t\tmax: 32,\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"keyCacheTimeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"Key cache timeout\",\n\t\t\t\tunit: \"seconds\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"How long the key cache must wait for additional characters\",\n\t\t\t\tmin: 1,\n\t\t\t\tmax: 10,\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\"supportedDataTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedEventTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedKeys\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t},\n);\n\n@API(CommandClasses[\"Entry Control\"])\nexport class EntryControlCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: EntryControlCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase EntryControlCommand.KeySupportedGet:\n\t\t\tcase EntryControlCommand.EventSupportedGet:\n\t\t\tcase EntryControlCommand.ConfigurationGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase EntryControlCommand.ConfigurationSet:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupportedKeys() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.KeySupportedGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCKeySupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCKeySupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedKeys;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getEventCapabilities() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.EventSupportedGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCEventSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCEventSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportedDataTypes\",\n\t\t\t\t\"supportedEventTypes\",\n\t\t\t\t\"minKeyCacheSize\",\n\t\t\t\t\"maxKeyCacheSize\",\n\t\t\t\t\"minKeyCacheTimeout\",\n\t\t\t\t\"maxKeyCacheTimeout\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"keyCacheSize\", \"keyCacheTimeout\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tkeyCacheSize: number,\n\t\tkeyCacheTimeout: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tkeyCacheSize,\n\t\t\tkeyCacheTimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: EntryControlCCAPI, { property }, value) {\n\t\t\tif (property !== \"keyCacheSize\" && property !== \"keyCacheTimeout\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet keyCacheSize = value;\n\t\t\tlet keyCacheTimeout = 2;\n\t\t\tif (property === \"keyCacheTimeout\") {\n\t\t\t\tkeyCacheTimeout = value;\n\n\t\t\t\tconst oldKeyCacheSize = this.tryGetValueDB()?.getValue<number>(\n\t\t\t\t\tEntryControlCCValues.keyCacheSize.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (oldKeyCacheSize == undefined) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The \"keyCacheTimeout\" property cannot be changed before the key cache size is known!`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tkeyCacheSize = oldKeyCacheSize;\n\t\t\t}\n\t\t\tconst result = await this.setConfiguration(\n\t\t\t\tkeyCacheSize,\n\t\t\t\tkeyCacheTimeout,\n\t\t\t);\n\n\t\t\t// Verify the change after a short delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\tthis.schedulePoll({ property }, value, { transition: \"fast\" });\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: EntryControlCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"keyCacheSize\":\n\t\t\t\tcase \"keyCacheTimeout\":\n\t\t\t\t\treturn (await this.getConfiguration())?.[property];\n\t\t\t}\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Entry Control\"])\n@implementedVersion(1)\n@ccValues(EntryControlCCValues)\nexport class EntryControlCC extends CommandClass {\n\tdeclare ccCommand: EntryControlCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses.Association,\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t];\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Entry Control\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// If one Association group issues Entry Control notifications,\n\t\t// we must associate ourselves with that channel\n\t\ttry {\n\t\t\tawait ccUtils.assignLifelineIssueingCommand(\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t\tthis.ccId,\n\t\t\t\tEntryControlCommand.Notification,\n\t\t\t);\n\t\t} catch {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\tgetCCName(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t)\n\t\t\t\t} commands failed!`,\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control supported keys...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedKeys = await api.getSupportedKeys();\n\t\tif (supportedKeys) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`received entry control supported keys: ${supportedKeys.toString()}`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control supported events...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst eventCapabilities = await api.getEventCapabilities();\n\t\tif (eventCapabilities) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received entry control supported keys:\ndata types: ${\n\t\t\t\t\teventCapabilities.supportedDataTypes\n\t\t\t\t\t\t.map((e) => EntryControlDataTypes[e])\n\t\t\t\t\t\t.toString()\n\t\t\t\t}\nevent types: ${\n\t\t\t\t\teventCapabilities.supportedEventTypes\n\t\t\t\t\t\t.map((e) => EntryControlEventTypes[e])\n\t\t\t\t\t\t.toString()\n\t\t\t\t}\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\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Entry Control\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control configuration...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst conf = await api.getConfiguration();\n\t\tif (conf) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received entry control configuration:\nkey cache size: ${conf.keyCacheSize}\nkey cache timeout: ${conf.keyCacheTimeout} seconds`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface EntryControlCCNotificationOptions {\n\tsequenceNumber: number;\n\tdataType: EntryControlDataTypes;\n\teventType: EntryControlEventTypes;\n\teventData?: string | Bytes;\n}\n\n@CCCommand(EntryControlCommand.Notification)\nexport class EntryControlCCNotification extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCNotificationOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sequenceNumber = options.sequenceNumber;\n\t\tthis.dataType = options.dataType;\n\t\tthis.eventType = options.eventType;\n\t\tthis.eventData = options.eventData;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCNotification {\n\t\tvalidatePayload(raw.payload.length >= 4);\n\t\tconst sequenceNumber = raw.payload[0];\n\t\tlet dataType: EntryControlDataTypes = raw.payload[1] & 0b11;\n\t\tconst eventType: EntryControlEventTypes = raw.payload[2];\n\t\tconst eventDataLength = raw.payload[3];\n\t\tvalidatePayload(eventDataLength >= 0 && eventDataLength <= 32);\n\t\tconst offset = 4;\n\t\tvalidatePayload(raw.payload.length >= offset + eventDataLength);\n\t\tlet eventData: string | Bytes | undefined;\n\t\tif (eventDataLength > 0) {\n\t\t\t// We shouldn't need to check this, since the specs are pretty clear which format to expect.\n\t\t\t// But as always - manufacturers don't care and send ASCII data with 0 bytes...\n\n\t\t\t// We also need to disable the strict validation for some devices to make them work\n\t\t\tconst noStrictValidation = !!ctx.getDeviceConfig?.(\n\t\t\t\tctx.sourceNodeId,\n\t\t\t)?.compat?.disableStrictEntryControlDataValidation;\n\n\t\t\teventData = Bytes.from(\n\t\t\t\traw.payload.subarray(offset, offset + eventDataLength),\n\t\t\t);\n\t\t\tswitch (dataType) {\n\t\t\t\tcase EntryControlDataTypes.Raw:\n\t\t\t\t\t// RAW 1 to 32 bytes of arbitrary binary data\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(\n\t\t\t\t\t\t\teventDataLength >= 1 && eventDataLength <= 32,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EntryControlDataTypes.ASCII:\n\t\t\t\t\t// ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.\n\t\t\t\t\t// The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(\n\t\t\t\t\t\t\teventDataLength === 16 || eventDataLength === 32,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Trim 0xff padding bytes\n\t\t\t\t\tlet paddingStart = eventDataLength;\n\t\t\t\t\twhile (\n\t\t\t\t\t\tpaddingStart > 0\n\t\t\t\t\t\t&& eventData[paddingStart - 1] === 0xff\n\t\t\t\t\t) {\n\t\t\t\t\t\tpaddingStart--;\n\t\t\t\t\t}\n\t\t\t\t\teventData = eventData.subarray(0, paddingStart).toString(\n\t\t\t\t\t\t\"ascii\",\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(/^[\\u0000-\\u007f]+$/.test(eventData));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EntryControlDataTypes.MD5:\n\t\t\t\t\t// MD5 16 byte binary data encoded as a MD5 hash value.\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(eventDataLength === 16);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tdataType = EntryControlDataTypes.None;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsequenceNumber,\n\t\t\tdataType,\n\t\t\teventType,\n\t\t\teventData,\n\t\t});\n\t}\n\n\tpublic readonly sequenceNumber: number;\n\tpublic readonly dataType: EntryControlDataTypes;\n\tpublic readonly eventType: EntryControlEventTypes;\n\tpublic readonly eventData?: Uint8Array | string;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"sequence number\": this.sequenceNumber,\n\t\t\t\"data type\": this.dataType,\n\t\t\t\"event type\": this.eventType,\n\t\t};\n\t\tif (this.eventData) {\n\t\t\tswitch (this.eventType) {\n\t\t\t\tcase EntryControlEventTypes.CachedKeys:\n\t\t\t\tcase EntryControlEventTypes.Enter:\n\t\t\t\t\t// The event data is likely the user's PIN code, hide it from logs\n\t\t\t\t\tmessage[\"event data\"] = \"*\".repeat(this.eventData.length);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tmessage[\"event data\"] = typeof this.eventData === \"string\"\n\t\t\t\t\t\t? this.eventData\n\t\t\t\t\t\t: buffer2hex(this.eventData);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface EntryControlCCKeySupportedReportOptions {\n\tsupportedKeys: number[];\n}\n\n@CCCommand(EntryControlCommand.KeySupportedReport)\n@ccValueProperty(\"supportedKeys\", EntryControlCCValues.supportedKeys)\nexport class EntryControlCCKeySupportedReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCKeySupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedKeys = options.supportedKeys;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCKeySupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst length = raw.payload[0];\n\t\tvalidatePayload(raw.payload.length >= 1 + length);\n\t\tconst supportedKeys = parseBitMask(\n\t\t\traw.payload.subarray(1, 1 + length),\n\t\t\t0,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedKeys,\n\t\t});\n\t}\n\n\tpublic readonly supportedKeys: readonly number[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"supported keys\": this.supportedKeys.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.KeySupportedGet)\n@expectedCCResponse(EntryControlCCKeySupportedReport)\nexport class EntryControlCCKeySupportedGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCEventSupportedReportOptions {\n\tsupportedDataTypes: EntryControlDataTypes[];\n\tsupportedEventTypes: EntryControlEventTypes[];\n\tminKeyCacheSize: number;\n\tmaxKeyCacheSize: number;\n\tminKeyCacheTimeout: number;\n\tmaxKeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.EventSupportedReport)\n@ccValueProperty(\"supportedDataTypes\", EntryControlCCValues.supportedDataTypes)\n@ccValueProperty(\n\t\"supportedEventTypes\",\n\tEntryControlCCValues.supportedEventTypes,\n)\nexport class EntryControlCCEventSupportedReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCEventSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedDataTypes = options.supportedDataTypes;\n\t\tthis.supportedEventTypes = options.supportedEventTypes;\n\t\tthis.minKeyCacheSize = options.minKeyCacheSize;\n\t\tthis.maxKeyCacheSize = options.maxKeyCacheSize;\n\t\tthis.minKeyCacheTimeout = options.minKeyCacheTimeout;\n\t\tthis.maxKeyCacheTimeout = options.maxKeyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCEventSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst dataTypeLength = raw.payload[0] & 0b11;\n\t\tlet offset = 1;\n\t\tvalidatePayload(raw.payload.length >= offset + dataTypeLength);\n\t\tconst supportedDataTypes: EntryControlDataTypes[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + dataTypeLength),\n\t\t\tEntryControlDataTypes.None,\n\t\t);\n\t\toffset += dataTypeLength;\n\t\tvalidatePayload(raw.payload.length >= offset + 1);\n\t\tconst eventTypeLength = raw.payload[offset] & 0b11111;\n\t\toffset += 1;\n\t\tvalidatePayload(raw.payload.length >= offset + eventTypeLength);\n\t\tconst supportedEventTypes: EntryControlEventTypes[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + eventTypeLength),\n\t\t\tEntryControlEventTypes.Caching,\n\t\t);\n\t\toffset += eventTypeLength;\n\t\tvalidatePayload(raw.payload.length >= offset + 4);\n\t\tconst minKeyCacheSize = raw.payload[offset];\n\t\tvalidatePayload(\n\t\t\tminKeyCacheSize >= 1 && minKeyCacheSize <= 32,\n\t\t);\n\t\tconst maxKeyCacheSize = raw.payload[offset + 1];\n\t\tvalidatePayload(\n\t\t\tmaxKeyCacheSize >= minKeyCacheSize\n\t\t\t\t&& maxKeyCacheSize <= 32,\n\t\t);\n\t\tconst minKeyCacheTimeout = raw.payload[offset + 2];\n\t\tconst maxKeyCacheTimeout = raw.payload[offset + 3];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedDataTypes,\n\t\t\tsupportedEventTypes,\n\t\t\tminKeyCacheSize,\n\t\t\tmaxKeyCacheSize,\n\t\t\tminKeyCacheTimeout,\n\t\t\tmaxKeyCacheTimeout,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Store min/max cache size and timeout as metadata\n\t\tconst keyCacheSizeValue = EntryControlCCValues.keyCacheSize;\n\t\tthis.setMetadata(ctx, keyCacheSizeValue, {\n\t\t\t...keyCacheSizeValue.meta,\n\t\t\tmin: this.minKeyCacheSize,\n\t\t\tmax: this.maxKeyCacheSize,\n\t\t});\n\n\t\tconst keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;\n\t\tthis.setMetadata(ctx, keyCacheTimeoutValue, {\n\t\t\t...keyCacheTimeoutValue.meta,\n\t\t\tmin: this.minKeyCacheTimeout,\n\t\t\tmax: this.maxKeyCacheTimeout,\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedDataTypes: readonly EntryControlDataTypes[];\n\n\tpublic readonly supportedEventTypes: readonly EntryControlEventTypes[];\n\n\tpublic readonly minKeyCacheSize: number;\n\tpublic readonly maxKeyCacheSize: number;\n\tpublic readonly minKeyCacheTimeout: number;\n\tpublic readonly maxKeyCacheTimeout: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported data types\": this.supportedDataTypes\n\t\t\t\t\t.map((dt) => EntryControlDataTypes[dt])\n\t\t\t\t\t.toString(),\n\t\t\t\t\"supported event types\": this.supportedEventTypes\n\t\t\t\t\t.map((et) => EntryControlEventTypes[et])\n\t\t\t\t\t.toString(),\n\t\t\t\t\"min key cache size\": this.minKeyCacheSize,\n\t\t\t\t\"max key cache size\": this.maxKeyCacheSize,\n\t\t\t\t\"min key cache timeout\": this.minKeyCacheTimeout,\n\t\t\t\t\"max key cache timeout\": this.maxKeyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.EventSupportedGet)\n@expectedCCResponse(EntryControlCCEventSupportedReport)\nexport class EntryControlCCEventSupportedGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCConfigurationReportOptions {\n\tkeyCacheSize: number;\n\tkeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.ConfigurationReport)\n@ccValueProperty(\"keyCacheSize\", EntryControlCCValues.keyCacheSize)\n@ccValueProperty(\"keyCacheTimeout\", EntryControlCCValues.keyCacheTimeout)\nexport class EntryControlCCConfigurationReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.keyCacheSize = options.keyCacheSize;\n\t\tthis.keyCacheTimeout = options.keyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst keyCacheSize = raw.payload[0];\n\t\tvalidatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);\n\t\tconst keyCacheTimeout = raw.payload[1];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tkeyCacheSize,\n\t\t\tkeyCacheTimeout,\n\t\t});\n\t}\n\n\tpublic readonly keyCacheSize: number;\n\n\tpublic readonly keyCacheTimeout: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"key cache size\": this.keyCacheSize,\n\t\t\t\t\"key cache timeout\": this.keyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.ConfigurationGet)\n@expectedCCResponse(EntryControlCCConfigurationReport)\nexport class EntryControlCCConfigurationGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCConfigurationSetOptions {\n\tkeyCacheSize: number;\n\tkeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.ConfigurationSet)\n@useSupervision()\nexport class EntryControlCCConfigurationSet extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.keyCacheSize = options.keyCacheSize;\n\t\tthis.keyCacheTimeout = options.keyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): EntryControlCCConfigurationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new EntryControlCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic readonly keyCacheSize: number;\n\tpublic readonly keyCacheTimeout: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"key cache size\": this.keyCacheSize,\n\t\t\t\t\"key cache timeout\": this.keyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAgBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAiC;AAEjC,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;AACP,cAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCZ,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AAqF3C,mBAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,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AAlE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;IAUA,kCAA8B,MAAA;8BAF1C,yCAAU,iCAAoB,gBAAgB,OAC9C,8CAAc,CAAE;;;;oBACmC;sDAAA,YAAc;WAAA;;;;;;;;AAAlE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAA2D;AAE3D,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;AAC5B,WAAK,kBAAkB,QAAQ;IAChC;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEgB;IACA;IAET,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,cAAc,KAAK,eAAe,CAAC;AACnE,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,kBAAkB,KAAK;UACvB,qBAAqB,KAAK;;;IAG7B;;;;",
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tgetCCName,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, buffer2hex, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tEntryControlCommand,\n\tEntryControlDataTypes,\n\tEntryControlEventTypes,\n} from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\n\nexport const EntryControlCCValues = V.defineCCValues(\n\tCommandClasses[\"Entry Control\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"keyCacheSize\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"Key cache size\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Number of character that must be stored before sending\",\n\t\t\t\tmin: 1,\n\t\t\t\tmax: 32,\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"keyCacheTimeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"Key cache timeout\",\n\t\t\t\tunit: \"seconds\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"How long the key cache must wait for additional characters\",\n\t\t\t\tmin: 1,\n\t\t\t\tmax: 10,\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\"supportedDataTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedEventTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedKeys\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t},\n);\n\n@API(CommandClasses[\"Entry Control\"])\nexport class EntryControlCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: EntryControlCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase EntryControlCommand.KeySupportedGet:\n\t\t\tcase EntryControlCommand.EventSupportedGet:\n\t\t\tcase EntryControlCommand.ConfigurationGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase EntryControlCommand.ConfigurationSet:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupportedKeys() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.KeySupportedGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCKeySupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCKeySupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedKeys;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getEventCapabilities() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.EventSupportedGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCEventSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCEventSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportedDataTypes\",\n\t\t\t\t\"supportedEventTypes\",\n\t\t\t\t\"minKeyCacheSize\",\n\t\t\t\t\"maxKeyCacheSize\",\n\t\t\t\t\"minKeyCacheTimeout\",\n\t\t\t\t\"maxKeyCacheTimeout\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tEntryControlCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"keyCacheSize\", \"keyCacheTimeout\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tkeyCacheSize: number,\n\t\tkeyCacheTimeout: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tEntryControlCommand,\n\t\t\tEntryControlCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new EntryControlCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tkeyCacheSize,\n\t\t\tkeyCacheTimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: EntryControlCCAPI, { property }, value) {\n\t\t\tif (property !== \"keyCacheSize\" && property !== \"keyCacheTimeout\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet keyCacheSize = value;\n\t\t\tlet keyCacheTimeout = 2;\n\t\t\tif (property === \"keyCacheTimeout\") {\n\t\t\t\tkeyCacheTimeout = value;\n\n\t\t\t\tconst oldKeyCacheSize = this.tryGetValueDB()?.getValue<number>(\n\t\t\t\t\tEntryControlCCValues.keyCacheSize.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (oldKeyCacheSize == undefined) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The \"keyCacheTimeout\" property cannot be changed before the key cache size is known!`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tkeyCacheSize = oldKeyCacheSize;\n\t\t\t}\n\t\t\tconst result = await this.setConfiguration(\n\t\t\t\tkeyCacheSize,\n\t\t\t\tkeyCacheTimeout,\n\t\t\t);\n\n\t\t\t// Verify the change after a short delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\tthis.schedulePoll({ property }, value, { transition: \"fast\" });\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: EntryControlCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"keyCacheSize\":\n\t\t\t\tcase \"keyCacheTimeout\":\n\t\t\t\t\treturn (await this.getConfiguration())?.[property];\n\t\t\t}\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Entry Control\"])\n@implementedVersion(1)\n@ccValues(EntryControlCCValues)\nexport class EntryControlCC extends CommandClass {\n\tdeclare ccCommand: EntryControlCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses.Association,\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t];\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Entry Control\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// If one Association group issues Entry Control notifications,\n\t\t// we must associate ourselves with that channel\n\t\ttry {\n\t\t\tawait ccUtils.assignLifelineIssueingCommand(\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t\tthis.ccId,\n\t\t\t\tEntryControlCommand.Notification,\n\t\t\t);\n\t\t} catch {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\tgetCCName(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t)\n\t\t\t\t} commands failed!`,\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control supported keys...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedKeys = await api.getSupportedKeys();\n\t\tif (supportedKeys) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`received entry control supported keys: ${supportedKeys.toString()}`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control supported events...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst eventCapabilities = await api.getEventCapabilities();\n\t\tif (eventCapabilities) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received entry control supported keys:\ndata types: ${\n\t\t\t\t\teventCapabilities.supportedDataTypes\n\t\t\t\t\t\t.map((e) => EntryControlDataTypes[e])\n\t\t\t\t\t\t.toString()\n\t\t\t\t}\nevent types: ${\n\t\t\t\t\teventCapabilities.supportedEventTypes\n\t\t\t\t\t\t.map((e) => EntryControlEventTypes[e])\n\t\t\t\t\t\t.toString()\n\t\t\t\t}\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\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Entry Control\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"requesting entry control configuration...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst conf = await api.getConfiguration();\n\t\tif (conf) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received entry control configuration:\nkey cache size: ${conf.keyCacheSize}\nkey cache timeout: ${conf.keyCacheTimeout} seconds`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface EntryControlCCNotificationOptions {\n\tsequenceNumber: number;\n\tdataType: EntryControlDataTypes;\n\teventType: EntryControlEventTypes;\n\teventData?: string | Bytes;\n}\n\n@CCCommand(EntryControlCommand.Notification)\nexport class EntryControlCCNotification extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCNotificationOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sequenceNumber = options.sequenceNumber;\n\t\tthis.dataType = options.dataType;\n\t\tthis.eventType = options.eventType;\n\t\tthis.eventData = options.eventData;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCNotification {\n\t\tvalidatePayload(raw.payload.length >= 4);\n\t\tconst sequenceNumber = raw.payload[0];\n\t\tlet dataType: EntryControlDataTypes = raw.payload[1] & 0b11;\n\t\tconst eventType: EntryControlEventTypes = raw.payload[2];\n\t\tconst eventDataLength = raw.payload[3];\n\t\tvalidatePayload(eventDataLength >= 0 && eventDataLength <= 32);\n\t\tconst offset = 4;\n\t\tvalidatePayload(raw.payload.length >= offset + eventDataLength);\n\t\tlet eventData: string | Bytes | undefined;\n\t\tif (eventDataLength > 0) {\n\t\t\t// We shouldn't need to check this, since the specs are pretty clear which format to expect.\n\t\t\t// But as always - manufacturers don't care and send ASCII data with 0 bytes...\n\n\t\t\t// We also need to disable the strict validation for some devices to make them work\n\t\t\tconst noStrictValidation = !!ctx.getDeviceConfig?.(\n\t\t\t\tctx.sourceNodeId,\n\t\t\t)?.compat?.disableStrictEntryControlDataValidation;\n\n\t\t\teventData = Bytes.from(\n\t\t\t\traw.payload.subarray(offset, offset + eventDataLength),\n\t\t\t);\n\t\t\tswitch (dataType) {\n\t\t\t\tcase EntryControlDataTypes.Raw:\n\t\t\t\t\t// RAW 1 to 32 bytes of arbitrary binary data\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(\n\t\t\t\t\t\t\teventDataLength >= 1 && eventDataLength <= 32,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EntryControlDataTypes.ASCII:\n\t\t\t\t\t// ASCII 1 to 32 ASCII encoded characters. ASCII codes MUST be in the value range 0x00-0xF7.\n\t\t\t\t\t// The string MUST be padded with the value 0xFF to fit 16 byte blocks when sent in a notification.\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(\n\t\t\t\t\t\t\teventDataLength === 16 || eventDataLength === 32,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Trim 0xff padding bytes\n\t\t\t\t\tlet paddingStart = eventDataLength;\n\t\t\t\t\twhile (\n\t\t\t\t\t\tpaddingStart > 0\n\t\t\t\t\t\t&& eventData[paddingStart - 1] === 0xff\n\t\t\t\t\t) {\n\t\t\t\t\t\tpaddingStart--;\n\t\t\t\t\t}\n\t\t\t\t\teventData = eventData.subarray(0, paddingStart).toString(\n\t\t\t\t\t\t\"ascii\",\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(/^[\\u0000-\\u007f]+$/.test(eventData));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EntryControlDataTypes.MD5:\n\t\t\t\t\t// MD5 16 byte binary data encoded as a MD5 hash value.\n\t\t\t\t\tif (!noStrictValidation) {\n\t\t\t\t\t\tvalidatePayload(eventDataLength === 16);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tdataType = EntryControlDataTypes.None;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsequenceNumber,\n\t\t\tdataType,\n\t\t\teventType,\n\t\t\teventData,\n\t\t});\n\t}\n\n\tpublic readonly sequenceNumber: number;\n\tpublic readonly dataType: EntryControlDataTypes;\n\tpublic readonly eventType: EntryControlEventTypes;\n\tpublic readonly eventData?: Uint8Array | string;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"sequence number\": this.sequenceNumber,\n\t\t\t\"data type\": this.dataType,\n\t\t\t\"event type\": this.eventType,\n\t\t};\n\t\tif (this.eventData) {\n\t\t\tswitch (this.eventType) {\n\t\t\t\tcase EntryControlEventTypes.CachedKeys:\n\t\t\t\tcase EntryControlEventTypes.Enter:\n\t\t\t\t\t// The event data is likely the user's PIN code, hide it from logs\n\t\t\t\t\tmessage[\"event data\"] = \"*\".repeat(this.eventData.length);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tmessage[\"event data\"] = typeof this.eventData === \"string\"\n\t\t\t\t\t\t? this.eventData\n\t\t\t\t\t\t: buffer2hex(this.eventData);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface EntryControlCCKeySupportedReportOptions {\n\tsupportedKeys: number[];\n}\n\n@CCCommand(EntryControlCommand.KeySupportedReport)\n@ccValueProperty(\"supportedKeys\", EntryControlCCValues.supportedKeys)\nexport class EntryControlCCKeySupportedReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCKeySupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedKeys = options.supportedKeys;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCKeySupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst length = raw.payload[0];\n\t\tvalidatePayload(raw.payload.length >= 1 + length);\n\t\tconst supportedKeys = parseBitMask(\n\t\t\traw.payload.subarray(1, 1 + length),\n\t\t\t0,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedKeys,\n\t\t});\n\t}\n\n\tpublic readonly supportedKeys: readonly number[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"supported keys\": this.supportedKeys.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.KeySupportedGet)\n@expectedCCResponse(EntryControlCCKeySupportedReport)\nexport class EntryControlCCKeySupportedGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCEventSupportedReportOptions {\n\tsupportedDataTypes: EntryControlDataTypes[];\n\tsupportedEventTypes: EntryControlEventTypes[];\n\tminKeyCacheSize: number;\n\tmaxKeyCacheSize: number;\n\tminKeyCacheTimeout: number;\n\tmaxKeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.EventSupportedReport)\n@ccValueProperty(\"supportedDataTypes\", EntryControlCCValues.supportedDataTypes)\n@ccValueProperty(\n\t\"supportedEventTypes\",\n\tEntryControlCCValues.supportedEventTypes,\n)\nexport class EntryControlCCEventSupportedReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCEventSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedDataTypes = options.supportedDataTypes;\n\t\tthis.supportedEventTypes = options.supportedEventTypes;\n\t\tthis.minKeyCacheSize = options.minKeyCacheSize;\n\t\tthis.maxKeyCacheSize = options.maxKeyCacheSize;\n\t\tthis.minKeyCacheTimeout = options.minKeyCacheTimeout;\n\t\tthis.maxKeyCacheTimeout = options.maxKeyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCEventSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst dataTypeLength = raw.payload[0] & 0b11;\n\t\tlet offset = 1;\n\t\tvalidatePayload(raw.payload.length >= offset + dataTypeLength);\n\t\tconst supportedDataTypes: EntryControlDataTypes[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + dataTypeLength),\n\t\t\tEntryControlDataTypes.None,\n\t\t);\n\t\toffset += dataTypeLength;\n\t\tvalidatePayload(raw.payload.length >= offset + 1);\n\t\tconst eventTypeLength = raw.payload[offset] & 0b11111;\n\t\toffset += 1;\n\t\tvalidatePayload(raw.payload.length >= offset + eventTypeLength);\n\t\tconst supportedEventTypes: EntryControlEventTypes[] = parseBitMask(\n\t\t\traw.payload.subarray(offset, offset + eventTypeLength),\n\t\t\tEntryControlEventTypes.Caching,\n\t\t);\n\t\toffset += eventTypeLength;\n\t\tvalidatePayload(raw.payload.length >= offset + 4);\n\t\tconst minKeyCacheSize = raw.payload[offset];\n\t\tvalidatePayload(\n\t\t\tminKeyCacheSize >= 1 && minKeyCacheSize <= 32,\n\t\t);\n\t\tconst maxKeyCacheSize = raw.payload[offset + 1];\n\t\tvalidatePayload(\n\t\t\tmaxKeyCacheSize >= minKeyCacheSize\n\t\t\t\t&& maxKeyCacheSize <= 32,\n\t\t);\n\t\tconst minKeyCacheTimeout = raw.payload[offset + 2];\n\t\tconst maxKeyCacheTimeout = raw.payload[offset + 3];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedDataTypes,\n\t\t\tsupportedEventTypes,\n\t\t\tminKeyCacheSize,\n\t\t\tmaxKeyCacheSize,\n\t\t\tminKeyCacheTimeout,\n\t\t\tmaxKeyCacheTimeout,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Store min/max cache size and timeout as metadata\n\t\tconst keyCacheSizeValue = EntryControlCCValues.keyCacheSize;\n\t\tthis.setMetadata(ctx, keyCacheSizeValue, {\n\t\t\t...keyCacheSizeValue.meta,\n\t\t\tmin: this.minKeyCacheSize,\n\t\t\tmax: this.maxKeyCacheSize,\n\t\t});\n\n\t\tconst keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;\n\t\tthis.setMetadata(ctx, keyCacheTimeoutValue, {\n\t\t\t...keyCacheTimeoutValue.meta,\n\t\t\tmin: this.minKeyCacheTimeout,\n\t\t\tmax: this.maxKeyCacheTimeout,\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedDataTypes: readonly EntryControlDataTypes[];\n\n\tpublic readonly supportedEventTypes: readonly EntryControlEventTypes[];\n\n\tpublic readonly minKeyCacheSize: number;\n\tpublic readonly maxKeyCacheSize: number;\n\tpublic readonly minKeyCacheTimeout: number;\n\tpublic readonly maxKeyCacheTimeout: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported data types\": this.supportedDataTypes\n\t\t\t\t\t.map((dt) => EntryControlDataTypes[dt])\n\t\t\t\t\t.toString(),\n\t\t\t\t\"supported event types\": this.supportedEventTypes\n\t\t\t\t\t.map((et) => EntryControlEventTypes[et])\n\t\t\t\t\t.toString(),\n\t\t\t\t\"min key cache size\": this.minKeyCacheSize,\n\t\t\t\t\"max key cache size\": this.maxKeyCacheSize,\n\t\t\t\t\"min key cache timeout\": this.minKeyCacheTimeout,\n\t\t\t\t\"max key cache timeout\": this.maxKeyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.EventSupportedGet)\n@expectedCCResponse(EntryControlCCEventSupportedReport)\nexport class EntryControlCCEventSupportedGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCConfigurationReportOptions {\n\tkeyCacheSize: number;\n\tkeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.ConfigurationReport)\n@ccValueProperty(\"keyCacheSize\", EntryControlCCValues.keyCacheSize)\n@ccValueProperty(\"keyCacheTimeout\", EntryControlCCValues.keyCacheTimeout)\nexport class EntryControlCCConfigurationReport extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.keyCacheSize = options.keyCacheSize;\n\t\tthis.keyCacheTimeout = options.keyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): EntryControlCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst keyCacheSize = raw.payload[0];\n\t\tvalidatePayload(keyCacheSize >= 1 && keyCacheSize <= 32);\n\t\tconst keyCacheTimeout = raw.payload[1];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tkeyCacheSize,\n\t\t\tkeyCacheTimeout,\n\t\t});\n\t}\n\n\tpublic readonly keyCacheSize: number;\n\n\tpublic readonly keyCacheTimeout: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"key cache size\": this.keyCacheSize,\n\t\t\t\t\"key cache timeout\": this.keyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(EntryControlCommand.ConfigurationGet)\n@expectedCCResponse(EntryControlCCConfigurationReport)\nexport class EntryControlCCConfigurationGet extends EntryControlCC {}\n\n// @publicAPI\nexport interface EntryControlCCConfigurationSetOptions {\n\tkeyCacheSize: number;\n\tkeyCacheTimeout: number;\n}\n\n@CCCommand(EntryControlCommand.ConfigurationSet)\n@useSupervision()\nexport class EntryControlCCConfigurationSet extends EntryControlCC {\n\tpublic constructor(\n\t\toptions: WithAddress<EntryControlCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.keyCacheSize = options.keyCacheSize;\n\t\tthis.keyCacheTimeout = options.keyCacheTimeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): EntryControlCCConfigurationSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new EntryControlCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic readonly keyCacheSize: number;\n\tpublic readonly keyCacheTimeout: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"key cache size\": this.keyCacheSize,\n\t\t\t\t\"key cache timeout\": this.keyCacheTimeout,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAgBO;AACP,oBAAwC;AAExC,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;AACP,cAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCZ,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AAqF3C,mBAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,sBA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AA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;IAUA,kCAA8B,MAAA;8BAF1C,yCAAU,iCAAoB,gBAAgB,OAC9C,8CAAc,CAAE;;;;oBACmC;sDAAA,YAAc;WAAA;;;;;;;;AAAlE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAA2D;AAE3D,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;AAC5B,WAAK,kBAAkB,QAAQ;IAChC;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEgB;IACA;IAET,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,cAAc,KAAK,eAAe,CAAC;AACnE,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,kBAAkB,KAAK;UACvB,qBAAqB,KAAK;;;IAG7B;;;;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core
|
|
3
|
-
import { Bytes } from "@zwave-js/shared
|
|
4
|
-
import { type AllOrNone } from "@zwave-js/shared/safe";
|
|
1
|
+
import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core";
|
|
3
|
+
import { type AllOrNone, Bytes } from "@zwave-js/shared";
|
|
5
4
|
import { PhysicalCCAPI } from "../lib/API.js";
|
|
6
5
|
import { type CCRaw, CommandClass, type InterviewContext } from "../lib/CommandClass.js";
|
|
7
6
|
import { FirmwareDownloadStatus, FirmwareUpdateActivationStatus, type FirmwareUpdateMetaData, FirmwareUpdateMetaDataCommand, FirmwareUpdateRequestStatus, FirmwareUpdateStatus } from "../lib/_Types.js";
|
|
@@ -16,7 +15,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
16
15
|
readonly endpoint: number;
|
|
17
16
|
readonly property: "supportsActivation";
|
|
18
17
|
};
|
|
19
|
-
is: (valueId: import("@zwave-js/core
|
|
18
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
20
19
|
readonly meta: Readonly<{
|
|
21
20
|
readonly type: "any";
|
|
22
21
|
readonly readable: true;
|
|
@@ -41,7 +40,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
41
40
|
readonly endpoint: number;
|
|
42
41
|
readonly property: "firmwareUpgradable";
|
|
43
42
|
};
|
|
44
|
-
is: (valueId: import("@zwave-js/core
|
|
43
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
45
44
|
readonly meta: Readonly<{
|
|
46
45
|
readonly type: "any";
|
|
47
46
|
readonly readable: true;
|
|
@@ -66,7 +65,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
66
65
|
readonly endpoint: number;
|
|
67
66
|
readonly property: "additionalFirmwareIDs";
|
|
68
67
|
};
|
|
69
|
-
is: (valueId: import("@zwave-js/core
|
|
68
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
70
69
|
readonly meta: Readonly<{
|
|
71
70
|
readonly type: "any";
|
|
72
71
|
readonly readable: true;
|
|
@@ -91,7 +90,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
91
90
|
readonly endpoint: number;
|
|
92
91
|
readonly property: "continuesToFunction";
|
|
93
92
|
};
|
|
94
|
-
is: (valueId: import("@zwave-js/core
|
|
93
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
95
94
|
readonly meta: Readonly<{
|
|
96
95
|
readonly type: "any";
|
|
97
96
|
readonly readable: true;
|
|
@@ -116,7 +115,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
116
115
|
readonly endpoint: number;
|
|
117
116
|
readonly property: "supportsResuming";
|
|
118
117
|
};
|
|
119
|
-
is: (valueId: import("@zwave-js/core
|
|
118
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
120
119
|
readonly meta: Readonly<{
|
|
121
120
|
readonly type: "any";
|
|
122
121
|
readonly readable: true;
|
|
@@ -141,7 +140,7 @@ export declare const FirmwareUpdateMetaDataCCValues: Readonly<{
|
|
|
141
140
|
readonly endpoint: number;
|
|
142
141
|
readonly property: "supportsNonSecureTransfer";
|
|
143
142
|
};
|
|
144
|
-
is: (valueId: import("@zwave-js/core
|
|
143
|
+
is: (valueId: import("@zwave-js/core").ValueID) => boolean;
|
|
145
144
|
readonly meta: Readonly<{
|
|
146
145
|
readonly type: "any";
|
|
147
146
|
readonly readable: true;
|