smarthome icon indicating copy to clipboard operation
smarthome copied to clipboard

[core] Feature request: Player Item type should handle Stop command

Open cweitkamp opened this issue 6 years ago • 5 comments

Continuing discussion from https://github.com/eclipse/smarthome/issues/3756#issuecomment-391665084

  • system.stop is not really clear to me and why for all media related stop operations the Player type doesn't cover this already. Anyhow, this is in general a "command only" / "stateless" channel, so I don't think this is appropriate as a system channel.

why for all media related stop operations the Player type doesn't cover this already

Most of the UIs render the Player item without a Stop-Button. Sending a command to that item leads to a warning in the logs (see https://community.openhab.org/t/open-tv-channel-in-xbmc-kodi/17330/18). I wondered about the dedicated stop channels for each binding too and found this #2741 (comment) . Shall we open a new issue for this to discuss it?

Valid data types are: ( PlayPauseType RewindFastforwardType UnDefType )

Paper UI player_paperui

Basic UI player_basicui

Regarding the stop channel, I would suggest to leave it out for now and discuss it in a separate issue since @kaikreuzer seems to also have changed its mind since #2741 (comment) so maybe its worth discussing this again.

cweitkamp avatar Jun 09 '18 07:06 cweitkamp

since @kaikreuzer seems to also have changed its mind since #2741 (comment)

Have I? Can you elaborate @triller-telekom why you think so and what has changed since my comment on #2741?

kaikreuzer avatar Jun 09 '18 09:06 kaikreuzer

@kaikreuzer What I was referring to is your https://github.com/eclipse/smarthome/issues/2741#issuecomment-271607692 where you say that "it (the binding) should implement a dedicated channel". So from this comment I understand that you like bindings to have an additional "stop" channel next to the player controls.

And in https://github.com/eclipse/smarthome/issues/3756#issuecomment-390466773 you write that "system.stop is not really clear to me and why for all media related stop operations the Player type doesn't cover this already", so you do not recommend it as a (system) channel.

So I am not sure whether you would like to integrate the "stop" into the player or leave it as a separate channel.

triller-telekom avatar Jun 11 '18 10:06 triller-telekom

Ok, so my https://github.com/eclipse/smarthome/issues/3756#issuecomment-390466773 was probably misleading then, sorry. I still don't really see that we should add a STOP command to the Player item. What all players have in common is a "stop playing the current media", which is addressed by the PAUSE command. A STOP instead can have many different outcomes (some devices turn themselves off, some reset a playlist, some just do the very same as pause, and so on), so thinking about a state transition diagram, I wouldn't really be able to say where stop should end up. To me, stop is rather the opposite to "select a playlist/station/song/stream" and thus should equally be its own channel.

kaikreuzer avatar Jun 11 '18 15:06 kaikreuzer

@kaikreuzer Like this it is causing lots of issues, triggering based on stop is difficult and causing issues right now (differentiate between stop and pause here, Kodi switches to paused and turns on the stop channel then, if the rule fires to fast it won't catch that). Stop is a perfectly valid state a player could be in. All classic CD Players have a stop button that causes it to reset, all DVD Players have it and all Software players have it. I agree that for some devices its not needed as they don't handle it properly but it's the same with not all Rollershutters/Garagedoors supporting stop commands, still it is there. For player's stop it could simply be mapped to pause if stopping is not an option, but I think for most devices it is (and Alexa supports it aswell as part of it's playback controller, so it can't be that uncommon). If in a sitemap it's somehow possible to limit what's shown (like for example if stop is not supported simply don't show it, or on a garage door if stop is not supported don't show it)

Flole998 avatar Feb 11 '19 04:02 Flole998

I've made a List that shows how many items use a dedicated stop channel and would benefit from this implementation. I hope it's complete (or at least close to complete). It's clearly visible that (assuming my list is complete-ish) many items would benefit from this channel so please re-consider this feature request (please also take into consideration the problem I mentioned above).

Stop No Stop
Allplay Spotify
AmazonEchoControl Rotel
Chromecast  
Squeezebox  
Onkyo  
Sonos  
Kodi

If I missed an item in my list feel free to tell me so I can edit the list.

Flole998 avatar Nov 25 '19 00:11 Flole998