Fixing energy dashboard issue after issues with monitoring platform

Hi all,

Maybe, someone here in the DEVs section could help me to figure out an issue with my energy dashboard after I had an issue with the API connection to SolarEdge Monitoring…

first, I need to describe what happened:

On September 21st, I got an Energymeter installed for my SolarEdge Inverter.
Everything was set up and seemed to work nicely, until I saw, that the SolarEdge LOCAL Integration could not read the information from the Meter via Modbus.

When this happened, I tried to change some settings in the Inverter to read also the meter values and send them through modbus…
But then, I’ve noticed that the Monitoring (Web and App) from Solaredge switched the view to the dashboard without meter information.

I’ve tried to redo the changes.
This was the time, when the initial issue started…

Even after I got the View of the App back - and could see all changes, the “history” in the Monitoring was gone.
The app just looked as it was just set up - with no further information from the previous days and months.

In HomeAssistant, the sensor that was used for the Solar Production, was also reset (lifetime energy)…

finally, I got it back running - in the night - but the outcome on the Dashboard can be seen here:

This is the Solar-Production for September 21st

This is the Solar-Production for September 22nd

and this is the Solar-Production for September 23rd

I’ve checked the SQLite Database where the Statistics are stored (as far as I understand)
and these are the recordings I would asume are related to the EnergyDashboard…

