Reducing all writes to SD card (revisited)

This seems to be very popular topic. The problem is that there’s too many threads about it. Many (most?) of which offer differing solutions, some of which may have applied to hassio at that time of development, and may not be valid anymore? Many of the threads don’t have a satisfactory conclusions on how to minimize writes to SD card.

I’m using HASSIO on a Pi on SD card. It’s my zigbee and rules engine (hassio, zigbee2mqtt, node-red). I would like to put logging in RAM (which I’ve done by editing fstab). But there’s also database writes that need to be disabled? I’m suppose to remove “recorder” and “history” components from configuration.yaml. But those components don’t exist in my configuration.yaml file. I think it’s still recording history, because I can see a history of when the lights get turned on/off.

Any tips would be appreciated.

And now there are more :smiley: Reminds me of xkcd’s comic on standards

But on to your problem… I thought it might be included in the default config. But that only has the history and logbook components integrations according to the documentation.

It seems that the recorder is now included by default and you have to add recorder: to your configuration.yaml file to change the defaults (to exclude everything).

This seems to have changed sometime before September 2018.

Ok, so that seems like something new to watch out for. So as of right now (v0.97.1), it seems you have to do two things to minimize writes to SD card.

  1. put logs into RAM (if you still want to see logs, which is useful when troubleshooting). Do so with fstab
  2. remove database writes by:
    a) comment out “default_config” and put in just the components you want.
    b) explicitly exclude every entry in “recorder”?

I’m not really sure how to remove database writes. I’ve commented out default_config here, and put in a few components that others have done. But it’s confusing what we’re suppose to do with recorder to not record anything. Can I just include nothing? Or do we have to go through and exclude things individually? Would including nothing make it exclude everything?

include
Configure which integrations should be included in recordings. If set, all other entities will not be recorded

recorder:
  purge_keep_days: 0
  include:
    domains:
    entities: