Fix squeezelite power control#4829
Conversation
|
A few concerns about this player provider:
|
| "receiver", | ||
| "controller", | ||
| "boom", | ||
| "squeezeplay", |
There was a problem hiding this comment.
will rename the list and/or update comment on L70 after #4829 (comment) is answered
There was a problem hiding this comment.
this is a software player so it does not belong in this list
It was named this way previously but nobody understands what that means. We focus on software based (squeezelite) implementations so we named it that way accordingly.
Software players can also run other protocols (e.g. airplay on picoreplayer) so those should be marked as protocol only and we only use the player type for actual hardware players here.
We don't support power control for protocols at all and there is also no need. On squeezelite, we send a power ON when the stream starts and OFF when the stream stops. |
Should player be considered as PROTOCOL if it exposes only one protocol and has exactly one way to control the player(i.e. standalone squeezelite)?
Why not if player supports it and user want to? |
There is no way to define that. The only reliable way is hardware devices.
It is already supported today. We "power on" the protocol on playback start and off on playback stop. If you really want a power control to show up, assign a fake power control to the player but there should be no difference. |
There is though. I need to have ability to power on the player before playback started, or turn off later without hidden magic |
|
Ah ok now I understand the usecase. Let me think about it how to fix this properly. I'm assuming you have some sort of relay attached to the squeezelite power control? |
Right! I think we can add If you're OK with it, I'm up to implement it. |
|
Well, supporting power control on a protocol is VERY difficult as that is not how we designed the protocols support. So far the only device I have seen in the wild that supports squeezelite as protocol is a WiiM device. Let me run some tests if we can safely detect if a player is a WiiM device and then flip the whole logic: |
Okay, thanks. Waiting for updates from you. |
What does this implement/fix?
Fixed power attribute update in the squeezelite player provider.
Added "squeezeplay" to
PLAYER_DEVICE_TYPESto enable support for GPIO/script power control that squeezelite provides.Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.