Dashticz - Module - Spotify (new version!)

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: robgeerts, htilburgs

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify

Post by robgeerts » Tuesday 01 May 2018 21:41

Guys, believe it or not but I finally started rewriting the Spotify Plugin ;)
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

joostnl
Posts: 54
Joined: Wednesday 03 February 2016 20:22
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify

Post by joostnl » Tuesday 01 May 2018 23:27

Great! Looking forward
robgeerts wrote:
Tuesday 01 May 2018 21:41
Guys, believe it or not but I finally started rewriting the Spotify Plugin ;)

freakshock
Posts: 75
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: Dashticz - Module - Spotify

Post by freakshock » Wednesday 02 May 2018 15:46

Awesome can't wait! ;)

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify

Post by robgeerts » Wednesday 02 May 2018 16:16

Latest version just pushed to BETA.
Could you please test this? Unfortunately, it only works when you have a premium account (playback functions like prev/next etc).
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

freakshock
Posts: 75
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: Dashticz - Module - Spotify

Post by freakshock » Wednesday 02 May 2018 20:00

Good start Rob, thanks :)

Test results:
  • Playlist selection works once, not multiple times. Need a page refresh to be able to switch playlists more than once.
  • Controlling playback on the device Spotify is currently playing on works fine.
  • Switching output device however does not seem to work at all.
    Also I was hoping the plugin would be able to find 'all' Spotify Connect devices, it does not in my case.
    It finds 2 devices on which spotify has recently been playing. If I have not used a spotify connect device (chromecast audio in my case) it does not show up in the devices list anymore.

Martijn89
Posts: 2
Joined: Wednesday 02 May 2018 21:49
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify

Post by Martijn89 » Wednesday 02 May 2018 21:52

Hi Rob,

First of all; great work! Absolutely amazing what you delivered with Dashticz.

I saw your post and tried the update in the beta, but for some reason I have the following issues:
- I don't see any control buttons, just the currently played song and playlist/device. Which I both can select though.
- When I activate the 'spotify' block all other blocks just disappear. When I remove it from the columns[] again the other blocks work as they did before. This goes for all the blocks which come from Domoticz, but the weather, calendar and buienradar still do work. Interesting: the sunrise and sunset and fullscreen button also disappear when I activate spotify. Any idea what can go wrong here?

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify

Post by robgeerts » Wednesday 02 May 2018 22:38

Martijn89 wrote:
Wednesday 02 May 2018 21:52
Hi Rob,

First of all; great work! Absolutely amazing what you delivered with Dashticz.

I saw your post and tried the update in the beta, but for some reason I have the following issues:
- I don't see any control buttons, just the currently played song and playlist/device. Which I both can select though.
- When I activate the 'spotify' block all other blocks just disappear. When I remove it from the columns[] again the other blocks work as they did before. This goes for all the blocks which come from Domoticz, but the weather, calendar and buienradar still do work. Interesting: the sunrise and sunset and fullscreen button also disappear when I activate spotify. Any idea what can go wrong here?
Sounds like you're not using the latest version...
If you really do, do you get any errors in console?
freakshock wrote:
Wednesday 02 May 2018 20:00
Good start Rob, thanks :)

Test results:
  • Playlist selection works once, not multiple times. Need a page refresh to be able to switch playlists more than once.
  • Controlling playback on the device Spotify is currently playing on works fine.
  • Switching output device however does not seem to work at all.
    Also I was hoping the plugin would be able to find 'all' Spotify Connect devices, it does not in my case.
    It finds 2 devices on which spotify has recently been playing. If I have not used a spotify connect device (chromecast audio in my case) it does not show up in the devices list anymore.
Thanks for your feedback, wil fix this a.s.a.p.
I knew the change of device wasnt working yet.
About the amount of devices, I did only see my devices where spotify was active (or in background on android).
I simply did not get more devices but will try again later :)
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify

Post by robgeerts » Thursday 03 May 2018 9:26

In latest beta, switching output device is fixed!! :)
I test with playlist selection, I tried multiple times without refreshing and it works... do you get any error?
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

freakshock
Posts: 75
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: Dashticz - Module - Spotify

Post by freakshock » Thursday 03 May 2018 10:32

Both are fixed indeed :)!

The only thing missing for me is that not all spotify connect devices show if if they have not been active recently.
This might not be easy to fix perhaps. For instance, the Windows Spotify client also does not support this. The android app however always shows all connect devices.

This causes me to always have to 'initiate' music play from another device than my Dashticz dashboard (because I have a tablet for this on my wall)

But I'm very happy with this plugin ! :)

tontze
Posts: 329
Joined: Thursday 12 January 2017 16:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify

Post by tontze » Thursday 03 May 2018 10:42

Awesome ! Thnx !
-----------------------------------------
Rpi 3 / Razberry 2
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
ESP82xx

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify

Post by robgeerts » Thursday 03 May 2018 11:40

freakshock wrote:
Thursday 03 May 2018 10:32
Both are fixed indeed :)!

The only thing missing for me is that not all spotify connect devices show if if they have not been active recently.
This might not be easy to fix perhaps. For instance, the Windows Spotify client also does not support this. The android app however always shows all connect devices.

This causes me to always have to 'initiate' music play from another device than my Dashticz dashboard (because I have a tablet for this on my wall)

