Skip to content

Implement Meter CC v6 #170

Description

@dfederm

Meter CC is essential for energy monitoring - smart plugs, power strips, and whole-home energy monitors report consumption via this CC. It reports values like kWh, W, V, A with multiple rate types and scales.

Scope:

  • MeterCommandClass : CommandClass<MeterCommand> with [CommandClass(CommandClassId.Meter)]
    • GetAsync(MeterType type, MeterScale scale, MeterRateType rateType) → current reading with precision and value
    • GetSupportedAsync() → supported meter types, scales, rate types, reset support
    • ResetAsync(MeterType type, MeterScale scale, MeterRateType rateType, int value) - reset accumulated readings (v6: targeted reset)
    • Process incoming MeterReport (unsolicited from lifeline)
  • Enums: MeterType (Electric, Gas, Water, Heating, Cooling), MeterScale (kWh, kVAh, W, V, A, PowerFactor, etc.), MeterRateType (Import, Export, both)
  • Value parsing: handle variable precision (1-3 decimal places), multi-byte values, delta time

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions