This module show current playback of any devices
This module is an Extented plugins for
MMM-GoogleAssistant
In addition, you can use some plugins:
EXT-Librespot
for playing spotify music on your mirror with a Premium account (optional)
EXT-TelegramBot
for controling music with the bot (optional)
Clone the module into your MagicMirror module folder and execute npm intall
in the module's directory.
cd ~/MagicMirror/modules
git clone https://github.com/bugsounet/EXT-Spotify
cd EXT-Spotify
npm install
To display the module insert it in the config.js file.
{
module: 'EXT-Spotify',
position: 'top_left',
animateIn: "flipInX",
animateOut: "flipOutX",
config: {
updateInterval: 1000,
idleInterval: 10000,
useBottomBar: false,
CLIENT_ID: "",
CLIENT_SECRET: "",
mini: true,
forceSCL: false,
noCanvas: false
}
},
field | description | type | default value |
---|---|---|---|
updateInterval | Update interval when playing (refresh) | NUMBER | 1000 |
idleInterval | Update interval when idle (check if Spotify active) | NUMBER | 10000 |
useBottomBar | Activate visual of the current playback in the bottom bar | BOOLEAN | false |
CLIENT_ID | Client ID of your Spotify account | STRING | "" |
CLIENT_SECRET | Client Secret of your Spotify account | STRING | "" |
mini | Activate mini style instead of big style |
BOOLEAN | true |
forceSCL | Force displaying Canvas and Lyrics on all devices | BOOLEAN | false |
noCanvas | Don't display Canvas with EXT-SpotifyCanvasLyrics displayer |
BOOLEAN | false |
You can play Spotify Music To MagicMirror
Actually 2 players are available:
EXT-Raspotify
orEXT-Librespot
forceSCL
andnoCanvas
can only be used withEXT-SpotifyCanvasLyrics
plugin
Visual Spotify setup
http://localhost:8888/callback
CLIENT_ID
and CLIENT_SECRET
in the configurationNote:
Spotify Free member can ONLY display the visual of any device that plays music
In RPI Desktop, log in in a Terminal (you can use VNC)
cd ~/MagicMirror/modules/EXT-Spotify
npm run token
Then, Allowance dialog popup will be opened. You MUST LOG IN and accept connect to create a token.
That's all. tokenSpotify.json
will be created, if success.
MMM-GoogleAssistant
recipe for vocal controlA prepared recipe is inclued and waiting for your use
Just add it in the config of MMM-GoogleAssistant
recipes: [
"../../EXT-Spotify/recipe/EXT-Spotify.js"
],
recipes: [
"my_recipe.js",
"../../EXT-Spotify/recipe/EXT-Spotify.js"
],
activate your mirror with your prefered keyword and just say:
Alan Walker on Spotify
: Assistant will search some music of Alan Walker on spotify and play itAlan Walker Faded on Spotify
: Assistant will search Alan Walker and the title Faded on spotify and play itplaylist Top Hit on Spotify
: Assistant will search the playlist Top Hit on spotify and play italbum K-391 on Spotify
: Assisant will search the album of K-391 and play itYou can choice your type of search in the begining of the request (artist, playlist, album, track)
You can translate type of search in your language with type feature: typeArtist
,typePlaylist
,typeAlbum
and typeTrack
spotify play
: to launch spotify and play last musicspotify pause
: make pause spotify stop
: for stop it !spotify volume [0-100]
: for controling volume[type of search] <your request> on spotify
: make a music search on spotify and play it. type of search is optionalspotify next
: next music on the playlistspotify previous
: previous music on the playlistspotify shuffle
: make shuffle playlistspotify repeat
: repeat playlist or trackspotify transfer to [device name]
: transfer music to a new device[type de recherche] <votre demande> sur spotify
: faire une recherche de musique sur spotify. Le type de recherche est optionelspotify suivante
: musique suivantespotify précédente
: musique précédentespotify aléatoire
: active la lecture aléatoirespotify répète
: active la répétitionspotify transfert vers [nom de l'appareil]
: transfert la musique vers un nouveau lecteur[type of search] <your request> su spotify
: make a music search on spotify and play it. type of search is optionalspotify seguente
: next music on the playlistspotify precedente
: previous music on the playlistspotify casuale
: make shuffle playlistspotify ripeti
: repeat playlist or trackspotify trasferisci a [device name]
: transfer music to a new deviceby editing pattern
field in the recipe you can make the recipe for your language
You can ONLY display the visual of any device that plays music.
You CAN'T play any music in the Mirror
You CAN'T use Vocal Control or telegramBot commands
EXT-Spotify
have a telegramBot command.
Just try /spotify
:
/spotify play
: Launch music (last title)
/spotify pause
: Pause music
/spotify stop
: Stop music
/spotify next
: Next track
/spotify previous
: Previous track
/spotify volume [0-100]
: Volume control, it need a value 0-100
/spotify to [device name]
: Transfert music to another device (case sensitive)
cd ~/MagicMirror/modules/EXT-Spotify
npm run update