Installing Home Assistant on a RPi 4b with SSD boot

Sorry for a big statement, but look:

  • I tried three different SD cards.
  • I tried various OS versions
  • I tried your guide and tried four different SSDs.
  • I tried to have local MariaDB instead of the default db in the file.
  • I tried remote MariaDB on my synology NAS.
  • I tried to cut some integrations (MQTT mainly) and kept only zigbee with 50 devices, about ten wifi switches and netatmo (beside all the basic ones such as printer, router, synology sensors.)
  • I even tried to buy a new router.

Btw finally when I was running both instances, I realized, that the freezed RPi (disconnected, no ssh, no ping over lan) still sends commands to netatmo, so it is apparently not freezed completely.

The only and extremely quick solution was to put it to VM on my desktop computer. Everything is superfast, more responsive, stable, reliable and all the bugs, delays, freezes I experienced are gone. HW test by RPidoctor does not return any troubles.

Fresh install of HA on RPi that only sends shell commands to my projector (and is controlled by hacs hass remote control) makes the RPi stable. So I am fine with buying NUC for HA. It will work.

I guess you simply saturated the Pi with whatever your automations do.

Sure you can throw hardware on that kind of problem. You will succeed and doing that will always be the cheapest solution if your time is worth money.

All I want to say is that what you experience is not a general Pi problem. A Pi 4 is absolutely capable of handling the load of even a quite extensive HA installation.

As I said before the downside of more powerful hardware is its carbon footprint. A HA system will typically run 24/7. Your NUC will easily consume 5 to 10 W more than a Pi doing the same thing. Over a year this sums up to 40 to 90 kWh or an equivalent of 20 to 100 kg of CO2 (depending on the carbon based fraction of power generation in your country). So the difference between RPi and NUC is not only more ooomps but also up to 50 m3 of additional CO2 per year.

IMHO this is far too much for an unspecific “RPi is to weak for HA”.

1 Like
  1. The freezing problem.
    I see many other people around in other threads with the same problem maybe caused by different errors. What we share is the fact that there is no debug method to cut down possible causes and find the one causing the freeze. There was a memory allocation problem in version 4.9 or 4.8 during which I firstly experienced the freeze. The developers of the HA Core fixed this and said there is no other bug to be fixed. Again, problem is that I do not have means to submit an extensive log. I can, of course, continue with looking for the cause but…

  2. The wife problem
    I cannot run my home toys on an unstable system because then my wife cannot switch on a simple light. That’s a problem beside all the HA complexity - the simply happy wife makes your life good.

  3. Carbon problem
    I plan to control my solar power plant with HA, manage flow of energy between PV, earth heat pump, heat reservoir for storing excessive heat in hundreds of C (oil) for usage in winter and heating/cooling the house. I plan to cool down my PV during summer to assist the heat pump (and store the excessive heat), so to control the temperature of the whole system on various levels, to control all valves for heating and cooling and other ideas. My first intention a year ago why I decided to understand HA was to make my life as sustainable as possible and mainly to control the energy. In this regard, I need stability, reliability and the difference of carbon footprint between RPi and NUC is negligible in relation to what I plan to achieve with my living.

Finally, don’t get me wrong. I was excited to see a single board capable to do such amazing things without a fan and for a fraction of energy. But if I put the same instance to VM and it works, then the problem is the RPi or it’s OS. I am ready to help somebody to solve it if there is way to contribute to the community this way.

I’m setting up a brand new RPI4 4GB together with a Argon One M.2 SATA case and a Samsung 860 Evo M.2 SATA SSD.

I followed this tutorial and flashed the latest HASSOS release (5.12) to the SSD using Etcher for Raspberry OS.

Unfortunately this does not seem to be working. When I turn on my RPI, I don’t see any boot screen at all (the one that has a QRCode is dislplayed only when booting from the SD card), although I can tell that there is some HDMI signal that makes my monitor to stay on.

Is this release USB boot friendly? Or is there something that needs to be considered besides this tutorial to make it work?

Well, it seems that the release is the culprit. I was trying to use the 32bit version, but I read in some other topic (Raspberry Pi 4, Home Assistant OS (5.5, dev version) on a SSD, and the Argon One M.2 Case (In Progress)) that someone else was having the same problem and solved it by using the 64 bit version.

Now let’s see if I can get it up and running :slight_smile:

Hi, can you please update here if using 64bit solved your problem? I have just bought my Argon M.2 case also, will move SSD booting soon.

Try this method,

https://krdesigns.com/articles/installation-home-assistant-with-supervisor-on-debian-10

My RPi4 is currently running 32bit HA OS. Moving to SSD, I would like to go for 64bit as it seems it has higher success rate.

So the question is, can I restore a 32bit snapshot to 64bit OS?

Yes, this is no Problem!
I have here a Raspberry Pi 4 4Gb in the Argon One Case running with a HassOS 5.12 64bit image. I restored it months ago from a 32bit SD-card installation.
In the meantime I changed from an external USB 3 SSD (120GB) to the internal M.2 SSD (WD Green 240GB) inside the Argon One case with a snapshot without any single problem.

Thanks for confirming. When you doing the snapshot restore, are you restoring everything?

Yes, sure! I did it directly at onboarding. And everything was the same as before.

1 Like

Snapshots do not restore the OS. That is why a restore takes two steps. Etcher to install Home Assistant and the snapshot to restore your configuration. This is why you can move between hardware with (mostly) no issues.

1 Like

I solved this behavior of black screen by using the above recommended cable and using 64bit installation. This combination worked for me.

Thank you for the detailed note. With the right hardware, the move to SSD was a simple 3 step breeze.

  1. Updated EEPROM with PI Imager
  2. Flashed SSD with Etcher
  3. Restored backup at onboarding.

Thanks again for the detailed documentation.

1 Like

I’m now updating the RPi4 bootloader firmware to have the USB boot. I flashed the USB boot firmware using the Raspberry Pi Imager and insert the SD card into my RPi4.
However, it’s now more than 10 min and green LED is still blinking, longer than I expected.

How long does it takes actually? Do we need to have internet connection while it’s updating?

When the green LED is flashing, it is ready. You can also connect a Monitor to HDMI and you will see a complete green screen when it is ready. it doesn‘t need an Internet connection!

Thanks. I have successfully migrated to SSD boot.

Hi, I have just moved HA to Argon M.2 case with RPi4 8Gb + Kingston A400 M.2 SSD. The migration process is easy and smooth. I have CC2531 hooked up to the RPi4 with an USB extension cable to USB2 and it seems stable.

Here are the quick re-cap on what I did for the migration,

  1. Update the bootloader firmware by flashing the USB boot firmware with the Raspberry Pi Imager software. There is USB boot firmware under Misc section and the flashing is very quick, ~1min.
  2. Put the SD card into RPi4 and hooked up the power supply, no internet access is needed. The green LED should starting flashing. I was told the firmware update is completed in seconds, but to be safe, just wait for +/- 10min and shutdown the power supply and pull the SD card out.
  3. I flashed the SSD with Etcher using a male to male USB cable connect to the Argon M.2 case. This complete in less than 5min.
  4. Complete the case assembly and fire it up, the new HA installation complete in less than 10min.
  5. I created a new account and upload my snapshot and do a recover everything. This takes around 15min to complete.

And that’s it, migration complete.
I plan to activate the active cooling some days in this week.

Thanks @Jpsy for this amazing guide.

1 Like

Why didn’t you used the Raspberry Pi imager also? It works with it without any problem!