rytilahti / python-songpal

Python library for interfacing with Sony's Songpal devices
GNU General Public License v3.0
63 stars 24 forks source link

Learnings about Group - Memory #78

Open maximoei opened 4 years ago

maximoei commented 4 years ago

Done some further digging into the different group functions. Since latest PRs, now have confirmed that following are working in my set up (XT-2 + X-88 + X-77)

Not working

Furthermore; the GetAllGroupMemory works, and returns the last five groups in XML embedded Json: Memory: {'GroupMemory': '<?xml version="1.0"?>\n<groupMemoryList>\n <groupMemory>\n <MemoryID>7</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Test</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9,uuid:00000000-0000-1010-8000-ac9b0a300c02</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>6</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Link</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>5</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Gekoppeld</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>4</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Group</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9,uuid:00000000-0000-1010-8000-ac9b0a300c02</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>3</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Group</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n</groupMemoryList>\n'} Don't know how to apply the other Memory related functions; would expect a StartM based on group id to recreate a group, but that doesn't exist.

Anyway, latest changes are already useful. @rytilahti , can a new release be created? I'm working on building support into HomeAssistant to create/abort groups.

rytilahti commented 4 years ago

Okay, let's keep this issue open in case something new comes up, it could be that those commands take the parameter in somehow, but the service description file just doesn't list all the parameters. One way to find out would be to see if the mobile app provides this functionality and do a packet capture to see what is happening.

I'll prepare a new release this week, btw, you are likely interested in https://github.com/home-assistant/architecture/issues/364 for homeassistant. Also related #49.

osk666neo666 commented 3 years ago

Is it able to create a group with the device not supporting wireless surround? like st5000. If not, is it able to add this to support list by myself using the audio api? Willing to make group with st5000 and 2 zr5. thx

rytilahti commented 3 years ago

@osk666neo666 check the output of songpal discover, if the relevant devices are listing urn:schemas-sony-com:service:Group:1 in the supported services, it may be doable.