span-hacs icon indicating copy to clipboard operation
span-hacs copied to clipboard

expose total grid production/consumption metrics

Open wez opened this issue 2 years ago • 1 comments

This data from /api/v1/panel seems like it would be good to expose as metrics that can be added to the energy dashboard for the grid consumption/return data:

{
  "mainRelayState": "CLOSED",
  "mainMeterEnergy": {
    "producedEnergyWh": 1172289.71875,
    "consumedEnergyWh": 860971.75
  },
  "instantGridPowerW": 1356.5203857421875,
  "feedthroughPowerW": 12.474345903843641,
  "feedthroughEnergy": {
    "producedEnergyWh": 6476087.607055664,
    "consumedEnergyWh": -7705796.045922002
  },

I think mainMeterEnergy.consumedEnergyWh is the grid consumption, while feedthroughEnergy.producedEnergyWh is the return.

I am running "firmwareVersion":"spanos2/r202223/04"

What do you think?

wez avatar Sep 13 '22 05:09 wez