I have Home Assistant 2022.7.5 running on a Raspberry 3 B+.
I actually use HA almost only to control my garden irrigation and individual Shellys, so HA is usually only briefly in active operation and even then not running at full load.
Nevertheless HA restarts several times a day (1-10 times). I have not found any indication of specific errors in the log. To track the restarts, I have set up a notification for this case. Since I have set up HA in such a way that all necessary settings are also restored during a restart, a restart currently causes me hardly any problems. Exception would be if the restart would occur during a running irrigation automation. But fortunately this has not happened yet.
Nevertheless, I would like to know for what reason HA restarts itself 3-4 times a day unannounced. Is this a normal behavior that you may have to expect or is this in principle rather problematic.
I can swap the power supply and SD card. Theoretically I also have another Pi 3 B+ lying here that I can try out.
Whether HA or the Pi restarts I honestly do not know. Is there any indication that can be read? Or do I have to wait next to the Pi
The first question would be, how did you install HA? HAos, HAcore, in a venv? And if HAos, are you up to date on the versions (not the HA version, rather the HAos version)?
But, it sounds to me more like a PI error, than a HA error. I’ve never heard about a restarting HA, it normally crashes and stays that way. But for PIs, yep, that sounds reasonable.
As already mentioned, you need to watch the PI for power outages and SDcard errors.
To help you further, one needs to know, what way of installation you chose. If it’s running HAos, you should see something in the supervisor logs, if you run the PI with a “normal” Linux, you should see somethign in the syslogs.
In HAos there’s a new integration (automatically set), that is called “Raspberry Pi Power Supply Checker”. It should give you some information about the power supply.
I changed the power supply (2.0A) now and watch HA with it. Unfortunately I don’t have a 2.5A RPi power supply, but actually I don’t have any consumers. Should the problems still occur with another SD card and / or the replaced Pi, I may have to get a 2.5A power supply.
It’s just a guess, because I don’t know your system, but with 2A power supply, you can run the PI, but only without any further dongles or SSDs. And there shouldn’t be any power intensive tasks, like compiling an ESPHome firmware or extended DB updates.
If you have a dongle for Zigbee or Z-Wave, or an SSD instead of an SDcard, it sounds very plausible, that you run into power issues…
The least you should provide, is the same power the official psu provides. Under that amperage, you can find tons of reports about strange issues happening.
Is it 64bit or 32bit? I started having the same issue after switching to 64bit. The same setup takes roughly 25 % more RAM with 64bit and when it runs out while doing operations like backups or updates, it just runs out of memory and crashes, or kills the python3 process which is the core of HA.
So to me it looks like the current consumption overall doesn’t really go beyond 0.7A @ 5V
And that’s actually something I can confirm as I use Pi 3(+)'s with 1.2A and 1.5A power bricks and even peripherals without any troubles.
Another thing is that if one uses a 2 or 2.4A power brick with micro USB for a Pi it’s almost guranteed that this currents will not reach the Pi actually because the micro USB specifications define a “maximum” of 1.8A@5V for a good reason - the tiny connectors on the micro usb connector/socket will heat up because of the high resistance
Why? Your numbers show exactly what I’m saying. Use it without anything plugged in, and you’re good to go. If you plug something in, check the psu, if it brings on enough power.
This is from the first ressource you quoted:
Factors Affecting Power Consumption
Here are things to consider when judging the power consumption of your Pi :
Attached USB devices draw power from the Pi’s USB ports
Keyboards and mice draw different current depending on their brand or design
On-board WiFi and Bluetooth will draw power unless disabled
Pi Models with multiple cores will use more power as those cores are put to work
Items attached to the GPIO will draw power through the 3.3V and 5V pins
Again, yes, if you use your PI with the “defaults”, you don’t need a bigger psu, but as soon as you plug something in, use Wifi and BT and a ressource hungry app like ESPHome, there is simply not enough power.
Or why do you think are even here in this forum a lot of threads, that complain about freezing the PI while compiling a firmware in ESPHome? In many cases this was solved by using a bigger (or better the recommended) psu.
I can see where you’re going with this, but I can’t agree with you. We both don’t know, or at least didn’t know when we wrote our posts, what could be plugged in, and therefor I find it totally valid, that one could speculate about a power issue. And even if we would have known, without the real power consumption data from the devices, we couldn’t rule out a power issue.
And we don’t know as well, how much power the used psu provides. Wouldn’t be the first, that says 2A and brings on not much more than 1A. That’s why the PI foundation recommends specific values for the psu or to use their own.
If nothing like this happened to you, you’re lucky. I had it with two PIs, that they didn’t work as expected, and the reason was not enough power. I didn’t bother about checking if this would have been transferable to other PIs, because the problems went away, after I changed my psu to the original one. But I as well have two PI3B+ running, that even work with a plugged in SSD, but with disabled Wifi and BT.
So yes, my point still stands: if you have something plugged into the PI, you should take care about the power consumption and the psu. But as I said as well, it is just a guess without knowing further details.
But after your answer, @Hannah.b, I would go with @Stooovie suggestion. Check the RAM use and see if something comes up there. And if you have the time and tools, I’d still check the power, the psu really provides. It is amazing, what sometimes is written on components vs the real provided values.
I don’t think so. Your claim is that 2000mA is only sufficient to run the “car” empty and in the lowest gear while I’m running one of that “cars” not only with load (usb receiver for mouse/keyboard, 433 rtl usb dongle, usb ssd) but even overclocked with a power supply then can deliver “only” a maximum of 1500mA. The other RPI3b+ (also overclocked) is running of a 1000mA PSU and is doing fine since ever too.
So it’s not only the available sources which don’t comply with your theory but also my practical experiences are contradicting it.
Because they are running out of memory. The Pi 3’s only had 1GB and that is gone quickly when compiling and running ha in background
But instead of randomly suggest to oversize the power supply by factor two or three it would be much better to concentrated on the typical weak points.
Typical the weakest link is actually the (mico)usb cable itself. They often have a resistance which is to high for a stable operation. Best is to try with a short and quality cable (not only thick on the outside but actually thick wires on the inside) and at least two different PSU (no need for 2 or 2.4A ones - 1 or 1.5A are totally fine when not loosing half of the power in heating up the usb cable and micro usb connector )
Another way to spot a “bad” or “aged” power supply which can’t deliver the values it’s rated for is actually to watch the logs as the berries typically detect under voltage and log this