Switch Spotify devices with Alexa and Smartthings

  • I made a video https://youtu.be/8BVC2dnnxFQ
    Smartthings 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 multiple Triggercmd switches that I trigger with Alexa through Smartthings. "Alexa turn on device 3"

    Spotify Devices in your device list will change position when devices are turned on and off. Even though your computer will always be in position 1 it still requires "{TAB 2}" in the script. It goes up from 2 to how many ever devices you have.

    Open notepad and copy and paste the following and save it as a .vbs

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

    I will post a video of this sooner or later. :)

Log in to reply