Skip to content

Blog

Monitoring CO2 with ESPHome

I have done several posts about my smart home, and in particular about my instance of Home Assistant. In an effort to continuously improve this system, I have recently added CO2 level monitoring with a Pi Pico and an SCD30 CO2 sensor, which also monitors temperature and humidity.

I've been keen to see how the levels of CO2 affect my concentration and the stuffiness of the room, and with a big gauge in Home Assistant, my previously uncaring self can slowly start to become obsessed with the air quality in the office.

Fixing a Broken Home Assistant

Like a small child with no sense of fear, my Home Assistant continues to break itself...

In my last post, I had a bit of a rant about how difficult my smart home was being. Since then, I've had a bit of time to recollect my thoughts and started to systematically tackle the issues and pain points I've had. In general, the issues in vague order of how much they annoy me are:

  • Unreliable Smart Plug Connections
    • Reliance on 'The Cloud'
    • Lack of Documentation
    • Alexa Integration
  • Remote Access
    • Access via http://host.name:8123
    • Lack of TLS
    • Lack of External Access
  • Scenes!
    • Automation
    • Sync Computer Brightness/Hue
  • Future Changes
    • Energy and Cost Views
      • Personal Usage
      • Total House Usage
    • Network Isolation
    • Camera (inc. Doorbell) Access
    • Expand to Entire House
    • Get Remote Keybinds on Computer Working Again
    • Auto Off/On Arrive/Leave House
    • Scene Switch Offs Only/Override Options
    • Electric Blanket Switch Off
    • Plex Dim Lights

I won't tackle all of those in this post, I'll just chip away at those I currently find most annoying and easiest to fix.

I Hate Maintaining Things

I like to start a lot of projects. New projects are fun. They have novelty and a lot to discover and implement. You can go from nothing to something functional in the span of a couple of hours and be really happy with it. Then, you go to bed, go to work, and find a new project to work on, one that's fun, has novelty, and has new things to discover and implement. You do this because the current project is no longer fun.

I have so many projects on the go at once that it's so overwhelming to change and go back to a different one. I'll rediscover something I started a few months ago and by the time I've dusted it off, got all the bits out, and started to work on it again, it's bedtime and I've not got any more time to fiddle with it.

As with all projects, the time you think something will take and the time it actually takes are different by several orders of magnitude. This would be really helpful if you thought something would take several months and only took fifteen minutes, but alas it's the other way round. Let's give a few examples.

How ET Bracket Racing Works

The 'Limpy Slug' at the last meet of the year in 2023, back when it was a nitrous motor

As I've mentioned on the front page of my site, I crew for a couple of cars racing in the Super Pro ET class who meet at the Santa Pod Raceway several times a year to compete for a chance to win the championship, and a little bit of money. I thought I'd dive into a bit more about how drag racing works in general, and how ET bracket racing fits into that.

Installing Old App Versions to Old Android Devices and Planning for Legacy Users

Emoji of ticket and a phone equalling a bomb and head exploding
Not everything needs to be done with a computer. Background image from Unsplash by Jude Mack

Whilst most adults will have a reasonably up-to-date smartphone, the same can't be said for younger siblings or children that are just getting used to the responsibility of carrying a mobile phone, typically being handed down old phones as their parents or siblings upgrade.

One problem with this is that older devices might not support the most up-to-date operating systems and apps needed for things such as bus passes. Unfortunately, the Play Store doesn't provide a mechanism for installing the most recent compatible version of the app to your device, so side loading from unofficial sources becomes the only way to make these apps work on old devices.

In the remainder of this post, I'll explain the issue that made me need to do this in the first place, and provide a tutorial on how you can safely side load apps on to an old Android phone without risking the addition of malware or disabling key security features.

Protecting Leisure Batteries and Smartifying Campervans

Disclosure: Some of the links below are affiliate links. This means that, at zero cost to you, I will earn an affiliate commission if you click through the link and finalise a purchase. Learn more.

Three icons: battery on phone, bolt, and car battery in white on a blurry background of some electronics from my van
Protect your batteries!

This post is slightly different from the usual, as it's all to do with my campervan. As some of you might know, I enjoy camping and have converted a Renault Trafic into my very own campervan, equipped with all the mod-cons one might expect when camping in luxury.

One of the downsides to this luxury is that it all uses a lot of power... the lights draw about 10W all in, the inverter sips around 30W just at idle, and don't even get me started talking about the diesel heater. All this power has to come from somewhere, and for me, it's a leisure battery.

Walking the South West Coast Path: From Shell Bay to Dancing Ledge

Various pictures at points along the SWCP, on the walk from Dancing Ledge to Swanage.

This week's blog post is on my shenanigans walking the South West Coast Path again, in particular covering the two days we did walking from Shell Bay to Swanage, then from Dancing Ledge to Swanage.

Whilst it has been a bit of a while since I walked these, I thought I'd take the time to post a bit about the coast path around the Swanage area, at the start point, which is just west of the chain link ferry that takes you across the mouth of the Poole harbour, to Dancing Ledge which is an amazing part of the world. The videos can be found below, or click for day 1 and day 2 on YouTube, respectively.

Havoc Ape: Using Chaos Engineering to Build Resilience and Automate Reboots

AI-generated image of a monkey pulling apart power cables in a server room, with sparks flying
Keep your data centre under lock and key, or risk the wrath of the ape... (AI-generated image, Havoc Ape project logo)

In a perfect world, servers would have infinite memory and would never have memory leaks. Unfortunately, this isn't a perfect world, and we've not yet figured out a way around the fundamental laws of physics, so it's quite likely you will have seen something like this if you've been administering Linux servers for a while:

[11686.043641] Out of memory: Kill process 2603 (applicationWithSlowMemoryLeak) score 761 or sacrifice child
[11686.043647] Killed process 2603 (applicationWithSlowMemoryLeak) total-vm:1498536kB, anon-rss:721784kB, file-rss:4228kB

If not, then you're either really lucky, or you haven't dealt with applications that aren't perfect. Linux tries its best to sort this using something called the OOM killer. This is a relatively simple part of the kernel that deals with memory saturation issues to prevent a complete system breakdown. It's well-intentioned, and tries to kill the process that it thinks might have a memory leak, but leaves servers in an unknown state, often killing the wrong daemon and requiring manual intervention to fix.

For the remainder of this blog post, I'll first dive into how we fix issues with the OOM killer in production across our fleet of servers, then a bit about how we make use of chaos engineering in production to reduce outages and build resilience in our systems.

Serving Plex Clients from a Raspberry Pi

Plex logo, a plus, and Raspberry Pi logo on a blurry background which is the plex home dashboard.
Running a home media server has never been easier!

Plex is the gold standard for a home-hosted media server, allowing you to stream your home movies or (legally) ripped media from any television, computer, or phone either at home or when out and about.

Plex is widely run across many homelabs, as it is easy to setup, and unlike some other projects actually provides good value to the end user. In the remainder of this post, I'll break down how I have my Plex server set up for 24/7 access on a Raspberry Pi.