Category Archives: Gadgets & Toys

AirTags for Airheads?

Well, somewhat to my surprise, I found an Apple AirTag to be remarkably useful today! (I bought them because, well, I just like gadgets and these are beautifully-engineered gadgets, but I wasn’t sure how much I’d actually use them.)

This wasn’t anything dramatic: no long-lost pets being recovered from the other side of the county or anything like that. No, we were going out, and I wanted to find my keys. It turned out that, last night, I had used them to unlock the side door before putting some things in the recycling bin, and, perhaps because I had my hands full and my mind elsewhere, had left the keys on the shelf beside the door: not somewhere they would ever normally live. Then a plastic bag had been put in front of them, and they were hidden from view.

So it was no big deal; we would have found them again in a day or two, but the ability to track them down to roughly the right room and make them beep meant that we were out of the door a minute later, with no worries lurking in the back of my mind. It won’t take many such absent-minded moments on my part — and these are distressingly and increasingly frequent! — to make the tags well worth the money.

Getting 3-Dimensional

Some quick thoughts after my first couple of days of owning a 3D printer.

Fireworks of the Future

I missed this at the time, but there was a lovely presentation put together for the Hogmanay New Year’s Celebrations in Edinburgh, using a swarm of drones carrying lights.

A short summary video is here:

but it is really worth watching the full presentation, which you can find here, with music and narration.

You don’t want to think too much about the fact that the effect was really only visible from one location, or that they weren’t allowed actually to film the Edinburgh scenes over the city so they had to do it in a remote bit of the Highlands and overlay it on images of the Edinburgh skyline… It’s still a lovely combination of software, hardware and poetry.

P.S. It turns out that there have been quite a few of these type of displays in recent months, if you search YouTube for ‘drone light show’. But most of them aren’t narrated by David Tennant 🙂

Activating Home Automations using NFC tags on iOS

Now that I have a shiny new iPhone, I’ve realised that I can finally start playing with NFC tags, and, in particular, they can do interesting things around the house by making them trigger actions in my Home Assistant system.

I do alread have various Zigbee buttons around the house, and in general these are more convenient, since you can just press them without needing a phone in your hand! There are a couple in the sitting room, for example, which toggle our ‘movie mode’. When movie mode is switched on, the lights in the hall, kitchen and sitting room dim to a low warm glow, any lights that reflect in the TV screen turn off completely, the temperature in the room is raised by a degree or two, and the TV & DVD player switch on. When movie mode is switched off, everything reverts to its previous state. I don’t want to have to pull out a phone to do this; it’s much easier to turn it on and off with a button, or to use voice. “Alexa, it’s movie time!”

A Xiaomi Zigbee button on the left; one of my NFC tags on the right. The NFC tag is an inch in diameter.

But if you don’t mind pulling out your phone, NFC tags have some key advantages: they’re small, weatherproof, require no battery and can do more things. You can also arrange that they do different things depending on who’s scanning them, so, for example, you could stick one beside your garage door; when you scan it, it unlocks your car, when your spouse scans it, it unlocks theirs, and when anyone else scans it, it does nothing (or perhaps causes your security camera to take a photo of them!)

Some tips

NFC tags each have a fixed unique ID, and for simple interactions you can just arrange that your phone does something when a particular ID is scanned.

But they can also be programmed with custom data using a protocol/format known as NDEF. There are standard ways of storing URLs, phone numbers, etc, much as you would with a QR code. So if you want a tag to take you to a web page, for example, without your phone needing to know anything about the tag in advance, this is a good way to do it.

If you want to experiment with this, then the Simply NFC app is a good place to start. Another good and completely free one is NFC TagWriter by NXP, but for the particular issue of reading things with an iPhone, I had more luck with Simply NFC. And a key thing to know if you’re using small tags is that the NFC reader is at the top of the back of your phone near the camera, and this needs to be within about a centimetre of the tag.

Recent iPhones will read a subset of these tag types in the background (i.e. without you having to run an app). As an example, I’ve just programmed a tag here with my email address (a mailto: link), and if I scan it, a notification pops up offering to take me to the mail app to send a message. I can do this with my iPhone at the home screen, or even the lock screen. More complex email variants, though, (for example, including an email subject line), don’t seem to work without running a special app.

Home Assistant – the simple way, and doing it better

