New Official Integration: Samsung Multiroom Audio

Hrmm I think i need to wireshark making a group and see what Samsung does, then make my own send to IP command to see if it works.

Thanks for the code

1 Like

Apparently, this is how these commands were found, and I’ve installed it too, for when I can spare some time :wink:

I am not sure if anyone has figured how the group calls should be but I think I finally did. I read through a lot of documents and went through a lot of code and I seem to have figured it out. Here are 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. It then sends a specific master call 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 slave call to each speaker that is part of the group and provides 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.

Good Luck

1 Like

I gave up on direct SHM and went back to BigTalker. Since Samsung audio app does not have a " stop", only a pause, even if music was not playing SHM ( when it actually worked) would turn up the volume to 75 ( as I set it) for announcement and then restart the last music at 75% volume. Even if that music had been played days ago. Big Talker does not do that, it only resumes if music was actually playing when it paused it for the announcement.

Right now I am trying to decide whether or not adding Samsung speakers is why I have been having so many WiFi issues. I am to the point of adding another WiFi router just for the speakers and just hooking up 1 ( or 2 ) of my control panels on the same SSID to control them. Since if the app only works if on the same network.

Hi @terr,

This is great information! Many thanks for this.
Once you have the encoded commands, is there any knack to sending them? Or are you suing cURL to send in a batch file?

Many thanks
Roy

Right now I am only using Postman to test the commands but I plan on making an Alexa intent that allows me to group speakers when I speak it. I will call Samsung to group and Spotify Connect to play music on that group.

Postman is a Chrome browser extension that lets you send HTTP messages and set header data. https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en

I guess you must have the “knack”, no matter what I try I’m not getting them linked. Yet get responses stating OK. At a loss.

Can you post the two commands your sending? What speakers are you using?

How do you connect these to smartthings please?

Open app, my home, things, scroll to bottom click add new things, add manually, speakers, Samsung multi room.speakers, wait

Thankyou @RLDreams me being a typical noob there.

It’s not picking mine up

For anyone struggling to turn their speakers off after playing music, I created a piston in WebCoRE to use “speak text and resume”. As we all know, they don’t resume. So now I use a virtual switch and a piston to speak “speaker now off”. Works a treat :wink:

1 Like

Very interesting!!

I apologize if this isn’t the appropriate thread, but I did a search and came up with nothing.

I need to find out if the Samsung HW-KM45C Soundbar is supported by Smartthings? Can you tell me, or direct me to where I should be asking?

Thank you.

If you open your ST app, click on things, add a new thing, add manually, speakers you can see the list of officially supported devices.

1 Like

Thanks for the info in this thread. I added my R1 and with the combination of Routines, WebCoRE, curl/JSON I am able to start, stop, play, pause, volume up and down my R1 with Hub and Google Home. Exploring more now.

1 Like

Roy, Do you mind sharing your WebCoRE code to “speak text and resume”. This has stopped me from using voice notifications for so long.

Thanks

Sure, here you go. This tells me if any things open when running goodnight routine.

1 Like

Thanks Roy.

I wanted to clarify my issue before I install this. I have a Samsung Soundbar HW750. When I have an alert sent to it it changes it’s mode the ‘Wifi’. And for some annoying reason Alexa can’t change it back to “TV Connect”.

Will this speak and resume solve that?