Hi,
I had problems with the recorder database when I was updating to February-version 2023.2 first.
As others told me, I then solved my issues by restoring the database and deleting/renaming the schema_changes table which was recreated after a restart.
Now, as I did another update to home assistant 2023.3.3, after around two days and some restarts I had another issue showing up no more updates in the energy dashboard. Initially this was noticed first, when I renamed a switch into a button sensor and after restarting home assistant the restart was taking very long time. (disabling the button didn’t solve the issue)
However, I could see that the entries in the statistics-table were updated, but not showing up in the dashboard. Old dashboard-entries were there.
As the last time solved it, I thought I could reorganize the database by just renaming the schema_changes table again. But it seems that the energy dashboard now isn’t showing up even the old data entries but only short time entries from yesterday with wrong values.
Another thing that bothers me is the fact, that some database tables show up as MyISAM, while others show up as InnoDB.
Is it save to convert all the tables to InnoDB by following this manual to change it using PHPMyAdmin?
Anything else to think of?
Alright, I don’t know if it was inititiated by time, the restart of the home assistant core (when I was actually just trying to stop it for database operations), or the fact that I now converted all database-tables to InnoDB using the command
alter table <table_name> ENGINE=InnoDB;
Now it looks good again. I have the history data in the energy dashboard and there is an entry of today already.
So I hope of no more problems with the next update.
Problem appeared again.
No more logging data in the energy dashboard.
I already installed the 2023.3.4 update without luck
Then again renamed the schema_changes table and restarted the home assistant core.
After some time I disabled and enabled the recorder service.
Now it looks as if the data has come back to energy dashboard.
I will keep watching what happens tomorrow…
Problem stays.
After a few hours, the energy dashboard doesn’t update with data.
I already followed this entry with the last comment from “der-berni”, to update the database schema to the default schema, since maybe something went wrong during one of the previous ha-updates where the database was reorganized…
The only thing that seems to help for a short time is, to remove the schema_changes table and calling the service recorder.disable and recorder.enable.
I’m having problems too after update, the states.entity_id column is not populated:
Did any one of you ever solve this issue? I am experiencing the same and do not know where to begin…