Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request Media Player: Some customizable buttons for choosing playlists, radiochannels or similar would be cool. #1082

Open
edwardtfn opened this issue Sep 23, 2023 · 15 comments
Labels
Enhancement For suggestions that add new features or improve existing functionalities.

Comments

@edwardtfn
Copy link
Collaborator

Based on #1080 by @quenthal

Some customizable buttons for choosing playlists, radio channels or similar would be cool.

There could be, let's say 3-9 buttons with either icons, numbers or customizable strings available for user with customizable media_content_Ids as values.. I think those could fit there quite nicely.

There might be some nice arrangement also for example if timeline and volume bar were replaced with buttons.

Originally posted by @quenthal in #1080

@edwardtfn edwardtfn added the Enhancement For suggestions that add new features or improve existing functionalities. label Sep 23, 2023
@Doughboy68
Copy link

I think this depends on the media player. I only have experience with Apple Music and there is no way to direclty call a playlist to the homepod media player in HA. It would requires maybe using an input boolean helper, expose to homekit via integration and then make a HomeKit automation to do this... triggered by HA.

Maybe I will dust off an Alexa and try it out and see how it works in comparison.

@edwardtfn
Copy link
Collaborator Author

The challenge here is to create a componente to show/select the playlist/radio/etc. in the Nextion display used on those panels.
More advanced versions of Nextion displays supports drop down components, but that isn't the case for the use selected by Sonoff.
It's feasible, but requires UI work.

@quenthal
Copy link

quenthal commented Sep 26, 2023

Do you think simple service call buttons are feasible? For example, when using Sonos choosing radio channels or Spotify playlists are as simple as calling play_media -service with customizable media_content_id:

service: media_player.play_media
target:
entity_id: media_player.sonos
data:
media_content_type: "playlist"
media_content_id: "spotify:playlist:abcdefghij0123456789XY"
enqueue: true

media_content_id can be spotify-playlists, URLs etc. (https://www.home-assistant.io/integrations/sonos/) If there was simply, for example 3-6 buttons where user could customize the title on the button and the media_content_id string (which could be one of the aforementioned URLs, playlists, Plex-links or radio-channels).

What is common for all media players, is that media_content_id is available for (almost) all of them. There is naturally limits what kind of URLs or ids work with them, but they could be dependant of the user.

Same could be for entity_id's, if groups were to be available here in future. entity_id 'all' points to all media_players.

@edwardtfn
Copy link
Collaborator Author

edwardtfn commented Sep 26, 2023

It would be quite easy to have custom buttons that you can freely assign to a light or a script, then in your script you call the service you want.
Then challend in this case is onky to find a place for those buttons. That page is quite full right now, specially in the US model.

@quenthal
Copy link

Maybe even smaller mdi-icon buttons, wher one could customize either numbers or some other icons with service calls? But I understand there is not much space.

@edwardtfn
Copy link
Collaborator Author

The icon size isn't the biggest problem. The touchable area is the issue. If we make it too small, gets harder to press the right button and sometime you can press a button in the side instead.

@quenthal
Copy link

Maybe something like this?

First picture is from 4.0.1:
image

Then we could drop the second line from song title (if we can either just cut predefined first characters out of it) and maybe use smaller font as well.

Then I would drop the volume controls and play/pause etc to bottom of screen. Below them we could still have volume and progression bar, but I wouldn't mind if we would lose draggability from them and use only buttons. With this kind of layout one could use hardware buttons for play/pause, mute or whatnot (but I'm not that sure about that personally, but just an idea based on other ongoing discussions).

After all this there is quite a lot of space for buttons?

image

@Doughboy68
Copy link

How about a popup screen containing the presets like how the keypad or notification works?
Issue with these presets is if controlling multiple players they would probably share the same screen with these presets (eg. how sensors/buttons are set in climate screen). But ideally one would have a panel for each room/player so not an issue.

@edwardtfn
Copy link
Collaborator Author

You are right. Buttons are globals, so a pop up screen makes more sense, but still needing development of components to support the different controls.

@edwardtfn
Copy link
Collaborator Author

By the way, do you have those playlists in some of the attributes of your media_player entity?

@quenthal
Copy link

quenthal commented Sep 26, 2023

By the way, do you have those playlists in some of the attributes of your media_player entity?

No. I'm mostly using Spotify playlists, copied from Spotify itself as urls.

EDIT: Just checked, that atleast Sonos provides Sonos' app's own favorites with predefined ways to address them thry media_content_id, but never used those. There seems to be even sensor for favorites one could point to. But I prefer to manage my music in spotify, Tidal, Soundcloud etc., I think it would be more media_player agnostic this way also.

@luckyzor
Copy link

hello all,
is this media player feature working?
as I see some screenshots I would like to test it.

thanks

@edwardtfn
Copy link
Collaborator Author

Yest, média player is working.
Try it, and let us know if you have any issue,

@luckyzor
Copy link

I have 2 NS Panels (ordered more 6) and wondering the firmware I will use. Started by install the nspanel manager (its really great to manage multiple nspanels, but is very limited), flashed the nspanel lovelace and I will install this one today or tomorrow and test both side by side with media player.

@Doughboy68
Copy link

NSPanel Lovelace seemed nice looking but I did not like the performance vs. Blueprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For suggestions that add new features or improve existing functionalities.
Projects
None yet
Development

No branches or pull requests

4 participants