Home Assistant Tags

I just started playing with tags and faced exactly the same problem… Did you found the solution, is it possible at all?

same here…

Must be an iPhone thing… I just tested with my Huawei Android and while watching events in HA, scanned several of my tags and they all fired an event. Then I restarted the phone and without opening anything, scanned a tag and the event fired in HA, and my front door unlocked! That’s the only automation I set up on that one tag for testing since I can hear the door unlock from my office. I too just started with tag reading…

You will need to raise a PR against the docs repo on GitHub. Requesting it here won’t do anything.

1 Like

Hello,

I try to build the reader myself.
But if I copy the original automation.yaml to HA it get the error:

Message malformed: extra keys not allowed @ data['automation']

automation.yaml

# Note, this is using new automation features introduced in Home Assistant 0.115
automation:
- id: handle_tag_scan
  alias: "Handle Tag Scan"
  mode: single
  # Hide warnings when triggered while in delay.
  max_exceeded: silent
  variables:
    # Map scanner device ID to media player entity ID
    media_players:
      0e19cd3cf2b311ea88f469a7512c307d: media_player.unnamed_room
    # Map tag ID to content
    tags:
      A7-6B-90-5F:
        media_content_id: spotify:album:0h2knr6qpiAq0tV5ri5JMF
        media_content_type: album
      04-B1-C6-62-2F-64-80:
        media_content_id: spotify:playlist:0OtWh3u6fZrBJTQtVBQWge
        media_content_type: playlist
  trigger:
    platform: event
    event_type: tag_scanned
  condition:
    # Test that we support this device and tag
    - "{{ trigger.event.data.tag_id in tags }}"
    - "{{ trigger.event.data.device_id in media_players }}"
  action:
    - variables:
        media_player_entity_id: "{{ media_players[trigger.event.data.device_id] }}"
        media_content_id: "{{ tags[trigger.event.data.tag_id].media_content_id }}"
        media_content_type: "{{ tags[trigger.event.data.tag_id].media_content_type }}"
    - service: media_player.play_media
      target:
        entity_id: "{{ media_player_entity_id }}"
      data:
        media_content_id: "{{ media_content_id }}"
        media_content_type: "{{ media_content_type }}"
    - delay: 2 # timeout before we allow processing next scan

I created some NFC-Tags for Christmas-Song and one automation for each tag.
If I scan them with my phone it plays just fine from my plex server
Now I would like to scan it with the separate reader and play.
Is this possible?

Best regards,
Stefan

Am I mistaken saying that you are forced to use the companion app for this and that the web app doesn’t support it through web NFC? Sounds like wasting development effort to port things to two apps Elle we could have everything in the web app.

Web NFC is not available on iOS, and NFC is only available to native iOS apps. Also, looks like only Android Chrome and Samsung Internet (a mobile browser based on Chromium) have implemented it. Even Firefox on Android doesn’t show support. So it’s a non-starter. They’d still have to put it into the native iOS app, and anyone on Android that doesn’t use Chrome/Samsung would be in the same boat.

I have been using the tag reader for 5 months as a garage door open/close.
It is mounted outside in a plastic electrical box. There is a hole in it to expose the led. And there is a buzzer as well.
The power wire runs throgh the outside of the house to my garage and is plugged in to an outlet with a 5v usb adapter/plug.
There is also a Unifi access point in the garage that shows it is available.
It does show that it has a 90% signal strength.
The problem is that in ESPHome it has never showed it as ever being online, though it is online.
Also some days it works and most others it does not.

How can I diagnose what is happening.
Thanks

The option in Unifi to “Automatically optimize” networks, used to turn off multicast, which breaks mDNS which ESPHome relies on to determine the node is alive. It might be worth checking that.

Thanks, I will check to see if that has an affect on it.

I am trying to set up a tag ready and cards for audiobooks. ideally from audible as i am using the alexa media player component.

is there a good way to find the right id for content?

I would live to See some documentation about it.
This would be really cool to have build!

@schmurtz
Maybe you can share some more details?

Hi, I don’t have documentation, may be I should :thinking:
But I’ve done a little demo video some time ago (at 5:53) :

Don’t hesitate if you need more details.

1 Like

Thanks a lot, this is brilliant!

I would be really interested in the details of you Magic Jukebox.
Especially:

  • How do you read you black / white constallation?
  • What hardware have you used for the buttons?
  • The case, can you share the making files?
  • Have you developed your own cicuit? If so, would you be able to share it?

@schmurtz
Concluded, if you would be able to document it, e.g. in Github and Thingverse, this would be awesome!
I would really like to build this one for my 4 years old kids to play their favorit music from Spotify or local media e.g. on a Amazon Echo…

And by the way, I am not sure how others think about it, but in my opninion, this is a must have device! Really brilliant funtionality and the case is just incredible!

@adonno
Hi, would that kind of tag be compatible with the DIY reader from your github ?

Will I be able to “flash” them with my phone ?
If no, do you have any link for some keychain tag that is compatible and that I can flash with my phone ?

many thanks.

I am still having trouble connecting 100% of the time.
Is there another espboard that might work better.
Any help isgreatly appreciated.

I don’t think those RFID tags would be writeable and useful. You want an NFC tag that’s listed with NTAG215 or NTAG213 (the differences being the amount of storage - either would work for Home Assistant to store a URL.)

Just searching around on AliExpress, perhaps something like this one: 10pcs NFC NTAG215 For Tagmo Switch Tag key fob RFID Token 13.56MHz Keychain for All NFC Mobile Phone|nfc ntag215|rfid tokentag nfc - AliExpress is what you had in mind. I just found it by searching for “NFC NTAG215 key fob” and I picked that one at random for a relatively low cost/quantity.

I don’t want to store any URL, I just want the keychain tag to be recognized by HA to enable/disable my home alarm.
The ones you linked look very much like the ones I did btw.

don’t want to store any URL, I just want the keychain tag to be recognized by HA…

When you use the Home Assistant mobile application to write a tag, it creates an NDEF URL record on the tag that contains a distinguished URL that smells like this:

https://www.home-assistant.io/tag/23d441cc-1607-4909-bdb2-1668254388f6

The Home Assistant mobile applications register that https://www.home-assistant.io/tag URL prefix with the OS, so when the tag is scanned by your phone, it’s used to launch and pass the scanned URL to the application. The Home Assistant app then posts that event to Home Assistant that then drops a tag_scanned event on it’s event bus. Or something like that.

So you need a tag with enough storage space to hold that NDEF URL record; I think in practice this means just about any NFC tag that has any amount of storage space that can be written. That’s like 63 bytes for that NDEF record and it fits with a little bit of space to spare on an NTAG213-style tag, which is the smallest one that I’ve commonly seen advertised.

While not using it for an alarm, one of my applications for an NFC tag is a sticker stuck by the front door. When it gets scanned by the Home Assistant app on my phone, it tells the Z-Wave lock to unlock itself. This is occasionally handy for when entering the per-user code on the keypad isn’t the best solution.

3 Likes

Thanks for the info.