[
  {
    "id": 3651,
    "created": "2021-09-21 15:12:00.054576",
    "metadata_id": 1,
    "start": "2021-09-21 14:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8384.112,
    "sum": 789.9529999999995
  },
  {
    "id": 3696,
    "created": "2021-09-21 16:12:00.096206",
    "metadata_id": 1,
    "start": "2021-09-21 15:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3741,
    "created": "2021-09-21 17:12:00.100608",
    "metadata_id": 1,
    "start": "2021-09-21 16:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3786,
    "created": "2021-09-21 18:12:00.105650",
    "metadata_id": 1,
    "start": "2021-09-21 17:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3831,
    "created": "2021-09-21 19:12:00.109082",
    "metadata_id": 1,
    "start": "2021-09-21 18:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3876,
    "created": "2021-09-21 20:12:00.115131",
    "metadata_id": 1,
    "start": "2021-09-21 19:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3921,
    "created": "2021-09-21 21:12:00.122294",
    "metadata_id": 1,
    "start": "2021-09-21 20:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 3966,
    "created": "2021-09-21 22:12:00.129139",
    "metadata_id": 1,
    "start": "2021-09-21 21:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 4011,
    "created": "2021-09-21 23:12:00.152165",
    "metadata_id": 1,
    "start": "2021-09-21 22:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 0.005,
    "sum": 790.7140000000007
  },
  {
    "id": 4056,
    "created": "2021-09-22 00:12:00.137474",
    "metadata_id": 1,
    "start": "2021-09-21 23:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4101,
    "created": "2021-09-22 01:12:00.142365",
    "metadata_id": 1,
    "start": "2021-09-22 00:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4146,
    "created": "2021-09-22 02:12:00.271361",
    "metadata_id": 1,
    "start": "2021-09-22 01:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4191,
    "created": "2021-09-22 03:12:00.155781",
    "metadata_id": 1,
    "start": "2021-09-22 02:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4236,
    "created": "2021-09-22 04:12:00.151024",
    "metadata_id": 1,
    "start": "2021-09-22 03:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4281,
    "created": "2021-09-22 05:12:00.165081",
    "metadata_id": 1,
    "start": "2021-09-22 04:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.175,
    "sum": 9176.884
  },
  {
    "id": 4326,
    "created": "2021-09-22 06:12:00.158784",
    "metadata_id": 1,
    "start": "2021-09-22 05:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8386.231,
    "sum": 9176.94
  },
  {
    "id": 4371,
    "created": "2021-09-22 07:12:00.165074",
    "metadata_id": 1,
    "start": "2021-09-22 06:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8387.211,
    "sum": 9177.92
  },
  {
    "id": 4416,
    "created": "2021-09-22 08:12:00.182573",
    "metadata_id": 1,
    "start": "2021-09-22 07:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8390.09,
    "sum": 9180.799
  },
  {
    "id": 4461,
    "created": "2021-09-22 09:12:00.194476",
    "metadata_id": 1,
    "start": "2021-09-22 08:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8394.8,
    "sum": 9185.509
  },
  {
    "id": 4506,
    "created": "2021-09-22 10:07:56.384249",
    "metadata_id": 1,
    "start": "2021-09-22 09:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8401.606,
    "sum": 9192.315
  },
  {
    "id": 4518,
    "created": "2021-09-22 11:12:00.097873",
    "metadata_id": 1,
    "start": "2021-09-22 10:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8409.402,
    "sum": 9200.111
  },
  {
    "id": 4530,
    "created": "2021-09-22 12:12:00.040954",
    "metadata_id": 1,
    "start": "2021-09-22 11:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8417.885,
    "sum": 9208.594000000001
  },
  {
    "id": 4542,
    "created": "2021-09-22 13:12:00.047369",
    "metadata_id": 1,
    "start": "2021-09-22 12:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8424.9,
    "sum": 9215.609
  },
  {
    "id": 4554,
    "created": "2021-09-22 14:12:00.046287",
    "metadata_id": 1,
    "start": "2021-09-22 13:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8430.415,
    "sum": 9221.124000000002
  },
  {
    "id": 4566,
    "created": "2021-09-22 15:12:00.046332",
    "metadata_id": 1,
    "start": "2021-09-22 14:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8434.913,
    "sum": 9225.622000000001
  },
  {
    "id": 4578,
    "created": "2021-09-22 16:12:00.049546",
    "metadata_id": 1,
    "start": "2021-09-22 15:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.351,
    "sum": 9228.060000000001
  },
  {
    "id": 4590,
    "created": "2021-09-22 17:12:00.053856",
    "metadata_id": 1,
    "start": "2021-09-22 16:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.957,
    "sum": 9228.666000000001
  },
  {
    "id": 4602,
    "created": "2021-09-22 18:12:00.069212",
    "metadata_id": 1,
    "start": "2021-09-22 17:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4614,
    "created": "2021-09-22 19:12:00.033862",
    "metadata_id": 1,
    "start": "2021-09-22 18:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4626,
    "created": "2021-09-22 20:12:00.039015",
    "metadata_id": 1,
    "start": "2021-09-22 19:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4634,
    "created": "2021-09-22 21:12:00.032527",
    "metadata_id": 1,
    "start": "2021-09-22 20:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4642,
    "created": "2021-09-22 22:12:00.041186",
    "metadata_id": 1,
    "start": "2021-09-22 21:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4650,
    "created": "2021-09-22 23:12:00.041797",
    "metadata_id": 1,
    "start": "2021-09-22 22:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4658,
    "created": "2021-09-23 00:12:00.043819",
    "metadata_id": 1,
    "start": "2021-09-22 23:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4666,
    "created": "2021-09-23 01:03:31.499206",
    "metadata_id": 1,
    "start": "2021-09-23 00:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4674,
    "created": "2021-09-23 02:12:00.097932",
    "metadata_id": 1,
    "start": "2021-09-23 01:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4682,
    "created": "2021-09-23 03:12:00.033302",
    "metadata_id": 1,
    "start": "2021-09-23 02:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4690,
    "created": "2021-09-23 04:12:00.035528",
    "metadata_id": 1,
    "start": "2021-09-23 03:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4698,
    "created": "2021-09-23 05:12:00.038124",
    "metadata_id": 1,
    "start": "2021-09-23 04:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.954,
    "sum": 9228.663
  },
  {
    "id": 4706,
    "created": "2021-09-23 06:12:00.036602",
    "metadata_id": 1,
    "start": "2021-09-23 05:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8437.971,
    "sum": 9228.68
  },
  {
    "id": 4714,
    "created": "2021-09-23 07:12:00.042672",
    "metadata_id": 1,
    "start": "2021-09-23 06:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8438.558,
    "sum": 9229.267000000002
  },
  {
    "id": 4722,
    "created": "2021-09-23 08:12:00.043005",
    "metadata_id": 1,
    "start": "2021-09-23 07:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8441.723,
    "sum": 9232.432
  },
  {
    "id": 4730,
    "created": "2021-09-23 09:12:00.050821",
    "metadata_id": 1,
    "start": "2021-09-23 08:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8446.753,
    "sum": 9237.462000000001
  },
  {
    "id": 4738,
    "created": "2021-09-23 10:12:00.046757",
    "metadata_id": 1,
    "start": "2021-09-23 09:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8451.594,
    "sum": 9242.303
  },
  {
    "id": 4746,
    "created": "2021-09-23 11:12:00.050466",
    "metadata_id": 1,
    "start": "2021-09-23 10:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8460.967,
    "sum": 9251.676000000001
  },
  {
    "id": 4754,
    "created": "2021-09-23 12:12:00.060357",
    "metadata_id": 1,
    "start": "2021-09-23 11:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8469.082,
    "sum": 9259.791000000001
  },
  {
    "id": 4762,
    "created": "2021-09-23 13:12:00.054219",
    "metadata_id": 1,
    "start": "2021-09-23 12:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8476.912,
    "sum": 9267.621000000001
  },
  {
    "id": 4770,
    "created": "2021-09-23 14:12:00.057441",
    "metadata_id": 1,
    "start": "2021-09-23 13:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8483.913,
    "sum": 9274.622000000001
  },
  {
    "id": 4778,
    "created": "2021-09-23 15:12:00.057892",
    "metadata_id": 1,
    "start": "2021-09-23 14:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8489.198,
    "sum": 9279.907000000001
  },
  {
    "id": 4786,
    "created": "2021-09-23 16:12:00.061313",
    "metadata_id": 1,
    "start": "2021-09-23 15:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8492.306,
    "sum": 9283.015000000001
  },
  {
    "id": 4794,
    "created": "2021-09-23 17:12:00.063269",
    "metadata_id": 1,
    "start": "2021-09-23 16:00:00",
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 8493.227,
    "sum": 9283.936000000002
  }
]

