A challenge of blog questions

Back in Ye Olden Times on LiveJournal (what I consider to be the forerunner of what social media and blogging has ended up being these days), we’d often come across a quiz and write answers to it, then tag some other friends to do it as well.

I have been tagged by the esteemed @web_goddess on her post and so here I am!

Q: Why did you start blogging in the first place?

The very beginning was probably everything2.com waaay back in mid-2000, it was a site which Slashdot would link to in story summaries, sort of as a precursor to Wikipedia, and was an interesting mix of factual information and whimsical writing. I was 17 and in Year 12 in high school at that point, and as it turns out decidedly not great at writing, and I removed most of my write-ups quite a number of years ago now, mostly because they were crap, but left a few up. I think I just liked writing things and having people talk about it, I don’t know if that would count as blogging though? And I was more interested in the social hangout in #everything on IRC anyway.

After that a bunch of us moved to LiveJournal which is probably far closer to what you’d consider blogging, and it was really just used the same way you’d use social media today: writing about what you were doing or watching on TV or whatever so your friends could follow along.

Q: What platform are you using to manage your blog and why did you choose it? Have you blogged on other platforms before?

I’m currently on a self-hosted WordPress, and have been since the end of 2015 when I imported all of my LiveJournal posts over here, and started using my blog for writing longer form content where Twitter was used for shorter things.

I chose WordPress specifically because it was the only thing I could find that actually had the ability to easily a) import LiveJournal posts and b) import the comments on them as well. Even that didn’t end up going flawlessly (see here and here) but by and large it was a success, and I have all of my posts going back to the very first LiveJournal post I made when getting drunk with friends on IRC. 😅

I started using Tumblr back in 2009, mostly just to post image posts, the sort of thing you’d use Instagram for, and would cross-post them to my Twitter account. (This whole setup ended up evolving, see the “Any future plans for your blog?” question below.)

Q: How do you write your posts? For example, in a local editing tool, or in a panel/dashboard that’s part of your blog?

Just in the standard WordPress editor.

Q: When do you feel most inspired to write?

It comes and goes, in the last few years it’s been primarily for documenting my efforts with our home temperature monitoring setup and all the associated gubbins. I’m not sure “inspired” is quite the right word for what I write though. 😛

Q: Do you publish immediately after writing, or do you let it simmer a bit as a draft?

I publish immediately, I’m not writing any deep and thoughtful things for the most part so I don’t feel like there’s a need to simmer.

Q: What’s your favourite post on your blog?

I’d say “favourite” probably corresponds to “most useful for other people” in this case, and by far the two that most hit that are these:

The Linux Mint one ended up with 39 comments on it all up over a period of five years (which IMO shows the value of comments even though it’s unfortunately a requirement these days to install the Akismet Antispam plugin to deal with all the fucking bot spam, sigh). And I got a couple of nice comments on the Guitar Hero one thanking me for it.

Q: Any future plans for your blog? Maybe a redesign, a move to another platform, or adding a new feature?

As well as my blog, I also have a section on my main website which is where all of my shorter posts that end up on Mastodon go. It came about originally because back when I was still on Twitter, my client of choice Tweetbot had an option where you could specify a custom API endpoint to send images to, you’d return a URL and it would post the tweet with a link to that image. Even back then I was thinking it would be good to actually be able to host all my own stuff on my own server, it went “live” as it were at the end of November of 2016 and I’ve pretty much been hacking on that Media section ever since. I also imported all of my Tumblr posts to my website in 2019, then added a Memories feature firstly to the Media section on its own (which I dutifully blogged about) and then to pull in Flickr photos (ditto), then finally pulling in WordPress posts too (which I don’t think I actually blogged about as far as I can see). So now each day I can hit /memories on my website and see all of the LiveJournal/Tumblr/Wordpress posts plus Flickr photos on that day all in one place!

At this point it’s basically a mini CMS, with a custom UI that I wrote for adding and managing posts, it’s got threads and replies and tags and search. I’ve thought about moving my WordPress posts into it too, but given the efforts I went to to get my LiveJournal plus all its comments imported, I’d need to handle all of that too, PLUS somehow adding comments and avoiding spam? Seems like too much hassle.

I have thoroughly enjoyed making new themes for my website though, and they’re all fully switchable still going back to the original “Dark” one I started with in 2012 when the current general design of my website began.

If I narrow the scope down to just WordPress, I’m not really a big fan of the theme I’m using right now (Blogghiamo) and I’d like to be able to completely customise everything, but starting from scratch making my own theme seems like a very large undertaking, and rife with possible footguns, and none of the third-party ones I’ve seen seem to be just a regular blog layout these days, they’re all about e-commerce and so on. So we’ll see on that front. I do try to keep at least the colours in the WordPress theme up to date with what my current “default” website style is.

So yeah, it’s sort of a weird mix between my website and my blog, and will occasionally go to find something and have to check both locations because I’ve forgotten which one I’d posted it on.

However, one really cool thing about sticking with WordPress is the ActivityPub plugin: my blog has its own fediverse account at @blog that you can follow from your Mastodon client of choice, and cooler yet you can reply to posts that that account makes and they show up on the blog post in WordPress as a comment!

Q: Who’s next?

I am going to pick… let’s see… @[email protected], @mike, @heygeorgie, and @liamvhogan!

Mexican-style pressure cooker lentil rice

Mexican-style pressure cooker lentil rice

Ever since COVID hit, my workplace has been fully remote — we still have an office but there’s no requirement to be in it — and given my commute is an hour on the train, plus a fifteen minute walk to the station in the first place, I opt to work from home unless I particularly want to go into the office for whatever reason. Even prior to COVID, we had free lunches provided in the office and so I’d just throw together some veggies and meat and sauce into a wrap and toast that to have while we played our regular daily Magic the Gathering over our lunch break.

Since I’m now working from home the vast majority of the time, though, I have to provide my own lunches (::dramatic hand to forehead::), and since I like having enough time to get a good drum practice session in over my lunch break, I mostly make a big batch of something on a weekend, freeze it into individual serves, and then bung a serve into the microwave each day for lunch. Unlike Kristina I have no qualms about having the same thing for lunch every day, it’s mostly just a delicious thing to put into my face while I’m catching up on my RSS feeds and forums and so on, prior to going out to the back room to play drums.

We use the hell out of our pressure cooker in particular for rice-based things (our is a Crockpot Express), and Kristina had introduced me to this conconction that has rice, chicken stock, lentils, and kale in it and I’d started making batches of that. I wanted to expand the variety a bit and really like the typically Mexican seasonings of smoked paprika and cumin, and through a whole lot of trialling and mucking around have come up with an absolutely delicious recipe for Mexican-style lentil rice.

Serves

This recipe makes nine serves of around 350g each.

Ingredients

⚠️ I use Australian measurements, so a tablespoon is 20mL instead of the 15mL that the rest of the world uses (don’t ask me why it’s like this), and 1 cup is a standard 250mL metric cup.

  • 2 cups of medium grain rice
  • 2x 420g tins of brown lentils1
  • 1x 400g tin of black beans
  • 2 large onions, finely diced
  • 5 cups (1.25L) of water
  • 45g of Vegeta chicken stock2
  • 450g sliced green beans3
  • 250g corn2
  • 4tbsp tomato paste
  • Healthy serving of garlic paste4
  • 1 tbsp smoked paprika
  • 1 tbsp ground cumin
  • 1/2 tbsp cinnamon
  1. Coles-brand lentils are actually surprisingly decent here because they don’t turn to mush.
  2. You don’t have to use this specific brand, but I’ve found it to be very tasty.
  3. I use frozen beans and frozen corn and defrost them under hot water from the tap before putting them into the pressure cooker pot.
  4. I use garlic paste rather than chopped up fresh garlic solely due to laziness, and give it about ten good-sized dollops. You can adjust it to taste.

Directions

  1. Dice the onions and start them cooking in a pan.
  2. Drain the lentils and black beans, rinse them off, and put them plus the rice, green beans, and corn into the pressure cooker pot.
  3. Boil the 4.5 cups of water in a kettle and dissolve the chicken stock and tomato paste in it, then dump it into the pressure cooker pot.
  4. Once the onions are looking good and caramelised, add the garlic paste and cook a bit further to allow the flavour to infuse.
  5. Add the onions to the pressure cooker pot, along with the smoked paprika, cumin, and cinnamon, and give the whole thing a solid stirring.
  6. Set the pressure cooker on regular “Pressure Cook” mode, low pressure, for 13 minutes.

Additions

To add some freshness, while I’m defrosting an individual serve in the microwave to have for lunch, I’ll chop two good thick slices of fresh tomato and dice it, along with about half as much in volume of diced red capsium. At the half-way defrosted mark I’ll stir in some shredded cheese (Perfect Italiano’s Perfect Bakes is a particularly tasty option) then pop it back into the microwave for the rest of the defrosting. When it comes out, stir the tomato and capsicum in and for some extra flavour and kick add two teaspoons of La Costeña chipotle sauce (or whatever hot sauce you’d like).

Improving wifi signal with Ubiquiti’s U6+ access points

Last month I bought a set of modern ESP32 boards with four times more memory than the ones I had been using that date from ~2017:

I have a bit of functionality in my MicroPython code where I can trigger the board to update itself remotely by pulling the files down from GitHub, but unfortunately with the overhead of running MicroPython plus my code itself, I only end up with about 80KB or so of free memory after a fresh reboot and so the update-from-GitHub code frequently runs out of memory and I end up needing to update the code by plugging it directly into the computer. (Which in turns means needing to find out a damn Micro USB to USB-C adapter or cable because all my computers are USB-C now.)

I got the indoor ESP32s for the office and lounge room all set up and working fine, but when I got the ones in the back room set up, I realised that they were constantly dropping off the wifi for minutes at a time, or longer. It turns out the wifi signal strength there is very marginal, and I think the sheer compactness of the new boards meant they couldn’t pick hang on to a signal as well as the older boards.

While investigating this, I realised that with my recent upgrade to an iPhone 16 Pro I could take advantage of Ubiquiti’s WiFiman app which lets you generate a map of your wireless signal strength but it will also use the ARKit functionality in newer iPhones to pick up where the walls in your house are and actually generate a rough floor plan! I ran it twice, once for the 2.4GHz and once for the 5GHz network:

A screenshot of both the 2.4GHz and 5GHz network signal strength. The 2.4GHz isn't bad, inside it's mostly green except for the very front of the house, but the back room is decidedly orange and getting close to red. The 5GHz is a shit-show, the room that the router is in green and everything else is yellow at MOST, with the front of the house being almost red, and the back room being completely red.

The room with the green signal strength on the 5GHz map is where the router was actually located, our home office is the room directly above that, the lounge room is at the bottom right and the very top-right bit that’s poking out is the back room that’s out in our back yard where the outdoor sensors live.

