adonno / tagreader

Simple to build/use NFC tag reader, specially created for Home Assistant
https://adonno.com
GNU General Public License v3.0
1.13k stars 175 forks source link

Scanning a card from the HA app gives a different ID than from the tagreader #231

Open ponchohoncho opened 1 year ago

ponchohoncho commented 1 year ago

I bought some NTAG215 cards for my RFID jukebox setup. I added and wrote a card to HA using the mobile app, and added the GUID-looking ID to my automation but when I scan the card with the tagreader, I get a different ID. Here's a screenshot of me scanning the same card from the app and from the tagreader. edit: I just scanned the same card 10 times on the phone and the tagreader and got consistent results the whole time. The phone returned the HA ID, the tagreader returned the card's ID.

https://imgur.com/a/OgDTWvb

I guess that this is because the HA app reads the card's ID and then looks up the mapping to the HA ID for it, where the tagreader only passes the card's ID to HA.

Is this expected behavior?

What it means is that:

  1. If I want to be able to scan the cards with my phone, my automation needs to have two entries per card, one with the card ID and one with the HA ID.
  2. The Tags section in HA has double entries. One set of nicely-named entries for when I create and write the card, and another set of hex IDs from when they're scanned with tagreader
  3. The only way to get the ID of each card is to listen for the tag_scanned event, scan it with the tagreader, and then note it down. This is cumbersome as my card printer and tagreader jukebox are on opposite ends of the house.
screenagerbe commented 7 months ago

I ran into the exact same issue, kind of annoying tbh.