as you can see, the STATE = 8384.112, recorded on sept.21st at 16:12 - and SUM = 790.7140…

Then, for the rest of the day, I only have recordings with a STATE = 0.005 while the sum remains the same.
This applies for the rest of the day…

On Sept.22nd, Record-ID 4056, Created at 2021-09-22 00:12 the STATE has changed to 8386.175 which would be a valid increase from the last recorded state the day before at 16:12.
But the sum has changed to 9176.884 - this is true, if I add the reported value 8386.175 to the last summary from the day before.

at least, this would explain the huge increase of 8 Mwh in the night of the 22nd September, when I was able to fix the Monitoring response for the Sensor.

This would also explain, why no other recordings could be shown on the day of the 22nd, because the measurements are just too small to be shown in that scale.

Is there a way to fix the SUM ??

// another nice feature would be - if this can be fixed somehow, that I could consider a way to import some older measurements that were taken before the dashboard was set up…

ok, I’ve tried a few things in order to “repair” my energy dashboard…
Since the reason is quite clear to me, I thought, I could update the SUM for all reported values before the reset happened and also update the state value for that day…

I’ve calculated the SUM for the days before September and just updated the different rows with DB Browser for SQLite… unfortunately, the System has detected a malformed database afterwards - and created a new one…

I am running a PRAGMA INTEGRITY Check on the backup file that was created to check, what exactly went wrong… unfortunately, a “complete backup” in Homeassistant does not mean, that it also include the SQLite file :-/

so… probably, I’ve lost all my recordings so far… but on the other hand…
This would allow me to start with a “clean” energy dashboard now …

and maybe, I am somehow able to recover the old data as well… (even if I don’t exactly know how)

If you have an issue with a core integration post it on github.

If you have a configuration question post it in the Configuration category.

This category is for discussion of Home Assistant core and platform development. It is not a personal hotline to the devs to help you fix issues.

Yes, you have to directly edit the recorder database. There are a few posts about this in the forum, use the search function.

If you would like to suggest a way to do this more easily use the Feature Request category. Though make sure you search the category first to see if someone else has already requested the feature and if so, vote for that one.

Hi,
sorry when this was the wrong way to post here in the section - but since my issue wasn’t a bug in HA, I thought, an issue on github wouldn’t be correct - and also, it is not a feature request.
… And since the issue was also not really related to a specific configuration, I was not sure if this kind of request would fit in this cathegory.

When I wrote the topic, honestly speaking, I was not sure if my analysis was correct (about the sum field within the SQLite DB)…

Again - sorry for this mistake / wrong understanding…

Regards,
Chris