No Power? No Problem: How a Local Gemma Model Gets Programmers Outside During Blackouts

A Nigerian dev turned daily blackouts into wellness breaks using a fully offline local Gemma model.
Developer dannwaneri built Light don go, an open-source tool that uses the gap between grid failure and generator startup to prompt users to get up and move. It runs entirely offline — weather data is pre-cached while power is on, sunset times are computed locally via NOAA's solar algorithm, and the overlay loads no network resources. The key engineering decision is strict role separation: code handles all numeric facts while the local Gemma model only generates a short suggestion with no numbers, validated by a guard. A real blackout exposed a cold-start timeout bug caused by Ollama's 5-minute idle unload — fixed with `keep_alive: -1`. The project makes a compelling, concrete case for local open-source AI's offline availability, zero cost, and debuggability.
In Port Harcourt, Nigeria, power outages are a daily reality. When the grid goes down, fans stop spinning, routers go dark, laptops switch to battery — and someone shouts "on the gen!" (go start the generator). Developer dannwaneri turned the gap between "grid down" and "generator up" into an opportunity to step outside. He built an open-source tool called Light don go (Pidgin for "the power's out").
The project entered the "Touch Grass" themed week of the Hacktoberfest Open Source AI Challenge. The concept is refreshingly grounded: when your laptop switches to battery power for more than 30 seconds, a full-screen overlay takes over your workspace — showing a suggestion, a 60-second stretch timer, and a button that reads "I don stand up. Close am." (I stood up. Close it.)

