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-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    Scheduled Pinned Locked Moved Entertainment
    38 Posts 4 Posters 20.3k Views 9 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.
    • Cr4z33C Offline
      Cr4z33
      last edited by

      Can someone that is NOT a Spotify Premium user please confirm whether this module works for him too or not?

      My (mirror) Google Assistant is not understanding what I want to do and I want to be sure it has nothing to do with this module.

      ejay-ibmE 1 Reply Last reply Reply Quote 0
      • ejay-ibmE Offline
        ejay-ibm Project Sponsor Module Developer @Cr4z33
        last edited by

        @Cr4z33 from here :
        https://developer.spotify.com/documentation/web-api/quick-start/
        “To use the Web API, start by creating a Spotify user account (Premium or Free).”

        Note :
        Spotify Free is supported by ads.
        Every few tracks you play, you will be forced to be interrupted by one or two short adverts, which will also break your pleasure that you get from the music.
        Some tracks are not be playable. You can use the desktop and web interfaces, but the mobile app will only let you listen on shuffle mode or pre-made playlists.

        with your free account : what does it do when you say “bob marley on spotify” ?

        Ejay

        Cr4z33C 1 Reply Last reply Reply Quote 0
        • Cr4z33C Offline
          Cr4z33 @ejay-ibm
          last edited by Cr4z33

          @ejay-ibm said in MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.:

          with your free account : what does it do when you say “bob marley on spotify” ?

          Well considering that my (mirror) Google Assistant is set to Italian language it simply replies saying it doesn’t know what I want to do.

          On the other hand if I say (in Italian) ‘Hey Google play music on Spotify’ on my living room’s Google Home Mini it works flawlessly.

          Actually tell me how is your module supposed to accept that command if we only entered PREV_SONG, PAUSE_SPOTIFY, RESUME_SPOTIFY and PLAY_NEXT_SPOTIFY?
          I mean I see no PLAY command there? :smiling_face_with_open_mouth_cold_sweat:

          Also aren’t these transcriptionHook entries supposed to be entered into quotation marks?
          I ask because I’ve got other entries there and they are ALL into quotation marks.

          ejay-ibmE 1 Reply Last reply Reply Quote 0
          • ejay-ibmE Offline
            ejay-ibm Project Sponsor Module Developer @Cr4z33
            last edited by ejay-ibm

            @Cr4z33
            Ok I got your point Google assisant and sdk act differently .

            What happen when you say something to your assisant:
            “Play bob marley on spotify”
            It search like you would do in the google search bar
            and return a result.
            That is your payload for the play … spotify command.
            Note that this command is the only one to not have a hook .

            So what it does is returning the first result from a google search .

            if I type “bob marley spotify” in my search bar i’m getting :
            Bob Marley & The Wailers on Spotify
            https://open.spotify.com/artist/2QsynagSdAqZj3U9HgDzjD

            That is what is expected from the payload , as we build later the api call from this url .

            I would try first to google search for "an artist on spotify in italian’ and see what it return they say to your assisant in italian the same. Usually the assistant quickly display what it find from the search you should see an url like :
            https://open.spotify.com/(artist, track or playlist)/with an Id here .

            regarding the syntax Quote or double quote doesn’t matter in js.

            Both

             transcriptionHook: {
                    PREV_SONG: {
                       pattern: "previous song",   
                       command: "PREV_SONG"
                  },
            or 
            transcriptionHook: {
                    PREV_SONG: {
                       pattern: 'previous song',   
                       command: 'PREV_SONG'
                  },
            
            

            will work the same.

            Hope this helps

            Ejay

            Cr4z33C 1 Reply Last reply Reply Quote 0
            • Cr4z33C Offline
              Cr4z33 @ejay-ibm
              last edited by

              @ejay-ibm said in MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.:

              @Cr4z33
              Both
              transcriptionHook: {
              PREV_SONG: {
              pattern: “previous song”,
              command: “PREV_SONG”
              },
              or
              transcriptionHook: {
              PREV_SONG: {
              pattern: ‘previous song’,
              command: ‘PREV_SONG’
              },

              will work the same.

              Hope this helps

              Ejay

              Sorry you misunderstood me. :smiling_face_with_open_mouth_cold_sweat:

              What I meant is don’t we have to put ie. PREV_SONG into quotation marks like

              "PREV_SONG": {
              

              ?

              As for the Google Assistant test you are asking me are you referring to the mirror module or to my Google Home Mini device?

              ejay-ibmE 1 Reply Last reply Reply Quote 0
              • ejay-ibmE Offline
                ejay-ibm Project Sponsor Module Developer @Cr4z33
                last edited by

                @Cr4z33
                don’t use your google home device it’s not comparable .
                I have one as well at home and it’s working completely differently, otherwise, I would not have to write this module. So i’m refering to what interest us your Mk2 assistant on your mirror .

                ejay

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

                  It says something like ‘I am sorry I don’t know how to help you, but I am learning new things day by day’.

                  I am 100% sure that all the API/token details are correct and still valid (if I run MMM-NowPlayingOnSpotify it works flawlessly).

                  ejay-ibmE 1 Reply Last reply Reply Quote 0
                  • ejay-ibmE Offline
                    ejay-ibm Project Sponsor Module Developer @Cr4z33
                    last edited by ejay-ibm

                    @Cr4z33
                    What Are you saying exactly ?
                    What is the result of this if you try to type in in your google search bar ?
                    did you simply try : “bob marley spotify” ?
                    what is your search result ? in google ?

                    Cr4z33C 1 Reply Last reply Reply Quote 0
                    • Cr4z33C Offline
                      Cr4z33 @ejay-ibm
                      last edited by

                      @ejay-ibm
                      I am saying that:

                      • If I say in Italian to MMM-AssistantMk2 play Bob Marley on Spotify then Google Assistant replies (by voice) that he doesn’t know how to help me
                      • If I search for bob marley spotify on Google then the first result I get is this link
                      ejay-ibmE 1 Reply Last reply Reply Quote 0
                      • ejay-ibmE Offline
                        ejay-ibm Project Sponsor Module Developer @Cr4z33
                        last edited by

                        @Cr4z33 try to just say “Bob Marley Spotify” so there’s no language interaction.

                        Cr4z33C 2 Replies Last reply Reply Quote 0
                        • Cr4z33C Offline
                          Cr4z33 @ejay-ibm
                          last edited by Cr4z33

                          @ejay-ibm just tried and again GA says he apologizes, but he doesn’t know right now how to help me.

                          1 Reply Last reply Reply Quote 0
                          • Cr4z33C Offline
                            Cr4z33 @ejay-ibm
                            last edited by Cr4z33

                            @ejay-ibm perhaps it doesn’t work (yet) when using GA in another language than English?

                            ejay-ibmE 1 Reply Last reply Reply Quote 0
                            • ejay-ibmE Offline
                              ejay-ibm Project Sponsor Module Developer @Cr4z33
                              last edited by

                              @Cr4z33 Well i’m using it in french … so I don’t think so .
                              I need to think a bit why your payload is incorrect.

                              Cr4z33C F 2 Replies Last reply Reply Quote 0
                              • Cr4z33C Offline
                                Cr4z33 @ejay-ibm
                                last edited by

                                @ejay-ibm sure take your time mate as I might probably not resume testing before tomorrow afternoon. ;)

                                1 Reply Last reply Reply Quote 0
                                • F Offline
                                  F17MC @ejay-ibm
                                  last edited by

                                  @ejay-ibm I thought your module only works to play/stop/next/previous. I have tried run “Bob Marley Spotify” and nothing happens. With other artist the same.
                                  If I can test something…
                                  Pd: Spanish + Spotify premium

                                  ejay-ibmE 1 Reply Last reply Reply Quote 0
                                  • ejay-ibmE Offline
                                    ejay-ibm Project Sponsor Module Developer @F17MC
                                    last edited by

                                    @F17MC @Cr4z33
                                    I don’t think the issue is with the module but with what the assistant return to the module .

                                    the module is expecting something like “”(open.spotify.com - https://open.spotify.com/artist/2Gkz5N7rWiCE3jlCgsw1yp""

                                    So i’m not getting why your assistant doesn’t understand what to search for.

                                    I’ll continue digging

                                    Ejay

                                    Cr4z33C 1 Reply Last reply Reply Quote 1
                                    • Cr4z33C Offline
                                      Cr4z33 @ejay-ibm
                                      last edited by

                                      @ejay-ibm OK thanks I might ask also @Sean tomorrow to see if he knows anything we don’t. :D

                                      ejay-ibmE 1 Reply Last reply Reply Quote 0
                                      • ejay-ibmE Offline
                                        ejay-ibm Project Sponsor Module Developer @Cr4z33
                                        last edited by ejay-ibm

                                        @Cr4z33 I’m already working on it with @Sean ;)

                                        quick question : if you just say “micheal jackson smooth criminal”
                                        does it start playing youtube ?
                                        if yes then just try “micheal jackson smooth criminal spotify”
                                        and let me know

                                        If that doesn’t work I’ll ask you some patience so I can implement the spotify search function directly in my module and not from the assistant. We will just use a hook in the assisant .

                                        Ejay

                                        F Cr4z33C 2 Replies Last reply Reply Quote 0
                                        • F Offline
                                          F17MC @ejay-ibm
                                          last edited by F17MC

                                          @ejay-ibm yes, with YouTube it works. But with Spotify no. I try with “artist + song Spotify”, “artist + song on Spotify” etc. Always run the video in YouTube.

                                          ejay-ibmE 1 Reply Last reply Reply Quote 0
                                          • ejay-ibmE Offline
                                            ejay-ibm Project Sponsor Module Developer @F17MC
                                            last edited by

                                            @F17MC That is interesting … that mean the result of the assistant research never bring a spotify url but a youtube one . a openspotify url is what the module expect to work .

                                            So we know now that under some circumpstance the module doesn’t get the right payload from assistant to work.
                                            Thanks for testing and reporting this guys .

                                            I’ll work with sean to implement a search function directly with the spotify APIs call . With that we will make the search directly on spotify ( and not on google ) so we will bypass this issue .

                                            I’m wondering where the difference is between you and I, because it work fine here and as well another German guy Mantha who is the original code creator .

                                            Anyway, there’s no problem … only solution .

                                            I’ll keep you informed once the module is updated .

                                            Ejay .

                                            F 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
                                            • 2 / 2
                                            • 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