But I'm very happy with this plugin ! :)
Indeed, its not easy to fix...
Maybe the android app scans the network for devices?
By the way, my Android-app also only shows the current active devices...
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

freakshock
Posts: 75
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by freakshock » Thursday 03 May 2018 14:14

Do you have Chromecast Audio or Google home devices?

I think there's a difference between 'cast targets' like the Chromecast audio, and normal devices like smartphones, PC's and tablets.
My Spotify android app always shows all Chromecast Audio targets, but only devices like my PC when it has recently been playing something.

Anyway, no biggie if it's not doable;)

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by robgeerts » Thursday 03 May 2018 14:29

I have chromecast devices, but I only see those when they are on ...
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
gielie
Posts: 219
Joined: Tuesday 12 January 2016 12:40
Target OS: Raspberry Pi
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by gielie » Thursday 03 May 2018 14:49

I can get spotify to work on my pc (safari) but on my iPad something strange is happening, i loose all my icons and +/- symbols.
- Vision ZU1401 USB Stick
- Aeotec MultiSensor 6
- FIBARO FGS222
- FIBARO FGWPE Wall Plug
- Everspring AN157
- Neo CoolCam Power plug
- Neo CoolCam PIR Sensor
- Popp Smoke Detector
- Toon
- Kodi Media Server

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by robgeerts » Thursday 03 May 2018 14:52

Could you clear cache/cookies?
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
gielie
Posts: 219
Joined: Tuesday 12 January 2016 12:40
Target OS: Raspberry Pi
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by gielie » Thursday 03 May 2018 16:54

I did clear my cache/cookies. I tried my iPhone and another iPad, it seems iOS specific. Once I // rule out my Spotify code the icons are back to normal.
- Vision ZU1401 USB Stick
- Aeotec MultiSensor 6
- FIBARO FGS222
- FIBARO FGWPE Wall Plug
- Everspring AN157
- Neo CoolCam Power plug
- Neo CoolCam PIR Sensor
- Popp Smoke Detector
- Toon
- Kodi Media Server

User avatar
robgeerts
Posts: 1239
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by robgeerts » Thursday 03 May 2018 21:23

Ok, problem is, I dont have ios to check this...
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

Martijn89
Posts: 2
Joined: Wednesday 02 May 2018 21:49
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify

Post by Martijn89 » Thursday 03 May 2018 22:58

robgeerts wrote:
Wednesday 02 May 2018 22:38
Martijn89 wrote:
Wednesday 02 May 2018 21:52
Hi Rob,

First of all; great work! Absolutely amazing what you delivered with Dashticz.

I saw your post and tried the update in the beta, but for some reason I have the following issues:
- I don't see any control buttons, just the currently played song and playlist/device. Which I both can select though.
- When I activate the 'spotify' block all other blocks just disappear. When I remove it from the columns[] again the other blocks work as they did before. This goes for all the blocks which come from Domoticz, but the weather, calendar and buienradar still do work. Interesting: the sunrise and sunset and fullscreen button also disappear when I activate spotify. Any idea what can go wrong here?
Sounds like you're not using the latest version...
If you really do, do you get any errors in console?
It works now Rob, I tried a git pull again with no results so downloaded the ZIP and uploaded it. Works like a charm now! What a great update!

Also checked the iOS issue; and indeed on iOS the icons are gone of all the blocks. The rest seems to work well however.

Two tips maybe;
- On a tablet the selector for the playlist and for the devices are really close together and pretty small. If one of them was on top and one at the bottom this would make it easier to use it. Users can change this of course as it is probably something personal.
- Do you think volume control would be an option in the future? I know Spotify Connect allows volume control for devices.

Great work Rob!

User avatar
gielie
Posts: 219
Joined: Tuesday 12 January 2016 12:40
Target OS: Raspberry Pi
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by gielie » Friday 04 May 2018 7:31

An other thing that is not working with Spotify enabled are the coloured icons, I have some code to make some icons in color, example the lightbulbs are yellow, but this doesn’t work either. Maybe this is a clue in the right direction.

Does someone know how I can get an debug log of dashticz on ios?
- Vision ZU1401 USB Stick
- Aeotec MultiSensor 6
- FIBARO FGS222
- FIBARO FGWPE Wall Plug
- Everspring AN157
- Neo CoolCam Power plug
- Neo CoolCam PIR Sensor
- Popp Smoke Detector
- Toon
- Kodi Media Server

Ectholian
Posts: 8
Joined: Thursday 26 April 2018 15:27
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Ectholian » Friday 04 May 2018 11:26

freakshock wrote:
Thursday 03 May 2018 14:14
Do you have Chromecast Audio or Google home devices?

I think there's a difference between 'cast targets' like the Chromecast audio, and normal devices like smartphones, PC's and tablets.
My Spotify android app always shows all Chromecast Audio targets, but only devices like my PC when it has recently been playing something.

Anyway, no biggie if it's not doable;)
It is undo-able. It's the way the spotify api works. The API can't talk directly to your device like a phone. So instead, you need to fire up the application (Spotify) and the application keeps a connection to the api and 'listens'. So if you use the spotify plugin, and api request is being made to the spotify api which in turn talks to the spotify application.

When the spotify application is shut down, this communication channel is also down so the api can't talk to the spotify application anymore. It is different for cast-devices like chromecast, because they are always running and therefore always keep the communication line open.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests