When I read that you can use the Shortcuts app in iOS to read from NFC tags and do things depending on what tag it was, I was intrigued.
To do my little experience, I had to buy some NFC tags to try it with. I decided to go with these because they look cute. Also what I had in mind would be good with a green and a red.
Last weekend I set up Sonos HTTP API to be able to control my Sonos system with some automation and so on. It is running in a docker on my Banana Pi I have set up at home.
My idea is this: I put up a green and a red NFC tag just inside my door and when I come and go I can tag in and out, and that will in turn play or pause the Sonos.
To do this, you will have to set up some automation in the Shortcuts app.
- Open the automation tab and tap the + to add a new Automation.
- Tap Create Personal Automation.
- If you scroll down you will find NFC at the bottom.
- Scan your NFC tag and name it.
- Now you can add an action and in this case we want to add “Get Contents of URL”

- In this Get Contents we will add the URL to our Sonos HTTP controller. In my case
http:/192.168.1.31:5005/kitchen/play

Music, maestro!