Unsurprisingly the 5GHz signal doesn’t penetrate through walls very well, but I was surprised at how little it reached the very front of the house where Kristina and I sit and use our computers when we’re not in the home office despite there only being a single wall in the way (though that also explains why I’ve gotten some pretty rubbish speeds when copying files over the network from my machine when sitting in the lounge room).

The router itself is a Ubiquiti Dream Router, and I knew Ubiquiti offered all sorts of additional access points that you could just plug into the network and get running with very little additional mucking around. After a bunch of reading I settled on a pair of the no-frills U6+ APs, and they arrived on the 4th of this month. My plan was to relocate the Dream Router itself to the home office and have one AP at the very front of the house in the lounge room and the other in the back room.

However, I had neglected to notice that the U6+ doesn’t actually have any way of getting power to it except for via Power over Ethernet (PoE) where both data and power is supplied via ethernet cable, which in turn requires a device that can inject power into the ethernet cable. Thankfully the Dream Router has two PoE-capable ports on it, but I wanted to keep the Raspberry Pi 4B+ on ethernet since it’s the heart of our temperature monitoring/display setup and is rather critical to the whole thing, so I needed to buy a separate PoE injector for the AP for the lounge room. Moving the main Dream Router to the home office also meant we needed to get the electrician out to do a bunch of recabling, and after four hours of hard work on Tuesday doing a bunch of extremely hot and difficult work in the ceiling, followed by three hours on Tuesday evening on my part pulling everything in the home office apart to tidy it up, we are in business!

The actual process of adding the new APs to the network could not have been easier: you plug them in, they start up and pop up in the Dream Router’s web interface, you click “Adopt”, and they update their firmware and are automatically configured, even figuring out which wifi channel they should be on so they don’t interfere with each other. You can also lock a specific device to only ever connect to one specific access point, so I’ve got everything that’s permanently in the lounge room set to only connect to the lounge room access point, and the same for the Dream Router and the back room access point as well.

I ran another WiFiman signal strength scan earlier today for both the 5GHz and 2.4GHz networks, and you can clearly see the effect of the router being in the office and having the new AP at the front of the house. The back room signal looks weird because my iPhone took a little while to roam from the prior access point to the one in the back room so it’d already partially mapped some signal strength but you can still see the difference from above:

An image of the signal strength of our 5GHz network with the new access points, the home office lounge room are both nicely green, as is the back room.

I haven’t included the 2.4GHz one here because the signal strength throughout the whole thing was sufficient that the iPhone never roamed from the original Dream Router I’d started out being connected to. 😅 But looking at the list of signal strengths of all of the clients in the Dream Router’s UI, they’re all absolutely excellent now and I’ve had zero dropouts on any of my ESP32s!

Playing with LaunchBar Actions: Converting epoch times to human dates

I’ve been a user of Objective Development’s most excellent utility LaunchBar since 2003 (!), I primarily use it for quickly launching applications (type Cmd-Space, start typing some letters, and hit Return à la Spotlight, but more powerful because it remembers the specific letters you’ve used: I type “ph” to launch Photos.app but “phs” for Photoshop for example) and clipboard history, but it has a ton of other functionality and to be honest I probably should take more advantage of it. 😅

One of the things Objective Development added relatively recently is Actions, basically a way to extend LaunchBar with your own custom code to accomplish various tasks, and it occurred to me that I could probably write up something that I often run into at work: needing to convert an epoch timestamp into a human-readable one.

An epoch timestamp is given as the number of seconds (or milliseconds) since the 1st of January 1970 UTC — for example as I type this the current epoch time is 1739007449 — and they’re quite heavily used in all sorts of computery things, including for things like times on logs entries and so on. The difficulty though is that you can’t just look at it and know what the actual human-readable time is, you need to convert it. There’s a website I’ve used for a while, epochconverter.com, which works well, but it’s an extra few steps, so I decided to scratch this itch and write a LaunchBar Action to do it!

You can download it here, unzip it and double-click the resulting .lbaction file to install it into LaunchBar. If called without any input, it will give the current epoch time in seconds and milliseconds. If given an epoch time as input, it will display the human-readable date and time in your local timezone as well as UTC!

I’ve put the code up on Codeberg if anyone is interested.

Sans Metronome

I mentioned in my last blog post that I’d recorded some drums at the end of October and was slowly building up a song. I’ve finally finished it and am absolutely stoked with the result! 🎉

I’m terrible at coming up with names for songs especially because none of mine have vocals, so I titled this one “Sans Metronome” since that was the whole thing to begin with (I fired up Logic Pro and just started playing the drums, without any explicit tempo set and no metronome). Pleasingly, I also subsequently realised that I actually broke the song up with minor fills every two bars and a larger one every fourth bar without even thinking about it so it flowed pretty naturally. I had bought the incredible Superior Drummer 3 plugin (at a significant discount from its RRP during their Black Friday sale, I should clarify 😅) and spent a fair bit of time getting my head around it, but otherwise didn’t do much of anything else with the song until the start of December when I was finally inspired enough to build on it.

I started by nicking Deb‘s general chord progression from I’m Staying Home This Christmas (the key was G Major with a I IV V I progression, so G C D G and the occasional Am thrown in) and once I had that, I began with the bass line which started as a very simple and uninteresting set of quarter-note triads that I deleted and redid with a faster and more interesting feel once I started recording the rhythm guitar section. After that it started coming together more quickly, I recorded the lead guitar part piece by piece with my Stratocaster which also ended up getting deleted and rerecorded with a faster pace, which then brought on some more changes to some of the parts of the bass guitar.

One of the things in music in general I’m a big fan of is the kind of “wall of sound” effect where there are just layers and layers of sound, and I wanted to try to recreate that a little bit with this song too. I used Logic Pro’s built-in “Alchemy” synthesiser plugin, manually wrote in the MIDI notes to match the lead guitar (this is the one part of the song I didn’t actually play on an instrument myself), and then had far too much fun mucking around with the twelve gajillion presets to see what sounded good. Originally I had a bells sort of sound for the choruses but on listening back to it, it sounded too Christmasy so I ditched that and went for a bit of a more pronounced synth pad sound similar to what I had done for the rest of the song, one that more floats in the background rather than particularly drawing attention to itself.

And then finally one of the really key parts once you’re done recording is mastering! One of the features that Apple introduced in a recent Logic Pro update is the Mastering Assistant:

Mastering Assistant is a plug-in designed to make your final mix sound great across any playback device. By meticulously analyzing audio, it automatically fine-tunes the sound through dynamic adjustments, precisely balanced frequency corrections, and additional sonic enhancements. Mastering Assistant also provides dynamic processing and spectral shaping inspired by boutique analog hardware devices used by professional mastering engineers

I fired that up and it did a great job, but I also paid careful attention to the relative sound levels of each track, and actually ended up cranking the volume down for almost everything to some degree, tweaked the sounds of the snare drum and ride cymbal to make them less and more pronounced respectively, and just generally really listened with a critical ear to make sure everything sounded correct and sat well together. I made sure to listen not just on my Audio Technica headphones that I normally use, but also through my Blackstar guitar amp that has a 3.5mm input, our HomePod, and through our big speakers plus subwoofer in the lounge room. The latter three were really interesting because they made me realise I needed to make some more tweaks to get the track sounding good.

And now finally after many hours of work, it’s finished. 🎉 I’m probably not going to do another one of these particularly soon, especially since I’m back at work tomorrow after having had three weeks off and loads of time to fiddle around, but I’m feeling a lot more confident now! 😁

Looking back at 2024, and onwards to 2025

I wrote a blog post at the start of this year with some “I’d like to do this,” and I figured I should probably write one for the end of the year too as a bit of a look back to see how it went!

Music

For the musical instruments, it’s been… okay I guess? I continue to be by far and away the best at drums, followed by bass, with guitar in a distant third. The Justin Guitar course has been very good but it’s divided up into modules with a bunch of lessons about a handful of topics in each, and I got to the end of Module 2 and Justin said, “Before you move onto the next module, make sure you’ve got all of these things down pat, and I’d recommend taking a month or two of revising to really ensure it’s sunken in.” It was at that point that I realised I didn’t actually know most of the stuff nearly as well I thought I had, and after feeling like I was treading water and not getting anyway, I got a bit discouraged and not really sure how to proceed. Thankfully there’s a very active forum community so I asked in September and got some good advice, so I’ve been trying to put that into practice and we’ll see how it goes.

One of the things that I’ve definitely noticed has helped is the “Strumming” course that’s part of the Justin Guitar app… it’s a whole thing on just getting your strumming consistent, and how to practice and how to keep in time, and I’ve absolutely noticed that I’ve gotten a lot better with that.

In terms of recording stuff, I haven’t done a ton of my own unique stuff, just two short little things (well, three but one of them was done with loops so doesn’t really count in my mind).

The first one was from February of this year, with the drums, bass, and two guitar tracks. The Bass Buzz and Justin Guitar courses ended up both getting into chords and songs “in the key of” at the same time, so I figured I should put this new knowledge to use! I used Logic Pro’s quantisation feature for to pull it into time because each track sounded okay on its own but when put together it was fairly obvious that just wasn’t quite all lined up, and I have a limit to how many times I want to record something to try to get it 100%. 😛

Noodling in A Major

Then in May I did another one featuring drums, bass, guitar, and a comparatively rare keyboard appearance. I noticed I was getting a lot better with the timing on the drums because this one didn’t actually need any quantisation at all!

Metal Tones in A Minor Pentatonic

However, the crowning glory of 2024 was the collaboration with Deb and a bunch of other folks from the fediverse under her L-Plate Players group for a Christmas song tribute for our friend Geordie who was a massive Christmas fiend and died unexpectedly in his sleep earlier in the year. It’s called “I’m Staying Home This Christmas” and I did the drums and the bass guitar for it and I’m absolutely stoked at how well it came out:

The full lyrics and list of contributors is on Deb’s Faircamp site.

Most recently (the end of October), I recorded a couple of minutes of me just playing the drums without a metronome or otherwise timekeeping device, and I was surprised at how well I kept time… Logic Pro has an “Adapt” option for the project tempo where it’ll figure out what the BPM was from the recording, and mine ended up ranging from 107bpm to slightly over 110bpm over that two minutes which I reckon is pretty decent. I’ve been slowly recording bass and guitar parts for it over the past few weeks and it’s coming along pretty well, though I have no idea when I’ll be finished!

I also look advantage of my work bonus to upgrade the cymbals on my drum kit, and it makes such a difference to the feel of playing them, they’re a lot thinner and bounce around a lot more like real acoustic cymbals would, and it’s an absolute joy to play on them:

