Tagreader jukebox: old dog, new tricks!

i will add this as a separate event, like esphome.tag_scanned or something. So this could be used with any tag data. But for now why do you need this in official Adonno repo? Just use your own code with your tag readers

Fair question! I would like to help make this an out of the box part of the readers since I think there could be a good bit of interest in this from the plex community. I’ve purchased 8 of the readers, and I’d love to be able to get them up and running with “stock firmware”, so that I can complete my scenarios and start sharing/recommending the solution to others in my community. It will be a lot easier for me to do this, if I don’t have to tell them and help them install my custom version of the yaml.

That said, if you are willing to do a little more work (which it sounds like it, based on your thought of creating a separate event), I might be able to work with you to make this solution even better and I can continue to test for you (now that I figured out the basics and know better what I am doing), and we can make sure the new event or functionality (whatever form it takes) meets the most needs possible.

1 Like

Thanks for this. Works great. Unfortunately, I discovered in troubleshooting this that Apple Music won’t let you share any tracks that are not already on the service. So all my old albums that I’ve added to Apple Music won’t share (the URL points to an empty playlist). I’ll have to go down the Plex route instead. @dtappert Will your last flash (from Jan 30) let me use Plex as a source for Sonos speakers?

Thanks,

Steve

Ok, a bit of progress made. @dtappert How are you generating the plex link to specific albums etc? I’ve tried a couple of different methods but I think the URLs are too long for the tag to store.

Is there any way to use the music tag to play music from Plex or local file?

if there is URL or simply a string that can be transferred to media player and use it to play, music tag can handle it.

Thank you that worked . Do you know how to reflash the tag reader software. I changed my Wi-Fi and now one of my devices is unreachable. How do I reflash it?

start over like with new device

Any chance of this supporting GitHub - music-assistant/hass-music-assistant: Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
?

Does the latest version of tagreader firmware have this implemented or do I need to use a specific firmware @luka6000 :slight_smile:

They’ve change a lot in latest MusicAssistant. I’m watching it closely and the target is to support MusicAss

1 Like

I did not push any new stuff to adonno tagreader repo but feel free to pull the code and use to your liking

I am having problems with the BluePrint. my automation never runs even though I can see the correct events happening in the developer tools.

I found out what the problem was. Device name capitalisation. This solved it:

blueprint:
  name: Play Music Tag
  description: Play music tag NDEF url
  domain: automation
  input:
    reader_id:
      name: ESPHome NFC reader device
      description: This is your NFC reader
      selector:
        device:
          integration: esphome
          multiple: false
    player:
      name: Media Player
      description: This is your media player for this reader
      selector:
        entity:
          domain:
            - media_player
          multiple: false
  source_url: https://github.com/luka6000/tagreader/blob/7bc9ec90bf8976eb9e5b85a720ef046a64ab5d03/blueprints/PlayMusicTag.yaml
variables:
  device_id: !input reader_id
  reader: '{{ device_attr(device_id, "name")|upper }}'
trigger:
  - platform: event
    event_type: esphome.music_tag
condition:
  - condition: template
    value_template: "{{ trigger.event.data.reader|upper == reader }}"
action:
  - service: media_player.media_stop
    target:
      entity_id: !input player
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ trigger.event.data.source == "sonos" }}'
        sequence:
          - service: media_player.select_source
            data:
              source: "{{ trigger.event.data.info }}"
            target:
              entity_id: !input player
    default:
      - service: media_player.play_media
        data:
          media_content_type: music
          media_content_id: "{{ trigger.event.data.url }}"
        target:
          entity_id: !input player
mode: queued
max: 10

1 Like

However there is now a new problem and that is that Spotify changed the links it provides via the mobile clients.

new links look like:

which obviously won’t work…

capitalization is already there in gist code - it was added some time ago with 2023.8. Good catch anyway!
As for the links, there’s nothing we can do? Apple Music still works for now. Spotify changed same way as Deezer. Too bad

I dont get this, if i use the share function of the spotify app (android) i get the link as usual…

1 Like

Thx @luka6000 and @adonno for the great work.
This was a fun project.

I adjusted the schema to an ESP32 an published the changes to:

Hi there,

Is it possible to open radio streams?
e.g. http://orf-live.ors-shoutcast.at/fm4-q2a.m3u
or http://opml.radiotime.com/Tune.ashx?id=s24896&formats=aac,ogg,mp3&partnerId=16&serial=97e56835a89c7612b50be9071a72047e

i am using Logitech Media Server/ Squeezeplayer as media player.

Perhaps i need to work with playlists/favorites, likes the example with SONOS?

I’ve just published a whole new version of the player. I call it TagTuner

ESP32, new housing, volume knob, new blueprint - complete redesign and rebuild.

1 Like