l3d00m / MMM-LibrespotJava

A module for MagicMirror displaying the song currently streaming on your librespot java speaker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Archived

I no longer own a Magic Mirror, so I'm not maintaining this anymore. Last time I used it in 2021, it worked fine.

MMM-LibrespotJava

A module for the MagicMirror project displaying the song currently playing on Spotify via the librespot-java API.

Screenshots

drawing

drawing

This fork

I've modified MMM-NowPlayingOnSpotify, so I could integrate it with the librespot-java API.

I've also modified a few other things to my liking. I removed some options (cover art not configurable) to reduce maintenance burden for me.

Multiple instances of this module are now also supported, if you've got more than one Librespot speaker.

Install the module

In your MagicMirror directory:

cd MagicMirror/modules
git clone https://github.com/l3d00m/MMM-LibrespotJava.git
cd MMM-LibrespotJava
npm install

Configuring

Here is an example for an entry in config.js

{
    module: "MMM-LibrespotJava",
    position: "top_right",

    config: {
        librespotApiHost: "localhost", // librespot java API host address (ip)
        librespotApiPort: "24879",     // librespot java API port, default is 24789
        updatesEvery: 1,               // How often should the song be fetched from librespot API in s?
        deviceName: '',                // Optional device name to display next to the progress time
    }
}

Librespot java configuration

Make sure your librespot java is build with API support and the config.toml contains the following:

### API ###
[api]
        # API port (`api` module only)
        port = 24879
        # API listen interface (`api` module only)
        host = "0.0.0.0"

Troubleshooting

If it doesn't display anything after start, simply skip at least one song (or pause/play) and it'll probably work. Also note that there's no display at all when no song is playing.

Special Thanks

  • To the original MMM-NowPlayingOnSpotify <3
  • Michael Teeuw for inspiring me and many others to build a MagicMirror module.
  • The community of magicmirror.builders for help in the development process and all contributors for finding and fixing errors in this module.

About

A module for MagicMirror displaying the song currently streaming on your librespot java speaker.

License:MIT License


Languages

Language:JavaScript 93.2%Language:CSS 6.8%