It's Dead, I have lost the lot

Hi All,

I had to pull the plug on my Pi and the worst has happened. I aren’t going to give up on my home automation dream (for starters I have too many buried tasmotised things) but am now put off the raspberry Pi.

I do have a PC that I can run 24/7, or an android box. What are the best options for starting again. I feel the PC is it. How do I start. How do I protect myself from this ever happening again.

Local control is the way forward but I need to protect it.

All input would be great.

Thanks.

Ensure you have backups? HASS.IO provides a snapshot feature, there are also add-ons that will do this automatically for you.

2 Likes

Backups. Just like any data that you don’t want lost. Backups.

4 Likes

No need to ditch the Pi, but switch to the reasonably new option of booting from a USB HDD.
You won’t have to worry about SD card corruption.

Couple that with the Google drive snapshot backup add-on and you’ll be near bullet proof.

2 Likes

I can but echo the above statements, you can tell people on a daily basis to make backups but they only really take notice when they lose weeks of work.
Doing an install from scratch only takes a couple of days with all the integrations and configuring components (you did take separate notes of you api tokens etc. didn’t you ?).
But its the hours spent getting the order of your entities ‘just right’, the most appropriate ‘names’ for your input boolean’s, the different icons in your icon templates etc. etc. etc. (image of Yul Brinner looking imperious !)
I bet you won’t do that again !

Well, you will, but your snapshot won’t ever be more than a month old (hopefully) :rofl:

Snapshot every day and there will be no more tears. Do this automatically and have a cloud based copy too incase your main drive dies.

1 Like

Good food for thought.

I did try and set up the google drive integration but gave up at the time as I have been busy doing other things. I did use snapshots as well.

Can I use a small SSD then to boot from USB? Was thinking of upgrading to a Pi 4 later on in the year as well.

I think in the long run this will be a blessing in disguise as all of the mistakes I made were buried in there and I need to re-structure my IT to be able to add more items.

Gonna be a massive task though.

A stroke of luck at least, my config file is still open on my laptop. Half of the battle right there.

I can tell you, I lost my SD card to Pi corruption twice. Both times, I had an extremely recent backup saved to another computer. Reformat SD card, re-install Hass.io from scratch, copy in the backup, tell Hass to restore it, and BOOM you’re back in business. After about a year of Pi usage, I upped my platform to a gently-used Intel i3 NUC with SSD and never looked back. Even a Celeron or Pentium based computer is an upgrade from a Pi in terms of stability and performance.

1 Like

I did the same. It’s been 100% solid and worth the speed increases IMO.

1 Like

With the huge amount of people that seem to experience SD card corruption/failure, I’m starting to think a warning really should be put up along the lines of, SD cards are great to tinker, but when you want to move to a serious build, USB boot is recommended. A ‘recommended Pi hardware configuration’ which includes a USB HDD or SSD.

My venv build (which does run a lot of other things besides HA), was chewing up and spitting out SD cards every 3 to 6 months. They were the expensive Samsung cards too, so not cheap ones. After two failures in fairly close succession, I gave up and went to USB SSD boot and had no issues since. I suspect wear-levelling on SD cards either doesn’t work, or is insufficient to avoid the issue.

Regardless of whether you are using venv, docker, Hassio, etc, the underlying linux OS is doing far to many writes to be sustainable long term.

They are pitching at a low cost entry to home automation, that pretty much means a pi.
Once you’ve tried it you can decide if you want to give up, or persist and give some time to consider upgrading perhaps to a NUC.

I have been running a pi for 2.5 years on the same card.
Though I have disabled all history and logs.

Which I agree with, but people don’t expect their cards are just going to cark it and so soon. At least if there was a note saying it was a common issue, and that its recommended to use something with better reliability, we’d see a lot less people on the forums saying they’ve lost all their data.

The Pi is pretty much an otherwise perfect solution, draws significantly less power than a NUC and cost 10x less. My Pi4 barely scrapes beyond 10% CPU load even with all the other crap running on it, so it doesn’t warrant spending a lot of money on a NUC.

1 Like

As some feedback on my overall experience so far, I am loving HA. I had a feeling this could happen and it shouldn’t take long to get going again. The biggest frustration for me has been setting up the google integrations. It would be great to just set HA in the normal google home way instead of around the houses method.

The other one for me is text based automations, I didn’t even attempt this, I personally find Node Red approachable, visual and intuitive. I also love lovelace UI and anyone I have shown this look impressed.

So for me it’s time for HACastle 2.0. SSD version. Here I go

I set up google drive back up 6 months ago and have not touched it. This was a prompt for me to check and to my great and pleasant surprise

Good time to do a restore test over the weekend

1 Like

Not the best solution. My USB-SSHD died after 8 months. Now I try SSD with NAS :slight_smile:

Or I would try Sandisk endurance 64gb with plenty of free space for wear level. :slight_smile:

Hey Jamie, i feel your pain on the data loss. but the pi is great has some benefits i have struggled to replicate on other platforms namely bluetooth & bluetooth LE.

1st of all backup, regularly. i use https://github.com/samccauley/addon-hassiogooglebackup which works great & takes a nightly snapshot and stores it off-site :slight_smile:

I also keep a spare sd with hass.io setup & working taped to the side of my pi - this way i can switch out sd cards - restore from most recent backup and i’m good to go. takes around 10-15 minutes.

lastly by default hass.io uses sqlite which writes the database to the sd card - this can lead to lots & lots of writes to your sd card basically everytime an entity updates it is logged to your database. restricting the data stored using the recorder: component can help. I moved away from sqlite and have a MySQL database running on my NAS this reduces the load on my SD drastically but i can still log data. i last changed my SD card a little over a year ago now :slight_smile:

1 Like

I will stick with the Pi, I have a 120gb usb SSD on it’s way and a fresh install of HA on a not too good sd card but will get me up and running again.

I have sorted out my tasmota devices and made them static IP as my router couldn’t reserve any more dhcp address and will this time make sure my backup system is working before I do anything else.

To be honest, I’m not sold on automatic backup’s.
Some seem to see this as a ‘cure all’ solution.
If I have had any changes to my config in the last 6 weeks - why bother backing up ?
Ooooh I’ve just spent 4 hours building this widget to do that task, I’ll spend another 60 seconds doing a manual backup - no big deal.
I know how important backups are and I also know that taking a picture of the same scene I took a picture of yesterday is both a waste of time and potentially just adding to my wear issues.
If you are clumsy or just forgetful then it will be a learning lesson and you’ll treat it more seriously next time.
I also see people making backups of backups of backups. (though I do have two backups but I’m both ocd and paranoid) work out the probabilities. Let’s assume a 5% chance of failure of each store so 5% * 5% * 5% = 0.0125 %. I like those odds and don’t feel the need for a 3rd backup. (real failure rates are probably a LOT less.
Still I also realise that this discussion will not make the die hards at the “yeah ! I’ll do a backup tomorrow” brigade, nor the “and I’ll do a full disk image as well as the backup to NAS, local PC, Google drive and one drive backup. Oooooh! I’ve also got a thumb drive too”

Find something you can justify, makes you feel safe and let subsequent experience modify it from there.

I’ve just lost a whole PC workstation :roll_eyes: , am I bothered ? No (but I am frustrated).
I’ll get it back up and running in a couple of days because I take ‘reasonable’ backups (mainly of the data) the apps and OS’s can easily be replaced (provided you backed up the serial numbers etc.)

1 Like

Yeah, when I changed my modem / router I selected one that could reserve 300 addresses (draytek vigor)