I’ve been working in Banbury this morning while my car was being serviced at the nearby garage. Once I got the call to say it had been done and I could come and collect it I walked back past this cache. Instant find. TFTC!
I’ve been playing with a Flic Hub LR and some Flic 2 buttons. They’re “smart home” buttons, but for me they’ve got a killer selling point: rather than locking you in to any particular cloud provider (although you can do this if you want), you can directly program the hub. This means you can produce smart integrations that run completely within the walls of your house.
Here’s some things I’ve been building:
Prerequisite: Flic Hub to Huginn connection
I run a Huginn instance on our household NAS. If you’ve not come across it before, Huginn is a bit like an open-source IFTTT: it’s got a steep learning curve, but it’s incredibly powerful for automation tasks. The first step, then, was to set up my Flic Hub LR to talk to Huginn.
This was pretty simple: all I had to do was switch on “Hub SDK web access open” for the hub using the Flic app, then use the the web SDK to add this script to the hub. Now whenever a button was clicked, double-clicked, or held down, my Huginn installation would receive a webhook ping.
For convenience, I have all button-presses sent to the same Webhook, and use Trigger Agents to differentiate between buttons and press-types. This means I can re-use functionality within Huginn, e.g. having both a button press and some other input trigger a particular action.
You’ve Got Mail!
By our front door, we have “in trays” for each of Ruth, JTA and I, as well as one for the bits of Three Rings‘ post that come to our house. Sometimes post sits in the in-trays for a long time because people don’t think to check them, or don’t know that something new’s been added.
I configured Huginn with a Trigger Agent to receive events from my webhook and filter down to just single clicks on specific buttons. The events emitted by these triggers are used to notify in-tray owners.
In my case, I’ve got pings being sent to mail recipients via Slack, but I could equally well be integrating to other (or additional) endpoints or even performing some conditional logic: e.g. if it’s during normal waking hours, send a Pushbullet notification to the recipient’s phone, otherwise send a message to an Arduino to turn on an LED strip along the top of the recipient’s in-tray.
I’m keeping it simple for now. I track three kinds of events (click = “post in your in-tray”, double-click = “I’ve cleared my in-tray”, hold = “parcel wouldn’t fit in your in-tray: look elsewhere for it”) and don’t do anything smarter than send notifications. But I think it’d be interesting to e.g. have a counter running so I could get a daily reminder (“There are 4 items in your in-tray.”) if I don’t touch them for a while, or something?
Remember the Milk!
Following the same principle, and with the hope that the Flic buttons are weatherproof enough to work in a covered outdoor area, I’ve fitted one… to the top of the box our milkman delivers our milk into!
Most mornings, our milkman arrives by 7am, three times a week. But some mornings he’s later – sometimes as late as 10:30am, in extreme cases. If he comes during the school run the milk often gets forgotten until much later in the day, and with the current weather that puts it at risk of spoiling. Ironically, the box we use to help keep the milk cooler for longer on the doorstep works against us because it makes the freshly-delivered bottles less-visible.
I’m yet to see if the milkman will play along and press the button when he drops off the milk, but if he does: we’re set! A second possible bonus is that the kids love doing anything that allows them to press a button at the end of it, so I’m optimistic they’ll be more-willing to add “bring in the milk” to their chore lists if they get to double-click the button to say it’s been done!
I’m still playing with ideas for the next round of buttons. Could I set something up to streamline my work status, so my colleagues know when I’m not to be disturbed, away from my desk, or similar? Is there anything I can do to simplify online tabletop roleplaying games, e.g. by giving myself a desktop “next combat turn” button?
I’m quite excited by the fact that the Flic Hub can interact with an infrared transceiver, allowing it to control televisions and similar devices: I’d love to be able to use the volume controls on our media centre PC’s keyboard to control our TV’s soundbar: and because the Flic Hub can listen for UDP packets, I’m hopeful that something as simple as AutoHotkey can make this possible.
Or perhaps I could make a “universal remote” for our house, accessible as a mobile web app on our internal Intranet, for those occasions when you can’t even be bothered to stand up to pick up the remote from the other sofa. Or something that switched the TV back to the media centre’s AV input when consoles were powered-down, detected by their network activity? (Right now the TV automatically switches to the consoles when they’re powered-on, but not back again afterwards, and it bugs me!)
It feels like the only limit with these buttons is my imagination, and that’s awesome.
Routine maintenance visit. Came in via the path through the field to the North (pictured) which was pretty challenging because the “path” is almost as deep in vegetation as the cornfield that straddles it! Gloriously hot today, and the elder tree at the GZ smells lush!
Pleased to see a log entry from March by some picknickers who found the cache by accident. Delightful!
Cache remains in fine condition and ready to be found!
Today I wanted to write a script that I could execute from both *nix (using Bash or a similar shell) and on Windows (from a command prompt, i.e. a batch file). I found Max Norin’s solution which works, but has a few limitations, e.g. when run it outputs either the word “off” when run in *nix or the word “goto” when run on Windows. There’s got to be a sneaky solution, right?
Here’s my improved version:
Mine exploits the fact that batch files can prefix commands with
@ to suppress outputting them as they execute. So
@goto can be a valid function name in
zsh etc. but is interpreted as a literal
goto command in a Windows Command Prompt. This allows me to move the
echo off command –
which only has meaning to Windows – into the Windows section of the script and suppress it with
The file above can be saved as e.g.
myfile.cmd and will execute in a Windows Command Prompt (or in MS-DOS) or your favourite *nix OS. Works in MacOS/BSD too, although
obviously any more-sophisticated script is going to have to start working around the differences between GNU and non-GNU versions of core utilities, which is always a bit of a pain!
Won’t work in
sh because you can’t define functions like that.
But the short of it is you can run this on a stock *nix OS and get:
$ ./myfile.cmd GNU/Linux
And you can run it on Windows and get:
> .\myfile.cmd Windows_NT
You can’t put a shebang at the top because Windows hates it, but there might be a solution using PowerShell scripts (which use
hashes for comments: that’s worth thinking about!). In any case: if the interpreter strictly matters you’ll probably want to shell to it on line 3 with e.g.
Why would you want such a thing? I’m not sure. But there is is, if you do.
This blog post is also available as a video. Would you prefer to watch/listen to me tell you about how I’ve learned to enjoy doing what I’m bad at?
There are a great number of things that I’m bad at. One thing I’m bad at (but that I’m trying to get better at) is being more-accepting of the fact that there are things that I am bad at.
I’m pretty bad in a pub quiz. I’m bad at operating my pizza oven without destroying cookware. I’m especially bad at learning languages. I’m appallingly bad at surfing. Every time my work periodically leans in that direction I remember how bad I am at React. And I’ve repeatedly shown that I’m bad at keeping on top of blogging, to the extent that I’ve periodically declared bankruptcy on my drafts folder.
So yeah, pretty bad at things.
But hang on: that assessment isn’t entirely true.
As a young kid, I was a smart cookie. I benefited from being an only child and getting lots of attention from a pair of clever parents, but I was also pretty bright and a quick learner with an interest in just about anything I tried. This made me appear naturally talented at a great many things, and – pushed-on by the praise of teachers, peers, and others – I discovered that I could “coast” pretty easily.
But a flair for things will only carry you so far, and a problem with not having to work hard at your education means that you don’t learn how to learn. I got bitten by this when I was in higher education, when I found that I actually had to work at getting new information to stick in my head (of course, being older makes learning harder too, as became especially obvious to me during my most-recent qualification)!
A side-effect of these formative experiences is that I grew into an adult who strongly differentiated between two distinct classes of activities:
- Things I was good at, either because of talent or because I’d thoroughly studied them already. I experienced people’s admiration and respect when I practised these things, and it took little effort to stay “on top” of these fields, and
- Things I was bad at, because I didn’t have a natural aptitude and hadn’t yet put the time in to learning them. We don’t often give adults external reinforcement for “trying hard”, and I’d become somewhat addicted to being seen as awesome… so I shied away from things I was “bad at”.
The net result: I missed out on opportunities to learn new things, simply because I didn’t want to be seen as going through the “amateur” phase. In hindsight, that’s really disappointing! And this “I’m bad at (new) things” attitude definitely fed into the imposter syndrome I felt when I first started at Automattic.
Leaving the Bodleian after 8½ years might have helped stimulate a change in me. I’d carved out a role for myself defined by the fields I knew best; advancing my career would require that I could learn new things. But beyond that, I benefited from my new employer whose “creed culture” strongly promotes continuous learning (I’ve vlogged about this before), and from my coach who’s been great at encouraging me towards a growth mindset.
But perhaps the biggest stimulus to remind me to keep actively learning, even (especially?) when it’s hard, might have been the pandemic. Going slightly crazy with cabin fever during the second lockdown, I decided to try and teach myself how to play the piano. Turns out I wasn’t alone, as I’ve mentioned before: the pandemic did strange things to us all.
I have no real experience of music; I didn’t even get to play recorder in primary school. And I’ve certainly got no talent for it (I can hear well enough to tell how awful my singing is, but that’s more a curse than a blessing). Also, every single beginners’ book and video course I looked at starts from the assumption that you’re going to want to “feel” your way into it, and that just didn’t sit well with the way my brain works.
I wanted a theoretical background before I even sat down at a keyboard, so I took a free online course in music theory. Then I started working through a “beginners’ piano” book we got for the kids. Then I graduated to “first 50 Disney songs”, because I know how virtually all of them sound well enough that I’d be able to hear where I was going wrong. Since then, I’ve started gradually making my way through a transcription of Einaudi’s Islands. Feeling like I’d got a good handle on what I was supposed to be doing, I then took inspiration from a book JTA gave me and started trying to improvise.
Most days, I get no more than about 10 minutes on the piano. But little by little, day by day, that’s enough to learn. Nowadays even my inner
critic perfectionist can
tolerate hearing myself play. And while I know that I’ll probably never be as good as, say, the average 8-year-old on YouTube, I’m content in my limited capacity.
If I’m trying to cultivate my wonder syndrome, I need to stay alert for “things I’m bad at” that I could conceivably be better at if I were just brave enough to try to learn. I’m now proudly an “embarrassingly amateur” pianist, which I’m at-long-last growing to see as better than a being non-pianist.
Off the back of that experience, I’m going to try to spend more time doing things that I’m bad at. And I’d encourage you to do the same.
Quick maintenance check while in the vicinity. All is well!
This morning two men from the council turned up at my door and asked if they could borrow my driveway to park their vehicle. We got chatting, and it turned out that they were going to be working on footpath maintenance nearby. Realising where they meant, I asked for more information about their work: their plan was to remove the footbridge which acts as the home to this geocache, and replace it with a new one a couple of metres over in order to bring the path in-line with its “correct” location!
So I wandered out with them and removed the geocache before they got started on removing the bridge. I might be able to replace it after the new bridge is built, but – based on their description of the new bridge – it might need to be a different design of cache, so for now I’m archiving this one. This is perhaps my happiest cache-archiving ever.
I confirmed that this team weren’t the bridge inspection team who wrote a lovely log in a cache of mine hidden under a different bridge in this area, but they said that they do occasionally find caches as part of their work and try to return them as-they-found-them. Delightful conversation.
GPSr was spot on, but the nettles are tall and fierce age it was a bit of a battle to get to this cache, hidden beneath them. TFTC!
Found easily. Strange choice of container; not what I expected! TFTC.
This one was a challenge. Finding myself on a path alongside a wooden fence, I propped my bike up against the fence to search what seemed to be the obvious candidates, but no look. I returned to my bike to retrieve my handlebar-mounted GPSr to try to get a better fix and soon found myself tramping through waist-high nettles towards to GZ. Oh! There’s another path over here! That makes more sense. Found the cache pretty quickly once I’d got my silly self into the right place! TFTC!
Good sized cache! My GPSr pointed me into the field at first and I had to double back. Log dry, but has clearly gotten wet in the past as done pages have begun to moulder. Okay to sign still, though. TFTC.