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

Linkplay sound mode does not apply to WiiM (Pro at least) #140809

Closed
vingerha opened this issue Mar 17, 2025 · 10 comments · Fixed by #141098
Closed

Linkplay sound mode does not apply to WiiM (Pro at least) #140809

vingerha opened this issue Mar 17, 2025 · 10 comments · Fixed by #141098

Comments

@vingerha
Copy link
Contributor

The problem

The LinkPlay media player allows to select a few pre-defined sound-modes which do not work on WiiM devices, at least not to my WiiM Pro.
WiiM uses a api-command EQLoad which allows to set one of the following predefined-EQ
["Flat", "Acoustic", "Bass Booster", "Bass Reducer", "Classical", "Dance", "Deep", "Electronic",
"Hip-Hop", "Jazz", "Latin", "Loudness", "Lounge", "Piano", "Pop", "R&B", "Rock", "Small
Speakers", "Spoken Word", "Treble Booster", "Treble Reducer", "Vocal Booster"]

This is documented in their partially incorrect/incomplete API doc https://www.wiimhome.com/pdf/HTTP%20API%20for%20WiiM%20Products.pdf

Aside the missing option, the API itself does not even present a command to read the current EQ setting so by default it is not nice to implement, still I would prefer to select working sound-modes instead of non-working ones. :)

At present I am not even sure to what level WiiM is 100% LinkPlay and vv., if not then I can understand that the LinkPlay integration & lib may not support WiiM-proprietary 'commands'

What version of Home Assistant Core has the issue?

2025.3.x

What was the last working version of Home Assistant Core?

n.a.

What type of installation are you running?

Home Assistant Container

Integration causing the issue

linkplayS

Link to integration documentation on our website

https://www.home-assistant.io/integrations/linkplay/

Diagnostics information

by selecitng a sound-mode, the sound stays the same

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @Velleman, mind taking a look at this issue as it has been labeled with an integration (linkplay) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of linkplay can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign linkplay Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


linkplay documentation
linkplay source
(message by IssueLinks)

@silamon
Copy link
Contributor

silamon commented Mar 18, 2025

I'm open to pull requests to this one since I don't own any of these devices myself. The linkplay protocol is not really the same for every device but it follows the specifications for the majority of the part.

The eq field of the playerstatus presents the current status, perhaps that works as well for these custom ones.

The pull request should add support for the commands in the library. Since at this point they are specific to wiim, I would prefix them there. We also know the device, so it should be easy to determine if custom names can be used. The library is close to the home assistant api, so there's just a function to set in it a state and None is being used to turn it off. So the list of custom names should be prepended with None. When setting anything different than None, it should be turned on first according to the documentation.

At the home assistant integration a list is kept with specific devices so we can keep a list here of devices that support this.

@vingerha
Copy link
Contributor Author

vingerha commented Mar 18, 2025

EDITED:

Thanks for responding, I am OK to work on a PR but I fear that it would just be for (this?) WiiM, not even sure if the WiiM Amp or mini have the same settings... which makes me a bit cautious on spending time
The eq field in the playerstatus has a constant 0 regardless of the EQ being on/off or presetEQ chosen, so that is also its worth :)
As WiiM (forum) just 2 weeks ago mentioned to work on the API (doc only?) I think I will wait a bit, I left a message to improve on some endpoints and not sure if they will/have tackled that.

On a PR, I would first introduce this to the library then and make that work before adding things to the HA integration.

@silamon
Copy link
Contributor

silamon commented Mar 18, 2025

From the public documentation, it seems like the products of WiiM support this. The documentation for WiiM mini is here: https://www.wiimhome.com/pdf/HTTP%20API%20for%20WiiM%20Mini.pdf. I haven't found any other documentation that makes mention of this api calls, so it seems WiiM specific.

Yeah, support needs to be added to the library first. Feel free to ping me specific if you need help or opened a pr for review.

I will add the documentations I found to the list in the readme of the library since the community improved them over the official documentation.

@vingerha
Copy link
Contributor Author

vingerha commented Mar 18, 2025

Let's call it 'likely' possible ... if only the docs they have are reliable :)
e.g. setAlarmClock does not work (anymore?), neither does 'reboot' and I already found more endpoints than the doc mentions.
Anyhow, I will have a look at the linkplay library first then

@vingerha
Copy link
Contributor Author

@silamon I am ready to raise a PR to the librayr but to where should I do this? to master? Asking as I know there are many (!) different approaches to how devs organize their things
You can find the commit in my report on master Velleman/python-linkplay@main...vingerha:python-linkplay:main

I also have the HA part done but not happy about it (am not a real dev myself) ... can we have a side-chat e.g. on Discord? I am on discord also under 'vingerha'

@silamon
Copy link
Contributor

silamon commented Mar 18, 2025

I've sent you a message on discord. Master branch is fine. It's most of the times the default branch unless specified otherwise.

@vingerha
Copy link
Contributor Author

vingerha commented Mar 23, 2025

@thecode For closing requests/issues one should wait till it is deployed, atm the PR does not (!) work

@thecode
Copy link
Member

thecode commented Mar 23, 2025

@thecode For closing requests/issues one should wait till it is deployed, atm the PR does not (!) work

I think I know how GitHub work and I don't like the tone in your message. FYI issues are automatically closed using the name of the author who merged the linked PR when it is merged, I didn't do anything to close the issue.

The release cycle is not related to GitHub, for this one, it will be released on the next major release which is planned for 2-Apr.

@vingerha

This comment has been minimized.

@home-assistant home-assistant locked as too heated and limited conversation to collaborators Mar 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants