LukevdPalen / pimatic-sonos

Pimatic Sonos plugin
GNU General Public License v2.0
2 stars 2 forks source link

Playlist integration #5

Open LeopoldKing opened 8 years ago

LeopoldKing commented 8 years ago

The Sonos API is stating that it is possible to play a given playlist. It should be easy to enhance the plugin towards that feature.

LeopoldKing commented 7 years ago

Since the last release 2 yrs ago, the APIs around Sonos were improved a lot, see

https://github.com/bencevans/node-sonos

It would be cool to integrate those features, such as the integration of Spotify and playing playlists. I miss those two integral features badly. Any chance to implement them?

Cheers, Leopold

LukevdPalen commented 7 years ago

@LeopoldKing Thanks for your input. As far as i know pimatic-mobile-frontend (the package which is responsible for rendering the frontend) has no such functionality.

A custom widget is needed, to enable playlist funtionality. In future releases i would love to include this, but for now; could you be a little bit more specific in what you mean with spotify integration?

leader21 commented 7 years ago

maybe there's some kind of "workaround" ? save the playlist in an external file and parse it from there ? sorry,unfortunately i don't use/have sonos but what exactly does pimatic need to get this integrated? maybe the framework or mobile frontend can be reworked for that

LeopoldKing commented 7 years ago

Hi @LukevdPalen,

thank you for your quick reply. Sure, I can do that :-)

The way I use my Smart Home is the following: I got an alarm in the morning to wake up. Pimatic is controlling my lights to brighten up the room. My Sonos got its own alarm - because I can't control it in Pimatic - to start playing a certain playlist from Spotify every morning. That's my morning routine. It would be great, if Sonos is implemented in a manner that I can also control it via my pimatic alarm.

Throughout the day it happens quite a lot that my wifi connection is down. Eventually Sonos is forgetting the playlist, it would be great to save the last played playlist from Spotify in a variable to reload and play it again. At this point it doesn't matter to replay from the last song, though it'd be a nice feature.

How this could be done in Pimatic:

What do you think?

Cheers, Leopold

LukevdPalen commented 7 years ago

@LeopoldKing Thank for your reply. This makes it more clear to me, beacuse i intentionally understood you requested some kind of playlist view. Sure this is possible, but because there are a lots of services that can be used by a Sonos, i suggest to start with a better Spotify integation. Does this fits your needs or are you using a local playlist?

LeopoldKing commented 7 years ago

perfect :-) actually I'm using Spotify as my only source of music.

ToniTornado commented 7 years ago

Since I use Google Music and there are so many music services supported by Sonos, I would prefer a more general solution. Maybe it works with Sonos Favorites? I can mark radio stations, albums, playlists from different services as favorite in my Sonos system and they are shared between devices i. e. saved within Sonos. So if we could read this favorites list and select an entry to play, this solution would only depend on Sonos and cover most use cases.

LeopoldKing commented 7 years ago

Don't know, if any of the existing developments are supporting that kind of functionality. The above mentioned one does support Spotify.

LukevdPalen commented 7 years ago

@ToniTornado I think the feature @LeopoldKing requested, is the possibility to programmatically play a certain playlist. The idea your mentioning is more like a playlist view where you can select a playlist.

I would love to add both functionalities in the near future, but for now i think it best to keep them separated. @ToniTornado could you maybe create a new issue for your suggestion and hopefully we can integrate this asap.

LeopoldKing commented 7 years ago

@LukevdPalen @ToniTornado It's indeed not a feature whereby I can see the playlist or whatever. It's more just the idea to create a rule like "when its 06:30 play mysoundtrack" - nothing more.

LeopoldKing commented 7 years ago

Hi @LukevdPalen ,

do you have any timeframe in mind?

Cheers, Leopold

LeopoldKing commented 7 years ago

Hi @LukevdPalen ,

I guess that you dropped the feature, right? Too bad! :-(

Cheers, Leopold

LukevdPalen commented 7 years ago

@LeopoldKing sorry for the late reply. Currently time is the biggest issue. I hope i can implement this in the coming weeks

LeopoldKing commented 7 years ago

ok, good to hear from you 👍

LukevdPalen commented 7 years ago

@LeopoldKing the current status is that this bug #https://github.com/bencevans/node-sonos/issues/142 in the node-sonos lib prevents my Sonos player from playing Spotify id's. As soon as it's fixed i can release the new version that supports playing spotify url's

LeopoldKing commented 7 years ago

wow, cool 👍 :-) I'm looking forward to it. Was it difficult to integrate?

LeopoldKing commented 7 years ago

Hi @LukevdPalen,

from what I saw they solved the problem. Can you give it a new try? :-) Thank you 😄