Hacker News new | ask | show | jobs
by f1shy 24 days ago
My take currently. Exactly this. Buy Sonoff things, Raspberry Pi, and do some vibe coding. All local first.
3 comments

Same. But instead of rPi get a cheap N100 etc. 'real' PC with M.2.
N100s are not cheap anymore. :(

I paid ~$150 for a fanless 4-port router with 16GB of RAM a few years back. Now they are ~$400 and up.

Yes, and that hardware is now half a decade old or so. It's truly shocking.
I think used optiplex / thinkcenters are the current cheap x86 options.
Optiplex/Lenovos are still <150. Lenovos have PCIe ports.
If you want something that works out of the box without too much work. Home Assistant Green is also a great little device. We first ran on a NUC (more powerful than N100), but then we switched to a HA Green. Passively cooled, doesn't draw a lot of power and has been super reliable. And it's well-supported by HA for obvious reasons.
What’s wrong with rpi?
Its a do-everything solution with a do-not-break-compatibility history to its design and a lot of attention driving its price upwards. These are good things as well, so...

Examples:

- SD cards are very convenient for hobbyists "experimenting" with OS variants. They are not great for performance or reliability; a soldered on storage device is common in many other products. - The price is more than it seems - you need a case and a power supply and an SD card. - The case situation is bad. If you want to 'set and forget' you really want a robust case, potted. Many N100's are designed for more abusive environments. - Most use cases don't need the HDMI, Camera, Audio, Ethernet, or all the USB ports. That is board space, purchase cost, and idle power draw that can be reduced or dropped. - It doesn't have some modern connectors, e.g. M2, because there is no space on the board, and the PCIe lanes have gone to the connectors you probably don't use.

Many stick based computers, particularly second hand and older generations, are better for most use cases. These are typically Intel N series; but are increasingly ARM, particularly at the lowest prices.

Absolutely this. For pretty much all use cases I have, for performance, power consumption, robustness, etc. is much better the ESP option or the “big” N100. Rpi is there in the middle. For some playing or prototyping I have some from the ol good times…
It's now crazy expensive for what it is. It's still okay if you prefer low power standby / rare use but other than that probably not so much.
Everything is now crazy expensive, if buying new.
I mean, yeah, but comparing what rpi is and can do it seems more overpriced than some other hardware I was looking for.

But yeah, true.

It all has its place.

RPi hardware is nice because it's a fairly-consistent, known quantity. All copies of a given board have the ~same features and bugs, so an image made for someone else's Pi 4 will run on my own Pi 4. This grants appliance-like utility that we haven't really ever had much of in the x86 PC space.

Pi hardware almost never shows up as cheap as a person might wish for. It's scarce on the used market, even when prices are high. In that space, demand outstrips supply.

And it's never been "cheap". A decade and a half ago when it first showed up, folks were already comparing the price (plus the SD card, and the appropriate power brick, and the USB cable, and the wifi adapter, and some kind of housing) to that of a used PC or laptop, and the Pi seldom came out on top.

But if we're doing new vs new, then it does alright price-wise.

And it's tiny. It's got some hackability built in, with the not-USB camera interface and the not-HDMI display support, and some GPIO that can be useful for some stuff.

It's got places where it's useful. I use them in those places. (And despite that lengthy defense, I run Home Assistant on a cheap SFF Lenovo box that came to me with RAM and an SSD for $50, delivered, in pre-used form)

I personally don’t like raspian at all, and how they change things. They try to be “compatible” with very old HW, while at the same time many SW things I’ve done, are systematically broken in each new release. My 2ct experience.
used workstations are even better such as Dell Wyse or HP Minis
Pi's are overpriced toys. I would never run a production system off an SD card.
They make industrial sd cards. I use those for many porjects that need a long life. However, this one has been running so long: Samsung EVO/EVO Plus, 32 GB, made 11/2018 used since 2019 daily. Wear has written roughly 1.5 TB in the 263 days, about 6 GB a day. So good enough for production for me!
I have used industrial cards. Are much better, yes. In a real production setup, where a stop costs actual money, or the thing is not easy to access, distance or dismantle a system, no way in hell I would use one.
you can run a pi with an m.2 nvme. my rpi5 does so, you need to buy some extra stuff to do so though.
Also use static IP addressing on your home network.

Your router is a point of failure, so an internet outage making it go weird doesn't mean you want all your stuff becoming on manageable).

IoT is honestly one of the best ways to rapidly learn SRE concepts.

Static IP addressing at this level is a curse.

On a home network with dynamic addresses: No need to worry about IP addresses; no overlaps happen, no mistakes, no spreadsheet table to manage. Use names (as long as DHCP works, then so does DNS). Renumbering the network is simple when that's useful.

It still works when the internet is down. And when the router itself breaks, we fix it or replace it and things work again. It's good to have a functional spare.

---

On a home network with static addresses: Micromanage IP addresses, keep a spreadsheet table, potentially make mistakes. Avoid using names (DHCP may be eliminated but DNS is still a failure point), making things harder to remember six months from now. Renumbering is arduous.

It still works when the router is down, but: When the router breaks, we still fix or replace it anyway. It's good to have a functional spare.

---

In terms of SRE: I don't need 5 9's of reliability for my smart light bulbs' IoT controls at home. They all still have some manner of physical switch, and they all can still be toggled on and off the old-fashioned way. Parallel controls work well-enough.

Everyone will get by almost-normally while I fix the router, which is a task that I'll set forth to be doing anyway for all of the reasons that household internet access provides.

I've recently come up with what I think is an even better solution. If someone's already done it, I have no idea. I just went ahead and implemented it because I thought it'd be interesting.

The concept is that, instead of assuming that IP and MAC addresses are at all reliable, to "fingerprint" devices on the LAN based on things such as SSH public keys, TLS SPKI fingerprints, UPnP device UUIDs, mDNS, common TCP port profiles, and IEEE OUI manufacturer in order to form mostly-stable identities. The IP and full MAC are only fallen back to when there's absolutely no other data to work off of. My software uses a daemon that scans the network in order find devices and update existing device identities if IPs change. It serves hostnames for these devices on the `.home.arpa` TLD and creates synthetic IPv6 addresses for each device in case one would rather use their own DNS server or hosts file.

I recently "finished" this project, and it's kind of awesome because I was able to swap to a new router and everything just kept working as-is without having to think about it. Of course mDNS solves a lot of these problems already, but not every device has mDNS.

What's really cool is I recently realized that this is also very useful for accessing your local network with a VPN like Wireguard. Even though I only planned on this being something you run on individual clients, I put it on my OpenWrt router and configured it with dnsmasq so that, when I connect to my network with Netbird, all of my local hostnames just work on my phone by virtue of connecting to the network and using its DNS server. That said, my project doesn't require router admin access at all. It can even run as rootless if TUN access (for synthetic addresses) is turned off.

Maybe I'll release it publicly at some point, but if anyone wants to steal this idea and do their own implementation, I am not territorial over it. It's made getting my LAN devices working together a joy.

I think that's brilliant, and that it deserves a much better writeup than what you've presented here. :)
Agreed! I'd love to see a more expanded writeup on this topic, and see what I could apply to my home.
Same. Would love to see more.
Hypothetically, a long DHCP lease should let you ride out a short Internet/router outage. After that, hypothetically of course, APIPA addresses would be assigned, and I suppose that mDNS should be working even after APIPA addresses take over. I was unable to make this happen. I also tried IPv6-only LAN, which my brand-new printer didn't like very much.

And don't forget to backup your router and switch configurations!

i use DHCP reservations since im a bit lazy and it seems to work good. It requires a reboot of the device on the network. at least for openwrt based routers.