Recent versions of the Home Assistant app know how to program NFC tags, and scan them, and associate them with Home Assistant actions. This is very cool, and gives you lots of information about who’s doing the scanning, etc.

But it has a problem on iOS: Apple doesn’t let an NFC tag perform an action on your phone without your confirmation. So instead of just pulling out your phone and tapping it on the tag, you also need to look for the resulting notification and confirm that you want the action to take place, which spoils the magic a bit. This isn’t an issue, I gather, on Android, but Apple are more cautious about doing things behind your back, especially, I guess, since an NFC tag could be hidden and yet still accidentally scannable.

However, there is one way to allow tags to perform actions on an iPhone without requiring your confirmation each time.

If you create an ‘automation’ on your iPhone using the Shortcuts app (not to be confused with a Home Assistant automation), you can choose to trigger this with an NFC tag.

You don’t need to program the tag: this just uses its ID, I think.

Now, an iPhone automation can do all sorts of things, including requesting a URL. And Home Assistant allows you to create webhooks which can trigger Home Assistant automations in response to a URL being requested.

Setting up a webhook

You can find information on how to create a Home Assistant webhook online, depending on whether you create your automations through the GUI or using YAML. Here’s my simple example called study_toggle, which toggles both ceiling lights in my study:

- alias: Toggle study lights
    - platform: webhook
      webhook_id: study_toggle
    - service: homeassistant.toggle
      entity_id: light.q_study_back
    - service: homeassistant.toggle
      entity_id: light.q_study_front

I can cause this automation to be run using the URL `/api/webhook/study_toggle’ on my Home Assistant server.

NOTE: It’s important to remember that webhooks don’t require authentication, so if your server is at all accessible to the outside world you should make sure you use more obscure URLs! Please don’t have one called!

Calling the webhook

OK, back to the iPhone. Now, your phone will need to make an HTTP POST request to that URL, but fortunately, this is easy to do. When adding an action to your automation, go into the ‘Web’ section and use ‘Get contents of URL’:

Then you can put in the URL and expand the ‘Show more’ section, which will let you change the HTTP method from GET to POST.

There’s no need to send any data in the request body, but you can add some JSON if you wish to make use of it in Home Assistant.

And that’s basically it! Make sure you turn off the ‘Ask Before Running’ option on the automation.

Now, the first time you scan the tag, it will still ask you for confirmation, but it’ll also give you the option not to be asked in future, at which point you can just tap the tag to run the action. Your phone does need to be unlocked.

Some hints

If you use Nabu Casa’s Home Assistant Cloud, they make it easy to get a long obscure URL which will link to your webhook and which will be accessible from anywhere. (If you set this up on your Mac, you’ll really want your ‘Universal Clipboard‘ enabled so you can copy on the Mac and paste on the phone!)

This is handy if you might want to put the tag somewhere away from your home, e.g. if it’s the last thing you scan before you leave the office to notify your spouse that you’re on the way. I’ve also heard of people sticking tags to their car dashboard which will open or close the garage door.

But if you’re only using the tag to control things when you’re actually at home, you’ll make it a lot more snappy if you keep everything on your local network, don’t go via lots of proxies, and you could even use an IP address to avoid a DNS lookup. So my actual tag to toggle my study lights calls a URL which is something like:

and it’s pretty much instantaneous.

Where have you bin all my life?

I have a new car. It’s rather clever. As I’m driving along it can recognise nearby vehicles, people, cyclists, traffic cones…

But I was somewhat amused yesterday to discover that it can also recognise wheelie-bins.

(Click for a larger image.)

I’m trying to imagine what I would have thought, back in the days of my old rusting Minis and Hillman Imps, if you’d told me that one day my car would have a built-in ability to recognise and draw pictures of the waste-disposal facilities it was passing…

Christmas purchasing advice for geeks

Have nothing in your house that you do not know to be beautiful, or believe to be useful, or can connect to Home Assistant .

If buying for others, you may need two of the above.

Mid-life Covid crisis?

I’m a middle-aged computer geek, but my iPhone is too old to run the NHS Track & Trace app. I think this is a limitation of the Bluetooth hardware, but my phone also can’t run a recent-enough version of the operating system.

This isn’t a criticism of the app; you need the right hardware to do something like this. But it makes me wonder about the proportion of the population that will actually be able to run it. Perhaps middle-aged computer geeks like me are actually the most likely to have elderly phones? I wonder whether anyone has done a graphic, plotting the age of users against the age of their smartphones? Probably a kind of 3D histogram?

On the one hand, younger users are probably more likely to be swayed by a desire for the latest gadget and by competition with their peers. But older users are, I guess, more likely to have the disposable income to upgrade. Mmm.

And now, of course, we have some interesting extra dimensions. The effectiveness of the app is highly dependent on its market penetration, and that penetration in different age-groups is going to be constrained by this distribution.

Is it particularly important that older people, who are more vulnerable to Covid, have this app? Well, probably not directly, because the app doesn’t protect you; it protects those who may come into contact with you in the future. On the other hand, perhaps older people are more likely to be in contact with other older people in the future, so it is important that they know when they shouldn’t be socialising.

There are lots of lovely opportunities for research, here, and for inventive data visualisation. Anyone got any funding available?

One thing is clear, though. The more of a social animal you are, of whatever age group, the more important it is that you run this. (That’s a serious point, so no snarky comments, please, about whether middle-aged computer geeks often fall into that category.)

Now, here’s a last thought. I have been considering that it may finally be approaching the time when I do upgrade my phone. But I’m likely to wait until Apple announces their next models, presumably sometime between now and Christmas. (This isn’t because I want the latest one, necessarily, but because the current top model will probably be demoted to a cheaper price bracket when its position is usurped.) I imagine many others may be in the same position, and large numbers of us will become track-and-traceable only after that point.


Given that this same technology is being used around the world, how many lives might be dependent on the timing of the next Apple and Samsung product announcements?

First experiments with an Instamic

New toy! I bought an Instamic: a tiny voice recorder that I wanted to use in situations where conventional microphones might be difficult or a nuisance, especially when I’m recording with my GoPro Max, which has no facility to take an external mic input.

Here’s my quick first test on yesterday’s dog-walk, in case it’s of interest!

Watching the map

A screenshot from the appI’ve long been a fan of the ViewRanger app for handling maps on my phone. I know I’ve been using it for at least 8 years, because I have tracks recorded from early 2012.

With it, you can use free maps, and buy commercial ones from a range of sources, in many countries, and pay for them in a variety of ways: subscriptions, individual purchases, or — the method I use because I started before the days of in-app purchases — buying a block of credits up front and using them as needed to purchase the map tiles you’re interested in. ViewRanger isn’t perfect: I find bits of its user interface very counter-intuitive, but in general it’s served me very well.

Another worthy contender for UK users, by the way, is the app UK Map, written by a good friend of mine, and which I’ve been using even longer than ViewRanger. UK Map has always provided a great combination for users here: a standard basic UK road atlas, always available offline; the ability to download the free Ordnance Survey maps (since almost the moment they became available), and the overlaying of paths from OpenStreetMap, which are often the most up to date indications of where you can actually walk. More recently, it too gained the option to buy premium maps, but by then I was somewhat invested in the ViewRanger ecosystem. Nonetheless, I do recommend UK Map – it’s helped me out on more than one occasion when I found myself completely out of phone coverage and just needed a good old-fashioned street atlas, for example. Don’t be fooled by its lack of flashy graphics and fewer immediately-obvious features. Phil, the author, is a very smart guy and knows what he’s doing. It’s worth having on your phone.

Maps have always held a fascination for me, and their combination with technology especially so. I remember I was in Seattle on the day the iPad was released, and so was able to get one that day, about 6 weeks before most of my European contemporaries. (I’m still a bit smug about that!) It only took me a few hours, though, to realise it was the best map-viewer I had ever seen. A zoomable, infinitely-scrollable, tactile display that was also big enough to show a reasonable area? Amazing. (The main thing I miss, by the way, about no longer also having an iPad Mini is that it combined most of that with the ability to fit in a coat pocket.)

Anyway, this is all old hat now. We almost all wander the footpaths and byways gazing at our phones, rather than unfolding bits of paper from our map pockets. They do, after all, have that undeniably useful extra feature – the little blinking dot or crosshairs showing where you actually are. And zooming and scrolling mean that the place you’re heading for is no longer on the other side of the fold! I do find, though, that zoomability means I’ve lost the intuition I used to have about how long it would take me to walk a certain number of inches…

There’s another problem, too, with phone-based navigation, that I’ve found in the soggier parts of the UK: touchscreens, and indeed fingerprint readers, really don’t work very well in the rain. The process of extracting the phone from a damp pocket, trying to find something less damp to wipe it on, failing to unlock it with my fingerprint and having to type a PIN before trying to manipulate a semi-responsive touchscreen has just occasionally left me thinking that even damp paper would be preferable to electronics.

Until today.

Because today I discovered something I should have noticed some time ago. ViewRanger has an interface for the Apple Watch. If it’s running on my phone, I can simply raise my wrist to see where I am.

I could have used this in the past, had I discovered it, but it’s also vastly improved by my recent purchase of a Series 4 watch to replace my Series 0, which means that when I raise my arm to look at my watch, things actually appear before my arm gets too tired and has to be lowered again. In fact, while testing it on this afternoon’s dog walk, it was effectively instantaneous. Where does this footpath to the right go? Let me just glance at my wrist – ah, OK. You can scroll around, zoom in and out etc, but most of the time, all I needed was a quick glance: no unlocking, no soggy touchscreen. (It also looks amazing, but I think that’s mostly because of another recent purchase: a new and expensive pair of spectacles!)

All of which makes me wonder whether, despite being at the opposite extreme in terms of screen size, I may after a decade have found an even better map viewer, at least in certain circumstances, than the iPad!

Coronavirus and cavemen

It seems only a few years ago that, when I walked around my house, the lights wouldn’t turn on automatically! For younger readers, I should explain that in the past you actually had to go to a particular place on the wall and press a switch if you wanted to be able to see things!

Can you imagine the inconvenience if, say, you had your hands full at the time? And when you left the room, if you wanted to save power, you’d have to do the same thing again, and then repeat it as you went into the next room. So people had to install switches in all the places they thought they might go in and out of rooms. They had to come up with complex wiring schemes because you might want to turn lights on at the bottom of a staircase and turn them off at the top, when the upstairs and downstairs lights were normally on different electrical circuits!

It’s hard to believe, in this era of easy home automation, that there are some people still living this caveman-like existence, but it’s true, just as there are those who, when they want to listen to the news, turn a physical dial instead of just talking to their smart speaker! Those whose house doesn’t know when they’re in movie-watching mode, so they have to turn the TV on and off with a remote control.

This is, of course, terribly inconvenient for those people who still embrace the ‘retro’ approach to life, but now it has an extra drawback: every one of those switches, buttons, knobs is a hot-spot for potential virus transmission. How are those people meant to protect their family from infection if, carrying in groceries or deliveries from the outside world, they have to press a light switch that everybody else in the family is going to touch later that day? And if, without thinking, they draw the curtains by hand, how many hands will touch the same spot later?

And that’s just home automation. When the lockdown is lifted, just imagine those poor people who have to go back to work in non-automated workplaces! The potential for contagion is terrifying.

But yes, my young friends, that’s what the world really used to be like for most people! Amazing, but true.

The Ring cycle?

I have a Ring video doorbell. When there’s movement in front of my door, or when someone rings the bell, it captures a brief video clip and saves it to the cloud.

It occurs to me that:

  • Amazon owns Ring.
  • Amazon delivers to my door.
  • Amazon could register that they had successfully delivered to my door by holding the delivery (or its barcode) up to the doorbell’s camera.
  • Perhaps I should patent the idea?

Regenerative amplification

When I take my foot off the accelerator in my electric car, the ‘regenerative braking’ process charges up the battery. Similarly if I’m going downhill. This is reasonably well-known now.

Well, I was talking to a friend today about his planned purchase of some high-tech hearing aids. They sound splendid, though they should do for the price. It would be cheaper to put two MacBook Pros in your ears… though perhaps a bit less comfortable.

Anyway, I was asking him about their battery life, and, pondering this topic later, I was thinking that you ought to be able to do something similarly clever there: if they use power to amplify things which are too quiet, could they also recharge their batteries by deadening things that are too loud? If you were out for a long day and they started to run down, you could simply head for a loud rock concert, or perhaps seek out a high-crime area and stand near some police sirens. Even if the recharging didn’t work very well, you wouldn’t be able to hear anything afterwards anyway, so you wouldn’t care.

Brilliant, eh? I’m off to the patent office…

© Copyright Quentin Stafford-Fraser