HA stopt working

Hello,

unfortunately my Home Assistant stopped working last night. I was running the previous version since 1 week without any problem.
Over night it stopped working. I’ve unpluged my raspi, but no sucess.
Are there any steps for solving such a problem. Or should I reinstall HA again an insert a snapshot?
I have a snapshot from beginning of january. Unfortunately I make every week a snapshot, but totally forgot to download it.

regards Tim

When you are up and running again:
GitHub - sabeechen/hassio-google-drive-backup: Automatically create and sync Hass.io snapshots into Google Drive

Can you ping home assistant?

Did you have SSH enabled?

Have you tried connecting via that method?

You can probably get the snapshots of the SD card using a Linux PC or using Linux Reader (free) on a windows PC.

Also there are many options to create and copy off your snapshots automatically:

To a NAS: Samba Backup: Create and store snapshots on a Samba share

To Goggle Drive: Add-on: Home Assistant Google Drive Backup

To DropBox: Hass.io Add-on: Upload hassio snapshots to Dropbox

To NextCloud or S3: [New Addon] Snap-Shipper - Webdav and S3 backups (and probably other ways to later on)

1 Like

SSH is disabled.
Going to tets if i can ping it tonight.
When I insert a snapshot, do i have to reconfigure all my tasmota switches ?

No, you shouldn’t have to do that. Restoring a snapshot should take you back to exactly like when the snapshot was taken.

Plug in a HDMI cable and connect to TV or monitor.

1 Like

This is the screen when I plug the raspi to hdmi
Incan ping the raspi
But I can’t access with the browser or app

Well that’s good news. Home assistant is running.

First try this command:

ha core check

Also check the logs:

ha core logs

No need to login.

1 Like

Core check is just running and running

Don´t give up. I just ran this on my system (RPI4) and its already taking 5 mins(and continuing), so just let it run.

Here is a list of commands you can use:

Completed now. Took around 7 minutes.

That looks like your database is corrupt.

Navigate to your config folder ( cd /config ) and rename the database with this command:

mv home-assistant_v2.db home-assistant_v2.db.old

Then this command:

ha core restart

Assuming that works we can fix your uptime sensor after that.

1 Like

I am back online :heart_eyes::heart_eyes::heart_eyes:

2 Likes

Great.

Now go to your config folder however you normally do (SAMBA?) and delete home-assistant_v2.db.old.

Also edit your uptime sensor, remove the unit of measurement.

1 Like

You’re my hero,
Everything is running again.
But what caused the broken db?

Did you have a power outage?

Pulling the power before home assistant is shut down can corrupt the database, so can restoring from a snapshot, so can system updates (sometimes). It’s not very robust. I recommend MariaDB. That at least seems to be less prone to the third cause.

  • Power Outage / Undervoltage
  • Corrupt filesystem

I’ve got another problem now
Everytime when I open my app now I get this notification.

I guess your API token got lost, too. Remove you device from the Mobile App integration and start over.