Page 5 of 9
Re: Dashticz - Module - Spotify
Posted: Tuesday 01 May 2018 21:41
by robgeerts
Guys, believe it or not but I finally started rewriting the Spotify Plugin

Re: Dashticz - Module - Spotify
Posted: Tuesday 01 May 2018 23:27
by joostnl
Great! Looking forward
robgeerts wrote: ↑Tuesday 01 May 2018 21:41
Guys, believe it or not but I finally started rewriting the Spotify Plugin
Re: Dashticz - Module - Spotify
Posted: Wednesday 02 May 2018 15:46
by freakshock
Awesome can't wait!

Re: Dashticz - Module - Spotify
Posted: Wednesday 02 May 2018 16:16
by robgeerts
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).
Re: Dashticz - Module - Spotify
Posted: Wednesday 02 May 2018 20:00
by freakshock
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.
Re: Dashticz - Module - Spotify
Posted: Wednesday 02 May 2018 21:52
by Martijn89
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?
Re: Dashticz - Module - Spotify
Posted: Wednesday 02 May 2018 22:38
by robgeerts
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

Re: Dashticz - Module - Spotify
Posted: Thursday 03 May 2018 9:26
by robgeerts
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?
Re: Dashticz - Module - Spotify
Posted: Thursday 03 May 2018 10:32
by freakshock
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 !

Re: Dashticz - Module - Spotify
Posted: Thursday 03 May 2018 10:42
by tontze
Awesome ! Thnx !
Re: Dashticz - Module - Spotify
Posted: Thursday 03 May 2018 11:40
by robgeerts
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...
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 14:14
by freakshock
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;)
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 14:29
by robgeerts
I have chromecast devices, but I only see those when they are on ...
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 14:49
by gielie
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.
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 14:52
by robgeerts
Could you clear cache/cookies?
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 16:54
by gielie
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.
Re: Dashticz - Module - Spotify (new version!)
Posted: Thursday 03 May 2018 21:23
by robgeerts
Ok, problem is, I dont have ios to check this...
Re: Dashticz - Module - Spotify
Posted: Thursday 03 May 2018 22:58
by Martijn89
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!
Re: Dashticz - Module - Spotify (new version!)
Posted: Friday 04 May 2018 7:31
by gielie
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?
Re: Dashticz - Module - Spotify (new version!)
Posted: Friday 04 May 2018 11:26
by Ectholian
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.