by SanderNL · 3y ago · 0 comments
5-10 years ago I would think this is perfectly fine. I believe I was not alone in this, but maybe I was. The energy would have cost pennies too and why whine about it?
Now I think it’s exorbitant as well, for me. The F150 etc, it’s telling a different story now.
I do think it’s kind of below the belt to snipe any single culture for this. It’s too easy to target Americans. I don’t know about this guy’s life. Maybe he has a ranch with 20 square miles of renewables and I don’t care actually. It’s just personal reflection.
When I moved into my own home (8 years ago) I brought my 'homeserver' with me. Which was just a simple i5-2600 build with some shucked drives in it. I never thought about electricity prices when I lived with my parents. But that changed rather fast. With the server gobbling up a constant 90W, I quickly realized that, even back than, it would cost me 15 euro's a month on electricity alone.
I than proceeded to put a Pi next to it, that would listen to incoming Plex requests and would start up and shut down the server with WoL. That only reduced costs by about a third. The next couple of years I would move on to a NUC with a NAS that would only consume about 29W/h on average. Which was decent, but not great considering the poor performance of both machines (J4105 and J1800).
Last month I have gone back to the DIY route. Now with a i5-13500. I'm still in the process of optimizing it for power efficiency. Although much more stressful than the prebuilts, I love the hunt for the last watt.
Anyway, what I wanted to say is that I notice that family and friends don't really care about saving power in general. They mostly just pay for it and there's that. While my house runs 100% on electricity and I'm really proud if I can get 9kWh/day on average. Even when I see that (for example) the 8-bit guy uses 100kWh/day on average [1]. Which seems out of this world for me.
How hard is this to configure? I have a server at home I use to run a database and computational heavy code, however I am the only user so realistically it is only in use 8 hours a day and some weekends etc. However in the fear of forgetting to turn it on before I go to work (or if I suddenly find time to work while away) I find that I default to leave it on. Being able to control it would be fantastic.
Not at all. Just ensure that you have WoL enabled on the host machine and than proceed to send a magic packet. You could even do this with Home Assistant [1] if you are into that. I did this with a script that used tcpdump to monitor for incoming traffic [2] for Plex with an additional (dummy) Plex server on the Pi. I also remember faintly that I had to add 1 library and 1 video file to make this work though.
Powering down - or sleep - is a bit harder. I built a 'Sleep on LAN' app [3] for myself years ago that could power down (or sleep) a system on demand using a REST API. I used this and Tautulli [3] with Home Assistant that would check if there were any active streams and if there wasn't any activity for a specified amount of time I would send a SoL request to my service.
As you can see it isn't super hard or complicated, but a bit cumbersome to find all the moving bits and make it work. But when it does, it's IMHO fantastic.
1. https://www.home-assistant.io/integrations/wake_on_lan/
2. https://gist.github.com/alex3305/8cc73ddd2c8ca6328f20235480a...
You can make it simpler to use by making an alias in your shell, or a button on your phone (with one of the countless "ssh button" apps). Or even make a web page for it (some php or python that just calls the WoL function).
OP describes a more transparent (and complex) setup where the Pi presumably acts as a reverse proxy. I'd be curious to know the exact setup too, one of the simplest ways would be to use wake on unicast: https://news.ycombinator.com/item?id=35627107
Other ways include wrapping some scripts around socat, writing your own proxy, systemd socket activation, etc.
A reverse proxy would of probably worked too, but I didn't want to be limited by the 100Mbps network interface of my Pi 3B.
1. https://gist.github.com/alex3305/8cc73ddd2c8ca6328f20235480a...
I'm environmentally conscious (0 cars, 0 pets) but I haven't spent any time measuring and optimising electricity usage.
I've had a look at my own electricity usage every once in a while, now averaging 48 kWh/month (between 38 and 68) for a larger than average apartment for two people.