Read the statement by Michael Teeuw here.
MMM-Spotify
-
@requiemmg , @sdetweil Thanks for the quick reply. Volume is working fine, but switching between 2 different “Client Id’s” isnt working. The MagicMirror only shows the accountdefault: 0. This means first device is working fine, but it isnt possible to switch to another device.
-
@Abstr device or account.
each system is one device. far as i know spotify bequires logoff/logon to switch
accounts. even family is multiple users under one payment planagain verify how it works with the connect app. has nothing to do with mm
-
@sdetweil verify w the connect app
-
@sdetweil Sorry, you are right. But I mean, I can connect my phone (with account A) to the spotify module. It shows up on the MM and music plays with Raspotify.
But switching to another phone (with account B ) isnt working. Music plays with Raspotify but doesnt show up on the MagicMirror.
I’ll try the connect app
-
@Abstr raspotify plays in the background
dont expect phone and other software to work the same. spotify doesnt care about not its platform
-
@sdetweil the mm aps show the music that is playing SOMEWHERE.
some modules will let u stop/start/move play somewhere. not all 100% functional all the time
-
@sdetweil ‘‘spotify doesnt care about not its platform’’, thats oke but my problem is switching between multiple spotify accounts.
-
@Abstr ok doc said u had to authorize each account in the order u set them up in the config json file
did u get a request to allow for each account?
never seen one work like this
-
@sdetweil Yes, I got both both accounts allowed in the correct order. Username, ID’s and token work fine. I’ve setup two users in spotify.config.json like the sample below. The user which I put first in the spotify.config.json get to display the music in MagicMirror. The second user doesnt. No matter if I swap them.
[
{
“USERNAME”: “AN NAME TO IDENTIFY THIS ACCOUNT”,
“CLIENT_ID” : “PUT_YOUR_SPOTIFY_APP_CLIENT_ID”,
“CLIENT_SECRET” : “PUT_YOUR_SPOTIFY_APP_CLIENT_SECRET”,
“TOKEN” : “./username_token.json”
},
{
“USERNAME”: “ANOTHER NAME TO IDENTIFY THIS ACCOUNT”,
“CLIENT_ID” : “PUT_YOUR_SPOTIFY_APP_CLIENT_ID”,
“CLIENT_SECRET” : “PUT_YOUR_SPOTIFY_APP_CLIENT_SECRET”,
“TOKEN” : “./another_token.json”
}
] -
@Abstr you might be able to hardcode it within the MMM-Spotify.js file by adding
case "SPOTIFY_ACCOUNT_JONDOE": this.sendSocketNotification("ACCOUNT","JONDOE") break
(e.g. after line 128) in order to create a notification that lets you address a specific account. Doesn’t allow toggling but might help you choosing a specific account. This should be the USERNAME from the spotify.config.json file.