No history recorded in logbook

Since latest update my logbook is empty, there are no logbook entries found

The homeassistant log shows this error.

2018-03-03 18:28:35 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (?, ?, ?, ?, ?)’] [parameters: (‘service_registered’, ‘{“domain”: “recorder”, “service”: “purge”}’, ‘LOCAL’, ‘2018-03-03 17:27:47.451781’, ‘2018-03-03 17:28:35.463167’)] (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)

It used to work correctly. I’ve tried adding the recorder, as this was a change for version 0.64 but this did not help

I have this in my configuration:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

recorder:
  purge_keep_days: 30

Who knows how to solve this?

That sounds like your home-assistant_v2.db file with the history has corrupted. Try to rename it and restart HA.

9 Likes

Thanks, it worked. Second time in a week you’ve saved me!

Yeah and the second time you had to clean stuff. I wonder if you had an unclean shutdown …

can’t remember doing that lately, I always try to reboot/turn off correctly. I might have unplugged the power too quick! I need to be more carefull.

thanks buddy