TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Start Spotify Playlists with Smartthings and Trigger CMD

    Instructions
    4
    7
    5.6k
    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.
    • N
      Nate Hales
      last edited by

      Start Spotify Playlists with Smartthings and Trigger CMD Here is a video of how to do it.
      https://youtu.be/5LNVrFHCKkA

      1 Reply Last reply Reply Quote 0
      • D
        dlaugh14
        last edited by

        Props to Bubba for the video! -

        I'm kind of a rookie to cmd scripts - I'm a web developer.

        I didn't see a command in this video so I thought I'd throw this in here in case there's someone like me.

        start C:\scripts\spotifyChill.vbs - He didn't mention the command in the video. I set voice command to chill music and now I can just tell Alexa to start trigger command and run chill music on my pc - It works great! No need for Spotify premium to play my music using Alexa. I have my computer right next to Alexa in my living room and PC hooked to TV so "Trigger CMD" will come in very useful.

        N 1 Reply Last reply Reply Quote 0
        • N
          Nate Hales
          last edited by

          UPDATE I just figured out how to switch between Spotify devices. it is a .vbs file I made in notepad. Works like a champ. You can change the amount of times it hits the TAB button (to select different devices) by changing the 3 in "{TAB 3}". I have made multiple identical scripts with the only change being this number. I made Trigger commands that I trigger with Alexa through Smartthings. "Alexa turn on device 3"

          Set WshShell = WScript.CreateObject("WScript.Shell")
          Comandline = ":\Users*YOUR COMPUTER NAME*\AppData\Roaming\Spotify\Spotify.exe"
          CreateObject("WScript.Shell").Run("spotify:")
          WScript.sleep 1000
          WshShell.SendKeys "^{d}"
          WScript.sleep 1000
          WshShell.SendKeys "{TAB 3}", True
          WScript.sleep 1000
          WshShell.SendKeys " "

          1 Reply Last reply Reply Quote 0
          • N
            Nate Hales @dlaugh14
            last edited by

            @dlaugh14 That is awesome! I actually hooked an echo dot to my PC (so I can hear both the PC sound and the Alexa sound at the same time. I then output my PC (and Alexa) audio to my home stereo system. One advantage is I only have to say "Alexa play chill music". 🙂 Spotify is set as default player on my Alexa. I can also just say "Alexa skip" to move to the next song.

            1 Reply Last reply Reply Quote 0
            • P
              Pedro Gense
              last edited by

              Whats the shortcut for shift?

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Pedro Gense
                last edited by Russ

                @pedro-gense, I found on this page you can have SendKeys basically hold shift and type letters with a + like this:

                objSendKey.SendKeys("+(joecolantonio)") 
                

                That would type JOECOLANTONIO in upper case.

                Russell VanderMey

                1 Reply Last reply Reply Quote 0
                • P
                  Pedro Gense
                  last edited by Pedro Gense

                  yeah some googling found it already, tnx for the quick response.

                  Im very noobish at this all and most of it is just copy past and reading.

                  What i want is the following, tru smartthings with a virtual button to start a playlist but also to stop the playlist if the virtual sensor switch to off.

                  Ive made it so far that i can start a playlist and send the audio tru a spotify connect speaker as so

                  Set WshShell = WScript.CreateObject("WScript.Shell")
                  Comandline = "C:\Users\Peke\AppData\Roaming\Spotify\Spotify.exe"
                  WScript.sleep 9000
                  CreateObject("WScript.Shell").Run("spotify:user:1131846872:playlist:3ztoPH7GPeH9b898dIXcvc")
                  WScript.sleep 5000
                  WshShell.SendKeys "^{s}"
                  WScript.sleep 1000
                  WshShell.SendKeys "^{RIGHT}"
                  WScript.sleep 1000
                  WshShell.SendKeys "^{d}"
                  WScript.sleep 1000
                  WshShell.SendKeys "{TAB 4}", True
                  WScript.sleep 1000
                  WshShell.SendKeys "+{ENTER}"

                  but what i really also want if the virtual button goes to off that the playlist stops and the sound out of my spotify connect speaker stops playing.

                  Is this possible, if so can you point me in the right direction?

                  Greetz Peke

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post