surekap / MMM-ShairportMetadata

AirTunes metadata module for MagicMirror
MIT License
18 stars 11 forks source link

Nothing appears in MagicMirror even though metadata is on in the config for Shairport-Sync #10

Open bodenlaman opened 4 years ago

bodenlaman commented 4 years ago

Pretty much the title, I'll attach the segment of the config below and my MagicMirror config.

ShairPort-Sync Config

// How to deal with metadata, including artwork
// For this section to be operative, Shairport Sync must be built with at one (or more) of the following configuration flags:
// --with-metadata, --with-dbus-interface, --with-mpris-interface or --with-mqtt-client.
// In those cases, "enabled" and "include_cover_art" will both be "yes" by default
metadata =
{
enabled = "yes"; // set this to yes to get Shairport Sync to solicit metadata from the source and to pass it on via a pipe
include_cover_art = "yes"; // set to "yes" to get Shairport Sync to solicit cover art from the source and pass it via the pipe. You must also set "enabled" to "yes".
//      cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; // artwork will be  stored in this directory if the dbus or MPRIS interfaces are enabled or if the MQTT client is in use. Set it to "" to prevent caching, which may be useful on some systems
pipe_name = "/tmp/shairport-sync-metadata";
pipe_timeout = 5000; // wait for this number of milliseconds for a blocked pipe to unblock before giving up
//      socket_address = "226.0.0.1"; // if set to a host name or IP address, UDP packets containing metadata will be sent to this address. May be a multicast address. "socket-port" must be non-zero and "enabled" must be set to yes"
//      socket_port = 5555; // if socket_address is set, the port to send UDP packets to
//      socket_msglength = 65000; // the maximum packet size for any UDP metadata. This will be clipped to be between 500 or 65000. The default is 500.
};

MagicMirror Config

    {
        module: 'MMM-ShairportMetadata',
        position: 'bottom_left',
        config: {
          metadataPipe: "/tmp/shairport-sync-metadata", // location of pipe with shairport-sync metadata
          alignment: "center",  // Possible values [left|right|center]. Default: center
        }
      },
surekap commented 4 years ago

Can you confirm that

  1. Shairport-sync is installed correctly from https://github.com/mikebrady/shairport-sync
  2. If you do a tail -f /tmp/shairport-sync-metadata and then play music to the mirror, it should show the metadata stream
bodenlaman commented 4 years ago

Nothing appears, but I will re-run the installation of Shairport-Sync and get back to you. Thanks for the fast response!

bodenlaman commented 4 years ago

Ok, I reinstalled it on my Pi, ran tail -f /tmp/shairport-sync-metadataand it came back with tail: cannot open '/tmp/shairport-sync-metadata' for reading: No such file or directory tail: no files remaining

It seems like the directory was deleted in the reinstallation and even though it's enabled, it's just not showing up. I can still AirPlay from my iPhone to my Pi though.

surekap commented 4 years ago

That file should exist - the issue is on your shairport setup I hope you are using the --with-metadata switch in your shairport configuration

bodenlaman commented 4 years ago

I did do that on the reinstallation, but nothing comes through with the tail command. Using cat /tmp/shairport-sync-metadata I get code, which is weird and I still don't get anything on MagicMirror

DavidD303 commented 4 years ago

@bodenchristian @surekap Have you got this working? I just installed everything and nothing is getting transmitter to my magic mirror. When I do the tail -f /tmp/shairport-sync-metadata nothing comes in it just sits there blank. verified in my config thats the correct pipe for the metadata

bodenlaman commented 4 years ago

I unfortunately never got this to work.

Bennoid commented 2 years ago

Same problem, been trying for about two weeks now but about to give this one up.

  1. Shairport-sync --with-metadata is installed correctly as far as I know
  2. tail -f /tmp/shairport-sync-metadata just sits there blank. cat /tmp/shairport-sync-metadata does give me the metadata.

'Somebody is playing' is just sitting there on the MagicMirror without more.

Mitchellja13 commented 2 years ago

+1 to this same issue. cat works, tail -f does not. any updates?

Sh4wn9 commented 1 year ago

Thought it would be useful as I was having the same issue. Found that @bradenbouwman found a fix. sudo apt install python2, check python with which python2 now just update shairport-metadata.sh from /usr/bin/python to /usr/bin/python2. Got it working for me!!

Bennoid commented 1 year ago

Thought it would be useful as I was having the same issue. Found that @bradenbouwman found a fix. sudo apt install python2, check python with which python2 now just update shairport-metadata.sh from /usr/bin/python to /usr/bin/python2. Got it working for me!!

I can confirm this works! Thanks!