Author Topic: Squeezbox plugin Spotify integration ?  (Read 683 times)

Offline shotgun29

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +0/-0
Squeezbox plugin Spotify integration ?
« on: December 16, 2015, 08:16:05 pm »
 Just wondering has anybody successfully integrated any options to control Spotify on a squeezebox duet via Vera ?

Offline myhomeserver

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 872
  • Karma: +3/-5
  • http://www.MyZwave.net
    • MyZwave.net
Re: Squeezbox plugin Spotify integration ?
« Reply #1 on: March 14, 2016, 05:03:13 pm »
Ive been trying to get it to play a playlist on spotify, but no go, I have it playing a local file

If anyone has ideas on how to do this I'd love to hear it
MyZWave.net - See Our Z-Wave product Reviews
(formerly MyHomeServer)

Offline simonk1969

  • Newbie
  • *
  • Posts: 15
  • Karma: +1/-1
Re: Squeezbox plugin Spotify integration ?
« Reply #2 on: August 14, 2016, 10:02:19 pm »
For anyone still looking to use Spotify within LMS controlled via Vera and start a playlist, I've managed to do it this evening. I am using the 3rd party Spotify plugin in LMS.

You need to add your Spotify playlist to your LMS favorites as I couldn't get a playlist to start but favorites do.

Click on the name of the Favorite and you should then see the URL for the playlist, copy this into the LUA code below replacing the BOLD text and obviously replace IP address with your LMS server IP and MAC address to the address of the client you wish to control.

I've used the following LUA in a scene:

socket=require('socket')
local client = socket.connect('192.168.0.110', 9090)

client:send("b8:26:eb:c1:71:f0 playlist play spotify:user:takethatofficial:playlist:7o1E5PXj3e0KNOUgRaU56A\n")
local result=client:receive()

I hope this helps someone else :-)

Offline myhomeserver

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 872
  • Karma: +3/-5
  • http://www.MyZwave.net
    • MyZwave.net
Re: Squeezbox plugin Spotify integration ?
« Reply #3 on: January 16, 2017, 05:09:02 pm »
Here is the code I finally got working

Code: [Select]

socket=require('socket')
local mac = "00:04:20:99:92:8b"

local client = socket.connect('192.168.1.227', 9090)

-- Make sure the player is on:
client:send(mac .. " power 1\n")
local result=client:receive()

-- Play Spotify Playlist
client:send(mac .. " playlist play Playlistname-Spotify\n")
client:send(mac .. " mixer volume +30\n")
local result=client:receive()

MyZWave.net - See Our Z-Wave product Reviews
(formerly MyHomeServer)