A photo of an electronic drum kit sitting in a corner, with a mesh snare and three mesh tom pads on it, and four black cymbals. Three of the cymbals are noticeably larger (and also cleaner) than the fourth one, and they're the new ones.

Back in August, I discovered that we actually have an entire little music room in the office at work, that has a (very low-end) electronic drum kit, a bass guitar, some guitars, a keyboard, and a full piano!

A photo of the corner of a room that has a whole bunch of musical equipment in it: there are three electric guitars and a bass guitar sitting in a stand at the left, two very large speakers, an electronic drum kit, a MIDI keyboard, and a full size piano at the right that is painted in extremely garish bright colours.

There are a number of people who are Actual Musicians who play but I’m not remotely good enough for that, and a few of the people in one of the teams I work with are in the same boat so we’ve started doing semi-regular jam sessions after work and it’s been so fun. I managed to get a recording of us doing a bit of improvising:

(The lights turn off at the end because I very poorly timed things and it was right when the building lights turn off automatically at 8pm, oops.)

Miniature painting

In my post at the beginning of the year I said:

The other thing I want to do more of this year is consistent miniature painting. I’ve been documenting my efforts getting through Warhammer Quest: Cursed Cityand I started out strong and ended up getting through half of the sixty miniatures in the box, but then… completely stopped painting anything.

And I’ve since realised that I just need to paint when the mood strikes and not force anything because that is a surefire way to ruin a hobby. For the Warhammer Quest miniatures, I got all the heroes finished by the end of January as well as the zombies and remaining bats too, but haven’t done anything with them since then.

In February I went back and added a bunch of extra detailing to my Kill Team: Into The Dark terrain, and over the course of January through to March I also finally made use of the Space Marine-sized female heads I bought back in 2022 and got an Intercession squad for Kill Team fully painted. After that, there was a big lot of nothing until October of this year when the new edition of Kill Team came out with a bunch of new terrain, and I’ve been steadily plugging away at that (though haven’t even looked at the miniatures from it, I’ve just been focused on the terrain to start with).

But apart from that, there hasn’t been any other painting, but as long as I’m doing it when I feel like it and it’s not feeling like a chore, I think I’m going to call that a win.

2025

For next year, I’m pretty much just going to keep plugging away at my music stuff and see how it goes!

I’m also going to add “Blog more” to my list of things for next year, because I’ve realised that with being able to post relatively short thoughts as they happen on things like trips we’ve taken or more involved things we’ve done (Kristina’s mum visiting, and going to Perth and Melbourne are the largest examples) I haven’t really had very much to post here, and it would be good to expand on things a bit more like I did with our trip to Switzerland.

Monitoring indoor air quality, and outdoor temperature sensor woes

Previously on Monitor (And Automate) All The Things:

At the end of my last post on the subject I mentioned I was going to add an ENS160 air quality sensor to my arsenal of home monitoring sensors. I actually got that done only a couple of weeks after that blog post was published and it was pretty straightforwards, though I ended up forking the ENS160 library I’d found so I could more easily configure it and have it work better for my ESP32 code architecture.

Because I2C devices like the BME280 can be daisy-chained together and Core Electronics’ sensors thoughtfully have two STEMMA QT connectors on them, I was able to refactor my esp32-sensor-reader-mqtt code to allow for multiple sensors per ESP32 board (which in turn required refactoring of my Pi Home Dashboard Admin page as well). So now we still need only a single ESP32 board each in the office and lounge room, but both of them have a temperature/humidity and indoor air quality sensor attached to them! It’s really interesting watching the huge increase in indoor air quality we get as soon as we open the windows and let the fresh air in (when the weather is amenable to that happening, of course), and having this data is making me much more eager to crack open even just a couple of windows whenever we can.


For my birthday this year I got a little starter kit I got from Core Electronics that has a bunch of sensors and wires and bits and bobs in it, and one of those bits and bobs was a board with three LEDs on it and a STEMMA QT connector. I was pondering what I could do with it, then hit upon the great idea of using it to give a visual indication of what the outdoor dew point, outdoor air quality, and indoor quality was without needing to display full numbers (ranging from blue being the best, through to yellow being not great, and red being actively bad). I used my esp32-sensor-reader-mqtt code as a base and wrote some code (Update April 2024: I’ve rolled this into the main esp32-sensor-reader-mqtt codebase) to listen to the relevant MQTT topics and change the LED colours based on thresholds for the values it received.

I wanted this whole setup to be fairly compact, not much larger than the LED board itself, and I discovered that Adafruit makes an ESP32 that is TINY and has a built-in STEMMA QT connector so I wouldn’t need to do any soldering: the QT Py ESP32 Pico. I also realised I would need some way of holding this all neatly together instead of being an ugly pile of wires everywhere, and so had my first foray into 3D printing! I used Tinkercad to design a holder, and a friend has a 3D printer and so was able to print out the prototype for me. It turned out the measurements weren’t quite correct so I did a bit of tweaking, got a second printing, and after a coating with black paint via my airbrush, hey presto!

A photo of two small black cube-shaped objects with a vertical slot cut out of the front of them. The one on the right has a larger slot which is holding a blue circuit board with three bright LEDs lit up in blue, green, and yellow. The one on the left has a smaller slot which is holding a smaller circuit board (the ESP32) with a USB-C port on one side of it. (The holder on the left is showing what's on the back side of the holder on the right.) There are three short wires looping out to connect from the ESP32 on the back to the LED module on the front.
The holder from behind on the left, showing the ESP32 board, and the front on the right with the LEDs lit up.

We have two of these LED boards set up, sitting next to the Raspberry Pis that show the temperature/humidity dashboard in the lounge room and the office. I also hooked the ESP32s into my MQTT topic setup that the Raspberry Pis listen to to turn their display backlight off each night at midnight and back on in the morning at 7am so we don’t have blindingly bright LEDs lighting up the whole lounge room and office at night.

These have been running since the end of May with zero problems, just quietly displaying their data and turning off and back on as required!


Also in my previous post, I said that I’d switched to the Bosch BME280 temperature/humidity sensors because the DHT22 that was outside would become saturated after a long enough period of high humidity and would display wildly incorrect humidity readings. Unfortunately I subsequently discovered that the same thing happens with the BME280 because it turns out they actually use the same type of technology for their humidity sensor as the DHT22. 😑 They’re definitely more accurate indoors and I’m happily using them in the lounge room and office, but we had a spate of really wet days in winter this year and the BME280 that was outside ended up in the exact same state as the DHT22s, despite not actually ever being directly exposed to rain.

Queue a bunch more research, and I finally found something that uses a totally different type of technology for measuring humidity and is designed to actually work outside, and it even has a little built-in heater than you can trigger to dry the sensor out, the Sensiron SHT-30 (which I will never not read as “sense-iron” rather than what I assume they were going for, “sensy-ron”). Adafruit has packaged this up into a weatherproofed mesh package so I bought one of those, updated my esp32-sensor-reader-mqtt code again (I continue to remain delighted at how the architecture for this whole project has allowed me to extremely easily add additional sensors without a whole lot of effort), and it’s been live “in production” as it were since August of this year with absolutely zero problems:

A photo of our extremely ghetto "weather station": it's a piece of wood attached to the outside of our back room with a tupperware over the end to protect the sensors from direct rain. The new sensor is dangling down underneath the tupperware and looks almost like it has a microphone on the end of it (it's actually the weatherproofing mesh).

I had to make a minor change to the SHT-30 library I’d found to allow for turning the built-in heater on and off so have forked it myself, though I think I could probably get away with not having the heater functionality after all… a friend of mine has the same sensor packed up into a little commercially-purchasable box without the heater being used and his has been sitting outside for over a year with no problems.

One difference between the BME280 and the SHT-30 is that the BME280 calculates the dew point, whereas the SHT-30 only sends temperature and humidity. However, I discovered that you can actually calculate the dew point yourself given a temperature and humidity value, so I was able to have an option to send dew point data for both the DHT22 and the SHT-30!

With all of the changes I made to the ESP32 admin page to account for the additional options (including software and firmware updates), it’s rather significantly longer now:

And my Grafana dashboard has gotten equally elaborate!

Better environmental monitoring with the BME280 temperature sensor

Previously on Monitor (And Automate) All The Things:

Ever since I originally moved to the Raspberry Pi setup for our temperature monitoring back in 2017, I’ve been using DHT22 temperature/humidity sensors. They work well enough but they’re quite low-cost and we were noticing that as soon as the temperature starting cooling down outside, the humidity reading would shoot up until it hit 100% even though that clearly was not the case just from standing outside and feeling that it wasn’t muggy. Unless it was properly low humidity, this 100% reading would persist throughout the night until after the sun came up, even after replacing the sensor with a brand new one because the old one got wet in a particularly heavy downpour.

I started investigating alternative sensors and then remembered I’d previously come across the Bosch BME280 which in addition to temperature and humidity also measures atmospheric pressure. A bare sensor by itself obviously isn’t particularly useful, but I found a mob just up in Newcastle called Core Electronics who actually manufacture their own circuit boards to put sensors and other little “maker” things on. Conveniently one of the sensors they offer is the aforementioned BME280 on this nifty little compact board that has a common connector known as “PiicoDev” from them so you don’t need to solder anything. (The connector is also known as “STEMMA QT” or “Qwiic” depending on which company is making it, but they’re all physically identical.)

I found a few MicroPython libraries for the BME280 and settled on this one because it also calculates the dew point for you. After that I ordered a couple of the sensors and got to hacking on my esp32-sensor-reader-mqtt project to add the ability to select which sensor type you’re using.

(I also ended up also rolling my esp32-air-quality-reader code in to allow usage of the PMS5003 air quality sensor we have because that repository was using an old and creaky version of the code I was busily hacking on, and given I had added support for the BME280 already it was a trivial matter to also do the PMS5003.)

As all of that progressed, the number of options the esp32-sensor-reader-mqtt code could use was increasing and I realised I needed some way of changing settings that was easier to use than having to remember a bunch of mosquitto_pub CLI commands and the specific JSON payload and MQTT topic each one used. I’d previously started writing an admin frontend for them as part of my pi-home-dashboard project but hadn’t finished it, so dusted that off and ended up with this lovely setup!

A screenshot of the Pi Home Dashboard Admin page, with buttons along the top to select which client is being configured, a bunch of text boxes underneath for setting the configuration, and a "Logs" box at the bottom showing all the logs being emitted from the board.

It’s all in a single HTML page, uses MQTT.js to talk directly to the MQTT broker that’s running on the Raspberry Pi, Vue.js for the interactivity, and Bootstrap to make it look nice. It also uses MQTT’s Last Will and Testament functionality to track whether or not the board is online (it restarts if you update a setting) and disable the field inputs if it’s not, plus it allows for remote software updating directly from GitHub so I don’t need to physically plug the boards into the computer like some sort of barbarian when I want to update them! And it’ll grab the latest Git commit hash and save it so I know which code is actually running on the board.

