In your configuration.yaml, recorder section (recorder: or recorder.yaml file), exclude every domain possible and include only the things you care about. I.e.:
My HASSIO instance just died a few days ago (this happened once before several months ago). I assume it is a corrupted SD card, because everything works fine with a new SD card. My latest backup was about a month old. Some headaches, but not the end of the world. I was back up and running in about 4 hours or so.
Now, a few days later, HASSIO just died again. I added the automatic backup to google drive add-on, so I have a snapshot from last night.
I am certainly guilty of logging way too much stuff. I barely have anything excluded and my log file takes FOREVER to open. I’ll have to change that. I have also been experiencing corrupted database files a lot in the past few months. Lots of deleting the database file and restarting.
Maybe I need a new power supply. I have the power supply that came with the CanaKit which I would expect to be good, but something isn’t right. Anyone have a specific power supply to recommend that is reliable?
To check if your Canakit power supply is good (which it should be), hook up the Raspberry Pi to an HDMI monitor or TV and check the output to see if there are any under-voltage warnings. Bad power supplies should get warnings within a minute or two. If there aren’t, then your power supply should be good and think about other solutions.
The Samsung Evo Plus and Select are identical… Amazon has exclusive rights to use the Select branding. So yes you are using a good card. Get rid of all those writes that you don’t need is a big step in the right direction. If you have a Synology NAS maybe setup a MariaDB I think I spent 45 minutes moving the database off the Pi including time to install the DB and phpMyAdmin.
Funny thing… not sure if others have experienced this. I have a few Pi’s for different uses and each have done the same thing at one time or another… not booted up and a quick turn the power off and on and they come right up. They have different power supplies so I think it is something with the RPi 3 B+. One power supply is from the Canakit, one is a 3 amp I bought and another is a 5 volt 5 amp tap from a transformer so they all should have plenty of power.
The remote database is kind of a no-brainer depending on what you have to run it on. I could not believe how easy it was to setup.
Just make sure that if you move to an external DB server, that it is always up and running. So a desktop is probably not a good candidate. Also, you would need to shutdown HA before you do maintenance/updates on the DB server system.
After my SD card died recently I switched to MariaDB on Synology using Docker, very simple and a noticeable speed boost too on the HA responsiveness.
What did surprise me was a raise from 30 IOPS to 100 IOPS average disk activity on the Synology; even though I have pruned what is sent to the recorder the amount of transactions from HA is still more than I’d expect. Not sure of the cause of those yet, I have to look into some further monitoring tools to trace activity. I’d be shocked if HA team have spent much time assessing efficiency of transactions.
If your windows machine has enough power and is on all the time should work. For windows I would try this (link below) to make it much easier or run it in Docker on windows. I have no real experience with it though. It does bundle everything you would need together.
Also I followed this link to setup on my Synology NAS but I now run in Docker on my NUC. Except for actually installing the Maria DB and phpMyAdmin the rest of the setup should be pretty much the same.
It looks like I’ll try other items before going down the external database route. I changed my config to reduce the amount of writes to the database. We’ll see how it goes. I now have this:
I excluded EVERYTHING that is not on the include list.
From the recorder doc (note the part that says: If set, all other entities will not be recorded.):
include
(map)(Optional)Configure which components should be included in recordings. If set, all other entities will not be recorded.
domains
(List)(Optional)The list of domains to be included in the recordings.
entities
(List)(Optional)The list of entity ids to be included in the recordings.
Basically it breaks down into 3 categories based on what you put in your config:
include only → excludes everything not on the include list
exclude only → includes everything not on the exclude list
include & exclude → 3rd option that I don’t 100% understand.
In the documentation they give a specific example that does make sense. Basically goes like this:
Include the domain “sensor” for example. Let’s pretend you have 100 sensors, but only want to keep 99 of them. You could then EXCLUDE a specific entity. Note this case includes the domain and then excludes entities within the domain.
I’m not sure what happens if you include some domains AND exclude other domains at the same time. It seems like you end up with a contradiction. (include causes unspecified items to be excluded and exclude causes unspecified items to be included this leads to the unspecified items being both included and excluded) Hopefully that makes sense.
I’m not sure I quite got what the documentation is saying either but I’m happy with what shows up in my logbook and I know a bunch of stuff I didn’t need is gone now.
Thank you for carefully preparing two effective hardware repair methods. I have already collected these two methods, and they will definitely be useful to me at the crucial moment. I also have seen several other tips for repairing SD cards. Please allow me to make a supplement.
THX for all the hints, also not thougth about logging config so far at all.
→ Are all this problems not relevant by migrating to “Home Assistant Blue” ?
THX M