HA / Pi stopped working - what to check?

Yesterday my Pi 3 was fine, running HA version 0.1 something. I could access using Duckdns and the HA app.

Today, cannot access using Duckdns or the app. I am at work so not able to view the Pi but I can see it is still connected to my Unifi POE switch and is recognised so internet is working, Pi is connected and on.

When I get home what steps should I go through to start solving this issue?

I have a Samba share set up so should be able to connect to my Pi using Cmd+K on my mac or through terminal but if these dont work not sure what to do, and if these do work still not really sure what to do to fix the issue?

Any help / tips / first steps?

Thanks

How did you install Home Assistant (Hass.io, Hassbian, etc.)? Were you running it on an SD card?

Its Hassio install on an SD card on my Pi yes.

Thanks

How long have you been running it? It’s very possible the SD card is beyond its service life.

Started using it Jan this year, running the Pi 3 B+ with a 32gig Scandisk extreme.

Not sure I want to know the answer to this but if the SD card is dead is that everything gone and lost presumably?

Did you set up a blacklist or whitelist for recorder? If not, I’d suspect it’s the SD card. Don’t want to jump to conclusions though. If you had SSH set up, see if you can SSH into your pi and reboot when you get home. Others may have different suggestions too.

But yes, if the SD card is toast you will likely have trouble accessing data. Do you have a recent snapshot saved externally?

Nope, no snapshots. To be honest its only over the last couple of weeks I have been playing with it lots while at work and have actually started to make inroads into undestanding it (hence I have posted a lot of questions) so not a massive project.

Off now to google how to take a snapshot so that if it is working I can do that! I made a local backup using the HA backup but obviously thats on the SD so in hindsight not much use.

We might be talking about the same thing here. The “backup” functionality in Hass.io is called a snapshot. It only saves locally to your device unless you use the Google Drive/Dropbox add-on.

yep just been googling this, looks like I passed the first hurdle and worked out how to make a backup, but failed at the second by not copying it off the SD card…

important lesson learned potentially!

Good news! We had had a power cut at home! Came back home, oven clock was flashing showing we’d had a power cut so unplugged the pi and plugged it back in and it’s all up and running again.

What I don’t know is why the pi doesn’t just restart after a power cut? The light on it was on, everything it was connected to was working and yet the pi needed to be unplugged and plugged back in to boot up?

Now to make a copy of the backup!

Thanks for the help

Not sure what autostart hass.io uses but I run HA in a venv and it auto starts on power on with a Systemd service.

An unscheduled shutdown (pulling the plug) can cause corruption on an SD card and a power failure/power restore can cause a spike which may have prevented your Pi from booting properly.

Luckily you are back in business but as well as a snapshot I’d image that SD card just as an extra precaution.

1 Like

Thanks, will look into imaging too. All of this is new to me so every word of wisdom from somewhere on here prompts hours of googling and new tasks haha

I would recommend getting SSH working as well as Samba. You can run system checks and restart HA via SSH as well - its very useful.

Did your broadband IP address change after the power fail? DuckDNS should have picked this up but I had a similar issue and lost access - found out my DuckDNS add on was not running and did not update to the new address.

I have SSH working but cannot use that from work. The IP did not change, the Pi needed unplugging and plugging back in after the power cut and after that it loaded fine, so the power cut must kill HA and something must stop it booting back up, but then unplugging the Pi with HA not running, and plugging it back in does start HA running which is odd.

I also cannot SSH from work so I use an App on my phone to get access - in cases where the Pi is back online but HA is still down this enables you to restart HA and get it back up and working. I use a paid for App but there are free App’s that allow 1 saved session to be used.

Have you ever tried restarting the Pi via SSH or from the Hassio system tab to see if HA starts up after the Pi has restarted ?

I use restart server from the HA Configuration menu under server control all the time through Duckdns as currently just learning HA so playing with the config lots.

Is that where you mean?

I had similar problems with my Pi - some components started to fail and HA was crashing eventually. I managed to do a backup and set up a VM with ubuntu, now running HA in docker - it runs perfectly fine now with identical config, the Pi runs fine too with a different SD Card in another project (retropie) - so I suspect the SD card to be degrading/failing after ~1 1/2 years. This was also a sandisk extreme 32gb by the way. So for extended, I/O heavy usage I recommend switching from the sd card to a SSD or another environment where the storage is more… long-time ready :wink:

No. It’s under Hass.io then under System

1 Like