Repurposing Hotel Keycards
April Cools!
Hi everyone!
My April Cools piece is up! It's about really weird stuff you can buy online. Now I know that's standard SEO farm stuff, but I promise I put a lot of time into researching why people actually want to buy these things. If you ever wanted to know where carnivals buy and sell their rollercoasters, now's your chance.
Anyway, that's just the April Cools for the blog. I've also got one just for the newsletter! It's about what to do with spare hotel keycards.
I always end up just throwing them away, which seems unnecessarily wasteful. Most smartphones have an NFC chip for contactless payments. Could I use that to do something interesting with hotel cards?
So, I made a train tracker. If I tap the key card I get the train arrival times. Now I know if I have to leave immediately or can do a quick chore first.
How it works
The secret ingredient is Tasker, a scripting app for Android phones. Every script ("profile") has a list of triggering conditions plus a set of task actions. Conditions can be based on things like buttons and schedules, The cool thing is that Tasker can use all phone's sensors so you can do stuff like prevent a task if the phone is upside down. I used the condition "whenever the NFC reader sees this serial number." That way I can have different hotel keycards do different things.
Then I had to pick the actions. Originally I tried hitting the Chicago transit API and showing the output in a custom popup, but I had trouble munging the response format. Then someone suggested instead opening the public traintracker URL. That worked better.
Here's what the full profile looks like:
And that's all there is to it! I was able to set up a similar thing on an iPhone via Shortcuts.
I like that this turns a digital motion (visiting a specific website) into a physical one (tapping a phone against something). It makes me want to do more with NFCs.
Anyway if you're got an Android I def recommend buying Tasker. Genuinely the best $3.50 I ever spent. It's got a rough learning curve but GPT4 can explain how to do simple stuff.
If you're reading this on the web, you can subscribe here. Updates are once a week. My main website is here.