Logbook and History problems

Some how after installing the updates yesterday evening my logbook and history is not working anymore.
I tried to restore it but till so far no succes.

Hopefully there is some advise on this community how to solve it.

I got the following errors in the log:

2017-10-09 17:15:58 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’, ‘2017-10-09 15:14:39.482600’, ‘2017-10-09 15:15:58.713086’)]

2017-10-09 17:14:41 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=96 from 2017-10-09 14:50:04.258753)

Hi @Imperial-Guard, looks like your sqlite db file is corrupt.
Just remove or rename your home-assistant_v2.db and restart HA.

3 Likes

Thanks for your quick reply!
Will try it right away!

I think I´m facing the same problem my logbook. events, history, and the all my sensors history are not updating nor showing anything here´s my logs:

> 2018-05-20 10:27:06 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=253 from 2018-05-20 13:21:58.383896)
> 2018-05-20 10:27:23 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
> 2018-05-20 10:27:41 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-05-20 13:27:04.271654', '2018-05-20 13:27:41.355786')] (Background on this error at: http://sqlalche.me/e/4xp6)
> 2018-05-20 10:27:50 ERROR (SyncWorker_7) [homeassistant.core] Error doing job: Task was destroyed but it is pending!

I´m running hass.io on rpi, what should I do, just delete the file and restart? won´t it broke?