WTH can't I (re)use read only NFC cards as automation triggers

(I’m aware that this has been asked for before via feature requests, but that hasn’t got it much attention, so using WTH month to get it in front of more people).

Most of us have a wallet or drawer full of NFC cards, whether payment cards, id cards, transit cards, hotel cards that could usefully be used to trigger automations if the NFC reader support (as implemented in the mobile companion apps) didn’t work by writing its own data to a card in order to be able to use it. All cards have a unique id anyway, so we simply have to recognize that id from any existing (read only) card, and use that to know what automation to do.

Although, your read only NFC chips do have their unique ID - your smartphone just doesn’t know what to do with it. When you flash a writeable NFC tag from HA app, it actually writes into memory a URL in the format https://home-assistant.io/tag/<UUID>

This URL is what tells iPhone (for example) to open HA app when the tag is scanned, since home-assistant.io is associated with this app. This way iPhone lets HA app to process the <UUID> part. If you scan a tag with just <UUID> in memory doesn’t make an iPhone to pass it to the HA app, thus it won’t work.

I think the only way to re-use those r/o tags or cards for HA is to setup a proper NFC reader integrated with HA (for example - ESPHome-based device with PN532 module) so it would send an event to HA server whenever some NFC tag is scanned.

My smartphone does - it runs Android! I did not realize that the NFC reader support on iPhone still doesn’t allow you access to the underlying NFC data.

Can you clarify what exactly you meant by “my smartphone does”? Does it let you to choose an app when you scan a random read-only tag, like your credit card?

iPhone doesn’t prevent me from reading a r/o tag using some app, like NFC Tools.

However, when you just tap iPhone against some r/o tag (your credit card for example) - since tag doesn’t contain any information pointing at particular application (such as Home Assistant) - iPhone just doesn’t know what to do with it.

The only way to make it to work is to add a script into built in Shortcuts app. You can “program” it to call particular HA service when specific tag is scanned. But again - it has to be done on each specific smartphone manually and can’t be controlled from the HA app itself.

And from what I can find on how Android dispatches tag read events - it’s not that different. In order to let an app to process scanned tag - the tag must have a MIME type or URI associated with a particular app. Otherwise Android just doesn’t know what to do with the scanned tag

on Android, using MIFARE Classic Tool

when scanning an unknown/unprepared card, the app starts : it makes me think there is a way.

I think NFC Tools does that too.

Ack. Have you tried installing both apps on Android at a same time?
I’m curious what would it do

Yes, when I tap an NFC card with my Android phone, it asks me which app I want to handle the action, where I currently have 2 apps “NFC ReTag PRO” and “NFC Tools Plugin: Reuse Tag” that I have installed specifically to handle reuse of existing read only NFC cards.