HTTP Group Calls for WAM3 and WAM1 Connected Speakers

I wanted the ability to create speaker groups without opening up the app but by using Alexa. I want to be able to say “Alexa ask Samsung to create groupone with the kitchen and livingroom speakers” then have an Alexa intent do it for me. I then want to tell Alexa to use this group “Alexa ask Spotify to play my playlist on groupone”. I don’t have a smartthings hub and not sure if it can be done with that but since I don’t have it I am going to use Alexa and Home Assitant. To be able to do that I needed to figure out how the HTTP Group calls to the speakers worked. Here is my findings:

  1. The way it works, as far as I can see, is that when you create a group you assign one of the speakers as the master (from the code it looks like it picks the one that was first selected to be part of the group)
  2. You sends a specific call to a speaker to let it know it’s the master, the name of the group, and the slave speakers IP addresses and mac addresses.
  3. It then sends a specific call to each slave speaker that is part of the group and provide the masters IP address and mac address.

Here are the calls that go out to my speakers. I am using two speakers. The master is the “Kitchen” speaker with an IP address of 1.2.3.4 and a MAC address of 01:02:03:04:05:06. The slave is the “Boysroom” speaker with an IP address of 9.8.7.6 and a MAC address of 11:22:33:44:55:66.

Sorry about the encoding of the URL but that was the only way to have it post in this forum. To decode go to the following tool. It helped me. http://www.url-encode-decode.com/

First, call the master speaker with the all the info about the group:
http%3A%2F%2F1.2.3.4%3A55001%2FUIC%3Fcmd%3D%3Cpwron%3Eon%3C%2Fpwron%3E%3Cname%3ESetMultispkGroup%3C%2Fname%3E%0D%0A%3Cp+type%3D%22cdata%22+name%3D%22name%22+val%3D%22empty%22%3E%3C%21%5BCDATA%5BKitchen+%2B+Boysroom%5D%5D%3E%3C%2Fp%3E%0D%0A%3Cp+type%3D%22dec%22+name%3D%22index%22+val%3D%221%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22type%22+val%3D%22main%22%2F%3E%0D%0A%3Cp+type%3D%22dec%22+name%3D%22spknum%22+val%3D%222%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22audiosourcemacaddr%22+val%3D%2201%3A02%3A03%3A04%3A05%3A06%22%2F%3E%0D%0A%3Cp+type%3D%22cdata%22+name%3D%22audiosourcename%22+val%3D%22empty%22%3E%3C%21%5BCDATA%5BKitchen%5D%5D%3E%3C%2Fp%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22audiosourcetype%22+val%3D%22speaker%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22subspkip%22+val%3D%229.8.7.6%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22subspkmacaddr%22+val%3D%2211%3A22%3A33%3A44%3A55%3A66%22%2F%3E

Then call the slave speaker
http%3A%2F%2F9.8.7.6%3A55001%2FUIC%3Fcmd%3D%3Cpwron%3Eon%3C%2Fpwron%3E%3Cname%3ESetMultispkGroup%3C%2Fname%3E%0D%0A%3Cp+type%3D%22cdata%22+name%3D%22name%22+val%3D%22empty%22%3E%3C%21%5BCDATA%5BKitchen+%2B+Boysroom%5D%5D%3E%3C%2Fp%3E%0D%0A%3Cp+type%3D%22dec%22+name%3D%22index%22+val%3D%221%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22type%22+val%3D%22sub%22%2F%3E%0D%0A%3Cp+type%3D%22dec%22+name%3D%22spknum%22+val%3D%222%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22mainspkip%22+val%3D%221.2.3.4%22%2F%3E%0D%0A%3Cp+type%3D%22str%22+name%3D%22mainspkmacaddr%22+val%3D%2201%3A02%3A03%3A04%3A05%3A06%22%2F%3E

Keep in mind for the master call:

  1. Name can be anything string you want and is set in the CDATA
  2. I found index 1 always works (not sure what its for though)
  3. Type is “main”
  4. spknum is the number of speakers in the group including the master

Keep in mind for the slave call:

  1. Name matches what was sent to the master
  2. Index is 1, same as master
  3. Type is “sub”
  4. spknum is the number of speakers in the group including the master. Same as master.

I hope this helps someone else.