"Unable to connect to Home Assistant" after manual purge

Hello,

Because my logbook doesnt show up after a long time waiting I decided to do a manual purge. I called the service recorder.purge with the following data:

{
  "keep_days":"1",
  "repack":"true"
}

After a restart I cant connect to homeassistant anymore. So I tried to delete the db file but this did not work, I can not connect to HA. Homeassistant doesnt seem to work because the new db file stays 60kb. However the HA process is active (running) when I check the status.

My log shows the following warning:

2018-11-17 17:42:57 WARNING (Recorder) [homeassistant.components.recorder.migration] Database requires upgrade. Schema version: None

My installation details are:

  • HA 0.82.1
  • Hassbian on RBP
  • default SQL dbase

What can I do to fix the problem?? And what did I do wrong?

thanks in advance!

turn off home assistant and delete the file, the start home assistant back up.

Thats the strange thing; I tried your solution serveral times but that did not help…

Start it up again and walk away. Get lunch, grab some coffee. A watched pot will never boil. (sometimes an HA recovery reboot can take forever)

I waited a few hours but nothing happened. I tried roll back to 0.81.6 but that did not solve the problem. However now my log show this warning:

2018-11-17 21:11:43 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=2 from 2018-11-17 20:00:35.713812)

I’m not exactly sure but sometimes when I crash are start up again, I see a second home-assistant_v2.* file (can’t remember the suffix right now) that I believe is some kind of partial database recovery effort. If you see one, try nuking that file also.

During the purge process there is indeed a second db file but that is already gone. For sure I deleted al the files which are not a yaml file and restarted HA. Unfortunately no success.

Maybe there are some leftovers in the hidden folders but I don’t think I can delete them.

ssh root into your HA box (I assume you are running hass.io), go to /config/.storage and delete the core.entity_registry file. It will be rebuilt.

Since the thread is tagged with hassbian, I think this is probably an incorrect assumption.

I tried but it didnt work out. So I choosed the more drastic way to reinstall hasbian.

Thanks