MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Spotify

    Scheduled Pinned Locked Moved Entertainment
    249 Posts 51 Posters 276.0k Views 54 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mmmmh Project Sponsor @Guest
      last edited by

      @Sean Thank you for chiming in and for providing a more elaborate response. I thought that the constant polling might be the reason. If I may comment, for other users it may be helpful to put it in the documentation that using the module leads to increased network traffic.

      I for one would be happy with a display of the static per-title information and the controls, I will observe what happens when I crank the refresh rate up to 30000 milliseconds.

      1 Reply Last reply Reply Quote 0
      • M Offline
        mmmmh Project Sponsor @Guest
        last edited by

        @Sean I hacked together a simple bash script (dnssaver.sh) that fetches IPs and stores them in the hosts file. If I call it with ‘api.spotify.com’ as argument and put it in my crontab it should take a load of the dns server. I’ll keep an eye on it.

        1 Reply Last reply Reply Quote 0
        • Cr4z33C Offline
          Cr4z33
          last edited by

          @Bugsounet either I am doing something wrong or there’s a bug.

          I added onStart: null, in the module config, but the big Spotify logo keeps displaying all the time.

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User
            last edited by A Former User

            if Soptify logo not hidden after start, it’s means :
            token missing or token error

            you should have in console something like that :

            [SPOTIFY:ERROR] USERNAME: [your username]
            [SPOTIFY:ERROR] Token Error ! ./[token name].json
            

            if you have set a token … verify the exact name
            and report it to your account username specified in spotify.config.json -> “TOKEN” field

            S 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User
              last edited by

              when ok It display :

              • default style
                253eaa12-c844-4296-8b73-1d107fdb504a-image.png

              • mini style
                108abf52-5ca1-41c3-983c-7c3bc2abe3e7-image.png

              • when bottom_bar position is set
                56ab36ca-b72b-463d-8a90-37fae6d6bbc4-image.png

              1 Reply Last reply Reply Quote 1
              • ? Offline
                A Former User
                last edited by A Former User

                @mmmmh :

                ec2c8523-54a4-4a39-a78a-db4e95a007de-image.png

                now idleInterval is set to 30000 (scan is Spotify is playing every 30 sec)
                if playing : updateInterval is set by default to 1000 (1sec)

                Attention it’s means that with idleInterval : when Spotify is playing to take 30 sec to display it in mirror !by default !

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mmmmh Project Sponsor
                  last edited by

                  @Bugsounet Thanks. Do I understand this correctly. As long as the module is idle it will only check for updates every 30 seconds and when it is active (music is being played) it updates every second?

                  1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User
                    last edited by

                    Right,

                    I hope this suits you, because it starts to take head ;)

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sbonn13
                      last edited by sbonn13

                      Somehow the authorization process does not work.

                      ...node first auth.js
                      [SPOTIFY] Initialized
                      

                      Browser opened and the log in was succesful as well as accepting the app, but then instead of creating the token.js I receive an error:

                      [SPOTIFY] Error in authentication flow!
                      [SPOTIFY] ERROR: undefined
                      [SPOTIFY] Authorization process finished!
                      

                      In spotify I can see that I have the mirror app available in approved apps, but there is not token in the modules folder. Therefore the connection does not work.

                      Does anybody have an idea?
                      Thanks

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @sbonn13
                        last edited by sdetweil

                        @sbonn13 there will be a message popup on the browser with a code (press the copy icon)
                        then return to the terminal window and paste the code in at the little app prompt, and hit enter
                        (make sure u don’t hit enter on that window before the browser opens, as the little app will take you enter key as the ‘token’ and not wait)

                        you run the node auth… app
                        and see

                        Opening OAuth URL. Return here with your code.
                        Paste your code: 
                        

                        then the browser opens, you pick your userid, then it asks for allow, then presents this screen

                        Screenshot at 2020-06-07 08-54-43.png

                        where u need to copy that and then return to app

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sbonn13 @sdetweil
                          last edited by

                          @sdetweil
                          Thanks unfortunately probably I do it completely wrong, I do not get it. Is there any instruction? OAuth was working fine for google services, but not with this Spotify solution :-(
                          My procedure:
                          1.) node first_auth.js as described in MMM-Spotify instruction.
                          -> [SPOTIFY] Initialized appeared in terminal window
                          2.) Browser opens with Spotify login, after having entered, spotify requesting access
                          -> No code yet, no additional terminal window, also no change in existing terminal window
                          3.) Click on accept access in browser (spotify)
                          -> callback localhost:8888 appeared in domain and shows ?code=**** in parameter.
                          But in the meantime the mentioned error has appeared immediately in the terminal window. No time or place to paste the code somewhere else. Where shall I put this code and at what point in the procedure?

                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @sbonn13
                            last edited by

                            @sbonn13 said in MMM-Spotify:

                            callback localhost:8888 appeared in domain

                            what does ‘appeared in domain’ mean?? sorry

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sbonn13 @sdetweil
                              last edited by sbonn13

                              @sdetweil
                              Following address is opened in browser: https://accounts.spotify.com/de/authorize?response_type=code&client_id=XXXXX&scope=user…

                              -> Press Agree button in Browser in order to agree access to spotify

                              Afterwards address in browser is changed to:
                              http://localhost:8888/callback?code=XXXXX&state=XXXXX…

                              I assume the code (anonymized XXXXX) in this address is the relevant one. But how to proceed with that? Because at the time I have received this code I already have the errors in my terminal window.

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @sbonn13
                                last edited by

                                @sbonn13 i do not know … @Bugsounet will have to help here

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • ? Offline
                                  A Former User
                                  last edited by

                                  I’m going to inspect the first_auth script. there is too much problem, I think.
                                  a little patience within a few days this should be fixed

                                  1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    ChanceTime
                                    last edited by

                                    hi @Bugsounet ! I’m working on my first smart mirror and was very happy to just get mmm-GoogleAssistant up and running! It’s able to do normal searches and that kind of thing, so I just tried to install MMM-Spotify.

                                    Unfortunately, MMM-GoogleAssistant doesn’t seem to be recognizing the commands, and I don’t see any changes on the screen when I try to use the commands for it (for example, “Michael Jackson on Spotify”).

                                    The code I used in the .config is below. Did I miss something?

                                    Thanks!!

                                    		{
                                    		  module: "MMM-GoogleAssistant",
                                    		  position: "fullscreen_above",
                                    		  config: {
                                    		    debug: false,
                                    		    assistantConfig: {
                                    		      lang: "en-US",
                                    		      projectId: "magic-mirror-79d8d", // Required to use gaction.
                                    		      modelId: "", // (OPTIONAL for gaction)
                                    		      instanceId: "", // (OPTIONAL for gaction)
                                    		      latitude: 45.255299,
                                    		      longitude: -75.729048,
                                    		    },
                                    		    responseConfig: {
                                    		      useScreenOutput: true,
                                    		      screenOutputCSS: "screen_output.css",
                                    		      screenOutputTimer: 5000,
                                    		      activateDelay: 250,
                                    		      useAudioOutput: true,
                                    		      useChime: true,
                                    		      newChime: false
                                    		    },	
                                    		    micConfig: { // put there configuration generated by auto-installer
                                    		      recorder: "arecord",
                                    		      device: "plughw:2",
                                    		    },
                                    		    customActionConfig: {
                                    		      autoMakeAction: false,
                                    		      autoUpdateAction: false, // in RPI, gaction CLI might have some trouble.(current version should be 2.2.4, but for linux-arm, Google haven't updated) so leave this as false in RPI. I don't know it is solved or not.
                                    		      actionLocale: "en-US", // At this moment, multi-languages are not supported, sorry. Someday I'll work.
                                    		    },
                                    		    snowboy: {
                                    		      audioGain: 2.0,
                                    		      Frontend: true,
                                    		      Model: "jarvis",
                                    		      Sensitivity: null
                                    		    },
                                    		    A2DServer: {
                                    		      useA2D: false,
                                    		      stopCommand: "stop"
                                    		    },
                                    		    recipes: [ "with-MMM-TelegramBot.js", "with-MMM-Spotify" ]
                                    		  }
                                    		},
                                    		{
                                    			module: "MMM-Spotify",
                                    			position: "bottom_left",
                                    			config: {
                                    				 style: "mini", // "default" or "mini" available
                                    				 control: "hidden", //"default", "hidden" available
                                    				 updateInterval: 1000,
                                    				 onStart: null, // disable onStart feature with `null`
                                    				 allowDevices: [], //If you want to limit devices to display info, use this.
                                    				 // allowDevices: ["RASPOTIFY", "My iPhoneX", "My Home speaker"],
                                    				},
                                    		},
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • ? Offline
                                      A Former User
                                      last edited by A Former User

                                      natively, MMM-Spotify and MMM-GoogleAssistant can’t read directly music on Spotify.
                                      MMM-Spotify can display only what you are listening on a device
                                      and you can change music ONLY with a premium account with vocal request
                                      if you want listening music on your mirror you have to install Raspotify or librespot on your mirror (but needed again a premium spotify account)
                                      After, A2D is coded to read +/- native google response without Spotify recipe

                                      J 1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        ChanceTime
                                        last edited by

                                        aaaah, okay, thanks so much!

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          socosurf
                                          last edited by

                                          Does anyone know how I can adjust this module so that the album art is to the left and all the info is to the right of the album art? I basically am running this solo in magic mirror with a dedicated display to show what song is playing in my apartment but right now the album art and text doesn’t utilize all the real-estate of the screen since it’s centered and stacked.

                                          Can this be altered to have the album art to the left and all the text stacked to the right?

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            dcimag
                                            last edited by

                                            Hi. I was wondering if someone could tell me what I need to edit in the MMM-Spotify module to make Spotify fully function and what I have to do to have it appear on my screen. I have all the details of the MMM-Spotify folder listed under my Music folder on my raspberry pi 4. I dont need to type out the coding. Again just asking what I need to edit of the coding. Already have all the code. Other than all the coding that is in the MMM-Spotify.js document. What do I need to puth for AUTH_DOMAIN: AUTH_PATH: AUTH PORT: SCOPE: and TOKEN.

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 9 / 13
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy