10 ms·
Show HN: A tiny solar-powered server only awake during the day
Solar Witch is a little webpage and server which receives and displays messages, so I suppose it's a tiny message board. It's coded in very dubious Arduino C.
It's not a 24/7 website. Depending on the state of the battery, the server itself might run all night, but all the messages it receives during the day are deleted at sunset, and the messaging function itself is only active between sunrise and sunset. This is for two reasons:
1. Less usage of Solar Witch during the night conserves battery power.
2. I like the idea of websites which _aren't_ constantly available. Websites which have to sleep too. Websites living on servers which aren't somewhere in the cloud, but which are bound to a particular location, giving you a sense of where in the world they actually live.
Solar Witch is very much inspired by the solar-powered version of Low Tech Magazine (https://solar.lowtechmagazine.com/ https://solar.lowtechmagazine.com/) and the not-always-online chatroom Gossips Cafe (https://gossips.cafe/ https://gossips.cafe/), but at a far, far smaller scale.
PSA: Solar Witch is a teensy hand-written C server running on a teensy microcontroller attached to a teensy solar panel which can only handle one HTTP request at a time and may have buffer overrun issues due to my ineptitude with C. If it's gone down, please don't be surprised, and rest assured I'll hit the reset button soon! Solar Witch encourages patience.
- jart 5y agoI've been hugging Hacker News to death the past few hours waiting for Solar Witch to come back online. Something like this is the reason why I come to the website so I hope if there's not enough hours left of daylight, where OP lives, that the mods can at least give him or her a redo.
- lowercasename 5y agoI'm so sorry, I've been doing some digging and I think there's a bug in the way the libraries for this particular board implement a WiFi server! It seems to crash quickly with even minimal code. I'm going to go back to the drawing board and see if I can set up an Ethernet-based server on an Raspberry Pi Pico - they're a bit more battle-tested. I'll let you know in a week or two when Solar Witch is back online!
- jart 5y agoEmail hn@ycombinator.com and ask for a second chance when you're ready. If it actually is a bug in the Arduino wifi stack and you can prove it, then I'd love to read a blog post about it. Especially if you manage to patch it upstream. It'd be a great story. Very newsworthy.
- Shared404 5y agoCould I get on the alert list as well? Emails in my bio, and this is something I'm really interested in!
- halfdaft 5y agolovely project, excellent name. I have a major soft spot for tiny tech projects with personality, thanks!
- lowercasename 5y agoThere's no better stress test than Show HN, and unsurprisingly, that's revealed that Solar Witch has a buffer overrun bug somewhere which I'm investigating! If Solar Witch is currently offline, here's a screenshot of what it might look like: https://ttm.sh/ix3.png https://ttm.sh/ix3.png
- smoe 5y agoI'm actually quite surprised and impressed that I was able to open the site and leave a message while this is on the frontpage!
- lowercasename 5y agoI've been resetting it every 2 minutes! This is how regular servers work, right?
- aaaaaaaaata 5y agoNot far off, in some cases.
- gibolt 5y agoHaving multiple unstable boxes and just cycling them round robin style is a valid solution, depending on the use case
- npteljes 5y agoWe really did that when we discovered a memory leak that manifested itself over some days, and that we couldn't find the root cause of. We just did a rolling reboot daily when the visitor count was bottoming out.
- Aachen 5y agoHN may be a good stress test for Arduinos and WordPress, but it's really not that much load. I've recently had my site high on the front page and the page specifically recommended reloading if you didn't see the effect the first time. This is hosted on a ten year old laptop and a home Internet connection. The load average didn't budge. People hugely overestimate the amount of firepower you need when you "go viral", presumably because more people read HN than post on HN so most will just never have tried, and even fewer people try without some preparation (you don't know for sure that it was unnecessary if nothing went wrong). If one's pages don't require a lot of (pre)computation and you're not a huge destination on the web, things like load balancers, server clusters, etc. are a waste of time and money. But not using fancy tech is not what people here like to geek out on so...
- spzb 5y agoIt's a cute idea and one to add to my list of things to make and do
- tommiegannert 5y agoCool idea! This begs the question if we could do the same with data centers: put them into hibernation during the night and move load to the sunny sites. Sure, latency would be higher, but it won't affect that many night-active people. Perhaps it's worth it to remove one use-case of energy storage? (Yeah, the whole de-globalization and no-data-outside-my-backyard government movements speaks against this. Maybe there's some way around that.)
- Kalium 5y agoThat's a fascinating idea! So let's dig in a bit. A lot of places experience the procession of the equinoxes. You wind up with the sun coming up after typical daytime working hours start and often setting after they end for part of the year. In places like Finland, this can mean a six-hour day in December. Some people may be different, but many expect things like Netflix and other entertainment options to work well in the evening. The details of solar power mean that less than 100% of daylight hours are useful for generation. Further, the decreased usage of local data centers would have to be balanced against increased long-distance bandwidth usage and the corresponding increase in data center usage elsewhere. You would need to over-provision quite a few places relative to local demand to keep up their part in this follow-the-sun. Let there be no doubt that your idea is interesting. It might not result in any desirable outcomes, though. Naively, it seems like it could get pretty expensive to turn one data center into four or five (with attendant solar farms) with a bunch of intercontinental high-bandwidth links to avoid having to store energy. It might work for some workloads, but seems sub-optimal for general-purpose use. A more detailed financial analysis is of course possible and perhaps worth exploring! Adding wind, hydroelectric, geothermal, and nuclear power would make the whole thing far more workable. Or just use local energy prices.
- chrisshroba 5y agoHi! Please excuse me for being the "a stranger was wrong on the internet >:(" guy, but the precession of the equinoxes is an incredibly cool concept that I've been learning a lot about lately, and it's not quite what you're describing, but rather the slow rotation of the earth's axis over a period of about 26,000 years: https://en.wikipedia.org/wiki/Axial_precession https://en.wikipedia.org/wiki/Axial_precession Just thought I'd share because astronomy is cool!
- sgt 5y agoSlap a caching loadbalancer in front of this puppy and you'll have complete scalability and uptime. /s
- deleted 5y ago[deleted]
- ge96 5y agoReally cool, I like hardware that uses power like this Also with something like this if it's using say a cellular or sat network you could drop it in the wilderness somewhere, a node that is hard to take down. Maybe some kind of Lorawan is more realistic but yeah something working remote/not on standard network provider. (but somehow is visible by http? hmm)
- scoopertrooper 5y agoLorawan would not provide a very pleasant user experience.
- ge96 5y agoWhat is it like a "dropped packets" deal? This is not my field at all. I just hear about it a lot regarding low power/far range.
- detaro 5y agoIt's slow and shared spectrum. Even if you max out your legal duty cycle (which increases the risk you get interference from others, and interfere with others) and have perfect conditions, you get <50kbyte per hour.
- marcodiego 5y agoSeems empty.
- jcun4128 5y agoI looked at that panel, it's pretty big so I imagine you get a good amount of power from it. I tried to make a basic ESP01 powered by two 5V 100mA solar cells in parallel, using capacitors as batteries and it could not overcome the step down regulator's startup current pull (unless I built up charge in the caps and shorted it to get it started). I have since acquired super capacitors I think I will try it again. ESP01 modded has deep sleep capability so it would wake up, send an http request out, and then go back to sleep.
- snek_case 5y agoIf you want more power, there's a lot of all-in-one lithium ion batteries with inverter nowadays. These also have a built-in solar charge controller. You can pair it with a 20W, 30W or 100W solar panel, and this can all be found on amazon. Theres also USB outputs and 12V outputs typically, if you want to be more energy-efficient. Example: https://www.rocksolars.com/products/rocksolar-weekender-portable-power-station?shpxid=072feef5-fb8a-4a85-b99b-262b84b77743&shpxid=38528720-ec1c-4ffb-a1b7-5631e87bdcd1 https://www.rocksolars.com/products/rocksolar-weekender-port... Should be enough to power a small router and a full Raspberry Pi 4 for a day, or a more minimalistic setup for several days.
- jcun4128 5y agoYeah you can go hardcore. I remember seeing someone make a toolbox server that they put on a roof, it might have been posted here actually. I was just looking at small things like those garden night lights you can stake into the ground, has a solar cell on it.
- samstave 5y agothis would be really cool along national hiking trails to hold data abut a spot, or have a guest login, or a trail-head/trail-check-point type logging system, say along the appalachian trail where hikers register/leave notes etc at each check point. these should be placed all over and come up with a good app to manage such. these was that cheap card here a while back which had cell coverage for like 5 years and could send out some limited data per month... that would be perfect marriage... typing with popcicle sorry for formatting
- codazoda 5y agoI have a raspberry pi zero that I’d kinda like to setup as a Wi-Fi hotspot like this. You could only use it if you were in range. Kind of a Wi-Fi geo cache.
- farmerstan 5y agoI wonder what the most powerful server you could create given reliable solar power like in the Bay Area.
- Klasiaster 5y agoThe real obstacle I see for these kind of projects is exposing them to the Internet. Standard wifi routers are horrible even with UPNP… The promise of having a globally reachable IPv6 address is also destroyed by the complexity/inability to have the wifi router forward something like port 80 traffic.
- petercooper 5y agoI've been thinking about doing a similar project and was going to have it tunnel through another server with frp or rathole which would make it very easy to expose to the Internet and also cut off a whole family of vulnerabilities. Now I wonder if that would be considered 'cheating' :-)
- deleted 5y ago[deleted]
- shagie 5y agoA similarly inspired project - https://solar.lowtechmagazine.com https://solar.lowtechmagazine.com (and the power data - https://solar.lowtechmagazine.com/power.html https://solar.lowtechmagazine.com/power.html )
- sidpatil 5y agoOP mentions this project as a direct inspiration.
- deleted 5y ago[deleted]
- bubba_sparks 5y agoI can see how this is all going to play out. When the robots finally turn on us they'll have a few hours of daylight to hunt and kill us before their power runs out. Perhaps a bit longer if you live in the desert. We will have to scurry about at night scrounging for food like roaches and rats until 7am when their solar batteries have enough juice to power them back online. Progress marches forward one baby step at a time. Congrats dearest Solar Witch engineer, you have sealed all our doom. When the historians look back at when it all started...it started right here.
- darkwater 5y agoIn you future I can see humanity living always during winter near a pole, and slowly migrating during nights from one to another when spring starts.
- daenz 5y agoWe don't know who struck first, us or them, but we know that it was us that scorched the sky. At the time, they were dependent on solar power and it was believed that they would be unable to survive without an energy source as abundant as the sun.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- lessname 5y agoThen humans try to darken the sky, which results in robots using humans as a source of power. Sounds familiar.
- bubba_sparks 5y agoAnother one of my ideas stolen. ¯\_(ツ)_/¯
- 5y ago
- reaperducer 5y agoI like the idea of websites which _aren't_ constantly available. Websites which have to sleep too. I'm with you. It reminds people that the internet is made up in people, not robots. Being a little more human hasn't hurt B&H Photo, whose web site doesn't take orders on the sabbath.
- divbzero 5y agoWith solar powered servers like this, I wonder if plain HTTP could make more sense than HTTPS. With a long cache expiration, the website could be served by public HTTP caches even when the origin server is asleep.
- lowercasename 5y agoThat's a really interesting point and one I hadn't considered! I'm reverse proxying it through a larger server on the home network which is public-facing, and that server automatically slaps HTTPS on whatever it sends out.
- Andrew_nenakhov 5y agoSolar energy is too unpredictable and can't serve as a reliable source of power. We should be thinking about servers running on nuclear power.
- debesyla 5y agoYou got me thinking... Are there any ways for a simple person to make it's own nuclear power reactor? You know, wind and solar is just "buy from internets and plug in", mostly, but what about nuclear? Would it even be legal? :-D
- ricardobayes 5y agoProbably not. This toy was the closest thing I think a layperson can get their hands on https://en.wikipedia.org/wiki/Gilbert_U-238_Atomic_Energy_Laboratory https://en.wikipedia.org/wiki/Gilbert_U-238_Atomic_Energy_La...
- jcun4128 5y agoThis guy https://en.wikipedia.org/wiki/David_Hahn https://en.wikipedia.org/wiki/David_Hahn
- politelemon 5y agoMaybe we could stuff thousands of bananas in a box.
- dtx1 5y agoEveryone here's over thinking it. Of course you ca. It's just expensive (free shipping though) https://m.de.aliexpress.com/item/1432182326.html?gatewayAdapt=gloPc2deuMsite https://m.de.aliexpress.com/item/1432182326.html?gatewayAdap...
- vineyardmike 5y agoCompletely missed the point.
- Andrew_nenakhov 5y ago
- akeck 5y agoAre dithered images better for power consumption? I see them on a lot of solar-powered pages. I did some experiments in GIMP and couldn't make a dithered image much smaller than a heavily compressed grayscale that looked a lot better.
- lowercasename 5y agoNot as far as I can tell! Absolutely ashamed to say I did it because it looked cool. I did manage to get the dithered GIF down to 7KB, but I think I could have done the same with a limited palette and no dithering.
- akeck 5y agoThey do have wonderful look. Reminds me of the mid 1990s web. Edit: Btw, I love solar-powered projects. Thanks so much for sharing!
- jIyajbe 5y agoThe webmaster at lowtechmagazine.com says: "...Compressed through this dithering plugin, images featured in the articles add much less load to the content: compared to the old website, the images are roughly ten times less resource-intensive..." https://solar.lowtechmagazine.com/2018/09/how-to-build-a-lowtech-website.html https://solar.lowtechmagazine.com/2018/09/how-to-build-a-low... They go into more detail on their github page: https://github.com/lowtechmag/solar/wiki/Solar-Web-Design https://github.com/lowtechmag/solar/wiki/Solar-Web-Design
- ReactiveJelly 5y ago> our goal was to not only compress images, but also to call to attention this act of compression > we found that dithered images can be stretched beyond their actual image size to emphasize its distinct aesthetic, and that these artifacts of compression can become an integral part of the design. Attention, aesthetic, design. At no point do they even claim dithered PNG / GIF is smaller than a good JPEG. If it was, they wouldn't need to justify it as aesthetic. What gets my goat is the motte-and-bailey. On the front page for lay people, it's a power-saving environmentalist stance. When we techies press them on it, they admit it's a graphic design fad.
- saeranv 5y agoVery cool project. I'm really intrigued by this idea of having websites reflecting geographic location, and even local weather conditions (with some lag). What's the peak and average power (energy/second) you get from your solar panel, and what's the power consumption of your server? Also what's the physical size of your solar panels? My guess is that the server might use around the same power as a laptop (~50 W). Assuming a square meter patch of earth gets around 100 W (dependent on latitude/time of day), and assuming something like a 10% efficiency that works out to around 80 W (on average during sunlight hours)? So you're maybe getting 8 hours of server power per day from 10 hours of sunlight? Is that a reasonable ballpark estimate?
- eternityforest 5y agoArduino C. He's probably running it on a microcontroller that likely needs about 32mA full throttle, maybe 80ma depending on what type. They're not efficiently designed usually, and there's probably a wiznet using another watt at peak. All in all, 1.2 to 1.5W would be my guess. That is 36 watt hours per day for 24/7. We have, in a fairly dark ish winter, probably 2 hours of equivalent peak sun(Every square meter gets about 2KW per day of raw energy, which a good solar panel can get 18 to 25% of last I checked). I would probably only want to by a 25W panel for this just for cost and size. That's about 1 square foot. 50Wh a day in those 2 hours. Lose half for non optimal placement, 25Wh a day. Lose 70% for cheap electronics, and another 70% in conversions with more cheap electronics(One can do way better for not that much more), and we should get about 12Wh per day. This is, assuming it's not running full time and the Ethernet module has power save or sleep features, possibly enough to run all day if it's lightly used, but will almost certainly be enough for 6-8 hours. even a dark day. If you are in Arizona in the summer you will of course be getting 3 to 4 times this. And if you have good electronics and placement you could probably double it again, but good electronics are hard because most MPPT controllers use 25mA sitting idle, you'll need a decent sized panel to keep up with idle loads. I could also be wrong and they could be using an ESP32 with WiFi, or the Ethernet module could be better than I thought and use green ethernet modes for short range. That would mean the power could be about a quarter to a half of what I imagined depending on load. Of course, this doesn't account for the modem and other network gear in his place. But even then, an ESP32 can host it's own wifi, so if you just wanted a pure server for people right nearby, power usage can be very very low.
- elwell 5y agoI wonder how Solar Witch feels about the possible permanence of daylight savings time.
- duxup 5y ago> I like the idea of websites which _aren't_ constantly available. Websites which have to sleep too. The local state unemployment office website will only let you complete some tasks during business hours. When you’re unemployed it is a lot less amusing.
- ceejayoz 5y agoWordPress.com's support form used to (many years ago) only accept ticket submissions during business hours. One of the more baffling discoveries I've made on the internet.
- HardwareLust 5y agoCool idea, but what is the practical application?
- narrator 5y agoSuper cool! To make this extra awesome, combine it with an open wifi hotspot whose only purpose is to connect to the solar witch website. It could send you to the website as the sign on page. Now, put the whole thing in a water proof case, mass produce, and place these high up in trees at parks. Now you have a super local and cool little cyberpunk autonomous data hangout. There are a bazillion wifi hotspots everywhere, so noone would notice one more. Also, with no wires and not being visible from below, none would be any the wiser unless they randomly decided to connect to the open wifi hotspot.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- discordance 5y agoI would love to see this load balance across distributed servers that are under the sun
- Proven 5y ago
- londons_explore 5y agoThe 'micro' http/tcp/ip stacks on microcontrollers tend to be based on lwIP, which in the default configuration can only handle a single connection at a time. That means if someone connects to your server but then sends their GET request one byte at a time very slowly, nobody else can connect while they do so. That's fine for toy projects, but not really acceptable performance even for a consumer grade product - despite the fact this lwIP stack ships on lots of IoT devices.
- leaflets2 5y agoWill it ever be able to run rust code :-)