I am urging everyone who wants to do this to see if they can't first do what they need with a small board like an ESP32. Their energy usage is a small fraction, they cost ones of dollars, and they're sufficient for a whole lot. If you're of the Python persuasion, many boards support both MicroPython and CircuitPython.
It's worth looking into for the cost savings on initial purchase and ongoing power draw.
Can I run a media server on an ESP32? No.
Can I run my password manager server on an ESP32? No
PiHole? No. Unifi controller? No
I think people making this comment are envisioning people use Pis as garage door controllers etc., but reflexively suggesting ESP32s as Pi replacements isn't helpful.
Why would you buy an expensive raspi for these scenarios? Wasn't it meant to be a computer learning platform for people with no access to powerful computers? Your applications don't need GPIO pins, so you could just use any small PC.
This is a fair point with how Pi prices have gone, and I don't think I'll be buying a pi5.
Good! You don’t need a Pi 5. You can still buy Pi 3b, which I use for many things successfully.
It’s unclear whether the usages are with Pi or Pi Zero, although advice applies to both. I have found more use with the Pi Zero W versus the full Pi. Some stuff certainly could be done using ESP, but faster to get done on Pi for me.
I know, right? I had to mortgage my family's ancestral home for the $35 to buy a raspberry pi 4 at microcenter. Luckily they had SD cards on sale, so I was able to buy the power supply and storage for the cost of a kidney. And now I can manage my home automation devices!
What small PCs would be suitable RPi alternatives? For many/most use cases they'd have to fit the same category -- so similar power consumption, similar physical size, passive cooling.
Even for the garage door opener use case, one nice thing about Pi is you can run Cloudflare tunnel on it – you can then access it from the internet without messing with port forwarding or TLS certificates.
Your point about the PI is spot on: a full linux stack means you can get up to "shenanigans" with all sorts of tooling!
A PI with MQTT server and ESP32 as clients is a match made in heaven! For 30 bucks you go from nothing to PI zero, and a hand full (literal) of esp32 devices. Its a fun stack to play with!
Not an exact substitute but mentioning it because people might be interested: esphome added support for wireguard some what recently.
For one device it works well, but when you get a bunch, I find it simpler to use one Pi (actually now a Lenovo m920q, it could be a Pi, I just needed a bit more power for other stuff) with the tunnels and make it talk to all the iot stuff. Has a few advantages: - Updating the more security sensitive parts is a lot easier (only one machine can talk to the internet). - Lets me use ultra-low-power 1-coincell a year stuff. - Integrates everything in a single point so coordinating stuff is very easy (like, single action to close the blinds, turn on projector and set AC a bit cooler).
How about a camera server?
Why yes a ESP32 can do that, and you get to play with a another cheap stack.
How about Blinking leds or a Display, or led strip... WLED and artwix have you covered!
A project like ESPresense is evolved from a PIzero project.
Let's not forget that some of the pi's appeal is that it has those GPIO headers!
So the straightforward answer is no, an ESP doesnt work for your situation.
They only asked that people consider it; no need to get snooty because it doesn't work for you, despite being very obviously inappropriate for your use case
How about PhotoPrism? ;-)
No, honestly I am impressed at the performance with which my RaspPi 4 is running a PhotoPrism instance with about 120.000 photos. This might also be thanks to the application software, but still quite a feat.
A useful deciding factor is whether your application benefits from an operating system and its utilities, or not.
I don't disagree with what you're saying at all, but in my defense, the blog entry posted literally starts with the sentence:
ESP32 and related are pretty cool, but it's a whole different mindset; if something doesn't work, you can't just connect an HDMI/keyboard to debug live with all the regular utilities one might know and that come for free with any mainiline Linux.
There are definitely limitations, but if it's a thing that you're going to leave untouched for years, it's worth looking at a device that will use 1/10th (or less) the power.
My time is worth more than the increased power draw
They are more stable in the long run since there is no OS. Honestly people make their lives harder using a Pi when using a microcontroller would be much easier and stable in the long run.
I ran a rpi for 2 years with no reboot.
Sure they are capable of running for years but they can fail at inopportune times. Every time one has died on me, it always seemed to be the microSD card that died. And that's with using reputable industrial cards and log2ram.
Also there's more complexity and overhead on a pi for simple tasks. And you potentially have to worry about updating the system and packages and other maintenance.
Not saying microcontrollers like the ESP32 are completely invulnerable to failure but it certainly is less likely.
And for another anecdote on uptime, I have a few Arduino-powered devices operating 24/7 for well over a decade now.
One of my RPis died somewhere in the mobo. I can turn it on and mount it over USB and read the SD card but it doesn't boot.
Another one lost the ethernet card. It was before they had Wi-Fi, or I didn't care to use Wi-Fi, I don't remember.
A Pi zero died, full stop.
A number of SD cards eventually died.
Not a very reliable platform compared to my laptop. On the other side my laptop costs almost a couple of orders of magnitude more.
I still use one RPi 3B+ with a TV hat and it has been on for about two years. It doesn't do anything else.
I switched to Odroid for everything else that could run on a small server, because it was impossible to find Raspberries. They work well, I'm happy with them. The only problem: I have to pin the kernel to their own version with their own drivers. The distro is Raspbian and I upgraded it a couple of weeks ago.
I never had an sd card in an rpi die, in years of continuous uptime, except for reboots.
I had one rpi become useless when its network stopped working.
or let alone a well designed or industrial sbc (of which rpi are neither)
Maybe, but if it is going to take you drastically longer to write the software because there's a smaller ecosystem / the stuff you need doesn't have a readymade library / you've never done C/MicroPython / there aren't the Linux tools that will help you debug or do a simple crontab to run your script on a schedule... The ROI might not be there even with the lower power consumption.
That's true, and an important consideration. I'm not an ESP fanboy, but I really do appreciate it as an engineer for how simple and cheap the development boards are, especially considering things like ESPhome exist. It's kind of ridiculous how many projects can be built by just writing a yaml file and a little soldering - https://esphome.io/guides/diy.html
Just took a look at the power consumption of Pi Zero. It will use $0.70 worth of electricity on my local grid, in a YEAR.
I bet me writing this comment used more while keeping my laptop alive.
I love ESP32s, built a long running device for my car, where the power draw is important because I don't want to deplete car battery. It uses almost no power. However if it was running connected to a power grid, I'd not care about the electricity cost.
If something goes wrong I just plug USB into my regular computer with all my normal tooling and can see the serial console, edit the filesystem, etc.
Or if I'm using something like Circuit python I'll just connect the web console.
A Pi Zero will spend about a dollar a year in electricity.
I've recently taken an interest in embedded programming and this is something I can't look past. Unless you're producing something at scale, I don't think there is much of a difference economically between writing code in a low level language and running it on a bare metal ESP32, vs running a Python script on a lightweight Linux on a Pi Zero. The cost difference is going to be a few dollars over the life of the product.
battery powered devices is a whole segment rpi cant even put a foot in the door
do hobbyists care? usually not
Just to clarify, does RP2040 count as rpi in this context?
N100 costs about $1.50 a year in electricity yet is like 30x faster.
I assume you are referring to an Intel N100 and not the OnePlus N100 smartphone...
Still a whole system is not just the CPU so suggesting a CPU as a RPi replacement seems a little odd
Electricity cost is not a problem, lack of ability to run of batteries (because if large amount of power consumption) is in some applications.
I run ssh, https server (with some dynamic pages written in python), there is a 3T disk attached to get files, I download torrent.
The other ones have touchscreens and speaker attached, I use them to listen to internet radio, watch cartoons and control relays.
Your cheaper solution doesn't allow for any of this to happen.
They simply asked people to consider it as an option, clearly your use wouldn't run on an esp very well
I hear the nay-sayers regarding the time cost and complexity of embedded programming, but as a hobbyist I think this is a great recommendation to at least consider.
The projects that I've been able to accomplish on a microcontroller have been more reliable (over decades) than my Pi-based projects, and I don't have to worry as much about them being part of some botnet because I forgot to change the default ssh configuration (wasn't it `pi:raspberry`?).
Beyond micropython, the no_std rust support for ESP32C3 is getting better every month. For people doing little home automation projects because they are fun, the additional constraints can make things a lot of fun and very rewarding.
But yes, for those that are already handy with Linux, a Pi is generally going to be much easier, though IME will be at least 10x as expensive, and the additional setup to get it in the same ballpark for reliability (SSD booting vs network booting vs ro-rootfs, watchdog setup, etc) and the increased power usage (esp for a Pi5) should at least be small part of the decision making.