Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Sonos binding, partly implemented getFavoriteRadios getFavorites #5003

Closed
BasvanH opened this issue Jan 29, 2018 · 10 comments
Closed

Sonos binding, partly implemented getFavoriteRadios getFavorites #5003

BasvanH opened this issue Jan 29, 2018 · 10 comments

Comments

@BasvanH
Copy link

BasvanH commented Jan 29, 2018

Hello,

Currently, the Sonos Binding does not have a channel for getting an list of the favorites. I would like to use this list in an HabPanel widget so you can choose an favorite to play.

The SonosPlayeHandler does have some parts of code towards getting the favorites, but it doesn't have it ported to an channel. Could this be implemented?

SonosPlayerHandler.java
https://github.com/eclipse/smarthome/blob/master/extensions/binding/org.eclipse.smarthome.binding.sonos/src/main/java/org/eclipse/smarthome/binding/sonos/internal/handler/ZonePlayerHandler.java

@triller-telekom
Copy link
Contributor

This sounds like a good use case for #4942.

You could have a dynamic "SelectionOptionProvider" for a favorites channel and show it as a selection element in a basic ui sitemap or whatever kind of widget in HabPanel.

@BasvanH
Copy link
Author

BasvanH commented Feb 12, 2018

Kindly requesting an update.

@maggu2810
Copy link
Contributor

As long as there is no volunteer that would like to implement that feature...

@lolodomo
Copy link
Contributor

lolodomo commented Jun 2, 2018

I will have a look as soon as my changes in Classic UI and Basic UI are merged.
A similar thing was apparently already implemented in the Kodi binding (building options dynamically).

@lolodomo
Copy link
Contributor

lolodomo commented Jun 2, 2018

In fact, it could be applied to 3 channels: favorite, playlist and radio.

@lolodomo
Copy link
Contributor

lolodomo commented Jun 2, 2018

I implemented that in the Sonos binding as a POC. Works well.
I have a problem to solve before proposing a PR: when triggering a refresh ? I was expecting a notification through the UPnP ContentDirectory subnscription but it does not happen and I don't understand why (I know that it was happening in the Vera plugin).

I have one worry: what will happen with very big lists ? Should we limit to a certain max list size ?

@lolodomo
Copy link
Contributor

lolodomo commented Jun 3, 2018

Unfortunately there is first an issue to fix in the jupnp library
jupnp/jupnp#97

@sjsf
Copy link
Contributor

sjsf commented Jun 11, 2018

I just merged the PR - nevertheless, the above statement wrt the dependency on a yet open change in jUPnP remains valid. See also #5682 (comment).

ermartens pushed a commit to ermartens/smarthome that referenced this issue Jun 15, 2018
…-archived#5682)

Used to define dynamically the state options for the channels radio, favorite and playlist

fixes eclipse-archived#5003
Signed-off-by: Laurent Garnier <[email protected]>
@lolodomo
Copy link
Contributor

I have not yet checked but the new feature should work starting with the snapshot 1305.

@lolodomo
Copy link
Contributor

I can now confirm that it is available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants