GithubHelp home page GithubHelp logo

surekap / mmm-shairportmetadata Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 10.0 290 KB

AirTunes metadata module for MagicMirror

License: MIT License

JavaScript 69.51% Python 26.87% Shell 0.51% CSS 3.12%

mmm-shairportmetadata's People

Contributors

chielchiel avatar clovel avatar surekap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mmm-shairportmetadata's Issues

Metadata not showing correctly

I can airplay successfully but metadata i have problems with. It was working fine until the last update. Below are my settings..

 {

        enabled = "yes"; // set this to yes to get Shairport Sync to solicit me$
        include_cover_art = "yes"; // set to "yes" to get Shairport Sync to sol$
        cover_art_cache_directory = ""; // artwork will be  stored in this dire$
        pipe_name = "/tmp/shairport-sync-metadata";
        pipe_timeout = 5000; // wait for this number of milliseconds for a bloc$
//      socket_address = "226.0.0.1"; // if set to a host name or IP address, U$
//      socket_port = 5555; // if socket_address is set, the port to send UDP p$
//      socket_msglength = 65000; // the maximum packet size for any UDP metada$
};
  		{
    			module: 'MMM-ShairportMetadata',
			header: "",
    			position: 'right',
    			config: {
      			metadataPipe: "/tmp/shairport-sync-metadata", // location of pipe with shairport-sync metadata
	  		alignment: "center",	// Possible values [left|right|center]. Default: center
    				}
  		},`

i have reinstalled shairport and even gone as far as complete reinstall of piOS (Buster) and magicmirror - made sure i "make" --with-metadata but no joy.
Read the other issue posted with similar description that was not resolved.
Have followed those instructions and also ran tail -f /tmp/shairport-sync-metadata and it came back with
tail: cannot open '/tmp/shairport-sync-metadata' for reading: No such file or directory tail: no files remaining. Because i had already reinstalled with metadata switch i figured i could create the file manually and set permissions on the file.
I now get data when i run tail command and can now see album artwork in the module but the data does not change when i skip track - instead it continues to count up the progress time and show the first track.

it did work fine previously before the progress bar was added.
could anyone offer suggestion on what i am missing?

Also - it would be remiss of me to not say thanks very much for the hard work that has gone into these modules!

TIA for any help offered.

Not displayed on Magic Mirror

Although airplay works, the metadata is not being displayed on MagicMirror. I have tried this on a device where I have installed Shairport on it myself and also a device in which alexapi has installed it for me. I manage to successfully create the pipe file in the tmp folder but to no avail. Any help would be greatly appreciated.

Homepod - >> Magicmirror

Hello, is there a solution to retrieve the homepod stream on Magic mirror, to have the information of the music played from the homepod.

Best regards,

Not showing up

Installed everything per instructions and configured metadata. Music plays via shairport but nothing shows up on the mirror. Node ver 8.9.3. Current mirror version. Any ideas ?

Metadata fades in and out

When I use airplay, the metadata appears, but it fades in and out rapidly - about every second. Any clues on what might be going on?

Setup

New to this, so probably being daft. However Iโ€™m struggling to install and set this module up. Any help would be greatly appreciated.

Title & Album Marquee Scrolls across entire screen

In the latest version of MM the Marquee for Title and Artist scroll across the entire screen from right to left instead of staying tight within the region space. As a temporary stop-gap, as I am not really a coder, I adjusted the if-else statement for title length to 100 from 30 and conversely the Album Name from 50 to 100 (see below). This stopped the marquee effect for most things. Just want to say thanks to surekap for writing this! I like having the info pop up on the MM. I really appreciate your work on this.

In MMM-ShairportMetadata.js I edited:

if (this.metadata['Title'] && this.metadata['Title'].length > 100){
titletag = document.createElement("marquee");
titletag.setAttribute('loop', '-1');
}else{
titletag = document.createElement("div");
}

  titletag.innerHTML = (this.metadata['Title']) ? this.metadata['Title'] : "";
  titletag.className = "bright";
  metadata.appendChild(titletag)


  var txt = "";
  if (this.metadata['Artist'] || this.metadata['Album Name']){
  	txt = this.metadata['Artist'] + " - " + this.metadata['Album Name']
  }
  if (txt.length > 100){
  	artisttag = document.createElement('marquee');
  	artisttag.setAttribute("loop", '-1')
  }else{
  	artisttag = document.createElement('div');

No output to screen

I cloned the github file, added it to the module array in config, i even tried
cat /tmp/shairportsync-metadata
or whatever the file extension is. I also made sure the pipe name was the same in the shairport-sync folder and in the module configuration, but nothing is still outputted to the screen when music is playing via shairport. Any suggestions?

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

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
	    }
	  },

How to properly display Album photo based on its width

@surekap

Thank you for providing us this faddish module!

In this module, the album photo size is in a fixed 200x200. But not all album photos are square. How to properly display album photos based on its width (e.g., 300x200)?

Could you give me some suggestions? Thanks in advance.

Module doesnt hide if nothing is playing

Hi,

It looks like in the .js if nothing is playing for 2 minutes the module should hide itself, is this correct? If so the module always shows the "Someone is now playing" or the last metadata is displayed until the magicmirror is restarted. Is there a way to hide the header and metadata if it is inactive.

Thanks

Magicmirror not updating

when I first open magic mirror it shows the last song on the pipe however it won't update when i pause or skip track. And the progress bar just continues to go up and doesnt start from where the progress actually is on the device streaming. Any ideas ?

somebody is now playing

hi, i am having trouble displaying the metadata. when i run shairport-sync-metadata-reader < /tmp/shairport-sync-metadata command it displays correct metadata and updates fine. so i assume shairport is working correctly. i have git cloned your repo into the module folder and altered both config files. but still will not display the song details. when running magic mirror npm run start i get a error

[LOG] ERR: File "/home/pi/MagicMirror/modules/MMM-ShairportMetadata/shairport-metadata.py", line 86
print json.dumps({})
^
SyntaxError: invalid syntax

i noticed json links to cpython ? do i need to install cython ?

i have checked and i cant find any syntax errors . i am pretty new to code. could it be something to do with python2 or python 3 ? am i missing something. thanks in advance

"Somebody is Now Playing"

is there possibly a way to have the "somebody" to identify as the name of the device from which it is actually streaming from?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.