The Joy of Reducing Complexity

2026, January 25    

They say with age comes wisdom, and while I believe that's true in some cases I feel realising things are overly complex and should be simpler (or put simply, I don't like fixing electronics in the rain every week) is a contributing factor. Over the last 3 months I've been battling with a tech issue as old as time: something that once worked fine but has become more problematic as of late. Too many days of being soaked while trying to avoid electrocution have helped me realise that sometimes simpler is better.

Some time ago I decided that it would be great to have the driveway gates accessible remotely so that upon arrival at the house I can drive in without blocking traffic (hint: these aren't fast gates). The manufacturer was kind enough to offer a pre-built solution for around 3 times the cost of a replacement controller (an interesting tactic given its an ESP32 under the covers, and they wanted over £500 for it), to which I politely declined. One technical manual later and it was time to create my own (what could go wrong).

Enter the inevitable Raspberry Pi and a dual-relay add-on board. Significantly cheaper than the manufacturer solution and with more flexibility this seemed the best approach. A quick search of the interwebs came up with Homebridge as a nice way to integrate with the Apple ecosystem, and it even had a script plug-in so that some quick/dirty code would work. A few hours of testing (to get the relay sequencing correct) and I had a working solution (and a hangover the next day).

As with many things, it runs stable for long enough that you leave it to itself and don't give it a second thought. Automatic updates do their thing, some uptime monitoring for good measure, and you carry on with your day-to-day (bonus points for having it automatically close them at 11pm if you accidentally left them open).

Then one day it doesn't work and you realise you don't have your remote fob on you. Remember that point about not blocking traffic... No biggie, as a quick login should fix any simple issue. Sadly it isn't reachable on the network (and your host monitoring also broke so no alert), and now you have to dismantle the control unit to figure out what went wrong. One blown board replaced and things are running again, right?

Well, yes and no... First, you blow another board (this time because the seal wasn't quite right and ants decided they like the heat from it). A new board later (and plenty of silicone this time) and its go-time, except for a few days later when it breaks again. This time it's still reachable over the network but Homebridge is dead. While automatic updates can be risky, a lean/clean Pi is a little surprising.

As I subsequently found out, support for 32-bit operating systems was removed in the latest Node upgrade (nice of the OS to let that install go through). OK, so an OS reinstall later (this time ensuring its definitely 64-bit), a reinstall / restore of the config, and things are great right. Right?

Now its time for the WiFi connection to become problematic. Powersave disabled, region fixed, good strength, AP selection locked (and unlocked), but still random disconnects (without the desired reconnect). Worse, a flashing activity light (when you take it all apart in the rain yet again) but no logs being written when you have to power it off. I lost track of how many times this happened, but regardless of the count, the summary is too many.

After 3 months of pulling my hair out (and not enjoying parcels left on the pavement / in the rain) it was time for something new (and something hopefully easier to troubleshoot). In comes a pair of Shelly devices (there were reasons not to use a single dual-relay device), which are delightfully cheap (£25 for the pair on special offer), and simplify what parts are actually alongside the gate controller. A quick pairing to the WiFi and both are showing as connected to the network.

Continuing with the Homebridge approach, a plug-in for these devices already detected them on the network by the time I logged in. A few bits of tweaking and relay sequence was good to go. The gates are working again, and I (hopefully) don't need to open the controller unit any more (especially not in the rain). As a bonus, the reliability should be a lot better now. For anyone wondering, yes, they have had the WiFi AP / Bluetooth / Cloud connection disabled (and they connect to an isolated network).

While I might one day look back on this and think how wrong I was, in truth I wish I had switched to these devices sooner. The level of effort / time consumed trying to get it running again and again (not to mention frustrations when blocking a road) make it hard to justify the initial project of creating my own. While I do love coding and developing new things, sometimes reinventing the wheel really doesn't make sense (especially when you just need a simple wheel).

Fingers crossed the gates continue to work for the foreseeable (leaving me time to focus on all the other tasks I need to do).