@zwave-js/cc 14.0.0-beta.4 → 14.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/DoorLockLoggingCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { isPrintableASCII, num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValue,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tDoorLockLoggingCommand,\n\tDoorLockLoggingEventType,\n\ttype DoorLockLoggingRecord,\n\tDoorLockLoggingRecordStatus,\n} from \"../lib/_Types.js\";\nimport { userCodeToLogString } from \"./UserCodeCC.js\";\n\ninterface DateSegments {\n\tyear: number;\n\tmonth: number;\n\tday: number;\n\thour: number;\n\tminute: number;\n\tsecond: number;\n}\n\nfunction segmentsToDate(segments: DateSegments): Date {\n\treturn new Date(\n\t\tsegments.year,\n\t\tsegments.month - 1, // JS months are 0-based.\n\t\tsegments.day,\n\t\tsegments.hour,\n\t\tsegments.minute,\n\t\tsegments.second,\n\t);\n}\n\nconst eventTypeLabel = {\n\tLockCode: \"Locked via Access Code\",\n\tUnlockCode: \"Unlocked via Access Code\",\n\tLockButton: \"Locked via Lock Button\",\n\tUnlockButton: \"Unlocked via Unlock Button\",\n\tLockCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Access Code\",\n\tUnlockCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Access Code\",\n\tIllegalCode: \"Illegal Access Code Entered\",\n\tLockManual: \"Manually Locked\",\n\tUnlockManual: \"Manually Unlocked\",\n\tLockAuto: \"Auto Locked\",\n\tUnlockAuto: \"Auto Unlocked\",\n\tLockRemoteCode: \"Locked via Remote Access Code\",\n\tUnlockRemoteCode: \"Unlocked via Remote Access Code\",\n\tLockRemote: \"Locked via Remote\",\n\tUnlockRemote: \"Unlocked via Remote\",\n\tLockRemoteCodeOutOfSchedule:\n\t\t\"Out of Schedule Lock Attempt via Remote Access Code\",\n\tUnlockRemoteCodeOutOfSchedule:\n\t\t\"Out of Schedule Unlock Attempt via Remote Access Code\",\n\tRemoteIllegalCode: \"Illegal Remote Access Code\",\n\tLockManual2: \"Manually Locked (2)\",\n\tUnlockManual2: \"Manually Unlocked (2)\",\n\tLockSecured: \"Lock Secured\",\n\tLockUnsecured: \"Lock Unsecured\",\n\tUserCodeAdded: \"User Code Added\",\n\tUserCodeDeleted: \"User Code Deleted\",\n\tAllUserCodesDeleted: \"All User Codes Deleted\",\n\tAdminCodeChanged: \"Admin Code Changed\",\n\tUserCodeChanged: \"User Code Changed\",\n\tLockReset: \"Lock Reset\",\n\tConfigurationChanged: \"Configuration Changed\",\n\tLowBattery: \"Low Battery\",\n\tNewBattery: \"New Battery Installed\",\n\tUnknown: \"Unknown\",\n} as const;\n\nconst LATEST_RECORD_NUMBER_KEY = 0;\n\nexport const DoorLockLoggingCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Door Lock Logging\"], {\n\t\t...V.staticProperty(\"recordsCount\", undefined, { internal: true }),\n\t}),\n});\n\n@API(CommandClasses[\"Door Lock Logging\"])\nexport class DoorLockLoggingCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: DoorLockLoggingCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase DoorLockLoggingCommand.RecordsSupportedGet:\n\t\t\tcase DoorLockLoggingCommand.RecordsSupportedReport:\n\t\t\tcase DoorLockLoggingCommand.RecordGet:\n\t\t\tcase DoorLockLoggingCommand.RecordReport:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tpublic async getRecordsCount(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockLoggingCommand,\n\t\t\tDoorLockLoggingCommand.RecordsSupportedGet,\n\t\t);\n\n\t\tconst cc = new DoorLockLoggingCCRecordsSupportedGet({\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\tDoorLockLoggingCCRecordsSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.recordsCount;\n\t}\n\n\t/** Retrieves the specified audit record. Defaults to the latest one. */\n\t@validateArgs()\n\tpublic async getRecord(\n\t\trecordNumber: number = LATEST_RECORD_NUMBER_KEY,\n\t): Promise<MaybeNotKnown<DoorLockLoggingRecord>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockLoggingCommand,\n\t\t\tDoorLockLoggingCommand.RecordGet,\n\t\t);\n\n\t\tconst cc = new DoorLockLoggingCCRecordGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\trecordNumber,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockLoggingCCRecordReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.record;\n\t}\n}\n\n@commandClass(CommandClasses[\"Door Lock Logging\"])\n@implementedVersion(1)\n@ccValues(DoorLockLoggingCCValues)\nexport class DoorLockLoggingCC extends CommandClass {\n\tdeclare ccCommand: DoorLockLoggingCommand;\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\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[\"Door Lock Logging\"],\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: \"querying supported number of records...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst recordsCount = await api.getRecordsCount();\n\n\t\tif (!recordsCount) {\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\"Door Lock Logging records count query timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst recordsCountLogMessage = `supports ${recordsCount} record${\n\t\t\trecordsCount === 1 ? \"\" : \"s\"\n\t\t}`;\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: recordsCountLogMessage,\n\t\t\tdirection: \"inbound\",\n\t\t});\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockLoggingCCRecordsSupportedReportOptions {\n\trecordsCount: number;\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedReport)\nexport class DoorLockLoggingCCRecordsSupportedReport extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordsSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.recordsCount = options.recordsCount;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordsSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst recordsCount = raw.payload[0];\n\n\t\treturn new DoorLockLoggingCCRecordsSupportedReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\trecordsCount,\n\t\t});\n\t}\n\n\t@ccValue(DoorLockLoggingCCValues.recordsCount)\n\tpublic readonly recordsCount: 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 no. of records\": this.recordsCount,\n\t\t\t},\n\t\t};\n\t}\n}\n\nfunction eventTypeToLabel(eventType: DoorLockLoggingEventType): string {\n\treturn (\n\t\t(eventTypeLabel as any)[DoorLockLoggingEventType[eventType]]\n\t\t\t?? `Unknown ${num2hex(eventType)}`\n\t);\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedGet)\n@expectedCCResponse(DoorLockLoggingCCRecordsSupportedReport)\nexport class DoorLockLoggingCCRecordsSupportedGet extends DoorLockLoggingCC {}\n\n// @publicAPI\nexport interface DoorLockLoggingCCRecordReportOptions {\n\trecordNumber: number;\n\trecord?: DoorLockLoggingRecord;\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordReport)\nexport class DoorLockLoggingCCRecordReport extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.recordNumber = options.recordNumber;\n\t\tthis.record = options.record;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordReport {\n\t\tvalidatePayload(raw.payload.length >= 11);\n\t\tconst recordNumber = raw.payload[0];\n\t\tconst recordStatus = raw.payload[5] >>> 5;\n\t\tlet record: DoorLockLoggingRecord | undefined;\n\t\tif (recordStatus !== DoorLockLoggingRecordStatus.Empty) {\n\t\t\tconst dateSegments = {\n\t\t\t\tyear: raw.payload.readUInt16BE(1),\n\t\t\t\tmonth: raw.payload[3],\n\t\t\t\tday: raw.payload[4],\n\t\t\t\thour: raw.payload[5] & 0b11111,\n\t\t\t\tminute: raw.payload[6],\n\t\t\t\tsecond: raw.payload[7],\n\t\t\t};\n\n\t\t\tconst eventType = raw.payload[8];\n\t\t\tconst recordUserID = raw.payload[9];\n\t\t\tconst userCodeLength = raw.payload[10];\n\t\t\tvalidatePayload(\n\t\t\t\tuserCodeLength <= 10,\n\t\t\t\traw.payload.length >= 11 + userCodeLength,\n\t\t\t);\n\n\t\t\tconst userCodeBuffer = raw.payload.subarray(\n\t\t\t\t11,\n\t\t\t\t11 + userCodeLength,\n\t\t\t);\n\t\t\t// See User Code CC for a detailed description. We try to parse the code as ASCII if possible\n\t\t\t// and fall back to a buffer otherwise.\n\t\t\tconst userCodeString = userCodeBuffer.toString(\"utf8\");\n\t\t\tconst userCode = isPrintableASCII(userCodeString)\n\t\t\t\t? userCodeString\n\t\t\t\t: userCodeBuffer;\n\n\t\t\trecord = {\n\t\t\t\teventType: eventType,\n\t\t\t\tlabel: eventTypeToLabel(eventType),\n\t\t\t\ttimestamp: segmentsToDate(dateSegments).toISOString(),\n\t\t\t\tuserId: recordUserID,\n\t\t\t\tuserCode,\n\t\t\t};\n\t\t}\n\n\t\treturn new DoorLockLoggingCCRecordReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\trecordNumber,\n\t\t\trecord,\n\t\t});\n\t}\n\n\tpublic readonly recordNumber: number;\n\tpublic readonly record?: DoorLockLoggingRecord;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tlet message: MessageRecord;\n\n\t\tif (!this.record) {\n\t\t\tmessage = {\n\t\t\t\t\"record #\": `${this.recordNumber} (empty)`,\n\t\t\t};\n\t\t} else {\n\t\t\tmessage = {\n\t\t\t\t\"record #\": `${this.recordNumber}`,\n\t\t\t\t\"event type\": this.record.label,\n\t\t\t\ttimestamp: this.record.timestamp,\n\t\t\t};\n\t\t\tif (this.record.userId) {\n\t\t\t\tmessage[\"user ID\"] = this.record.userId;\n\t\t\t}\n\t\t\tif (this.record.userCode) {\n\t\t\t\tmessage[\"user code\"] = userCodeToLogString(\n\t\t\t\t\tthis.record.userCode,\n\t\t\t\t);\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 DoorLockLoggingCCRecordGetOptions {\n\trecordNumber: number;\n}\n\nfunction testResponseForDoorLockLoggingRecordGet(\n\tsent: DoorLockLoggingCCRecordGet,\n\treceived: DoorLockLoggingCCRecordReport,\n) {\n\treturn (\n\t\tsent.recordNumber === LATEST_RECORD_NUMBER_KEY\n\t\t|| sent.recordNumber === received.recordNumber\n\t);\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordGet)\n@expectedCCResponse(\n\tDoorLockLoggingCCRecordReport,\n\ttestResponseForDoorLockLoggingRecordGet,\n)\nexport class DoorLockLoggingCCRecordGet extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.recordNumber = options.recordNumber;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordGet {\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 DoorLockLoggingCCRecordGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic recordNumber: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.recordNumber]);\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: { \"record number\": this.recordNumber },\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAUO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAA0C;AAE1C,iBAAqC;AACrC,0BAKO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAKO;AACP,wBAAoC
|
|
6
|
-
"names": ["import_safe"
|
|
4
|
+
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { isPrintableASCII, num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tDoorLockLoggingCommand,\n\tDoorLockLoggingEventType,\n\ttype DoorLockLoggingRecord,\n\tDoorLockLoggingRecordStatus,\n} from \"../lib/_Types.js\";\nimport { userCodeToLogString } from \"./UserCodeCC.js\";\n\ninterface DateSegments {\n\tyear: number;\n\tmonth: number;\n\tday: number;\n\thour: number;\n\tminute: number;\n\tsecond: number;\n}\n\nfunction segmentsToDate(segments: DateSegments): Date {\n\treturn new Date(\n\t\tsegments.year,\n\t\tsegments.month - 1, // JS months are 0-based.\n\t\tsegments.day,\n\t\tsegments.hour,\n\t\tsegments.minute,\n\t\tsegments.second,\n\t);\n}\n\nconst eventTypeLabel = {\n\tLockCode: \"Locked via Access Code\",\n\tUnlockCode: \"Unlocked via Access Code\",\n\tLockButton: \"Locked via Lock Button\",\n\tUnlockButton: \"Unlocked via Unlock Button\",\n\tLockCodeOutOfSchedule: \"Out of Schedule Lock Attempt via Access Code\",\n\tUnlockCodeOutOfSchedule: \"Out of Schedule Unlock Attempt via Access Code\",\n\tIllegalCode: \"Illegal Access Code Entered\",\n\tLockManual: \"Manually Locked\",\n\tUnlockManual: \"Manually Unlocked\",\n\tLockAuto: \"Auto Locked\",\n\tUnlockAuto: \"Auto Unlocked\",\n\tLockRemoteCode: \"Locked via Remote Access Code\",\n\tUnlockRemoteCode: \"Unlocked via Remote Access Code\",\n\tLockRemote: \"Locked via Remote\",\n\tUnlockRemote: \"Unlocked via Remote\",\n\tLockRemoteCodeOutOfSchedule:\n\t\t\"Out of Schedule Lock Attempt via Remote Access Code\",\n\tUnlockRemoteCodeOutOfSchedule:\n\t\t\"Out of Schedule Unlock Attempt via Remote Access Code\",\n\tRemoteIllegalCode: \"Illegal Remote Access Code\",\n\tLockManual2: \"Manually Locked (2)\",\n\tUnlockManual2: \"Manually Unlocked (2)\",\n\tLockSecured: \"Lock Secured\",\n\tLockUnsecured: \"Lock Unsecured\",\n\tUserCodeAdded: \"User Code Added\",\n\tUserCodeDeleted: \"User Code Deleted\",\n\tAllUserCodesDeleted: \"All User Codes Deleted\",\n\tAdminCodeChanged: \"Admin Code Changed\",\n\tUserCodeChanged: \"User Code Changed\",\n\tLockReset: \"Lock Reset\",\n\tConfigurationChanged: \"Configuration Changed\",\n\tLowBattery: \"Low Battery\",\n\tNewBattery: \"New Battery Installed\",\n\tUnknown: \"Unknown\",\n} as const;\n\nconst LATEST_RECORD_NUMBER_KEY = 0;\n\nexport const DoorLockLoggingCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Door Lock Logging\"], {\n\t\t...V.staticProperty(\"recordsCount\", undefined, { internal: true }),\n\t}),\n});\n\n@API(CommandClasses[\"Door Lock Logging\"])\nexport class DoorLockLoggingCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: DoorLockLoggingCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase DoorLockLoggingCommand.RecordsSupportedGet:\n\t\t\tcase DoorLockLoggingCommand.RecordsSupportedReport:\n\t\t\tcase DoorLockLoggingCommand.RecordGet:\n\t\t\tcase DoorLockLoggingCommand.RecordReport:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tpublic async getRecordsCount(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockLoggingCommand,\n\t\t\tDoorLockLoggingCommand.RecordsSupportedGet,\n\t\t);\n\n\t\tconst cc = new DoorLockLoggingCCRecordsSupportedGet({\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\tDoorLockLoggingCCRecordsSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.recordsCount;\n\t}\n\n\t/** Retrieves the specified audit record. Defaults to the latest one. */\n\t@validateArgs()\n\tpublic async getRecord(\n\t\trecordNumber: number = LATEST_RECORD_NUMBER_KEY,\n\t): Promise<MaybeNotKnown<DoorLockLoggingRecord>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tDoorLockLoggingCommand,\n\t\t\tDoorLockLoggingCommand.RecordGet,\n\t\t);\n\n\t\tconst cc = new DoorLockLoggingCCRecordGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\trecordNumber,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tDoorLockLoggingCCRecordReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.record;\n\t}\n}\n\n@commandClass(CommandClasses[\"Door Lock Logging\"])\n@implementedVersion(1)\n@ccValues(DoorLockLoggingCCValues)\nexport class DoorLockLoggingCC extends CommandClass {\n\tdeclare ccCommand: DoorLockLoggingCommand;\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\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[\"Door Lock Logging\"],\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: \"querying supported number of records...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst recordsCount = await api.getRecordsCount();\n\n\t\tif (!recordsCount) {\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\"Door Lock Logging records count query timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst recordsCountLogMessage = `supports ${recordsCount} record${\n\t\t\trecordsCount === 1 ? \"\" : \"s\"\n\t\t}`;\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: recordsCountLogMessage,\n\t\t\tdirection: \"inbound\",\n\t\t});\n\t}\n}\n\n// @publicAPI\nexport interface DoorLockLoggingCCRecordsSupportedReportOptions {\n\trecordsCount: number;\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedReport)\n@ccValueProperty(\"recordsCount\", DoorLockLoggingCCValues.recordsCount)\nexport class DoorLockLoggingCCRecordsSupportedReport extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordsSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.recordsCount = options.recordsCount;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordsSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst recordsCount = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\trecordsCount,\n\t\t});\n\t}\n\n\tpublic readonly recordsCount: 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 no. of records\": this.recordsCount,\n\t\t\t},\n\t\t};\n\t}\n}\n\nfunction eventTypeToLabel(eventType: DoorLockLoggingEventType): string {\n\treturn (\n\t\t(eventTypeLabel as any)[DoorLockLoggingEventType[eventType]]\n\t\t\t?? `Unknown ${num2hex(eventType)}`\n\t);\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordsSupportedGet)\n@expectedCCResponse(DoorLockLoggingCCRecordsSupportedReport)\nexport class DoorLockLoggingCCRecordsSupportedGet extends DoorLockLoggingCC {}\n\n// @publicAPI\nexport interface DoorLockLoggingCCRecordReportOptions {\n\trecordNumber: number;\n\trecord?: DoorLockLoggingRecord;\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordReport)\nexport class DoorLockLoggingCCRecordReport extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.recordNumber = options.recordNumber;\n\t\tthis.record = options.record;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordReport {\n\t\tvalidatePayload(raw.payload.length >= 11);\n\t\tconst recordNumber = raw.payload[0];\n\t\tconst recordStatus = raw.payload[5] >>> 5;\n\t\tlet record: DoorLockLoggingRecord | undefined;\n\t\tif (recordStatus !== DoorLockLoggingRecordStatus.Empty) {\n\t\t\tconst dateSegments = {\n\t\t\t\tyear: raw.payload.readUInt16BE(1),\n\t\t\t\tmonth: raw.payload[3],\n\t\t\t\tday: raw.payload[4],\n\t\t\t\thour: raw.payload[5] & 0b11111,\n\t\t\t\tminute: raw.payload[6],\n\t\t\t\tsecond: raw.payload[7],\n\t\t\t};\n\n\t\t\tconst eventType = raw.payload[8];\n\t\t\tconst recordUserID = raw.payload[9];\n\t\t\tconst userCodeLength = raw.payload[10];\n\t\t\tvalidatePayload(\n\t\t\t\tuserCodeLength <= 10,\n\t\t\t\traw.payload.length >= 11 + userCodeLength,\n\t\t\t);\n\n\t\t\tconst userCodeBuffer = raw.payload.subarray(\n\t\t\t\t11,\n\t\t\t\t11 + userCodeLength,\n\t\t\t);\n\t\t\t// See User Code CC for a detailed description. We try to parse the code as ASCII if possible\n\t\t\t// and fall back to a buffer otherwise.\n\t\t\tconst userCodeString = userCodeBuffer.toString(\"utf8\");\n\t\t\tconst userCode = isPrintableASCII(userCodeString)\n\t\t\t\t? userCodeString\n\t\t\t\t: userCodeBuffer;\n\n\t\t\trecord = {\n\t\t\t\teventType: eventType,\n\t\t\t\tlabel: eventTypeToLabel(eventType),\n\t\t\t\ttimestamp: segmentsToDate(dateSegments).toISOString(),\n\t\t\t\tuserId: recordUserID,\n\t\t\t\tuserCode,\n\t\t\t};\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\trecordNumber,\n\t\t\trecord,\n\t\t});\n\t}\n\n\tpublic readonly recordNumber: number;\n\tpublic readonly record?: DoorLockLoggingRecord;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tlet message: MessageRecord;\n\n\t\tif (!this.record) {\n\t\t\tmessage = {\n\t\t\t\t\"record #\": `${this.recordNumber} (empty)`,\n\t\t\t};\n\t\t} else {\n\t\t\tmessage = {\n\t\t\t\t\"record #\": `${this.recordNumber}`,\n\t\t\t\t\"event type\": this.record.label,\n\t\t\t\ttimestamp: this.record.timestamp,\n\t\t\t};\n\t\t\tif (this.record.userId) {\n\t\t\t\tmessage[\"user ID\"] = this.record.userId;\n\t\t\t}\n\t\t\tif (this.record.userCode) {\n\t\t\t\tmessage[\"user code\"] = userCodeToLogString(\n\t\t\t\t\tthis.record.userCode,\n\t\t\t\t);\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 DoorLockLoggingCCRecordGetOptions {\n\trecordNumber: number;\n}\n\nfunction testResponseForDoorLockLoggingRecordGet(\n\tsent: DoorLockLoggingCCRecordGet,\n\treceived: DoorLockLoggingCCRecordReport,\n) {\n\treturn (\n\t\tsent.recordNumber === LATEST_RECORD_NUMBER_KEY\n\t\t|| sent.recordNumber === received.recordNumber\n\t);\n}\n\n@CCCommand(DoorLockLoggingCommand.RecordGet)\n@expectedCCResponse(\n\tDoorLockLoggingCCRecordReport,\n\ttestResponseForDoorLockLoggingRecordGet,\n)\nexport class DoorLockLoggingCCRecordGet extends DoorLockLoggingCC {\n\tpublic constructor(\n\t\toptions: WithAddress<DoorLockLoggingCCRecordGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.recordNumber = options.recordNumber;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): DoorLockLoggingCCRecordGet {\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 DoorLockLoggingCCRecordGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic recordNumber: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.recordNumber]);\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: { \"record number\": this.recordNumber },\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAUO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAA0C;AAE1C,iBAAqC;AACrC,0BAKO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAKO;AACP,wBAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWpC,SAAS,eAAe,UAAsB;AAC7C,SAAO,IAAI;IACV,SAAS;IACT,SAAS,QAAQ;;IACjB,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;EAAM;AAEjB;AAEA,MAAM,iBAAiB;EACtB,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,uBAAuB;EACvB,yBAAyB;EACzB,aAAa;EACb,YAAY;EACZ,cAAc;EACd,UAAU;EACV,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,YAAY;EACZ,cAAc;EACd,6BACC;EACD,+BACC;EACD,mBAAmB;EACnB,aAAa;EACb,e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Q,WAAW,QAAI,uCACtB,KAAK,OAAO,QAAQ;QAEtB;MACD;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;AAQD,SAAS,wCACR,MACA,UAAuC;AAEvC,SACC,KAAK,iBAAiB,4BACnB,KAAK,iBAAiB,SAAS;AAEpC;IAOa,8BAA0B,MAAA;8BALtC,yCAAU,oCAAuB,SAAS,OAC1C,kDACA,+BACA,uCAAuC,CACvC;;;;oBAC+C;kDAAA,YAAiB;;;;;;AAAjE,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,SAAuD;AAEvD,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAC7B;IAEO,OAAO,KACb,MACA,MAAsB;AAEtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,YAAY,CAAC;AAC7C,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,iBAAiB,KAAK,aAAY;;IAE/C;;;;",
|
|
6
|
+
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -32,13 +32,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
32
32
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
33
33
|
var import_Values = require("../lib/Values.js");
|
|
34
34
|
var import_Types = require("../lib/_Types.js");
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
36
|
+
function accept(f) {
|
|
37
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
38
|
+
return f;
|
|
39
|
+
}
|
|
40
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
41
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
42
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
43
|
+
var _, done = false;
|
|
44
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
45
|
+
var context = {};
|
|
46
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
47
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
48
|
+
context.addInitializer = function(f) {
|
|
49
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
50
|
+
extraInitializers.push(accept(f || null));
|
|
51
|
+
};
|
|
52
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
53
|
+
if (kind === "accessor") {
|
|
54
|
+
if (result === void 0) continue;
|
|
55
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
56
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
57
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
58
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
59
|
+
} else if (_ = accept(result)) {
|
|
60
|
+
if (kind === "field") initializers.unshift(_);
|
|
61
|
+
else descriptor[key] = _;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
65
|
+
done = true;
|
|
66
|
+
};
|
|
67
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
68
|
+
var useValue = arguments.length > 2;
|
|
69
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
70
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
71
|
+
}
|
|
72
|
+
return useValue ? value : void 0;
|
|
40
73
|
};
|
|
41
|
-
var EnergyProductionCCReport_1, EnergyProductionCCGet_1;
|
|
42
74
|
function __assertType(argName, typeName, boundHasError) {
|
|
43
75
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
44
76
|
if (boundHasError()) {
|
|
@@ -64,171 +96,228 @@ const EnergyProductionCCValues = Object.freeze({
|
|
|
64
96
|
}))
|
|
65
97
|
})
|
|
66
98
|
});
|
|
67
|
-
let EnergyProductionCCAPI =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
99
|
+
let EnergyProductionCCAPI = (() => {
|
|
100
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Energy Production"])];
|
|
101
|
+
let _classDescriptor;
|
|
102
|
+
let _classExtraInitializers = [];
|
|
103
|
+
let _classThis;
|
|
104
|
+
let _classSuper = import_API.CCAPI;
|
|
105
|
+
var EnergyProductionCCAPI2 = class extends _classSuper {
|
|
106
|
+
static {
|
|
107
|
+
_classThis = this;
|
|
72
108
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
109
|
+
static {
|
|
110
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
111
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
112
|
+
EnergyProductionCCAPI2 = _classThis = _classDescriptor.value;
|
|
113
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
114
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
115
|
+
}
|
|
116
|
+
supportsCommand(cmd) {
|
|
117
|
+
switch (cmd) {
|
|
118
|
+
case import_Types.EnergyProductionCommand.Get:
|
|
119
|
+
return true;
|
|
85
120
|
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
async get(parameter) {
|
|
89
|
-
__assertType("parameter", "EnergyProductionParameter", __assertType__EnergyProductionParameter.bind(void 0, parameter));
|
|
90
|
-
this.assertSupportsCommand(import_Types.EnergyProductionCommand, import_Types.EnergyProductionCommand.Get);
|
|
91
|
-
const cc = new EnergyProductionCCGet({
|
|
92
|
-
nodeId: this.endpoint.nodeId,
|
|
93
|
-
endpointIndex: this.endpoint.index,
|
|
94
|
-
parameter
|
|
95
|
-
});
|
|
96
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
97
|
-
if (response) {
|
|
98
|
-
return (0, import_shared.pick)(response, ["value", "scale"]);
|
|
121
|
+
return super.supportsCommand(cmd);
|
|
99
122
|
}
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
get [import_API.POLL_VALUE]() {
|
|
124
|
+
return async function({ property, propertyKey }) {
|
|
125
|
+
if (EnergyProductionCCValues.value.is({
|
|
126
|
+
commandClass: this.ccId,
|
|
127
|
+
property,
|
|
128
|
+
propertyKey
|
|
129
|
+
})) {
|
|
130
|
+
return (await this.get(property))?.value;
|
|
131
|
+
} else {
|
|
132
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async get(parameter) {
|
|
137
|
+
__assertType("parameter", "EnergyProductionParameter", __assertType__EnergyProductionParameter.bind(void 0, parameter));
|
|
138
|
+
this.assertSupportsCommand(import_Types.EnergyProductionCommand, import_Types.EnergyProductionCommand.Get);
|
|
139
|
+
const cc = new EnergyProductionCCGet({
|
|
140
|
+
nodeId: this.endpoint.nodeId,
|
|
141
|
+
endpointIndex: this.endpoint.index,
|
|
142
|
+
parameter
|
|
143
|
+
});
|
|
144
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
145
|
+
if (response) {
|
|
146
|
+
return (0, import_shared.pick)(response, ["value", "scale"]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return EnergyProductionCCAPI2 = _classThis;
|
|
151
|
+
})();
|
|
152
|
+
let EnergyProductionCC = (() => {
|
|
153
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Energy Production"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(EnergyProductionCCValues)];
|
|
154
|
+
let _classDescriptor;
|
|
155
|
+
let _classExtraInitializers = [];
|
|
156
|
+
let _classThis;
|
|
157
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
158
|
+
var EnergyProductionCC2 = class extends _classSuper {
|
|
159
|
+
static {
|
|
160
|
+
_classThis = this;
|
|
161
|
+
}
|
|
162
|
+
static {
|
|
163
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
164
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
165
|
+
EnergyProductionCC2 = _classThis = _classDescriptor.value;
|
|
166
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
167
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
168
|
+
}
|
|
169
|
+
async interview(ctx) {
|
|
170
|
+
const node = this.getNode(ctx);
|
|
128
171
|
ctx.logNode(node.id, {
|
|
129
172
|
endpoint: this.endpointIndex,
|
|
130
|
-
message: `
|
|
131
|
-
direction: "
|
|
173
|
+
message: `Interviewing ${this.ccName}...`,
|
|
174
|
+
direction: "none"
|
|
132
175
|
});
|
|
133
|
-
await
|
|
176
|
+
await this.refreshValues(ctx);
|
|
177
|
+
this.setInterviewComplete(ctx, true);
|
|
134
178
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const scale = (0, import_Types.getEnergyProductionScale)(parameter, rawScale);
|
|
154
|
-
return new EnergyProductionCCReport_1({
|
|
155
|
-
nodeId: ctx.sourceNodeId,
|
|
156
|
-
parameter,
|
|
157
|
-
value,
|
|
158
|
-
scale
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
parameter;
|
|
162
|
-
scale;
|
|
163
|
-
value;
|
|
164
|
-
persistValues(ctx) {
|
|
165
|
-
if (!super.persistValues(ctx))
|
|
166
|
-
return false;
|
|
167
|
-
const valueValue = EnergyProductionCCValues.value(this.parameter);
|
|
168
|
-
this.setMetadata(ctx, valueValue, {
|
|
169
|
-
...valueValue.meta,
|
|
170
|
-
unit: this.scale.unit,
|
|
171
|
-
ccSpecific: {
|
|
172
|
-
parameter: this.parameter,
|
|
173
|
-
scale: this.scale.key
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
this.setValue(ctx, valueValue, this.value);
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
serialize(ctx) {
|
|
180
|
-
this.payload = import_shared.Bytes.concat([
|
|
181
|
-
import_shared.Bytes.from([this.parameter]),
|
|
182
|
-
(0, import_core.encodeFloatWithScale)(this.value, this.scale.key)
|
|
183
|
-
]);
|
|
184
|
-
return super.serialize(ctx);
|
|
185
|
-
}
|
|
186
|
-
toLogEntry(ctx) {
|
|
187
|
-
return {
|
|
188
|
-
...super.toLogEntry(ctx),
|
|
189
|
-
message: {
|
|
190
|
-
[(0, import_shared.getEnumMemberName)(import_Types.EnergyProductionParameter, this.parameter).toLowerCase()]: `${this.value} ${this.scale.unit}`
|
|
179
|
+
async refreshValues(ctx) {
|
|
180
|
+
const node = this.getNode(ctx);
|
|
181
|
+
const endpoint = this.getEndpoint(ctx);
|
|
182
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses["Energy Production"], ctx, endpoint).withOptions({
|
|
183
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
184
|
+
});
|
|
185
|
+
for (const parameter of [
|
|
186
|
+
import_Types.EnergyProductionParameter.Power,
|
|
187
|
+
import_Types.EnergyProductionParameter["Production Total"],
|
|
188
|
+
import_Types.EnergyProductionParameter["Production Today"],
|
|
189
|
+
import_Types.EnergyProductionParameter["Total Time"]
|
|
190
|
+
]) {
|
|
191
|
+
ctx.logNode(node.id, {
|
|
192
|
+
endpoint: this.endpointIndex,
|
|
193
|
+
message: `querying energy production (${(0, import_shared.getEnumMemberName)(import_Types.EnergyProductionParameter, parameter)})...`,
|
|
194
|
+
direction: "outbound"
|
|
195
|
+
});
|
|
196
|
+
await api.get(parameter);
|
|
191
197
|
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return EnergyProductionCC2 = _classThis;
|
|
201
|
+
})();
|
|
202
|
+
let EnergyProductionCCReport = (() => {
|
|
203
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EnergyProductionCommand.Report)];
|
|
204
|
+
let _classDescriptor;
|
|
205
|
+
let _classExtraInitializers = [];
|
|
206
|
+
let _classThis;
|
|
207
|
+
let _classSuper = EnergyProductionCC;
|
|
208
|
+
var EnergyProductionCCReport2 = class extends _classSuper {
|
|
209
|
+
static {
|
|
210
|
+
_classThis = this;
|
|
211
|
+
}
|
|
212
|
+
static {
|
|
213
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
214
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
215
|
+
EnergyProductionCCReport2 = _classThis = _classDescriptor.value;
|
|
216
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
217
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
218
|
+
}
|
|
219
|
+
constructor(options) {
|
|
220
|
+
super(options);
|
|
221
|
+
this.parameter = options.parameter;
|
|
222
|
+
this.value = options.value;
|
|
223
|
+
this.scale = options.scale;
|
|
224
|
+
}
|
|
225
|
+
static from(raw, ctx) {
|
|
226
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
227
|
+
const parameter = raw.payload[0];
|
|
228
|
+
const { value, scale: rawScale } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(1));
|
|
229
|
+
const scale = (0, import_Types.getEnergyProductionScale)(parameter, rawScale);
|
|
230
|
+
return new this({
|
|
231
|
+
nodeId: ctx.sourceNodeId,
|
|
232
|
+
parameter,
|
|
233
|
+
value,
|
|
234
|
+
scale
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
parameter;
|
|
238
|
+
scale;
|
|
239
|
+
value;
|
|
240
|
+
persistValues(ctx) {
|
|
241
|
+
if (!super.persistValues(ctx))
|
|
242
|
+
return false;
|
|
243
|
+
const valueValue = EnergyProductionCCValues.value(this.parameter);
|
|
244
|
+
this.setMetadata(ctx, valueValue, {
|
|
245
|
+
...valueValue.meta,
|
|
246
|
+
unit: this.scale.unit,
|
|
247
|
+
ccSpecific: {
|
|
248
|
+
parameter: this.parameter,
|
|
249
|
+
scale: this.scale.key
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
this.setValue(ctx, valueValue, this.value);
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
serialize(ctx) {
|
|
256
|
+
this.payload = import_shared.Bytes.concat([
|
|
257
|
+
import_shared.Bytes.from([this.parameter]),
|
|
258
|
+
(0, import_core.encodeFloatWithScale)(this.value, this.scale.key)
|
|
259
|
+
]);
|
|
260
|
+
return super.serialize(ctx);
|
|
261
|
+
}
|
|
262
|
+
toLogEntry(ctx) {
|
|
263
|
+
return {
|
|
264
|
+
...super.toLogEntry(ctx),
|
|
265
|
+
message: {
|
|
266
|
+
[(0, import_shared.getEnumMemberName)(import_Types.EnergyProductionParameter, this.parameter).toLowerCase()]: `${this.value} ${this.scale.unit}`
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
return EnergyProductionCCReport2 = _classThis;
|
|
272
|
+
})();
|
|
198
273
|
function testResponseForEnergyProductionGet(sent, received) {
|
|
199
274
|
return received.parameter === sent.parameter;
|
|
200
275
|
}
|
|
201
|
-
let EnergyProductionCCGet =
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
276
|
+
let EnergyProductionCCGet = (() => {
|
|
277
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EnergyProductionCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(EnergyProductionCCReport, testResponseForEnergyProductionGet)];
|
|
278
|
+
let _classDescriptor;
|
|
279
|
+
let _classExtraInitializers = [];
|
|
280
|
+
let _classThis;
|
|
281
|
+
let _classSuper = EnergyProductionCC;
|
|
282
|
+
var EnergyProductionCCGet2 = class extends _classSuper {
|
|
283
|
+
static {
|
|
284
|
+
_classThis = this;
|
|
285
|
+
}
|
|
286
|
+
static {
|
|
287
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
288
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
289
|
+
EnergyProductionCCGet2 = _classThis = _classDescriptor.value;
|
|
290
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
291
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
292
|
+
}
|
|
293
|
+
constructor(options) {
|
|
294
|
+
super(options);
|
|
295
|
+
this.parameter = options.parameter;
|
|
296
|
+
}
|
|
297
|
+
static from(raw, ctx) {
|
|
298
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
299
|
+
const parameter = raw.payload[0];
|
|
300
|
+
return new this({
|
|
301
|
+
nodeId: ctx.sourceNodeId,
|
|
302
|
+
parameter
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
parameter;
|
|
306
|
+
serialize(ctx) {
|
|
307
|
+
this.payload = import_shared.Bytes.from([this.parameter]);
|
|
308
|
+
return super.serialize(ctx);
|
|
309
|
+
}
|
|
310
|
+
toLogEntry(ctx) {
|
|
311
|
+
return {
|
|
312
|
+
...super.toLogEntry(ctx),
|
|
313
|
+
message: {
|
|
314
|
+
parameter: (0, import_shared.getEnumMemberName)(import_Types.EnergyProductionParameter, this.parameter)
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
return EnergyProductionCCGet2 = _classThis;
|
|
320
|
+
})();
|
|
232
321
|
// Annotate the CommonJS export names for ESM import in node:
|
|
233
322
|
0 && (module.exports = {
|
|
234
323
|
EnergyProductionCC,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/EnergyProductionCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeFloatWithScale,\n\tparseFloatWithScale,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { type MaybeNotKnown } from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host\";\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 = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Energy Production\"], {\n\t\t// Static CC values go here\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Energy Production\"], {\n\t\t// Dynamic CC values go here\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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBASO;AAOP,oBAA+C;AAE/C,iBAKO;AACP,0BAMO;AACP,oCAOO;AACP,oBAAkB;AAClB,mBAKO
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeFloatWithScale,\n\tparseFloatWithScale,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { type MaybeNotKnown } from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host\";\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 = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Energy Production\"], {\n\t\t// Static CC values go here\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Energy Production\"], {\n\t\t// Dynamic CC values go here\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): 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): 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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBASO;AAOP,oBAA+C;AAE/C,iBAKO;AACP,0BAMO;AACP,oCAOO;AACP,oBAAkB;AAClB,mBAKO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,2BAA2B,OAAO,OAAO;EACrD,GAAG,gBAAE,qBAAqB,2BAAe,mBAAmB,GAAG;;GAE9D;EAED,GAAG,gBAAE,sBAAsB,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