Indoor Activities

Autumn seems to have caught up with us, even if it feels like it’s just blundered inside and cannot make up its mind as to whether it locked the car (it’s rained a bit this weekend, but rather perfunctorily, and the sun has shone through on a few occasions).

As usual around this time of year, I’ve been trying to disengage from the social cacophony that Eternal September seems to have evolved into. I usually do that by decreasing the time spent online and removing self-serving echo chambers from impinging upon my downtime, which has been a great success–I’m pretty much off Facebook, only follow a handful of friends and family on Instagram, and other than Slack and Twitter (in which I am moderately active), there is little else to curb.

So having become a regular user of LinkedIn over the past few years (given that it is by far the most important social network in my line of business, irrespective of it being owned by my current employer, even though it is essentially useless for anything but social marketing these days), I set myself the goal of unfollowing/unlinking ten people a week until I can open the app and actually get useful news out of it rather than self-congratulatory/promotional posts.

Measuring The Force

I recently had both of our energy meters replaced by Landis+Gyr ZCXe110CR models, so of course I’m going to revisit my previous attempts at reading meter data, except that this time there is no need for OCR —these meters have a blinking LED that lights up every watt-hour:

EDP's single-page doc on the ZCXe110CR. There really isn't much to it.

They also report our energy consumption via PLC to a remote controller, but there’s no way I can tap into that… Well, none that I feel like tackling, that is.

I have a bunch of TCRT5000 IR reflective sensors about (both with and without breakouts) I had bought to try to read the old rotating disc meters, so I am looking at just sticking one against the LED and using a trivial pull-up resistor setup to use the phototransistor half of them (but haven’t tested that yet).

Hooking Things Up

In short, I have two main options. The first is the most reliable, but also the most involved:

Grab an ESP-01 module and build what is essentially the same setup as my first doorbell extender, but instead of writing my own sensor handling in C++, I’m going to be lazy about it and use the “push button” functionality of the Tasmota firmware to get an MQTT notification when the light blinks.

Should be only a matter of picking the right pull-up resistor and (crucially) seeing if the LED falls into the IR spectrum the TCRT5000 is sensitive to.

But that requires powering the ESP-01, so another alternative that might work is to hack one of the Xiaomi Zigbee contact sensors (again like I did for my doorbell extender, but replacing the magnetic reed switch). This has the potential to be much neater (zero wiring) but might not work depending on the phototransistor’s forward current and the length of the light pulse, either of which might not be enough for the contact sensor to fire.

The MCCGQ11LM stripped of its casing. Note The reed switch on the bottom and the Zigbee antenna on the right.

A quick test done by shunting the reed switch with one of the phototransistors almost worked, but not reproducibly so since I am having trouble with Zigbee coverage around the house and probably need to sort that out first.

Regardless of sensor type the pulses will come in as MQTT events, so to measure power consumption I’ll just pipe everything into my metrics system and compute a moving average.

I am curious as to whether I can expose it as a simulated HomeKit power meter (since the official spec doesn’t really cover energy meters yet), but there seem to be devices out there doing that already, and I should have no trouble reproducing their proprietary characteristics…

Hopefully it will all be done before we put our heaters back in rotation, so that I can chart power consumption over the winter period.

Deployment Pains

This week I found myself late into the evening wrestling with a Kubernetes ingress controller to get multiple TLS endpoints working in a cluster and realizing that I had spent all my free time dealing with something that ought to be a solved problem by now.


Forced Perspectives

My regular complaint of not having enough free time turned against me last week, big time–I ended up being housebound for a few days due to a minor health issue (just in time to have a couple of major personal ones pile on, Murphy be damned), and took some time to unplug from work and re-visit my hobbies.


Post-Vacation Blues

So I went on vacation, started going through all my personal To-Dos, and… Got stuck on a couple and didn’t actually get around to tackle any of the beefy ones, and now I’m back at work. And, of course my schedule is a mess again–I’m booked solid to the far end of October.


A Short Musical Break

Last Christmas, having decided to act on last year’s Summer resolution and gotten myself a new MIDI keyboard, I also started wading through the Mac and iOS DAW ecosystems. With a year gone by since the whole thing began, and with my vacation mere hours away from ending, I guess it’s time for a little status update.



A quiet moment at the beach during my vacation.


A rather characteristic small villa at my hotel, by streetlight.

Hot Summer

I’m (supposedly) on vacation yet utterly unable to relax given my huge personal backlog and a pervasive need to tackle at least some of it in a meaningful way before I go back to work, so things aren’t exactly peachy right now, especially considering that a lot of what I wanted to attend to seems to be stuck in limbo and all sorts of niggling issues keep cropping up.


Golden Dusk

A lovely view of the Alentejo countryside at dusk.

Dealing With a Million Legacy Files Every Day

There is a very frequent and particularly messy ETL scenario that I like to call “death by a million files” in which large corporations find themselves in need of collecting and processing thousands of old-school CSV and XML files (or worse) and take them to the cloud, which is something that no traditional ETL tool can do efficiently (especially not graphical ones).