Closed lukx closed 5 years ago
Hi!
I would gladly accept a PR to add such functionality, the library used for discovery (https://github.com/flyte/upnpclient) provides a nice interface for SSDP calls, so considering you have already figured out the parameters it should be fairly easy to implement. There are also some features which use those (the library for sony bravia series seems to use the same protocol as this lib, a fact I noticed too late: https://github.com/aparraga/braviarc) and which could be interesting to add at some point, too.
One thing to consider is that finding out the SSDP endpoint requires either a parameter or a separate discovery round (which is currently avoided by having --endpoint
as a parameter), so it should be done only on demand. It probably also makes sense to have it in its own class (the device.py is already overblown and will have to be refactored at some point).
@lukx I just added some preliminary support to this (songpal group
command), please let me know if it's working for you! Unfortunately I don't know the format for adding multiple devices into a group, so more input here would be very welcome.
Same applies also for those other commands (Entry, Leave) which are probably used to add and remove single devices from an existing group.
Thank you. This is very exciting. I have 2x SRS-ZR5's and will try to test in the next week(s)
I just merged this in, please open new issues if you encounter any troubles :-)
Hey, as I would love to be able to group/ungroup my Sony Speakers using Home Assistant, I have done some investigation how the protocol works there. The Audio Control API doesn't support grouping/ungrouping (yet?), but instead it's a SOAP Request.
I can not judge whether or not @rytilahti would like to implement support for grouping or ungrouping, but here's what I know.
Setup
I have two speakers, "Küche" and "Wohnzimmer (WZ)". Küche runs at IP 192.168.178.77.
Getting Group Status
Request:
Response when not grouped
Response when grouped with the other Speaker
Grouping two speakers
By running the following request to the master Speaker (Küche), telling it to enslave Wohnzimmer.
Response:
Ungrouping
(i forgot to capture the response for this one)