status.href.cat now reports and notifies me if my home power/internet goes down!
The other day, PG&E and my landlord emailed me about a power outage. The elevator system needed a technician to reset it. All the e-key readers in the lobby no longer work. This got me wondering, how long was the power out for? With this, I decided to add uptime stats for my home electricity.
PG&E emailed about the power outage. 10 minutes later, my power was restored. My landlord emailed, reporting all the things that they checked and are failing
My first thought was, how can I check if my home power is out? I have some IoT devices around the house connected to the Wi-Fi. If the power goes out, these devices would go offline, right? Unfortunately, it was a big waste of time; the “last connected” timestamps from the Wyze API are from almost 20 hours ago. I guess Wyze devices are incredibly passive, which doesn’t solve my problem.
My Eero app says my router is powered on and connected to the internet. There must be an API powering this, right?
Then I realized my Eero router has an app that tells me if my router is online and connected to the internet! I found a repo on Github, reproduced the requests in CURL by eyeballing the code, and built an n8n workflow in 10 minutes.
So much automation in my life boils down to looping over “run a CURL command” and then “run some logic”. It’s nice to be able to focus on those core issues instead of all the boilerplate.
Now that I can reliably see my power availability, how should I store this information? Naively, I could add a block that emails/texts me when power is unavailable, but I’d also notify myself every minute that power is out. I wanted to know when my power first went offline and came back online. Showing historical data would be ideal. Then I realized I could use my uptime dashboard! I added a webhook for my small piece of code, and now my uptime dashboard checks every 5 minutes, including history and stats. Tada!
My uptime dashboard now shows if my home internet and power are online. It also reports uptime percentages and previous outages.
This post is a testament to building personal software. I started programming because I could solve many problems in my personal life with a little code. I wish the tools I have today had existed 5 years ago. As a software engineer through and through, I enjoy the low-code, no-code revolution for my personal needs. I don’t want to write a script, figure out a scheduling system, build out observability, and polish up a functional UI. A lot of personal software is super easy if you know the right tools. Whatever it is, software has gotten much easier to build, even without AI hype. This “home electricity uptime” project used only 20 lines of JavaScript; self-hosting n8n’s community edition got me the rest of the way.
The software I’m most proud of is the one that notified my friend whenever a new dog was available for adoption at our local shelter. Hearing PagerDuty’s robotic voice tell you that Misty is a sweet puppy who loves cuddles and digging in mud is one of the most heart-melting sensations you can experience. And it worked! My friend adopted a cute Kenji!
If I didn’t know any better, Kenji was a ragdoll cat.
Give it a shot, build small software, and make your friends happy.