Installing Home Assistant on a RPi 4b with SSD boot

So, I think this is happening to me too.
HA OS running on a Raspberry Pi 4 with an SSD.
I used to have a few Aqara sensors and also some Arduino sensors I created, sending data via MQTT.
The most important sensor is the door sensor which, when triggered, I receive a message in my Telegram.
Sometimes, specially when on holidays, the whole system collapses, it’s not possible to access Supervisor or to reboot HA or after a while, to open the UI
I have been investigating this is the last couple of weeks, reinstalling HA with less integrations every time.
I reinstalled it yesterday morning, with 2 temperature sensors only (Arduino, mqtt), and nothing else. I even changed the Raspberry Pi internal IP and the duckdns name to avoid exterior calls messing with HA. Overnight, the issue happened again. I managed to open the logs just before it all stopped, and there are like 15 errors related to the database, but the first one seems to be:

Saving JSON file failed: /config/.storage/auth

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 74, in save_json
OSError: [Errno 30] Read-only file system: '/config/.storage/tmpfrfyz7yq' -> '/config/.storage/auth'

I’ve been searching for the errors, but couldn’t find a proper cause or workaround.
Any help would be really appreciated!

This seems to be the error. Home Assistant can not write to whatever anymore.
I suspect that the SSD is getting not enough power, so it is shutting off. What power supply are you using for the Pi and how is the SSD attached?

You know that you can use notify together with the Home Assistant Companion App? You can send 500 messages each day which are send via push (so no direct connection is needed between Home Assistant and the Companion App).

The Pi 4 is powered with the official power adaptor, 3A 5.1V if I remember it well. The SSD is plugged to a USB3 port. The Pi is connected to the network via an ethernet cable and the only other device connected is a ConBee II usb stick, not currently in use in HA, connected to a USB2 port.

Regarding the Telegram notifications, I just prefer to use Telegram. I was using the companion app on a couple of devices, but uninstalled them as part of the investigations of the issue.

Du you have the possibility to attach the SSD to a powered USB 3 Hub and then to the Pi? But I am not sure if the Pi will boot in this configuration.

it won’t, unless the powered hub does not back-power the Pi. Which is something you wont find documented on the hubs unfortunately.

I have found 1: see: Pi4+SSD too much to handle for powersupply? replace with - #24 by Mariusthvdb

I have the following configured and it works:

Pi4 → USB3 → SSD (boot disk, no SDcard in the system)
Pi4 → USB3 → Tube EFR32 Zigbee adapter
Pi4 → USB2 → unpowered usb hub → powered USB hub → HUSBZB1 stick

My Pi4 is an 8GB model using the standard PS. I do not currently have a GPIO fan.

If you are wondering about the dual setup in #3/USB2. It is to avoid backpowering from the powered hub that prevents the Pi4 from booting.

But why the powered hub in the first place? The zwave stick doesn’t need that?

I was worried that between the SSD, ZWave dongle and HUSBZB-1 that I would draw too much power from the Pi. I have not tested it without the hub though…

sorry, I missed that you had an SSD attached to the #3 also.
And about the double hubs, well, I guess thats possible, but for me, it is a bit too experimental for a system that would be the production system. I’d love to keep things as tidy as possible, and given the technical state of many of these hubs, I prefer eliminating or better yet preventing them as much as possible …

I also found that preventing the processor from heating is way more effective. the Argon case really made my Rpi4 system rock solid, and no power outage has been recorded ever since (even with the SSD directly attached)

I completely understand. My experience has been that the two hub model works really well and is super solid. That said, I can see your point too. My current system is not really mission critical, but that will likely be changing in the near future.

I have an Argon case too, but mine is the fanless passive cooling variety. It is handling temperatures efficiently. I actually bought an Argon smart fan for it but find that it is not needed and so have not installed i.

Thanks for writing this guide! Just went through it, followed the directions exactly, and everything worked great first time! I used Startech 3.1 USB as advised).

1 Like

I can’t seem to get the logic about using the double hub to avoid the backpowering. When both unpowered and powered hub are connected, the 5V rail are actually still connecting all the way to the 5V rail at the USB port on the RPi. So the backpower could be still happening.

The only way to avoid the backpower is isolate the 5V rail of the hub from the USB port on RPi.

How long are the cables for both of the USB hubs?

I see your point and am not sure. I always assumed that the unpowered hub somehow blocked the 5v rail from returning power or something. All I can say for certain is that it works.

When you said it works means it has no issue doing host reboot? Or it just a server reboot?

Also, I noticed you zigbee stick is connected to USB3 port directly without USB extension cable. Is your zigbee network stable? USB 3.0 is known have interference that will interfere with zigbee.

When I said it works, I meant that it solved all reboot issues. Prior to the unpowered hub, the Pi would hang due to the power from the powered hub. Now, all is normal.

Regarding USB, it was weird as I was trying to get it running and it would not work on the powered hub, the unpowered hub or even a standard USB2 port. For whatever reason my EFR-32 based coordinator (from Tube) only works on the USB3 port. Not sure why, but it works and so I am asking questions. :slight_smile:

Good to know even with USB3.0, the zigbee stick is working fine. I’m asking because recently I’m trying to migrate my cc2531 to cc2652p stick and all the while my cc2531 stick is connected to USB2.

When I connect my cc2532p into the same port, my zigbee end devices doesn’t want to join. I have confirmed the cc2652p stick is working fine at another RPi setup which runs HA on sd card.

So I’m suspecting the new stick need higher current to make it work.

Maybe that was my issue too and why I had to use USB3? I am not entirely sure. Maybe try it?

  • SSD: 120gb integral
  • USB 3.0 startech SATA adapter (USB3S2SAT3CB)
  • Raspberry Pi4 4 Gb
  • Official Power supply 3.0A 5.1V.
  • Hassio firmware: haos_rpi4-6.2.img.xz

No luck with this set up, usb boot failing and I’ve been troubleshooting for the last 6 hours! Anyone see anything obvious I’m doing wrong?

Where I am: data adaptor status led flashes a few times at boot and then solid on, not RPI boot screen or any HDMI output (black screen). RPI status led stops flashing after a few seconds at boot.

Most likely your USB3 adapter is causing the issue. There are working adapters mentioned in this thread.