With that all done, I updated our Grafana dashboard with the new data.

A screenshot showing spark graphs with the current temperature and humidity for the four ESP32s we have, our power usage and consumption, outdoor air quality, and the two new bits, two gauges showing the current dew point and atmospheric pressure.

Pleasingly, all of the new readings have been very close to what the Bureau of Meteorology reports!

And finally for my birthday later this month I’m getting Core Electronics’ PiicoDev Starter Kit which has several other sensors in it, and on top of that I included an ENS160 air quality sensor which measures VOCs and eCO2 indoors so I have a lot more more hacking fun to come. 😁

Hello, 2024

I’ve never been someone who has ever made New Year’s Resolutions, but at the same time looking back at my blog post about learning musical instruments and inspired by Georgie’s blog post the other day, I’m going to do a bit of this:

If you’ve known me for a while, you know that I don’t love making yearly goals or resolutions, but I thought I’d write down a few intentions for the year.

I think the main thing that’s really triggered it is the fact that I’ve had my guitar for three and a half years now (plus the Ibanez JIVA I got at the end of 2022), and I still can’t actually play any songs. I’ve got the basic open chords pretty well down (I’m even managing to mostly get the F Major barre chord fully ringing out about 80% of the time), and I can play the C Major scale accurately and at a decent pace, but that’s not a lot for the amount of time that’s passed.

Well okay, I guess that’s not strictly true, I’ve done a bit of mucking around and recorded a few things, the most recent and one I’m most happiest with being this:

But I still can’t do any sort of string-crossing like I’ve been learning on the bass, so stuff like the song above is just me sticking to the one string and moving up and down the frets. I’m by far and away the best at the drums, and I really need to knuckle down and actually get into a proper practice routine with the guitar, so hopefully the act of writing this blog post will get me into gear!

The other thing I want to do more of this year is consistent miniature painting. I’ve been documenting my efforts getting through Warhammer Quest: Cursed City and I started out strong and ended up getting through half of the sixty miniatures in the box, but then… completely stopped painting anything. I managed to do half of my Navis Breachers in September but didn’t do the rest, and after that did only two of the smallest goblins from the Warhammer Underworlds warband Grinkrak’s Looncourt in October. After that there was a whole lot of nothing until I started the Vargskyr last week. I wouldn’t say it felt like work, but I was just really uninspired and blargh, and that’s not really a good headspace to be in for something that’s creative. You could make the argument that it was just burnout from having painted 32 miniatures over the course of like a month, but I’ve had this same pattern pretty much every prior year as well. So I think I’m going to try to just do a bit of painting each week and get something done, rather than going boom and bust. 🤞🏻

On a more positive note, one thing I have been enjoying doing is reading a couple of chapters of a book before bed. This has gotten me through the entirety (bar the last book) of the 41 books of Terry Pratchett’s Discworld novels, all of Iain M. Banks’ Culture series, as well as Timothy Zahn’s Quadrail one. Most recently I’m doing yet another re-read of the very excellent Chronicles of the Shadow War trilogy, which is a continuation of Willow set fifteen years after the movie.

So yes, onwards and musically upwards!

Automating Raspberry Pi setup (and ESP32, and Linode) with Ansible

(Update April 2024: When I originally wrote this blog post, the official Raspberry Pi distribution of Debian hadn’t been updated for Debian 12 and so I was still on Debian 11. They’ve since updated it, so I ran a trial run on my spare Raspberry Pi 4B+ and made a couple of minor changes to the Ansible playbooks, and flashing the “production” 4B+ to Debian 12 with the full Ansible setup was an absolute unqualified success! 🎉)

Back in 2017 when I first moved off the old and busted NinjaBlocks platform to a Raspberry Pi for my temperature sensor setup, I said:

[…] if the hardware itself died I’d be stuck; yes, it was all built on “open hardware” but I didn’t know enough about it all to be able to recreate it.

I definitely have no problems with the hardware now (and with my move to ESP32s and MQTT for the temperature sensors themselves it’s even simpler), but I recently realised that the software configuration on the Raspberry Pis was still a problem: the configuration and setup of everything had had a steady pace of organic updates and tweaks and if one of the SD cards died or had a problem and I had to reformat it, I’d have a hell of a time recreating it afresh. On the “main” Raspberry Pi 4B+ alone I would need to:

  • Install all the various software packages (vim, git, tmux, Docker, etc.)
  • Add my custom shell configuration and bashmarks
  • Install Chrony and configure it to allow access from the ESP32s
  • Configure the drivers for the JustBoom DAC HAT and install and configure shairport-sync to allow for AirPlay to the big speakers in the lounge room
  • Configure and run the Mosquitto Docker container to allow all my temperature, humidity, air quality, and power data to flow to all the various places it needs to go
  • Configure and run the pi-home-dashboard Docker container so the Raspberry Pi Zero Ws can display our little temperature dashboards
  • Configure and run the powerwall-to-pvoutput-uploader Docker container so our power usage data can be both sent to PV Output and also be read by InfluxDB and the Raspberry Pi Zero W dashboard

In addition to all of that, the Raspberry Pi Zero Ws that display our little dashboards required a whole bunch of constant tweaks and changes to get them working properly (they run a full Linux desktop and display the dashboard in Chromium, and Chromium has an extremely irritating habit of giving a “Chromium didn’t shut down properly” message instead of loading the page you tell it to if there were basically any issues at all; fixing that required a whole lot of trial and error until I narrowed down the specific incantations to get it to stop).

Setting all of that back up from scratch would have been an absolute nightmare so I figured I should probably automate it in some fashion. And in addition, it means I would be able to keep future changes under version control as well so no matter what I’ve done I’d be able to restore it if necessary. At work we use a piece of software called Ansible to bring up the required software and configuration on the Amazon EC2 instances we run, so I thought that’d be a good place to start.

Even though it’s developed by RedHat and isn’t just some random open-source piece of software (although it is open-source), I still found the documentation to be not great in terms of explaining everything step-by-step and building on that knowledge in subsequent steps. But after a bunch of reading and trial and error, plus several weeks of getting it all working, I have my entire Raspberry Pi setup for all the Pis we have at home fully automated! I can wipe the SD card, reflash it with a fresh copy of Raspbian, then run Ansible and it gets everything installed and configured and working exactly how I need it.

I uploaded the whole shebang to Codeberg to hopefully help others out as well. It’s obviously completely customised for our setup, but it at least gives a reasonable idea of how everything works.

It starts by creating an inventory, basically a list of the hostnames you want to run playbooks against (a “playbook” is a file that describes the list of steps to run in order to get to the desired state you need). Alongside that, you can group the hosts together so you can target a playbook to run on a specific set of hosts. For example, the server group only consists of the main Raspberry Pi 4B+ described above, but the dashboards consists of all three of the Pi Zero Ws that are running the dashboards.

One of the really handy things with Ansible is that you can set variables that will be reused in various places, and you can configure them for all hosts, or per group, or per individual host. I’m using a combination of those, and inside the server group it will actually look up items from within 1Password so I can commit the code to source control and not be storing secrets in it. You can also set variables per individual host as well, which I use to specify the dashboard URL that each of the Pi Zero Ws should load.

The playbooks themselves live in the playbooks directory, and they specify a set of hosts to run against, and a series of roles to run. The roles are reusable sets of tasks, so for example I run the initialisation role against all of the Raspberry Pis no matter what they’re ultimately going to be doing, for doing the initial things like setting the hostname and updating all the software packages, configuring Git, etc.

After the initialisation is done, the server playbook will run all the various steps to get Docker installed, NVM and Node.js installed, then get everything else configured and installed that needs to be configured and installed. Compare to the dashboards playbook that will also run the same initialisation steps, but then runs the dashboard role which installs the drivers for the HyperPixel display and various other things that need doing, and will configure the autostart file so on boot Chromium comes up with the correct URL depending on which Raspberry Pi it’s running on! The dashboard_url variable in that template file is set in the host_vars directory per specific hostname, so I can customise it for each one.

After my complete success here, I decided I wanted to do the same for when I needed to reflash my ESP32s, because previous it relied on me remembering to update a configuration file with the name of the ESP32 and I had definitely messed that up on a couple of occasions. That was relatively straightforwards as well, and I added it to my esp32-sensor-reader-mqtt repository (and included a playbook to just erase a board because I never did it quite often enough to remember what the specific steps were).

And then finally after that, I decided I should also automate my Linode setup. I’d posted back in 2019 about using Linode’s StackScripts to set everything up, but the problem with that is that you run it at the very beginning and your Linode is set up appropriately at that point, but any changes you make after that aren’t saved anywhere, so you’re essentially back to square one again. The final sentence in that blog post was this:

As long as I’m disciplined about remembering to update my StackScript when I make software changes, whenever the next big move to a new VM is should be a hell of a lot simpler.

But in news that will surprise nobody, I was not at all disciplined. 😅 The other problem is that you can’t test the StackScript as you’re going (they only run when you first spin up the Linode afresh), you have to update it and hope those steps work in future. With Ansible, the idea is that everything is idempotent, so you can run everything as many times as you want and it won’t change if something has been configured already, so it enables you to easily test out parts of the playbook updates without needing to wipe the whole damn thing. It’s taken a bit over a month of working on it after dinner and on weekends, but now the whole Linode setup is fully automated as well.

However, the other wrinkle is that where the Raspberry Pis don’t store any data on them and can just be wiped without problem, my Linode hosts this blog, my website and all its images, all the various images I’ve posted to Ars Technica over the years, and a bunch of other things too. I ended up splitting the Ansible process into two, there’s the configuration and then another separate playbook that copies everything over from the old Linode onto the new one and then registers a new SSL certificate with Let’s Encrypt and updates Cloudflare to point the DNS of my website and blog and the general server hostname to the new Linode.

That bit was a bit nerve-wracking, I tested the process a bunch of times and pulled the trigger for real last weekend, then had a minor panic attack when I realised that the database dump of my website hadn’t been reimported since I originally tested the process back on the 9th (I suspect it didn’t import because there was already data in the database, but unfortunately it didn’t actually error out so I didn’t know), so I didn’t have any of the posts I’d made nor any of the temperature data since then. 😬 Fortunately I realised this the morning after I’d done the migration and had wisely left the old Linode up and running, so I renamed the database on the new Linode so I could harvest the temperature data that been sent since the migration, dumped the old database from the old Linode and imported it into the correct location on the new Linode, and then exported and reimported just the missing temperature data, and we’re back in business.

This time I should be able to revisit this in three or four years when I next do a big upgrade and it should actually be quite painless (famous last words, I know, but I’m much more confident this time).