Nine Raspberry Pis powering an office (2016)
monterail.com
monterail.com
I also tell myself I'm supporting the manufacturer, though it would appear they don't need my help.
Pihole -> Great use for a network wide adblocker/DHCP server.
Wireguard VPN -> In combination with a DDNS setup and some port forwarding enables the use of a global private VPN. I think it's a prerequisite for a decent home-automation setup.
DNSCryptProxy -> Great for ensuring all DNS requests on the network via DNS over HTTPS. Kind of useful because frankly ISPs are sniffing DNS traffic. Also useful for bypassing DNS based ISP filters.
The above basically enabled me to create a 5 country wide private VPN by giving VPNs to family members. It enables me to print/scan things from abroad, access CPU resources/servers/GPUs/Webcams/automation and obviously browse as if I am in another place.
My family when they are abroad, can now work as if they aren't.
It also saves power (reducing analytics traffic), improves privacy and takes about a weekend to setup.
They also make great personal gifts too.
A lot of my stuff is ad-hoc from my personal exploration and experience on Linux.
In regards to the wireguard specific stuff, this isn't a bad guide.
https://mikkel.hoegh.org/2019/11/01/home-vpn-server-wireguar...
The harder part with the VPN stuff is the following.
1) Setting up a clear route of forwarding traffic to the pihole. To do so, you would need to setup netplan/systemd-networkd so your pi gets a static private IP. (Not that easy if you are doing a full ipv6 route too.)
2) Setup a DDNS mechanism (as you most likely are getting a dynamic IP). My suggestion for this was to get a domain name (8 quid a year) and use cloudflare as a DDNS host. You also need to punch a UDP port through your router to forward to your pi.
3) Then setup the rest of the wireguard stuff.
4) Setup the pihole and ensure all interfaces are covered so your VPN has a DNS server.
Part 2 is the hardest bit as I kind of needed some custom scripting to ensure cloudflare had working routes to my networks. e.g. https://gist.github.com/Kedstar99/2d8ab0e9bec3a5629562b4ab01...
The above script obviously running as a systemd service that restarts automatically.
Obviously you can use something else like noip or some other DDNS solution.
https://www.freedesktop.org/software/systemd/man/systemd.net...
Then choose your firewall of choice to setup NAT and forwarding. I used firewalld, but not sure I'd recommend it. It's just the first solution I got working.
Once you have the base OS ready to go, it will take you less than 30 minutes if you know how to muck with your DHCP/firewall settings in your router.
https://github.com/pi-hole/pi-hole/#one-step-automated-insta...
Install Pi-Hole, then edit your DHCP server to hand out the Pi-Hole as the DNS server.
After installing Pi-hole, install this. Choose Wireguard, not OpenVPN. port-forward the Wireguard UDP port to your VPN server. use the "pivpn" command to create client configs and the "qr" subcommand to scan the config into your phone.
The community around WG has gotten much easier for noobs to get into, and the porcelain around the tool itself has made it quite easy to use, IMO.
By specifying the namespace in a systemd service file, I can let a service use a specific VPN.
Pihole pretty much installs itself (it even has a pre-made image). WireGuard will take reading, testing and failing.
I recommend doing these things one thing at a time, and doing the Pihole first.
If you're using PiHole, you can just use cloudflared to do DoH. https://docs.pi-hole.net/guides/dns/cloudflared/
On a different note, biggest reason I've never installed a VPN at home is because I just prefer a deny-everything home network and worry I'll misconfigure something and cause a security issue.
It also picks from 140 or so anonymous DoH relays, with specifics for nologs and dnscrypt support.
Why would I go for just 1 arbitrary provider rather than the lowest latency choice out of 140?
I also think the latter point is a bit overblown. So long as you keep your kernel updated and you only expose a single high UDP port, it should all be fine. I have ufw enabled on each pi, along with various logging mechanisms in place to see if things seem reasonable. That and 2fa for actual ssh access.
Because a ISP that can compromise any one of those 140 different single points of failure can now make that one have the lowest latency and give you malicious DNS results just like you never secured anything.
This is the same problem as allowing 140 different CAs to issue certificates for subdomains of com, rather than forcing the fucking registry to do it when you get a domain name in the first place.
>minisign_key is a public key, used to verify that the content is legitimate. Lists can thus be served from any location, even from an untrusted ISP: dnscrypt-proxy will immediately detect and reject something that has been tampered with.
>https://dnscrypt.info/stamps-specifications/ >https://dnscrypt.info/faq
An ISP will not be able to spoof the sources or these stamps. They wouldn't put the effort in. Even if they did, it is factored and thought about.
More harmful would be a malicious DoH relay but I trust the devs.That I think is fixed by mandating the use of DNSSec too for my relays.
OTOH, I'm beginning to migrate to pfsense and pfblockerng at home. So, it is possible that I may retire my pi-hole at some point. Currently I'm running both as I transition and test.
The added benefit is that I can force all devices to use PiHole while connected to Tailscale and have DNS-adblocking on the go!
I find it super useful!
Even if just for remoting into various boxes; the kids for instance often tether their PCs off their phones or I'm tethered and want to remote to my LAN.
(I have terrible internet)
I run pihole with 256MB version(which is $1 less) for two years fanlessly, and this includes enclosure too, load the software and hook it to my wireless router's ethernet port and just forgot about it.
What I've heard is a crashing Pi is usually due to sagging voltage on an inadequate power supply, and that's probably even more an issue on the more demanding/powerful Pi4. On my cameras I just use the wall warts adafruit sells for the Pi, and haven't had any power problems.
As far as the SD card goes you can boot off an external hard drive or SSD via USB and that should guarantee longevity.
My biggest problem with headless Pis was that they would randomly disconnect from the wifi network and disappear, turning off power saving on wifi didn't solve it. In the end the real solution ended up being to just create a 2.4ghz-only network and connect them to that. Somehow they just don't play well with networks that have the same SSID for 2.4 and 5ghz on my Ubiquiti gear.
This is anecdata from my part, but I’ve got eight or 10 Pis running (Flightaware/ADSBexchange, PiHole/Influx/Grafana/Wireguard, a couple of Octoprint, Home Assistant - with a relay HAT for triggering dampers, Showmewebcam, and a handful of other things). Once I switched to good power supplies and good SDHC cards, my problems went away. My most heavily loaded machine is the PiHole machine which also has influx running and writing to the SDHC card - it’s probably a ticking time bomb, but it’ll celebrate it’s fourth birthday on the same card in two months.
My Pi 4 running 2 instances of Octoprint kept crashing until I switched to their official power supply. On previous models I always got away with whatever power supply I had around but the 4 doesn't play around when it comes to power consumption.
I've got a web server, a SAN, a couple pi-holes, and a home automation controller. I plan to spin out my databases and Prometheus onto their own Raspberry Pi's. All of them are configured using Ansible. I can recreate one in a hurry if it dies and data backed up to a ZFS partition on the SAN pi. I have a couple additional Raspberry Pi's that I temporarily hook up to the network and run a script to sync the latest ZFS snapshots over for backup purposes.
I'm sure you could find SOME use for them :)
Nextcloud is an absolute dog. Even on a server with loads of power and an SSD-based database over a local connection with all the caching options turned on… it’s still not snappy. I wish we had better FOSS options in this space.
I loved Pydio but it was simply too slow.
Friday I was trying to figure out if I could remotely read realtime usage off my power meter. I've tried using a SDR for it but it uses some proprietary frequency hopping system that is difficult to understand and I don't have enough domain knowledge to reliably implement. But it had a debug port on it with what looked like an IR transmitter in it, and some reading online indicated that it might be flashing at a rate that indicates usage. It was too weak (and it was too bright outside) to see it with my phone, so I decided ot just try it out.
30 minutes later I had a Raspi with a IR receiver and lirc and I could confirm that it was pulsing at a rate of 1 pulse per watt-hour (1000 pulses per kWh).
The actual reader implementation I will probably do on esp32 because Raspi is overkill for this, it just needs to read the pulses and broadcast messages to MQTT, and I'll 3D print an enclosure so it's not just taped to the side of the meter. But the Raspi made it really easy to just try this idea out without making any commitments to it. That alone is worth keeping a few around.
I also checked the local municipal code (my utility is city-owned) and there doesn't seem to be anything in the code that says I can't do it.
That said, I intend to put a notice next to it that says something along the lines of "This is a non-contact measuring device that counts IR pulses. Please call XXX with any questions."
I basically deployed a nodejs app and configured FullPageOS to load that local page. The clock itself is just HTML and JavaScript (jQuery, bootstrap, moment.js) - there is no servers side code beyond basically the "connect+serve-static to server the index.html file.
Oh, and it plays the comet from Star Trek Deep Space Nine's Title Credits on the hour in the background.
For a temporary workaround I set up a VPN endpoint on a VPS and configured a disused Pi3 to route through to the VPN endpoint, then turned it into an AP and had everybody connect through the Pi instead. It bypassed the breakage for the day so I could leave the connection off overnight to force my ISP to reallocate that IP.
It is this kind of Swiss Army Knife type job where the Pi is a perfect solution.
Other commentators mentioned pihole/DNS, WireGuard, and music streaming, but you can also use them for a (slow) NFS server, persistent Syncthing node, Maestral host[1] (third-party Dropbox client written in Python (that can actually run on the Raspberry Pi, unlike the official Dropbox client)), or device that maintains a connection to a distributed network (e.g. Hyporborea/cjdns).
- The obligatory PiHole.
- An ssh server, which I use to access my internal network.
- A script that scrapes a website daily.
- A database to support a web development project.
- A web server to support a web development project.
- An NFS server, for data backups.
While it is probably underpowered to serve the needs of some people, it serves my needs. Since I don't fiddle around with it very much, it has proven to be very reliable.
What language, frameworks, modules and how do you store and present it?
Another use was running HomeAssistant, but I migrated that to my real server.
Another use is having an external InfluxDB + Grafana monitoring setup so I can view stats even if the server goes down.
Lastly, you can take X amount of raspberry pis and run a kubernetes cluster with k3s. [1]
Since I don't play with my cluster much, most of my pis just sit around gathering dust...
The second use-case I have is as an Octopi server to run my 3D printer. I have found this interface to be significantly more user friendly than uploading new designs to an SD card.
Each issue is full of projects with step-by-step instructions on creating the project.
Each issue of the magazine can be downloaded for free as a PDF (or alternatively purchased as a print magazine):
The MagPi Magazine: https://magpi.raspberrypi.com/issues
The other two pis are sitting in a project crate, ready to use if I ever find myself with extra free time again.
We mostly play SNES games but I sometimes play stuff from my childhood when they're not awake.
https://techcrunch.com/2021/09/21/raspberry-pi-gets-45m-to-m...
they are primarily funded by government, ngo's, and other foundations.
I can see the appeal.
But I have come to the sensible conclusion that an Intel NUC is far more useful, to me, as a general purpose computing device, media server, file server, linux dev box and occasional casual Minecraft gaming device for the kids!
Seemingly once I've specced up a RPI, they are not exactly super cheap at that point!
The end result clearly looks amazing. I'd really like to get into doing that, but every time I try, it ends up being way tougher than it looks and the net result is nowhere near as clean as it is in the pictures.
You're looking at the 10th, 20th, 30th+ attempt being documented/curated on the internet. You've gotta break a few eggs to make an omelet, so don't let that not-so-perfect first try slow you down if you derive value from tinkering.
Much like writing code, you collect knowledge along the way and the next one is hopefully better.
I run an invoicing tool off mine, PiHole, NextCloud, UPS monitoring and HomeAssistant to control lights and heating in my home.
I have one serving as a controller and monitoring server for my 3D printer that I turned into a chunky little tablet with a 7” touchscreen and OctoPrint.
And another one for backups at the office.
IIRC Lakka (a Linux that boots straight into Retroarch, based on the same micro-distro Kodi uses, I think) is booted and interactive, with a GUI, in like 2-3 seconds. I think it's using direct rendering to achieve that, though, not X or Wayland.
[EDIT] And that's off an SDCard.
Still, I learned about micro-distros which was quite an interesting thing to discover :) I might try and mess around with some on the Pi Zero I have to see if I can figure out a cool use for something like that.
Tom Lawrence (YouTuber who makes networking related videos) uses the open source one called InvoiceNinja. Apparently it’s pretty good!
https://www.monterail.com/blog/2016/smart-office-raspberry-p...
Clicking on the Monterail about page I really do appreciate when companies list their teams. It's that small bit of credit that I feel goes a long way. It appears more common in European companies. American companies will typically list the board and executives; ICs are treated as interchangeable cogs with no credit given except internally.
Works great. Except the SD card seems to be dying now after 3 years of constant usage (well, less usage during the enforced home-office times).
##
## Decrease touches to root partition a little with noatime flag
##
/dev/mmcblk<NUM>p<NUM> / ext4 defaults,noatime 0 1
##
## decrease writes because tmp activity by mounting as tmpfs
##
tmpfs /tmp tmpfs ddefaults,nodev,nosuid,noexec,noatime,mode=1777 0 0
##
## /dev/shm security measure
##
tmpfs /dev/shm tmpfs defaults,noexec,nodev,nosuid 0 0Can connect to them from anywhere in the world to check what's going on with my house and in some cases act on it.
They also gather every possible piece of data they can get their hands on and log that to a centralized, off-site InfluxDB instance so I can ramp up a grafana instance and check what's been happening in the last <time period>.
Convergence of a few things that happened relatively recently to make this possible / easy:
1. Wireguard: all my computers and it thins are on the same virtual LAN
2. Pi 4 has a *way* better Wifi antenna and can sit quite far from the Wifi router and still be very useful.
3. Grafana
4. InfluxDBIn a fit of frustration, I asked for all VLANs to be sent to one port, then I set up a Raspberry Pi to do DNS and DHCP using a NetBSD host-based router to actually forward and do NAT. I told them it would stay that way until the Juniper gear was set up 100% and tested.
They're excellent little machines, inexpensive, and wonderful to keep around "in case of emergency". Learn how to root off of a USB drive or to limit writes to the SD card, and they're wonderfully reliable, too.
1. Pihole + p1 power meter 2. Internet quality monitoring 3. Grafana + Graphite for my home computers 4. Always on Ubuntu Repository Mirror with external 8TB drive 5. A 3b hosting my website powered by solar
I should add 'router' but my internet is faster than my Pi4 can handle. Maybe the compute module or pi400 can handle gigabit internet.
However, almost everything I listed here could be hosted on a single low-power x86 box and that would even be more power-efficient too.
edit: found some more detail in the direct link - very interesting. I wonder if you have to get something like that inspected wherever it was installed.
I dropped down to Rust and gave the thread max priority in Linux but still couldn't toggle the port fast enough (the remote outputs square waves where the signal for the same button varies by low hundred of microseconds. The frequency changed rapidly enough that I can't use the rpi's built-in pwm).
It seemed I'd need a dedicated board running something more embedded-y the rpi communicates with. Instead, I'm going to try to solder transistors to the capacitive buttons on the existing remote and re-use it's board. Unfortunately I can't get replacement remotes and I'm just learning how to solder, so I'm not confident in success.
I wonder if there is a rpi alternative with more gpu power and multiple hdmi outputs just for this use case. You could probably run all the logic on a single rpi.
The rpis driving the screens are probably under-utilised and complicates the setup.
On the other hand, by having multiple rpis, you reduce the risk of everything going down and ethernet cables (or wifi) could be simpler to setup than having super long cables from a central board up to every screen.
I've toyed with the idea of starting an open source building automation hardware company. There's quite a few open BAS software packages floating around now too.
What I've seen done for this sort of application is to stack the RPi on top of, say, an Arduino Mega or SAMD51 in team. The Pi handles database, network (NTP, HTML interface, update work) and the micro is sort of a real-time port expander.
Think of an access control scenario ( doors not ports ) where you have n doors ( potentially 2n readers, either wiegand or directly RS485 ) you then have 2n contact closure sensors ( door position and request-to-exit ) and an output relay to control the lock hardware power. The real-time needs of this type of thing scale to super-wide while the database lookup scales separately.
You keep a fraction of the user table on the micro controller, based on frequent use of the doors attached directly. Hang another micro controller when you've used up your I/O but connect it to RS485 doing the "same thing" with different labels/IDs. But the Pi just keeps the full list, the full log if wanted, and gives a target for your user update work and adding new doors.
I think what people like about the Pi is the modularity and ecosystem. I can get a hat for relays and sensors and things (and a super-duper hat thing for door control if you dig deep enough)
You have to engineer all of the reliability ( RTC, watch-dog timers, power state control, opto-isolation of inputs, debouncing of buttons, on and on...) but if you have more time than money, you can learn a fair deal about a particular field by building something rather than buying it.
Then when you finally have horsepower at your disposal, you may actually appreciate the value of the readily-available devices built to perform such duties reliably.
Disappointed to see that this was about controlling some LEDs and billboard screens instead.
- dhcp / dns / radius for the office - maybe internet router, if they don’t have a too fast connection (>500 mbps) - egress MTA - intranet wiki or ticketing - resource monitoring
But yah, I agree with others, the title is a bit click-bait.
I have the feeling that a lot of information systems are not exchanging much but require huge payloads to coat things enough to keep cute in the html5/es6 era
Quite often what would have been done with a bunch of bytes on a dumb terminal now requires full blown windows + browser, network shares of useless files, mail servers holding massively redundant content
Don’t get me wrong I would love to spend the time to build a system like that, as an engineer it sound fun!
No doubt this project came at the cost of someone paying the company for value that was not transferred
Sorry for being Daniel Downer here…
We implement “15% time” for this and other reasons (and we certainly didn’t invent the idea). Some great ideas came out of it that grew into products and features. But mostly it’s stuff that was fun or interesting but didn’t directly lead to any revenue. That’s not just ok- it’s an important part of getting better as an engineer.
As a rule, every client contributes with something. Probably not at the same rate.
All those tasks are "home automation" for the office. You can buy solutions for this, e.g. meeting room free/busy, but inherently there's a large amount of customisation and the COTS ones tend to be surprisingly expensive.
The power supply tends to be much shorter lived. I severely oversize those and even then they like to stop working after just a few years. The SD card is the shortest lived component by far, but it lasts longer and has a better failure mode if you disable swap. (Why do pi distros enable swap at all?)
Oh, and of course, since version 3 the power cable is the hardest component to get right. You need a very good cable, and you probably don't even know the specs on most of the ones you have...
The first one I owned had some kind of electrical fault that bricked and destroyed my TV.
The second one I owned had a fault where a few of the capacitors on the back fell off upon me plugging it in for the first time.
The third one I tried had a fault where it would spontaneously shut down if I had any USB devices plugged into it for any reason at all (in this case it was a mouse and a flash drive).
The fourth one I owned had the same problem, and the way I fixed it was desoldering its onboard wifi receiver running it at an absurd underclock and overvolting the USB2 input with my bench power supply.
With that said, let me talk about their hardware.
The USB-C implementation on the raspberry pi 4 violates the USB spec. When this was brought up to the engineers over there, they completely memory holed the problem, saying it works on USB2 chargers through an adapter. I call bullshit because during normal use it will draw more than 12.5 watts (which exceeds power limits on USB2 cables).
I have never seen the micro HDMI port on anything made before 2013 so the adapters required to make it work with modern TVs may as well be proprietary ones sold by RPi.
The camera input connector is encrypted for some reason, so if you wanted to use a camera through there it has to be one of raspberry pi's.
Despite them claiming it's opensource, it really isn't. The only thing that they have made opensource is the schematics which are largely useless for integrating into your own designs. The main processor onboard (and a handful of other ICs) isn't even commercially available. They claim it is, but that's only if you order it in minimum quantities of a few hundred thousand or something.
So in order to use the RPi4's most basic features, you need a proprietary charger, a proprietary camera, and a proprietary video output dongle. These things are more locked down than most laptops.
And that's just the problems with the RPi4. That has absolutely nothing to do with the litany of problems the past versions have had, which I don't feel like listing here. One of the issues that comes to mind is that the RPi 3 had a problem where it would spontaneously shut down if the lights in the room flickered wrong.
Worst of all, because these clowns have mindshare it means that other more well-behaved SBCs will never get any form of community tech support or large enough marketshare to make any notable change.
I have a power supply that is so weak that Pi would reboot when I plug a USB keyboard in it. Solution: never use weak power supplies on Pi's.
> I have never seen the micro HDMI port on anything made before 2013 so the adapters required to make it work with modern TVs may as well be proprietary ones sold by RPi.
Pi Zero uses mini HDMI due to size constraints. Pi 4 has 2 HDMI outputs! Instead of adapters, I always prefer "right" cables. More expensive but convenient. E.g. https://www.amazon.de/Snowkids-zukunftssicheres-TV-Kabel-unt.... Also, ironically, my 2012/2013 ASUS Zenbook has a microHDMI port.
> The fourth one I owned had the same problem, and the way I fixed it was desoldering its onboard wifi receiver running it at an absurd underclock and overvolting the USB2 input with my bench power supply.
Have you tried 2-3A power supplies? E.g. https://www.amazon.de/Anker-PowerPort-Wandladeger%C3%A4t-kom.... Though I found the "official" supply cheaper and went with it.
> One of the issues that comes to mind is that the RPi 3 had a problem where it would spontaneously shut down if the lights in the room flickered wrong.
Most likely your power adaptor would not be able to maintain stable voltage when your lights flickered.
Anyway, have been running 3B+, a few Pi0s for a few years and this is the first time I read about so many problems with Pi's falling on one head. To keep my SD cards alive longer, I use DietPi and had only one SD card die on me over ca. 10 pi-years of uptime.
> more well-behaved SBCs
I am all ears!
>Pi 4 has 2 HDMI outputs!
Two full-sized HDMI ports could fit on the board. At least, I could fit them. I question the competency of all the engineers working there.
>Most likely your power adaptor would not be able to maintain stable voltage when your lights flickered.
No. It was due to the wifi/bluetooth tranceiver not being potted and it would hard-reset if disturbed too much by the photoelectric effect.
>Anyway, have been running ...
Anecdotal evidence. They are built like absolute trash and it's a miracle anybody says they work for any reason.
> more well-behaved SBCs
Wake me up when someone makes one with ECC ram. I will not entertain using one unless it does.
They are made from the floor sweepings in Sony's factory.
You don't hear about the failures because most people just buy them and throw them away. I would venture to guess that about 60% of their customers are one-time buyers that try to power it on once and throw it away because it doesn't work. The other 40% either won the lottery or put up with its constant stream of shit because they have a near monopoly. The same is true for 3d printers.
Out of at least a dozen people I know using them, every single person has multiple RPis that has been in pretty regular use. On top of that you have a plethora of documented uses and projects across the internet, ranging from home automation to arcade machines.
You seem to be painting an entire community with the same brush, but most of the people in this community would gladly help you solve the issues you seem to be facing. Perhaps the issue lies not with the RPis but with how you're using them....
In reality, fully working raspberry pi boards are normal. I must have at least 10. I admit I no longer use the original model (so slow) but last time I tried it worked just fine. I think that's pretty great for the money, especially considering the state of the market before they came along which I think you might be forgetting.
I had a 3B running as a car infotainment system with hard shutdowns at least daily for three years. Sold that car and it's now in a drawer, but slated for use in an arcade perhaps.
I've got another 3b running as a Unifi controller that's been running for 2+ years.
I've got two 3b and one 4 running OctoPi (3d printer server) without issues for 3+ years.
Given the mass adoption and heavy usage of RPis, I would venture to day most people don't find them to be "horrible computers". I think in 5+ years the only time I've had an RPi fail at the hardware level and die was due to powering it via the 5V headers and accidentally reversing polarity. Might have also shorted one out when an enclosure was flooded due to bad weather seals.
All anecdotal, but I find most of the time when Pi's fail it's often either voltage sag, poor quality sd cards, or excessive writes to the SD. The SD cards are definitely a weak link in the RPi ecosystem.
Whenever possible, ensure your Pi isn't reporting undervoltage and look for ways to minimize writing to disk (or attach a USB drive for any heavy writing necessary).
Here's a list of over 400 boards. There's also a .csv file to downlaod for offline quick comparison. https://hackerboards.com/