rPi resilience for Home Automation IoT usage or time to walk?

Hi HE Wisdom of Crowds :smiley:

I'm using an rPi to supplement my HE system (to run my custom dashboard using Apache2, and Node-RED for various flows which unfortunately run like a dog on HE). However I've recently experienced some really poor resilience problems with my Pi's - sdcards going bad, crashes, maybe heat related? not sure, poor performance until rebooted, etc. It's become a real problem and sink of my time. I've surfed various articles and implemented some things but just had yet another sdcard go down and now thinking maybe it's the device itself. Ugh. Seems these devices are cheap but basically crap. So..... I'm looking for best practices, guidance, articles etc that might help me set up something much more resilient. I'm close to thinking that it's just not worth using a Pi at all for this kind of thing and maybe it would be better to get a small headless PC instead (I know @aaiyar swears by his). I could set up automated backups but it seems they will be slow and really just provide a means to recover when the inevitable sdcard crash comes again. I could set up a ssd drive instead but that looks quite complicated and a cobbled together solution, not 'out of the box' and requiring quite some setup.

  • How to setup the best solution for trouble free operation and relatively simple setup? (eg. cost is not the main driver)
  • Tools to monitor performance/potential/root-cause issues?
  • Maintenance/fix tools?
  • Etc.

Please bear in mind I'm a keen amateur, not a programmer or Linux wizzkid ok. So please pitch your comments/recommendations accordingly :rofl:

I'm basically just getting tired of continually having to fix sh1t with my setup every other day.

Thanks all.

You don't need a headless PC if your usage is light. There RPi-like SBCs that have eMMCs (or can use eMMCs) instead of being solely dependent on microSDs like the RPi. And having suffered from microSD corruption at least once, I won't use an RPi .....

1 Like

Does it mean that this could be an improvement?

Yes. I've no experience with those specifically, but it would be a huge improvement over a microSD.

There's one or two things I can contribute...

When I bought my rpi 4 I also purchased the genuine (plastic) case. I found out quite quickly this had a big impact on the potential overheating of the rpi, easily getting up to the 80 - 85C needed to start throttling the cpu.. I started by cracking open the case slightly and running a pedestal fan over it while I put a more appropriate case on order. I chose a Flirc Raspberry Pi 4 Passive Cooling Metal case through Amazon. This brings the temperature down to a relatively stable 45 - 55C.

The other thing I did was write a small script to send the current temperature of my rpi to HE via the Maker API, storing this in a virtual temperature device every minute. This then gets sent back to my rpi as part of my InfluxDB / Grafana setup, allowing me to monitor it over time and setup alerts if I wanted, either through Grafana or HE, though I haven't done that part yet. I'll track down the posts I have made on this...

I plan to setup an "administration" dashboard showing things like the rpi temperature as well as disk space, memory, cpu, etc, as well as other stuff relating more closely to the HE hub. Again this could help keep an eye on things. There are a couple of community apps / drivers already that can help in getting some of this info.

4 Likes

I also plan to transition to an external hard drive or alternative eventually

1 Like

I read somewhere that if the temp on the Pi gets to 85 degs (I think it was) then a pop up display of the temp would come up on the desktop showing the temperature. Never seen that myself. A couple of my Pi's have a fan but they end up being really noisy in no time or get clogged with dust. The design is just rubbish in my opinion. So I've been using a passively cooled device but it is in a plastic case so maybe is overheating. Again, pretty poor design for sure.

Will look to implement your temp monitoring, that's a great idea, thanks.

1 Like

The Flirc case certainly seems to have solved it for me, though I do just have the rpi sitting in amongst my collection of other hubs, typically connecting remotely via SSH (putty) or less often via an rdp session. By that I mean I don't typically have it connected to a display, which would contribute to more processing power and therefore heat if I did have it connected on a regular basis I would think.

I would also say that I think it is worth persisting with having something like a rpi, it does open up a lot of options, and I'm by no means a massive user of mine.

1 Like

I'm going to try mine with the top off for a few days. Yeah, will try a metal case too I think. And probably fit a UPS (it has been power cycled when it's seized up a few times, which I'm sure hasn't helped).

Use one of these available at Amazon quite cheap and any small SSD should fix that.

That said I have used Sandisk ultra class 10 micro SDs so far with no failures (obviously buy from reputable dealers). Setting up a Pi4 to boot from SSD is a simple matter of updating the firmware if you have an earlier release. SSD support is already built into Pi3's.

Pi4s generate far too much heat even at low computing loads IMO. Even with a metal case I have an outboard 80mm case fan mounted behind it constantly running at its lowest speed to keep the normal temp at around 45C (10C less than without). Works much more quietly than these tiny fans that plug into the header. If I were buying another case I'd get those where the top is one giant finned heatsink.

EDIT:

This. Headless is the only way to go! :smiley:

1 Like

Not sure if you mean SD cards or RPi’s as a whole? SD cards certainly don’t seem to be that resilient for use as a boot drive, but I have found RPi’s to be remarkable little devices, especially considering their price point.

It’s possible to configure an RPi to boot from USB, which opens up other options in terms of flash storage that should be less prone to self-destructing than SD cards.

1 Like

For normal node red/mqtt type use they are more than adequate. If however you start running a DB like influx and do a lot more writes than would normally be the case this will definitely bring down the MTBF.

2 Likes

I agree. MicroSDs are the failure point; the RPi hardware per se is fine.

Having said that, there are other SBCs with a similar price point that have built-in eMMC support, support stock Debian/Ubuntu, and have beefier processors.

2 Likes

What would be your latest and greatest recommendation? Not crazy price but the best bang for the buck (I'm very ok to spend 2x or 3+x the price of an rPi4 for something better). And that would be relatively easy to setup and maintain, including the OS.​ Thanks.

This is your solution right here. rPi's are commonly used for Home Assistant and the SD card's are a constant point of failure. The recommended solution is always to use a USB SSD.

3 Likes

If your biggest concern is the SD card, even the RPi 4 now can be setup to boot off of an SSD drive easily. If I can follow the instructions successfully, anyone can. I am using an RPi 4 8Gb with a 128Gb SSD drive for my Node Red Setup. The SSD was about $35.

1 Like

Thanks guys, will look into this.

I've always been partial to the Odroids. The N2+ 4GB model is really good as long as you can live without onboard WiFi/BT.

1 Like

Ok, thanks.