@zwave-js/cc 15.27.1 → 15.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.js +6 -5
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +5 -5
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +4 -1
- package/build/cjs/cc/BasicCC.js +18 -0
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.js +18 -4
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.js +5 -1
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +4 -1
- package/build/cjs/cc/BinarySwitchCC.js +18 -0
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.d.ts +3 -2
- package/build/cjs/cc/CRC16CC.js +7 -1
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +1 -4
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.js +16 -8
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.js +1 -1
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +4 -16
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -4
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.js +5 -8
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.d.ts +1 -0
- package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.js +13 -0
- package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +6 -4
- package/build/cjs/cc/ManufacturerSpecificCC.js +41 -8
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.js +18 -29
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +11 -7
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +3 -1
- package/build/cjs/cc/MultiChannelCC.js +21 -10
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +5 -1
- package/build/cjs/cc/MultilevelSwitchCC.js +30 -0
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +29 -11
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC.js +2 -0
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +2 -1
- package/build/cjs/cc/Security2CC.js +31 -3
- package/build/cjs/cc/Security2CC.js.map +2 -2
- package/build/cjs/cc/SecurityCC.d.ts +3 -2
- package/build/cjs/cc/SecurityCC.js +7 -6
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.js +6 -6
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +2 -1
- package/build/cjs/cc/SupervisionCC.js +6 -0
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +1 -3
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +4 -1
- package/build/cjs/cc/ThermostatSetpointCC.js +18 -0
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.js +3 -6
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/UserCredentialCC.js +8 -6
- package/build/cjs/cc/UserCredentialCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +5 -1
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +3 -11
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +4 -4
- package/build/cjs/cc/_CCValues.generated.js +1 -1
- package/build/cjs/cc/_CCValues.generated.js.map +2 -2
- package/build/cjs/cc/index.d.ts +179 -179
- package/build/cjs/cc/index.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +2 -2
- package/build/cjs/lib/API.d.ts +3 -2
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +23 -1
- package/build/cjs/lib/CommandClass.js +63 -15
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/EncapsulatingCommandClass.js.map +2 -2
- package/build/cjs/lib/NotificationEventPayload.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +1 -4
- package/build/cjs/lib/Security2/Extension.js.map +2 -2
- package/build/cjs/lib/Security2/shared.js.map +2 -2
- package/build/cjs/lib/SetValueResult.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +1 -1
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_CCAPI.generated.js.map +1 -1
- package/build/cjs/lib/_Types.d.ts +34 -30
- package/build/cjs/lib/_Types.js +7 -0
- package/build/cjs/lib/_Types.js.map +3 -3
- package/build/cjs/lib/serializers.js +1 -4
- package/build/cjs/lib/serializers.js.map +2 -2
- package/build/cjs/lib/utils.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +1 -2
- 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 +8 -7
- 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 +11 -12
- 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 +10 -9
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +4 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +30 -7
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.js +2 -5
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +17 -14
- 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 +12 -7
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +4 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +31 -6
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +3 -2
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +10 -4
- 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 +2 -1
- 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 +6 -2
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +6 -2
- 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 +17 -20
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +37 -33
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -2
- 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 +26 -30
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +10 -7
- 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 +15 -27
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +8 -9
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +27 -42
- 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 +8 -6
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +1 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts +1 -0
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.js +10 -0
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +6 -4
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +54 -17
- 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 +28 -38
- 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 +15 -20
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +3 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +28 -22
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +11 -11
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +5 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +56 -16
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +66 -55
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +13 -9
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +5 -8
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +10 -16
- 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 +13 -20
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +2 -1
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +68 -32
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +3 -2
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +16 -11
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -2
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +2 -1
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +13 -6
- 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 +1 -2
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +1 -3
- 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 +1 -2
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +4 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +31 -19
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +6 -2
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +8 -8
- 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 +23 -30
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
- package/build/esm/cc/UserCredentialCC.js +49 -60
- package/build/esm/cc/UserCredentialCC.js.map +1 -1
- package/build/esm/cc/VersionCC.js +3 -3
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +10 -9
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +5 -26
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +4 -4
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +638 -679
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/index.d.ts +179 -179
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js +124 -124
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/esm/lib/API.d.ts +3 -2
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +23 -1
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +61 -20
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -2
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -1
- package/build/esm/lib/NotificationEventPayload.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -6
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Security2/shared.d.ts.map +1 -1
- package/build/esm/lib/Security2/shared.js.map +1 -1
- package/build/esm/lib/SetValueResult.d.ts.map +1 -1
- package/build/esm/lib/Values.d.ts +1 -1
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -1
- package/build/esm/lib/_Types.d.ts +34 -30
- package/build/esm/lib/_Types.d.ts.map +1 -1
- package/build/esm/lib/_Types.js +5 -0
- package/build/esm/lib/_Types.js.map +1 -1
- package/build/esm/lib/serializers.d.ts.map +1 -1
- package/build/esm/lib/serializers.js +1 -4
- package/build/esm/lib/serializers.js.map +1 -1
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +25 -31
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +7 -7
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var ManufacturerSpecificCC_validateArgs_exports = {};
|
|
31
31
|
__export(ManufacturerSpecificCC_validateArgs_exports, {
|
|
32
32
|
validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet: () => validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet,
|
|
33
|
+
validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport: () => validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport,
|
|
33
34
|
validateArgs_ManufacturerSpecificCCAPI_sendReport: () => validateArgs_ManufacturerSpecificCCAPI_sendReport
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(ManufacturerSpecificCC_validateArgs_exports);
|
|
@@ -56,9 +57,21 @@ function validateArgs_ManufacturerSpecificCCAPI_sendReport() {
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
__name(validateArgs_ManufacturerSpecificCCAPI_sendReport, "validateArgs_ManufacturerSpecificCCAPI_sendReport");
|
|
60
|
+
function validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport() {
|
|
61
|
+
return (__decoratedMethod, { kind }) => {
|
|
62
|
+
if (kind === "method") {
|
|
63
|
+
return /* @__PURE__ */ __name(function sendDeviceSpecificReport(options) {
|
|
64
|
+
v.assert(v.object({ kind: "parameter", name: "options" }, "ManufacturerSpecificCCDeviceSpecificReportOptions", { "type": v.enum({ kind: "property", name: "type" }, "DeviceIdType"), "deviceId": v.oneOf({ kind: "property", name: "deviceId" }, void 0, v.primitive({ kind: "property", name: "deviceId" }, "string"), v.uint8array({ kind: "property", name: "deviceId" })) })(options));
|
|
65
|
+
return __decoratedMethod.call(this, options);
|
|
66
|
+
}, "sendDeviceSpecificReport");
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
__name(validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport, "validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport");
|
|
59
71
|
// Annotate the CommonJS export names for ESM import in node:
|
|
60
72
|
0 && (module.exports = {
|
|
61
73
|
validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet,
|
|
74
|
+
validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport,
|
|
62
75
|
validateArgs_ManufacturerSpecificCCAPI_sendReport
|
|
63
76
|
});
|
|
64
77
|
//# sourceMappingURL=ManufacturerSpecificCC._validateArgs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ManufacturerSpecificCC._validateArgs.ts"],
|
|
4
|
-
"sourcesContent": ["import * as v from \"@zwave-js/core/validation\";\n\nexport function validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function deviceSpecificGet(this: any, deviceIdType: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.enum({ kind: \"parameter\", name: \"deviceIdType\" }, \"DeviceIdType\")(deviceIdType),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, deviceIdType);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}\n\nexport function validateArgs_ManufacturerSpecificCCAPI_sendReport() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function sendReport(this: any, options: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.object({ kind: \"parameter\", name: \"options\" }, 'ManufacturerSpecificCCReportOptions', { \"manufacturerId\": v.primitive({ kind: \"property\", name: \"manufacturerId\" }, \"number\"), \"productType\": v.primitive({ kind: \"property\", name: \"productType\" }, \"number\"), \"productId\": v.primitive({ kind: \"property\", name: \"productId\" }, \"number\") })(options),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, options);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
4
|
+
"sourcesContent": ["import * as v from \"@zwave-js/core/validation\";\n\nexport function validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function deviceSpecificGet(this: any, deviceIdType: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.enum({ kind: \"parameter\", name: \"deviceIdType\" }, \"DeviceIdType\")(deviceIdType),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, deviceIdType);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}\n\nexport function validateArgs_ManufacturerSpecificCCAPI_sendReport() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function sendReport(this: any, options: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.object({ kind: \"parameter\", name: \"options\" }, 'ManufacturerSpecificCCReportOptions', { \"manufacturerId\": v.primitive({ kind: \"property\", name: \"manufacturerId\" }, \"number\"), \"productType\": v.primitive({ kind: \"property\", name: \"productType\" }, \"number\"), \"productId\": v.primitive({ kind: \"property\", name: \"productId\" }, \"number\") })(options),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, options);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}\n\nexport function validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function sendDeviceSpecificReport(this: any, options: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.object({ kind: \"parameter\", name: \"options\" }, 'ManufacturerSpecificCCDeviceSpecificReportOptions', { \"type\": v.enum({ kind: \"property\", name: \"type\" }, \"DeviceIdType\"), \"deviceId\": v.oneOf({ kind: \"property\", name: \"deviceId\" }, undefined, v.primitive({ kind: \"property\", name: \"deviceId\" }, \"string\"), v.uint8array({ kind: \"property\", name: \"deviceId\" })) })(options),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, options);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,QAAmB;AAEb,SAAU,2DAAwD;AACvE,SAAO,CAAqB,mBAAsB,EAAE,KAAI,MAA6C;AACpG,QAAI,SAAS,UAAU;AACtB,aAAO,gCAAS,kBAA6B,cAAqB;AAC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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,8 +9,9 @@ export { ManufacturerSpecificCCValues };
|
|
|
9
9
|
export declare class ManufacturerSpecificCCAPI extends PhysicalCCAPI {
|
|
10
10
|
supportsCommand(cmd: ManufacturerSpecificCommand): MaybeNotKnown<boolean>;
|
|
11
11
|
get(): Promise<Pick<ManufacturerSpecificCCReport, "manufacturerId" | "productId" | "productType"> | undefined>;
|
|
12
|
-
deviceSpecificGet(deviceIdType: DeviceIdType): Promise<MaybeNotKnown<string>>;
|
|
12
|
+
deviceSpecificGet(deviceIdType: DeviceIdType): Promise<MaybeNotKnown<string | Bytes>>;
|
|
13
13
|
sendReport(options: ManufacturerSpecificCCReportOptions): Promise<void>;
|
|
14
|
+
sendDeviceSpecificReport(options: ManufacturerSpecificCCDeviceSpecificReportOptions): Promise<void>;
|
|
14
15
|
}
|
|
15
16
|
export declare class ManufacturerSpecificCC extends CommandClass {
|
|
16
17
|
ccCommand: ManufacturerSpecificCommand;
|
|
@@ -35,13 +36,14 @@ export declare class ManufacturerSpecificCCGet extends ManufacturerSpecificCC {
|
|
|
35
36
|
}
|
|
36
37
|
export interface ManufacturerSpecificCCDeviceSpecificReportOptions {
|
|
37
38
|
type: DeviceIdType;
|
|
38
|
-
deviceId: string;
|
|
39
|
+
deviceId: string | Uint8Array;
|
|
39
40
|
}
|
|
40
41
|
export declare class ManufacturerSpecificCCDeviceSpecificReport extends ManufacturerSpecificCC {
|
|
41
42
|
constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificReportOptions>);
|
|
42
43
|
static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificReport;
|
|
43
44
|
readonly type: DeviceIdType;
|
|
44
|
-
readonly deviceId: string;
|
|
45
|
+
readonly deviceId: string | Bytes;
|
|
46
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
45
47
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
46
48
|
}
|
|
47
49
|
export interface ManufacturerSpecificCCDeviceSpecificGetOptions {
|
|
@@ -49,7 +51,7 @@ export interface ManufacturerSpecificCCDeviceSpecificGetOptions {
|
|
|
49
51
|
}
|
|
50
52
|
export declare class ManufacturerSpecificCCDeviceSpecificGet extends ManufacturerSpecificCC {
|
|
51
53
|
constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificGetOptions>);
|
|
52
|
-
static from(
|
|
54
|
+
static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificGet;
|
|
53
55
|
deviceIdType: DeviceIdType;
|
|
54
56
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
55
57
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -47,7 +47,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
47
47
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
48
48
|
var import_Types = require("../lib/_Types.js");
|
|
49
49
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
50
|
-
const { validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet, validateArgs_ManufacturerSpecificCCAPI_sendReport } = __validateArgs;
|
|
50
|
+
const { validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet, validateArgs_ManufacturerSpecificCCAPI_sendReport, validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport } = __validateArgs;
|
|
51
51
|
let ManufacturerSpecificCCAPI = (() => {
|
|
52
52
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Manufacturer Specific"])];
|
|
53
53
|
let _classDescriptor;
|
|
@@ -57,6 +57,7 @@ let ManufacturerSpecificCCAPI = (() => {
|
|
|
57
57
|
let _instanceExtraInitializers = [];
|
|
58
58
|
let _deviceSpecificGet_decorators;
|
|
59
59
|
let _sendReport_decorators;
|
|
60
|
+
let _sendDeviceSpecificReport_decorators;
|
|
60
61
|
var ManufacturerSpecificCCAPI2 = class extends _classSuper {
|
|
61
62
|
static {
|
|
62
63
|
__name(this, "ManufacturerSpecificCCAPI");
|
|
@@ -68,8 +69,10 @@ let ManufacturerSpecificCCAPI = (() => {
|
|
|
68
69
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
69
70
|
_deviceSpecificGet_decorators = [validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet()];
|
|
70
71
|
_sendReport_decorators = [validateArgs_ManufacturerSpecificCCAPI_sendReport()];
|
|
72
|
+
_sendDeviceSpecificReport_decorators = [validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport()];
|
|
71
73
|
(0, import_tslib.__esDecorate)(this, null, _deviceSpecificGet_decorators, { kind: "method", name: "deviceSpecificGet", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "deviceSpecificGet" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.deviceSpecificGet, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
72
74
|
(0, import_tslib.__esDecorate)(this, null, _sendReport_decorators, { kind: "method", name: "sendReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
75
|
+
(0, import_tslib.__esDecorate)(this, null, _sendDeviceSpecificReport_decorators, { kind: "method", name: "sendDeviceSpecificReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendDeviceSpecificReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendDeviceSpecificReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
73
76
|
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
74
77
|
ManufacturerSpecificCCAPI2 = _classThis = _classDescriptor.value;
|
|
75
78
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -122,6 +125,15 @@ let ManufacturerSpecificCCAPI = (() => {
|
|
|
122
125
|
});
|
|
123
126
|
await this.host.sendCommand(cc, this.commandOptions);
|
|
124
127
|
}
|
|
128
|
+
async sendDeviceSpecificReport(options) {
|
|
129
|
+
this.assertSupportsCommand(import_Types.ManufacturerSpecificCommand, import_Types.ManufacturerSpecificCommand.DeviceSpecificReport);
|
|
130
|
+
const cc = new ManufacturerSpecificCCDeviceSpecificReport({
|
|
131
|
+
nodeId: this.endpoint.nodeId,
|
|
132
|
+
endpointIndex: this.endpoint.index,
|
|
133
|
+
...options
|
|
134
|
+
});
|
|
135
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
136
|
+
}
|
|
125
137
|
constructor() {
|
|
126
138
|
super(...arguments);
|
|
127
139
|
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
@@ -273,7 +285,9 @@ let ManufacturerSpecificCCGet = (() => {
|
|
|
273
285
|
return ManufacturerSpecificCCGet2 = _classThis;
|
|
274
286
|
})();
|
|
275
287
|
let ManufacturerSpecificCCDeviceSpecificReport = (() => {
|
|
276
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ManufacturerSpecificCommand.DeviceSpecificReport), (0, import_CommandClassDecorators.ccValueProperty)("deviceId", import_CCValues_generated.ManufacturerSpecificCCValues.deviceId, (self) => [
|
|
288
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ManufacturerSpecificCommand.DeviceSpecificReport), (0, import_CommandClassDecorators.ccValueProperty)("deviceId", import_CCValues_generated.ManufacturerSpecificCCValues.deviceId, (self) => [
|
|
289
|
+
self.type
|
|
290
|
+
])];
|
|
277
291
|
let _classDescriptor;
|
|
278
292
|
let _classExtraInitializers = [];
|
|
279
293
|
let _classThis;
|
|
@@ -295,16 +309,20 @@ let ManufacturerSpecificCCDeviceSpecificReport = (() => {
|
|
|
295
309
|
constructor(options) {
|
|
296
310
|
super(options);
|
|
297
311
|
this.type = options.type;
|
|
298
|
-
|
|
312
|
+
if (typeof options.deviceId === "string") {
|
|
313
|
+
this.deviceId = options.deviceId;
|
|
314
|
+
} else {
|
|
315
|
+
this.deviceId = import_shared.Bytes.from(options.deviceId);
|
|
316
|
+
}
|
|
299
317
|
}
|
|
300
318
|
static from(raw, ctx) {
|
|
301
319
|
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
302
320
|
const type = raw.payload[0] & 7;
|
|
303
321
|
const dataFormat = raw.payload[1] >>> 5;
|
|
304
322
|
const dataLength = raw.payload[1] & 31;
|
|
305
|
-
(0, import_core.validatePayload)(dataLength > 0, raw.payload.length >= 2 + dataLength);
|
|
323
|
+
(0, import_core.validatePayload)(type === import_Types.DeviceIdType.SerialNumber || type === import_Types.DeviceIdType.PseudoRandom, dataFormat === import_Types.DeviceIdDataFormat.UTF8 || dataFormat === import_Types.DeviceIdDataFormat.Binary, dataLength > 0, raw.payload.length >= 2 + dataLength);
|
|
306
324
|
const deviceIdData = raw.payload.subarray(2, 2 + dataLength);
|
|
307
|
-
const deviceId = dataFormat ===
|
|
325
|
+
const deviceId = dataFormat === import_Types.DeviceIdDataFormat.UTF8 ? deviceIdData.toString("utf8") : deviceIdData;
|
|
308
326
|
return new this({
|
|
309
327
|
nodeId: ctx.sourceNodeId,
|
|
310
328
|
type,
|
|
@@ -313,12 +331,22 @@ let ManufacturerSpecificCCDeviceSpecificReport = (() => {
|
|
|
313
331
|
}
|
|
314
332
|
type;
|
|
315
333
|
deviceId;
|
|
334
|
+
serialize(ctx) {
|
|
335
|
+
const deviceIdData = typeof this.deviceId === "string" ? import_shared.Bytes.from(this.deviceId, "utf8") : this.deviceId;
|
|
336
|
+
const format = typeof this.deviceId === "string" ? import_Types.DeviceIdDataFormat.UTF8 : import_Types.DeviceIdDataFormat.Binary;
|
|
337
|
+
const length = Math.min(deviceIdData.length, 31);
|
|
338
|
+
this.payload = import_shared.Bytes.concat([
|
|
339
|
+
[this.type & 7, format << 5 | length],
|
|
340
|
+
deviceIdData.subarray(0, length)
|
|
341
|
+
]);
|
|
342
|
+
return super.serialize(ctx);
|
|
343
|
+
}
|
|
316
344
|
toLogEntry(ctx) {
|
|
317
345
|
return {
|
|
318
346
|
...super.toLogEntry(ctx),
|
|
319
347
|
message: {
|
|
320
348
|
"device id type": (0, import_shared.getEnumMemberName)(import_Types.DeviceIdType, this.type),
|
|
321
|
-
"device id": this.deviceId
|
|
349
|
+
"device id": typeof this.deviceId === "string" ? this.deviceId : (0, import_core.logBuffer)(this.deviceId)
|
|
322
350
|
}
|
|
323
351
|
};
|
|
324
352
|
}
|
|
@@ -349,8 +377,13 @@ let ManufacturerSpecificCCDeviceSpecificGet = (() => {
|
|
|
349
377
|
super(options);
|
|
350
378
|
this.deviceIdType = options.deviceIdType;
|
|
351
379
|
}
|
|
352
|
-
static from(
|
|
353
|
-
|
|
380
|
+
static from(raw, ctx) {
|
|
381
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
382
|
+
const deviceIdType = raw.payload[0] & 7;
|
|
383
|
+
return new this({
|
|
384
|
+
nodeId: ctx.sourceNodeId,
|
|
385
|
+
deviceIdType
|
|
386
|
+
});
|
|
354
387
|
}
|
|
355
388
|
deviceIdType;
|
|
356
389
|
serialize(ctx) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ManufacturerSpecificCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./ManufacturerSpecificCC._validateArgs.js\";\nconst { validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet, validateArgs_ManufacturerSpecificCCAPI_sendReport } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, num2hex, pick } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { DeviceIdType, ManufacturerSpecificCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ManufacturerSpecificCCValues } from \"./_CCValues.generated.js\";\nexport { ManufacturerSpecificCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses[\"Manufacturer Specific\"])\nexport class ManufacturerSpecificCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: ManufacturerSpecificCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ManufacturerSpecificCommand.Get:\n case ManufacturerSpecificCommand.Report:\n return true; // This is mandatory\n case ManufacturerSpecificCommand.DeviceSpecificGet:\n case ManufacturerSpecificCommand.DeviceSpecificReport:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.Get);\n const cc = new ManufacturerSpecificCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ManufacturerSpecificCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"manufacturerId\",\n \"productType\",\n \"productId\",\n ]);\n }\n }\n @validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet()\n public async deviceSpecificGet(deviceIdType: DeviceIdType): Promise<MaybeNotKnown<string>> {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.DeviceSpecificGet);\n const cc = new ManufacturerSpecificCCDeviceSpecificGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n deviceIdType,\n });\n const response = await this.host.sendCommand<ManufacturerSpecificCCDeviceSpecificReport>(cc, this.commandOptions);\n return response?.deviceId;\n }\n @validateArgs_ManufacturerSpecificCCAPI_sendReport()\n public async sendReport(options: ManufacturerSpecificCCReportOptions): Promise<void> {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.Report);\n const cc = new ManufacturerSpecificCCReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Manufacturer Specific\"])\n@implementedVersion(2)\n@ccValues(ManufacturerSpecificCCValues)\nexport class ManufacturerSpecificCC extends CommandClass {\n declare ccCommand: ManufacturerSpecificCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // The Manufacturer Specific CC MUST be interviewed first\n return [];\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Manufacturer Specific\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n if (node.id !== ctx.ownNodeId) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying manufacturer information...\",\n direction: \"outbound\",\n });\n const mfResp = await api.get();\n if (mfResp) {\n const logMessage = `received response for manufacturer information:\n manufacturer: ${ctx.lookupManufacturer(mfResp.manufacturerId)\n || \"unknown\"} (${num2hex(mfResp.manufacturerId)})\n product type: ${num2hex(mfResp.productType)}\n product id: ${num2hex(mfResp.productId)}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCReportOptions {\n manufacturerId: number;\n productType: number;\n productId: number;\n}\n@CCCommand(ManufacturerSpecificCommand.Report)\n@ccValueProperty(\"manufacturerId\", ManufacturerSpecificCCValues.manufacturerId)\n@ccValueProperty(\"productType\", ManufacturerSpecificCCValues.productType)\n@ccValueProperty(\"productId\", ManufacturerSpecificCCValues.productId)\nexport class ManufacturerSpecificCCReport extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCReportOptions>) {\n super(options);\n this.manufacturerId = options.manufacturerId;\n this.productType = options.productType;\n this.productId = options.productId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCReport {\n validatePayload(raw.payload.length >= 6);\n const manufacturerId = raw.payload.readUInt16BE(0);\n const productType = raw.payload.readUInt16BE(2);\n const productId = raw.payload.readUInt16BE(4);\n return new this({\n nodeId: ctx.sourceNodeId,\n manufacturerId,\n productType,\n productId,\n });\n }\n public readonly manufacturerId: number;\n public readonly productType: number;\n public readonly productId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = new Bytes(6);\n this.payload.writeUInt16BE(this.manufacturerId, 0);\n this.payload.writeUInt16BE(this.productType, 2);\n this.payload.writeUInt16BE(this.productId, 4);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"manufacturer id\": num2hex(this.manufacturerId),\n \"product type\": num2hex(this.productType),\n \"product id\": num2hex(this.productId),\n },\n };\n }\n}\n@CCCommand(ManufacturerSpecificCommand.Get)\n@expectedCCResponse(ManufacturerSpecificCCReport)\nexport class ManufacturerSpecificCCGet extends ManufacturerSpecificCC {\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCDeviceSpecificReportOptions {\n type: DeviceIdType;\n deviceId: string;\n}\n@CCCommand(ManufacturerSpecificCommand.DeviceSpecificReport)\n@ccValueProperty(\"deviceId\", ManufacturerSpecificCCValues.deviceId, (self) => [self.type])\nexport class ManufacturerSpecificCCDeviceSpecificReport extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.type = options.type;\n this.deviceId = options.deviceId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificReport {\n validatePayload(raw.payload.length >= 2);\n const type: DeviceIdType = raw.payload[0] & 0b111;\n const dataFormat = raw.payload[1] >>> 5;\n const dataLength = raw.payload[1] & 0b11111;\n validatePayload(dataLength > 0, raw.payload.length >= 2 + dataLength);\n const deviceIdData = raw.payload.subarray(2, 2 + dataLength);\n const deviceId: string = dataFormat === 0\n ? deviceIdData.toString(\"utf8\")\n : \"0x\" + deviceIdData.toString(\"hex\");\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n deviceId,\n });\n }\n public readonly type: DeviceIdType;\n public readonly deviceId: string;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"device id type\": getEnumMemberName(DeviceIdType, this.type),\n \"device id\": this.deviceId,\n },\n };\n }\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCDeviceSpecificGetOptions {\n deviceIdType: DeviceIdType;\n}\n@CCCommand(ManufacturerSpecificCommand.DeviceSpecificGet)\n@expectedCCResponse(ManufacturerSpecificCCDeviceSpecificReport)\nexport class ManufacturerSpecificCCDeviceSpecificGet extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificGetOptions>) {\n super(options);\n this.deviceIdType = options.deviceIdType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificGet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ManufacturerSpecificCCDeviceSpecificGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public deviceIdType: DeviceIdType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([(this.deviceIdType || 0) & 0b111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"device id type\": getEnumMemberName(DeviceIdType, this.deviceIdType),\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./ManufacturerSpecificCC._validateArgs.js\";\nconst { validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet, validateArgs_ManufacturerSpecificCCAPI_sendReport, validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, logBuffer, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, num2hex, pick } from \"@zwave-js/shared\";\nimport { CCAPI, PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { DeviceIdDataFormat, DeviceIdType, ManufacturerSpecificCommand, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ManufacturerSpecificCCValues } from \"./_CCValues.generated.js\";\nexport { ManufacturerSpecificCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses[\"Manufacturer Specific\"])\nexport class ManufacturerSpecificCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: ManufacturerSpecificCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ManufacturerSpecificCommand.Get:\n case ManufacturerSpecificCommand.Report:\n return true; // This is mandatory\n case ManufacturerSpecificCommand.DeviceSpecificGet:\n case ManufacturerSpecificCommand.DeviceSpecificReport:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.Get);\n const cc = new ManufacturerSpecificCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ManufacturerSpecificCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"manufacturerId\",\n \"productType\",\n \"productId\",\n ]);\n }\n }\n @validateArgs_ManufacturerSpecificCCAPI_deviceSpecificGet()\n public async deviceSpecificGet(deviceIdType: DeviceIdType): Promise<MaybeNotKnown<string | Bytes>> {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.DeviceSpecificGet);\n const cc = new ManufacturerSpecificCCDeviceSpecificGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n deviceIdType,\n });\n const response = await this.host.sendCommand<ManufacturerSpecificCCDeviceSpecificReport>(cc, this.commandOptions);\n return response?.deviceId;\n }\n @validateArgs_ManufacturerSpecificCCAPI_sendReport()\n public async sendReport(options: ManufacturerSpecificCCReportOptions): Promise<void> {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.Report);\n const cc = new ManufacturerSpecificCCReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_ManufacturerSpecificCCAPI_sendDeviceSpecificReport()\n public async sendDeviceSpecificReport(options: ManufacturerSpecificCCDeviceSpecificReportOptions): Promise<void> {\n this.assertSupportsCommand(ManufacturerSpecificCommand, ManufacturerSpecificCommand.DeviceSpecificReport);\n const cc = new ManufacturerSpecificCCDeviceSpecificReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...options,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Manufacturer Specific\"])\n@implementedVersion(2)\n@ccValues(ManufacturerSpecificCCValues)\nexport class ManufacturerSpecificCC extends CommandClass {\n declare ccCommand: ManufacturerSpecificCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n // The Manufacturer Specific CC MUST be interviewed first\n return [];\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Manufacturer Specific\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n if (node.id !== ctx.ownNodeId) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying manufacturer information...\",\n direction: \"outbound\",\n });\n const mfResp = await api.get();\n if (mfResp) {\n const logMessage = `received response for manufacturer information:\n manufacturer: ${ctx.lookupManufacturer(mfResp.manufacturerId) || \"unknown\"} (${num2hex(mfResp.manufacturerId)})\n product type: ${num2hex(mfResp.productType)}\n product id: ${num2hex(mfResp.productId)}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCReportOptions {\n manufacturerId: number;\n productType: number;\n productId: number;\n}\n@CCCommand(ManufacturerSpecificCommand.Report)\n@ccValueProperty(\"manufacturerId\", ManufacturerSpecificCCValues.manufacturerId)\n@ccValueProperty(\"productType\", ManufacturerSpecificCCValues.productType)\n@ccValueProperty(\"productId\", ManufacturerSpecificCCValues.productId)\nexport class ManufacturerSpecificCCReport extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCReportOptions>) {\n super(options);\n this.manufacturerId = options.manufacturerId;\n this.productType = options.productType;\n this.productId = options.productId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCReport {\n validatePayload(raw.payload.length >= 6);\n const manufacturerId = raw.payload.readUInt16BE(0);\n const productType = raw.payload.readUInt16BE(2);\n const productId = raw.payload.readUInt16BE(4);\n return new this({\n nodeId: ctx.sourceNodeId,\n manufacturerId,\n productType,\n productId,\n });\n }\n public readonly manufacturerId: number;\n public readonly productType: number;\n public readonly productId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = new Bytes(6);\n this.payload.writeUInt16BE(this.manufacturerId, 0);\n this.payload.writeUInt16BE(this.productType, 2);\n this.payload.writeUInt16BE(this.productId, 4);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"manufacturer id\": num2hex(this.manufacturerId),\n \"product type\": num2hex(this.productType),\n \"product id\": num2hex(this.productId),\n },\n };\n }\n}\n@CCCommand(ManufacturerSpecificCommand.Get)\n@expectedCCResponse(ManufacturerSpecificCCReport)\nexport class ManufacturerSpecificCCGet extends ManufacturerSpecificCC {\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCDeviceSpecificReportOptions {\n type: DeviceIdType;\n deviceId: string | Uint8Array;\n}\n@CCCommand(ManufacturerSpecificCommand.DeviceSpecificReport)\n@ccValueProperty(\"deviceId\", ManufacturerSpecificCCValues.deviceId, (self) => [\n self.type,\n])\nexport class ManufacturerSpecificCCDeviceSpecificReport extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificReportOptions>) {\n super(options);\n this.type = options.type;\n if (typeof options.deviceId === \"string\") {\n this.deviceId = options.deviceId;\n }\n else {\n this.deviceId = Bytes.from(options.deviceId);\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificReport {\n validatePayload(raw.payload.length >= 2);\n const type: DeviceIdType = raw.payload[0] & 0b111;\n const dataFormat: DeviceIdDataFormat = raw.payload[1] >>> 5;\n const dataLength = raw.payload[1] & 0b11111;\n validatePayload(type === DeviceIdType.SerialNumber\n || type === DeviceIdType.PseudoRandom, dataFormat === DeviceIdDataFormat.UTF8\n || dataFormat === DeviceIdDataFormat.Binary, dataLength > 0, raw.payload.length >= 2 + dataLength);\n const deviceIdData = raw.payload.subarray(2, 2 + dataLength);\n const deviceId: string | Bytes = dataFormat === DeviceIdDataFormat.UTF8\n ? deviceIdData.toString(\"utf8\")\n : deviceIdData;\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n deviceId,\n });\n }\n public readonly type: DeviceIdType;\n public readonly deviceId: string | Bytes;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const deviceIdData = typeof this.deviceId === \"string\"\n ? Bytes.from(this.deviceId, \"utf8\")\n : this.deviceId;\n const format = typeof this.deviceId === \"string\"\n ? DeviceIdDataFormat.UTF8\n : DeviceIdDataFormat.Binary;\n const length = Math.min(deviceIdData.length, 0b11111);\n this.payload = Bytes.concat([\n [this.type & 0b111, (format << 5) | length],\n deviceIdData.subarray(0, length),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"device id type\": getEnumMemberName(DeviceIdType, this.type),\n \"device id\": typeof this.deviceId === \"string\"\n ? this.deviceId\n : logBuffer(this.deviceId),\n },\n };\n }\n}\n// @publicAPI\nexport interface ManufacturerSpecificCCDeviceSpecificGetOptions {\n deviceIdType: DeviceIdType;\n}\n@CCCommand(ManufacturerSpecificCommand.DeviceSpecificGet)\n@expectedCCResponse(ManufacturerSpecificCCDeviceSpecificReport)\nexport class ManufacturerSpecificCCDeviceSpecificGet extends ManufacturerSpecificCC {\n public constructor(options: WithAddress<ManufacturerSpecificCCDeviceSpecificGetOptions>) {\n super(options);\n this.deviceIdType = options.deviceIdType;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ManufacturerSpecificCCDeviceSpecificGet {\n validatePayload(raw.payload.length >= 1);\n const deviceIdType: DeviceIdType = raw.payload[0] & 0b111;\n return new this({\n nodeId: ctx.sourceNodeId,\n deviceIdType,\n });\n }\n public deviceIdType: DeviceIdType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([(this.deviceIdType || 0) & 0b111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"device id type\": getEnumMemberName(DeviceIdType, this.deviceIdType),\n },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA6K;AAC7K,oBAAwD;AACxD,iBAAqC;AACrC,0BAAiE;AACjE,oCAAiH;AAEjH,mBAA+E;AAE/E,gCAA6C;AAT7C,MAAM,EAAE,0DAA0D,mDAAmD,gEAA+D,IAAK;IAa5K,6BAAyB,MAAA;8BADrC,mCAAI,2BAAe,uBAAuB,CAAC,CAAC;;;;oBACE;;;;;iDAAA,YAAa;WAAA;;;;;;;;uCA4BvD,yDAAwD,CAAE;gCAW1D,kDAAiD,CAAE;8CAUnD,gEAA+D,CAAE;AApBlE,qCAAA,MAAA,MAAA,+BAAA,EAAA,MAAA,UAAA,MAAA,qBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,uBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,mBAAb,OAA8B,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAW9B,qCAAA,MAAA,MAAA,wBAAA,EAAA,MAAA,UAAA,MAAA,cAAA,QAAA,OAA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AA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAoE;AACnF,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAChC;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,eAA6B,IAAI,QAAQ,CAAC,IAAI;AACpD,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;OACH;IACL;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,EAAE,KAAK,gBAAgB,KAAK,CAAK,CAAC;AAC5D,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,sBAAkB,iCAAkB,2BAAc,KAAK,YAAY;;;IAG/E;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/cjs/cc/MeterCC.js
CHANGED
|
@@ -358,7 +358,9 @@ let MeterCCAPI = (() => {
|
|
|
358
358
|
}
|
|
359
359
|
}, "optimisticallyUpdateRelatedValues"),
|
|
360
360
|
verifyChanges: /* @__PURE__ */ __name(() => {
|
|
361
|
-
this.schedulePoll(readingValueId, 0, {
|
|
361
|
+
this.schedulePoll(readingValueId, 0, {
|
|
362
|
+
transition: "fast"
|
|
363
|
+
});
|
|
362
364
|
}, "verifyChanges")
|
|
363
365
|
};
|
|
364
366
|
} else {
|
|
@@ -623,12 +625,14 @@ let MeterCCReport = (() => {
|
|
|
623
625
|
if (!super.persistValues(ctx))
|
|
624
626
|
return false;
|
|
625
627
|
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
628
|
+
const rateType = ccVersion >= 2 ? this.rateType : import_Types.RateType.Unspecified;
|
|
629
|
+
const scaleNumber = ccVersion >= 3 ? this.scale : this.scale & 3;
|
|
626
630
|
const meter = (0, import_core.getMeter)(this.type);
|
|
627
|
-
const scale = (0, import_core.getMeterScale)(this.type,
|
|
631
|
+
const scale = (0, import_core.getMeterScale)(this.type, scaleNumber) ?? (0, import_core.getUnknownMeterScale)(scaleNumber);
|
|
628
632
|
const measurementValidation = !ctx.getDeviceConfig?.(this.nodeId)?.compat?.disableStrictMeasurementValidation;
|
|
629
633
|
if (measurementValidation) {
|
|
630
634
|
import_core.validatePayload.withReason(`Unknown meter type ${(0, import_shared.num2hex)(this.type)} or corrupted data`)(!!meter);
|
|
631
|
-
import_core.validatePayload.withReason(`Unknown meter scale ${(0, import_shared.num2hex)(
|
|
635
|
+
import_core.validatePayload.withReason(`Unknown meter scale ${(0, import_shared.num2hex)(scaleNumber)} or corrupted data`)(scale.label !== (0, import_core.getUnknownMeterScale)(scaleNumber).label);
|
|
632
636
|
if (ccVersion >= 2) {
|
|
633
637
|
const expectedType = this.getValue(ctx, import_CCValues_generated.MeterCCValues.type);
|
|
634
638
|
if (expectedType != void 0) {
|
|
@@ -636,23 +640,23 @@ let MeterCCReport = (() => {
|
|
|
636
640
|
}
|
|
637
641
|
const supportedScales = this.getValue(ctx, import_CCValues_generated.MeterCCValues.supportedScales);
|
|
638
642
|
if (supportedScales?.length) {
|
|
639
|
-
import_core.validatePayload.withReason(`Unsupported meter scale ${scale.label} or corrupted data`)(supportedScales.includes(
|
|
643
|
+
import_core.validatePayload.withReason(`Unsupported meter scale ${scale.label} or corrupted data`)(supportedScales.includes(scaleNumber));
|
|
640
644
|
}
|
|
641
645
|
const supportedRateTypes = this.getValue(ctx, import_CCValues_generated.MeterCCValues.supportedRateTypes);
|
|
642
646
|
if (supportedRateTypes?.length) {
|
|
643
|
-
import_core.validatePayload.withReason(`Unsupported rate type ${(0, import_shared.getEnumMemberName)(import_Types.RateType,
|
|
647
|
+
import_core.validatePayload.withReason(`Unsupported rate type ${(0, import_shared.getEnumMemberName)(import_Types.RateType, rateType)} or corrupted data`)(supportedRateTypes.includes(rateType));
|
|
644
648
|
}
|
|
645
649
|
}
|
|
646
650
|
}
|
|
647
|
-
const valueValue = import_CCValues_generated.MeterCCValues.value(this.type,
|
|
651
|
+
const valueValue = import_CCValues_generated.MeterCCValues.value(this.type, rateType, scaleNumber);
|
|
648
652
|
this.setMetadata(ctx, valueValue, {
|
|
649
653
|
...valueValue.meta,
|
|
650
|
-
label: getValueLabel(this.type,
|
|
654
|
+
label: getValueLabel(this.type, scaleNumber, rateType),
|
|
651
655
|
unit: scale.unit,
|
|
652
656
|
ccSpecific: {
|
|
653
657
|
meterType: this.type,
|
|
654
|
-
scale:
|
|
655
|
-
rateType
|
|
658
|
+
scale: scaleNumber,
|
|
659
|
+
rateType
|
|
656
660
|
}
|
|
657
661
|
});
|
|
658
662
|
this.setValue(ctx, valueValue, this.value);
|
|
@@ -669,10 +673,7 @@ let MeterCCReport = (() => {
|
|
|
669
673
|
const deltaTime = this.deltaTime ?? 65535;
|
|
670
674
|
const deltaTimeBytes = new import_shared.Bytes(2);
|
|
671
675
|
deltaTimeBytes.writeUInt16BE(deltaTime, 0);
|
|
672
|
-
this.payload = import_shared.Bytes.concat([
|
|
673
|
-
typeAndValue,
|
|
674
|
-
deltaTimeBytes
|
|
675
|
-
]);
|
|
676
|
+
this.payload = import_shared.Bytes.concat([typeAndValue, deltaTimeBytes]);
|
|
676
677
|
if (this.deltaTime !== 0 && this.previousValue != void 0) {
|
|
677
678
|
const prevValueBytes = (0, import_core.encodeFloatWithScale)(
|
|
678
679
|
this.previousValue,
|
|
@@ -680,16 +681,10 @@ let MeterCCReport = (() => {
|
|
|
680
681
|
// we discard the scale anyways
|
|
681
682
|
floatParams
|
|
682
683
|
).subarray(1);
|
|
683
|
-
this.payload = import_shared.Bytes.concat([
|
|
684
|
-
this.payload,
|
|
685
|
-
prevValueBytes
|
|
686
|
-
]);
|
|
684
|
+
this.payload = import_shared.Bytes.concat([this.payload, prevValueBytes]);
|
|
687
685
|
}
|
|
688
686
|
if (scale2 != void 0) {
|
|
689
|
-
this.payload = import_shared.Bytes.concat([
|
|
690
|
-
this.payload,
|
|
691
|
-
[scale2]
|
|
692
|
-
]);
|
|
687
|
+
this.payload = import_shared.Bytes.concat([this.payload, [scale2]]);
|
|
693
688
|
}
|
|
694
689
|
return super.serialize(ctx);
|
|
695
690
|
}
|
|
@@ -908,10 +903,7 @@ let MeterCCSupportedReport = (() => {
|
|
|
908
903
|
-1
|
|
909
904
|
);
|
|
910
905
|
const scalesByte1 = supportedScales[0] >>> 1 | (supportedScales.length > 1 ? 128 : 0);
|
|
911
|
-
this.payload = import_shared.Bytes.from([
|
|
912
|
-
typeByte,
|
|
913
|
-
scalesByte1
|
|
914
|
-
]);
|
|
906
|
+
this.payload = import_shared.Bytes.from([typeByte, scalesByte1]);
|
|
915
907
|
if (supportedScales.length > 1) {
|
|
916
908
|
this.payload = import_shared.Bytes.concat([
|
|
917
909
|
this.payload,
|
|
@@ -1011,10 +1003,7 @@ let MeterCCReset = (() => {
|
|
|
1011
1003
|
const { data: typeAndValue, scale2 } = encodeMeterValueAndInfo(this.type, this.rateType, this.scale, this.targetValue);
|
|
1012
1004
|
this.payload = typeAndValue;
|
|
1013
1005
|
if (scale2 != void 0) {
|
|
1014
|
-
this.payload = import_shared.Bytes.concat([
|
|
1015
|
-
this.payload,
|
|
1016
|
-
[scale2]
|
|
1017
|
-
]);
|
|
1006
|
+
this.payload = import_shared.Bytes.concat([this.payload, [scale2]]);
|
|
1018
1007
|
}
|
|
1019
1008
|
}
|
|
1020
1009
|
return super.serialize(ctx);
|