A Local AI App Built for Offline Environments
The most noteworthy design choice is that the tool requires absolutely no internet connection. The reason is straightforward: when the power goes out, the router goes with it. Cloud APIs are unreachable at the exact moment the tool needs to "speak."
The author's solution is to handle all network dependencies in advance. While power is available, the tool saves hourly weather forecasts from Open-Meteo every 30 minutes; when the power's out, it reads only from local cache. Sunset times are calculated on-device using NOAA's solar position algorithm — for Port Harcourt on October 7th, it computed 18:21, nearly identical to Open-Meteo (18:21) and sunrise-sunset.org (18:22).
The full-screen overlay follows the same offline principle: no web fonts loaded, no CDN resources fetched. The page adapts its appearance based on context — warm tones with a countdown to rain or sunset during the day, dark tones at night with suggestions to stay close to home. This kind of pragmatic consideration for edge environments is something many cloud-first products tend to overlook.
Open-Meteo is an open weather data API offering free hourly forecasts with no registration required, drawing from numerical weather prediction models from multiple national meteorological agencies. NOAA's Solar Position Algorithm, published by the National Oceanic and Atmospheric Administration, calculates sunrise and sunset times from coordinates and date — entirely on-device, requiring only a CPU and accurate geographic coordinates. Together, these enable a "prefetch when connected, read offline when not" architecture: weather data is periodically synced and written to a local cache file while online; sunset times are computed locally in real time with no cache expiry concerns. This "prefetch online, degrade gracefully offline" design pattern has broad applicability in regions with unstable infrastructure.
Code Handles the Facts, Gemma Just "Speaks Human"
The most valuable engineering decision in the entire system is the author's strict delineation of AI responsibilities.
The model used is gemma4:e2b-it-qat, running locally via Ollama on a CPU-only i5-1135G7 laptop. The download is 4.3GB; cold start is about 14 seconds, warm start is 3.6–4.0 seconds, at roughly 15–20 tokens/sec.
Initially, the author had Gemma write the entire notification message from raw facts. In 4 tests, it dropped all the numbers and twice reversed the meaning entirely — for example, writing "NEPA light don come" (the power's back) instead of describing an outage, or saying "before the generator dies" about a generator that hadn't even started yet. Simple number validation couldn't catch these errors because the broken sentences contained no numbers at all.
So he split the responsibilities:
- Code writes the fact lines: what happened, when rain or sunset is coming, how many minutes remain, how many naira saved. Every number in the message comes from code.
- Gemma only writes the "suggestion": it sees exactly three things — location, context (raining / dry daytime / after dark), and one activity selected by rule. It sees no numbers at all.
- A guard validates the suggestion: if any number appears, the word count exceeds 20, or NEPA / light / electricity / generator is mentioned, it's rejected outright. Gemma gets one retry; if that fails, a fixed fallback sentence is used. At most two model calls — never a loop.
After the split, all 9 tests passed on the first try with none of the semantic errors he'd observed.
The author is candid about the guard's limitations: it checks for numbers and topic violations, not coherence. Once, Gemma produced "watch the rain inside the phone" — nonsensical, but it passed. A larger model would make fewer such mistakes, but won't run on this laptop. He explicitly accepted this tradeoff. That kind of clear-eyed acknowledgment of constraints is more instructive than blindly chasing model capability.
Ollama is an open-source tool for running large language models locally, supporting macOS, Linux, and Windows with an OpenAI-compatible HTTP API — no knowledge of underlying inference frameworks required.
gemma4:e2b-it-qatis a quantized instruction-tuned variant of Google's Gemma family;qatstands for Quantization-Aware Training, which typically preserves better generation quality at the same compression ratio compared to post-training quantization.keep_alive: -1is an Ollama API request parameter that tells the server to keep model weights in memory indefinitely after a call, overriding the default 5-minute idle unload behavior. This parameter proved critical in the bug fix described below — power outages often occur after the model has already been unloaded, and keeping it resident in memory is the only way to ensure warm-start rather than cold-start latency.
Real Blackouts Exposed a Bug That Simulations Couldn't Find
The project log records multiple real power outages on October 8th and 9th. The very first one revealed a critical flaw.
When the power cut at 12:23, the tool detected it successfully — but Gemma timed out. Before changing anything, the author measured first: ollama ps showed the model had just been loaded by this failed request. Ollama unloads models after 5 minutes of idle time. His warmup had run at 11:53, so by 12:23 the model had long been unloaded — triggering a cold start on battery power that took over 20 seconds.
The fix was a single setting: keep_alive: -1, keeping Gemma resident in memory (3.9GB out of 15.7GB). The next outage at 12:31, Gemma answered on the first try. A later timeout at 13:34 had a different cause — the laptop had entered Windows Modern Standby sleep. Before blaming the fix, the author checked the event log to confirm.
His conclusion is spot-on: the default configuration broke the tool's only promise — working during a power cut — and "this is a problem I couldn't have found in simulation." That's exactly the value of running a tool in real-world conditions.
Windows Modern Standby is a low-power sleep mode Microsoft introduced after 8th-gen Core processors, replacing traditional S3 sleep. Unlike S3, the system isn't fully suspended — background network tasks and apps can still run in limited ways, but CPU-intensive tasks like local model inference are heavily throttled or suspended. This means a laptop that appears to be running normally may cause Ollama inference requests to time out as the system enters a low-power state — and this behavior is difficult to reproduce in normal testing. The author confirmed the sleep event timestamp by examining the Windows Event Log, distinguishing this timeout from the earlier
keep_alivefix and avoiding a false attribution. It's a textbook example of system-level debugging.
Engineering Details: A Full-Screen Overlay and 98 Tests
The presentation layer is an HTML file; outage data is written to it as JSON. Edge opens it with --app --start-fullscreen — no address bar, no tabs. Model-generated sentences are injected as data, never as raw HTML. There's a dedicated test that feeds in a suggestion containing </script> to verify the page can't be broken.
The entire project has 98 tests. One blocks all network sockets to ensure the complete outage flow runs in a fully offline environment. The author also deliberately "broke" the guard 8 times (relaxing tolerances, removing checks), with a corresponding test failing each time — a good habit that validates the tests themselves are actually effective.
Why Local Open-Source Models Are Irreplaceable Here
The author's reasoning is concise and compelling: the network and the power die together.
When the power cuts, the router waits for the generator to come back online. Cloud APIs are unreachable at the exact moment the tool needs to speak — and the local model responds in 4 seconds with no signal. The cost per outage is zero, which matters when outages happen every single day.
More critically, because Ollama and the model are open, the author could see exactly why the first real call failed (idle model unloaded after 5 minutes) and change that setting. With a closed-source API, "a timeout is just a timeout" — there's nothing to debug.
This small project puts local open-source AI's core advantages — offline availability, zero marginal cost, observability and debuggability — into a real, concrete use case. That's more persuasive than any abstract pitch. And as the author notes, the tool's best outcome isn't in the logs: it's the morning of the 9th that would have been spent waiting for the generator, but was instead spent playing with his cousin's children.
Related articles

Uber Deploys ChatGPT Work Company-Wide: AI in the Workplace Enters the Scaled Implementation Phase
Uber deploys ChatGPT Work to 30,000+ employees, extending it from engineering to all roles. We analyze its expert-engineer pairing, end-to-end automation, and questions of AI control and power concentration—insights for scaling AI in the workplace.

Shift at Midnight Hands-On: When "ID Verification" Becomes Alien Hunting
Shift at Midnight blends ID verification with horror survival in a four-player co-op game. We break down its inspection mechanics and chaotic humor.

Zelensky Recounts the Outbreak of War: I Need Ammunition, Not a Ride
Zelensky recalls the first day of war in a YouTube interview: farewell to family, rejecting Biden's evacuation offer with "I need ammunition, not a ride," and how Bucha shaped his stance on compromise and peace talks.