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

Support devices without getPlayerStatus(Ex) support #68

Open
anderscarling opened this issue Nov 25, 2024 · 6 comments
Open

Support devices without getPlayerStatus(Ex) support #68

anderscarling opened this issue Nov 25, 2024 · 6 comments

Comments

@anderscarling
Copy link
Contributor

Some linkplay devices (including recent Audio Pro devices like the "A10 MkII") does not support getPlayerStatus and getPlayerStatusEx.

linkplay_cli uses a UPNP based fallback to getPlayerStatus

I could investigate implementing something similar, but wanted to check if that's something that you feel is within the scope of the project before I put any work into it?

@silamon
Copy link
Contributor

silamon commented Nov 27, 2024

There are plenty of issues at the Home Assistant repository for this specific device in the linkplay integration.

I do wonder before going ahead with the upnp fallback if these devices work with certain companion apps and/or embedding a web applications where you can control these devices. We may be able to find out more about the differences this device has in comparison with the normal linkplay protocol.

@anderscarling
Copy link
Contributor Author

They do for sure work with Audio Pro and the "WiiM Home" (published by "LinkPlay Tech" in iOS App store) companion apps. No embedded web application.

From what I can tell the apps use upnp to query the speakers for what's being played, and LinkPlay HTTP api for instructions (at least for the multiroom configuration). It's a bit hard to figure out exactly what they do over linkplay though, due to the https encryption.

I've not gone through all the api calls in the acrylic http api documentation, but a random subset of playback (play/pause etc) control and multiroom control apis seems to be working. I've also tried some TCP UART APIs and result seems to be similar.

Could definitely do some more testing though, to make sure all other APIs used by python-linkplay are working.

@silamon
Copy link
Contributor

silamon commented Nov 28, 2024

I can't find any references to the getPlayerStatus(Ex) api command in the app either, so I'm open to have the uPnP added as a fallback. Let's try and fallback if the command cannot be found, similar to the linkplay-cli tooling, keep a boolean variable upnp_fallback so we don't query it every time. Since this is a linkplay library specificly, the result should be converted back to the dict structure already in place in the LinkPlayPlayer class.

@silamon
Copy link
Contributor

silamon commented Dec 2, 2024

There's more information and some outputs at home-assistant/core#126172

@anderscarling
Copy link
Contributor Author

Cool, I'll hopefully find some time to try to put an implementation together later this week.

@dnikles
Copy link

dnikles commented Dec 5, 2024

If or when upnp support gets added, would we be able to force that option for a player? The wiim mini currently crashes when polled by getPLayerStatusEx (usually happens to my device in less than 36 hours, other models of Wiim do not have this issue). Wiim support seems willing to address the issue from their side but in the meantime I'm using this integration https://github.com/onlyoneme/home-assistant-custom-components-wiim/tree/beta specifically for my wiim minis, which uses upnp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants