Jump to content

To Raspberry Pi or not, that is the question.


TerryE

Recommended Posts

One or more RPi SBCs seem to be the go-to systems for those wanting to do home automation on a budget.  I currently have 3 running my entire home environment:

  • A RPi3 + battery backup hat + ½ Tb SSD doing my CH + HW logging and control on a bare bones overlayFS-based NodeRED stack.
  • An Argon One.M2 RPi4 + ½Tb SSD running my HomeAssistant system.  All of my non-mission-critical smart switches sensors, buttons, etc. connect into this using Zigbee, TUYA or ESPhome over Wifi. 
  • A Flirc RPi4 + 1Tb USB3 SSD running overlayFS + docker which hosts a bunch of other containers for Pihole, my Wordpress stack, VPN, FTP service for my external cameras, etc.

These basically do all of my home automation for a capital outlay of a few £100s, and they generally do it well, except for a few really annoying exceptions. These are:

  • Power-out recovery.  This only happens a few times a year, but when it does it can be a real PITA.  The overall system does not recover and restart seamlessly, as there is a race between my BT Infiniband modem, my 4×Asus mesh router / access points, these RPis and the various containers / services running on them.  Almost invariably I need to manually restart something to get everything talking to each other, which is a slight hassle if I am in the house, but we once had a power-fail when we were in Alonnisos, and the docker stack running my VPN couldn't connect to the router, so I couldn't VPN in to do this recovery remotely.  All too fragile.
  • SD / SSD failure causing RPi outage.  This has happened about once a year on average over the 5 years that we've been in the house, and this is 5 times too many, IMO.  In the course of all this, I have learnt lots of techniques to avoid / mitigate the damage, but I have still had to rebuild / restore my HA system 3 times now, plus a couple of times when the failures were "soft", but I still had to recover the system by logging into the HA console with keyboard + display and hacking.

So all of this has got me to the point where I have been asking myself: is this really the best approach?  Is a loose cluster of RPis really up to the job?

 

Some of you might watch Andreas Spiess on Youtube, and he has been going on a parallel journey.  He has decided to migrate all of his servers onto a NUC-style host running ProxMox. I decided to go on a slight variant route and use an old 8 Gb RAM + 1Tb SSD CoreI5 laptop (that I no longer use since I have swapped to using a far lighter and more powerful Chromebook as my interactive device for this). Think of this lid-always-closed laptop as a small 8 Gb CoreI5 server with inbuilt battery backup.  I will keep the RPi3 running the CH + DW, but use this ProxMox host for all other services.  

 

As one of the YouTubers on a Speiss topic on this commented: you can pick up a 2-3 year old 8Gb Core I5/I7 laptop with a cracked or fade-damaged screen on eBay or direct from one of the PC refurbishment companies for around £100 or less, as they are useless for use as laptop but are perfectly fine as a small `server with in-built battery backup.

 

Anyway, I just wanted to flag this up as some of you might be interested in this approach as well.  Depending on the interest, I can provide more write-ups and engage in discussion.  Up to you guys.

 

PS.  I do think that RPis have a sweet spot where they are really effective: the RPi3 running my CH + HW system is a good example, and this has run faultlessly for over 5 years now.  What really lets down the other two systems isn't the OS, processing power or RAM, but rather SD card and USB3 storage failures.  

Edited by TerryE
Link to comment
Share on other sites

Lots of RPi fans on here. I had several dotted round the last place doing much the same plus music streaming and an arcade machine. 
 

The issue I found was it’s not house friendly with the people that also live with me. When it inevitably fell over and I was away I’d get a load of white noise. Consequently I’m only allowed to put HA into the new house if it’s a ‘proper system’ and not some ‘hacked together bag of shit you’re always tinkering with’. In other words it needs to be invisible from the biologicals. 

  • Haha 1
Link to comment
Share on other sites

There's definitely a sweet spot where using an RPi makes a lot of sense, say to want a decent full Linux stack in the IoT space.  I would categorise my CH + DW system here.  It's dedicated to a single application, so there isn't much other crap installed or running.  The handshake with HA is all through MQTT, and HA provides my User Interface.  I do have a minimal UI driven from NodeRED, but this is basic health dashboard and buttons to turn on HW heating to 30 mins, the CH slab heating for 60, and to restart the system: this is there to provide a very basic level of control for the CH + HW if HA is down.

 

Where RPis starts to struggle, IMO, is when you want to do real server stuff, e.g. running a bunch of containers offering a mix of servers.  External USB3 is just too fragile an interface for mission-critical storage.  OK, there are a bunch of IO extenders for the RPi4 CM that allow M.2 keyed SSDs to be directly attached as well as eMMC, but buying something like this in a decent lead-time and without a horrendous scarcity markup is like hen's teeth. 

 

I can understand why the RPi foundation is taking a pause on the RPi5 release. Nonetheless,  given that we are fast approaching the 4th anniversary of the 4B launch, it is appalling that we still don't have a standard model with decent eMMC or M.2 SSD support.

 

Link to comment
Share on other sites

4 hours ago, S2D2 said:

never had an SD card failure

 

The problem with SD cards is that that you don't -- until you do: you don't have yellow warnings where you are getting the odd I/O error and you think: humphff, time to swap out the device;  SD cards tend to recover from errors silently -- and then they give up and you now have a dead device, and any data that is not backed up is lost forever..
 

What is your DR strategy if you discover that your SD root card is dead when you wake up tomorrow?

Link to comment
Share on other sites

1 hour ago, SteamyTea said:

I have had laptops fail.

Any PC hardware can fail. That's the nature of the beast. However a lid-closed static laptop, where the CPU barely breaks into a sweat will last as long as any server.  You need to have a proper backup and recovery strategy, but one advantage of Proxmox is that this pretty much automates all that.

Edited by TerryE
Link to comment
Share on other sites

I am a lightweight Pi user, I just have the one for my music system running Pi Music Box.

 

In 4 years, the first SD card corrupted itself for no apparent reason after about a year,  so I had to restore that.  Then 2 years later it died completely so I had to replace it which was another recovery.  

 

It needs re booting at least once a month, sometimes once a week.  Without a re boot it starts stuttering the channel it is streaming and the user interface becomes unresponsive.  Also it used to be less reliable than that when we had ADSL broadband which crashed with monotonous regularity which seemed to upset the Pi and it would not always re start streaming without a re boot.

 

In defence of the Pi I will say this is one of the very original boards, bought thinking I was going to use it then, but never did, and resurrected from storage for this job.  

Link to comment
Share on other sites

I have several RPis, but I've started using J4125 or N5105 based PCs which can be had fairly cheaply from Aliexpress. They are much more computationally powerful than RPis but consume similarly low amounts of power. (And you can run Windows, which I find much easier; I'm not a Linux expert (although 2 of them are running Linux - PFsense and Frigate..)

Link to comment
Share on other sites

4 hours ago, TerryE said:

 

The problem with SD cards is that that you don't -- until you do: you don't have yellow warnings where you are getting the odd I/O error and you think: humphff, time to swap out the device;  SD cards tend to recover from errors silently -- and then they give up and you now have a dead device, and any data that is not backed up is lost forever..
 

What is your DR strategy if you discover that your SD root card is dead when you wake up tomorrow?

I've probably just been lucky, and I don't go near any sort of video storage on the card that would really hammer it. It was swapped for a larger capacity after six years but until that point had managed it's own failures very well, nothing I log ever had an I/o error.

 

Any data I actually care about is covered by Syncthing, the rest just isn't important. Couple of hours to recover everything makes setting up anything more robust a bit pointless as it wouldn't repay itself. If the failures were annual though yes, a better system would be needed. 

 

4 hours ago, TerryE said:

Where RPis starts to struggle, IMO, is when you want to do real server stuff, e.g. running a bunch of containers offering a mix of servers.  External USB3 is just too fragile an interface for mission-critical storage. 

 

I agree it's a price to performance trade off, if you get to the point where your system needs an i5 you're not going to be spending £35 on the finished article and drawing 5W. The laptop is a good step up price/performance wise if required, but personally I still wouldn't touch anything mission-critical with it, depending on your definition of that.

Link to comment
Share on other sites

42 minutes ago, SteamyTea said:

How do you get an RPi to draw that much.

RPi4s require a 3A PSU for a reason and mine all run hot (~50°C min) even with a decent heatsink.  5+W seems to be a consensus from benchmarks that use a decent meter designed to be accurate at such low lower draws, esp if you've an attached SSD or other USB devices.  The earlier models draw less and the Pi Zeros typically under 1W    

Link to comment
Share on other sites

1 hour ago, SteamyTea said:

How do you get an RPi to draw that much.

My usage on them is too small to meter.

This is the max, it's mostly the old usb external 2.5" HDD, 5W total when this is spinning and about 2W the majority of the time just for the Pi.

Link to comment
Share on other sites

The only thing I can really add to this conversation is that I still think most reliability problems stem from the power supply. By comparison with the SMPS used in desktop and laptop PC's, there's precious little charge storage in both the Pi and the AC adaptor used to power it (including the official ones). This is why even using an AC UPS is of limited benefit. Since powering my mission critical Pi's from DC-DC convertors connected to a 12V SLA on trickle charge, I seem to have resolved my reliability problems.

 

I do however use a Netgear NAS for database and other frequent data writes. Keeping a .ISO clone of the SD card in each one and taping it to the enclosure is, of course, a no-brainer. And SD cards are highly variable in quality. Everyone seems to have their favourite. Mine's the Sandisk Extreme Pro.

Link to comment
Share on other sites

I've been running proxmox on a NUC for several years and wouldn't go back. I can spin up new VMs, create snapshots and backup to NAS with a single click or on schedule, migrate VMs between machines all with super low hassle .

Each VM gets its own IP and hostname so moving services around between machines is transparent to anything configured to use them.

 

I now have a second almost identical NUC and considering setting it up as a hot spare. The proxmox cluster replication feature needs minimum of 3 nodes (to run election protocol) which seems overkill for a home installation but I might tinker with it just for kicks 

 

My only gripe is proxmox licenses are fairly expensive for enterprise users and they don't have any option for home users to pay a smaller amount, so I just use the free version. It does all I need, but I actually like to support software that works 

  • Like 1
Link to comment
Share on other sites

This is one of the reasons my HA is on a NUC with ups . The pi’s are great for somethings though . I use max2play as the streamer but you can configure it so it never writes to the SD card once booted . This solves lots of issues during any power outage .

Storage wise pi is I think a bit unreliable with ssd / usb ; so I have a dedicated nas with raid .

Of course this all costs wonga …

Link to comment
Share on other sites

40 minutes ago, pocster said:

Of course this all costs wonga …

As does powering a NUC. I went to some trouble and expense getting a fridge that draws under 10W. Realistically a NUC is going to draw a lot more than that.

  • Like 1
Link to comment
Share on other sites

22 minutes ago, Radian said:

I went to some trouble and expense getting a fridge that draws under 10W. Realistically a NUC is going to draw a lot more than that.

My Core I5 laptop + 8Gb RAM and 1Tb SSD draws about 15W with the lid closed and doing a typical work mix which has the overall CPU at only a few %.  That's only 50% more than 2 RPis.

 

13 minutes ago, SteamyTea said:

We need to start a thread about current draws of ordinary household goods.

Over to you, Nick 🙂  

  • Like 1
Link to comment
Share on other sites

34 minutes ago, Radian said:

As does powering a NUC. I went to some trouble and expense getting a fridge that draws under 10W. Realistically a NUC is going to draw a lot more than that.

Not checked mine . But as a small form factor relatively low spec I’d hope its current draw is low . But I need to check this . Tbh our electric bill is zero ( consumption- export ) - so probably not a real issue in our circumstances.

Link to comment
Share on other sites

21 minutes ago, TerryE said:

That's a Pi Zero case, isn't it?  See above.

No, just a little DC energy monitor.

Looked at it a while back and it was averaging about 1W.

Think it is an old model b, shall have to open a box to have a look.

The CurrentCost is also on the same supply.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...