HW-Q990B/Q995B: The app can control the sound mode, but I cannot find it in Smart Things capabilities

I have an HW-Q950 and am surprised at the lack of things able to be done within the SmartThings app for a Samsung product. I would like to be able to change the Soundbar Input based on a Routine or Scene, such as “Watch TV” changes to HDMI1, “Play XBox” to HDMI2, etc. Routines currently only have the ability to turn the soundbar On/Off and control Volume.

I found a way to set the soundmode via API, use this command:

{
   "commands":[
      {
         "component":"main",
         "capability":"execute",
         "command":"execute",
         "arguments":[
            "/sec/networkaudio/soundmode",
            {
               "x.com.samsung.networkaudio.soundmode":"standard"
            }
         ]
      }
   ]
}

No way?
how did you do find it out!?
Packet capture? Did you find anything else interesting?

I installed an application called OCF Device Spy. With that I was able to receive a JSON of all the “hidden” OCF capabilities. I haven’t yet found out how to find the possible arguments though. The argument standard I am using was just a lucky guess :sweat_smile:

I have uploaded the json here: soundbar_ocf.json - Google Drive

If you find a way to see possible arguments let me know :slight_smile:

1 Like

If anyone is able to find out which of these capabilities is used to set “night mode” and with which arguments, let me know!

Me again - I found a way to see all possible arguments and also check the current status of each capability listed in the json I posted.

I explain it with the example capability x.com.samsung.networkaudio.advancedaudio:
First you have to call https://api.smartthings.com/v1/devices/DEVICE-ID/commands with this payload:

{
   "commands":[
      {
         "component":"main",
         "capability":"execute",
         "command":"execute",
         "arguments":[
            "/sec/networkaudio/advancedaudio"
         ]
      }
   ]
}

It is important that the arguments array only contains the href value of the capability (see my json) and no other arguments like in my previous post.

After this call was successful you then call https://api.smartthings.com/v1/devices/DEVICE-ID/components/main/capabilities/execute/status, which will show you the current status, as well as possible arguments for that capability, like so:

{
    "data": {
        "value": {
            "payload": {
                "rt": ["x.com.samsung.networkaudio.advancedaudio"],
                "if": ["oic.if.rw", "oic.if.baseline"],
                "x.com.samsung.networkaudio.voiceamplifier": 1,
                "x.com.samsung.networkaudio.bassboost": 0,
                "x.com.samsung.networkaudio.nightmode": 0
            }
        },
        "data": {
            "href": "/sec/networkaudio/advancedaudio"
        },
        "timestamp": "2022-12-08T14:10:05.796Z"
    }
}

And final small tip: Using a tool called SharpTools I’m now able to automatically switch my sound mode to Standard after each time the Input source changed on my TV and automatically enable/disable night mode.

Finally after 3 days of trial and error I can start enjoying my new setup :slight_smile:

I hope my findings are useful for you aswell. Have a great day!

2 Likes

@S3basuchian excellent work, nice findings!

However, the call to change the sound mode does not actually change it for me, nothing happens. Other calls do trigger correctly, eg subwoofer volume. Reminder that I have a HW-Q90R.

I believe that it may not be possible to change something that cannot currently be changed via the smartthings app either. My HW-Q90R cannot have the sound mode changed via the app, so… I think i’m back to square one. Do other newer models support the change via the app?

Nice work regardless :slight_smile:

Hi,
Yeah I have a Q800b and the Smartthings app allows me to change the soundmode and the call also works for me. Sorry I’m afraid your right and if the Smartthings app doesn’t let you change the soundmode it might not be possible. I could be wrong tho, I only have experience with my Q800b

I made a small little service so that you can send a simple GET request, for instance with homebridge/hoobs, and control the soundbar soundmode.

I’ll also be looking into switching based on input. May start with polling Samsung TV, or using homebridge with smartthings and lg thinq for both rooms, and homekit automations

Hi, guys

Sorry for the late response. I talked to the team about this and the answer was the following. There is a reason there are some capabilities that are not listed in the Capabilities Reference. Those are capabilities that were made for a specific purpose and may suffer changes, or may not work for every integration due to several reasons. To say this in words we all understand, these are custom capabilities, just as any other you can find in this Community, with the only peculiarity that were created by SmartThings. That is the reason why they are not listed, and that is the reason why we can’t support those capabilities, since they may not work always as expected.

Hi there
I’m trying to implement this in tasker for my Q800b soundbar

Do you know what the syntax would for the http request body?

The following works to set the volume level to a parameter

{“commands”: [{“component”:“main”,“capability”: “audioVolume”,“command”: “setVolume”,“arguments”: [%volumeLevel]}]}

Thanks

Hi,
you mean to change the soundmode?
Try this:

{
   "commands":[
      {
         "component":"main",
         "capability":"execute",
         "command":"execute",
         "arguments":[
            "/sec/networkaudio/soundmode",
            {
               "x.com.samsung.networkaudio.soundmode":"standard"
            }
         ]
      }
   ]
}

Just replace “standard” with your desired soundmode

1 Like

Hi Sebastian

Thanks for the swift reply. Tried it and works great.

Would you also now how to turn nightmode on?

Thanks

Sure, should be this one:

{"commands":[{"component":"main","capability":"execute","command":"execute","arguments":["/sec/networkaudio/advancedaudio",{"x.com.samsung.networkaudio.nightmode":1}]}]}

1 is for on, 0 for off

1 Like

Thanks again that’s perfect

Hey, can you share the full Tasker action details you used? I’d love to control my Soundbar with Tasker.
Like the URL and where to put your smartthings token and everything.
Thanks!

Here you go:

Task: St Soundbar Adaptive

A1: Variable Set [
     Name: %deviceId
     To: ########-####-####-####-#######
     Max Rounding Digits: 3
     Structure Output (JSON, etc): On ]

A2: HTTP Request [
     Method: POST
     URL: https://api.smartthings.com/v1/devices/%deviceId/commands
     Headers: Authorization: Bearer %Bearer
     Content-Type: application/json
     Body: {
        "commands":[
           {
              "component":"main",
              "capability":"execute",
              "command":"execute",
              "arguments":[
                 "/sec/networkaudio/soundmode",
                 {
                    "x.com.samsung.networkaudio.soundmode":"adaptive sound"
                 }
              ]
           }
        ]
     }
     Timeout (Seconds): 30
     Structure Output (JSON, etc): On ]

A3: Flash [
     Text: %http_response_code
    
     Continue Task Immediately: On
     Dismiss On Click: On ]
1 Like

Hi all back again

Anyone know the code to switch the soundfrom value?

Eg. From external device HDMI to this phone bluetooth

Thanks

If anyone is interested this is the code to switch source to HDMI

{“commands”:[{“component”:“main”,“capability”:“mediaInputSource”,“command”:“setInputSource”,“arguments”:[“HDMI1”]}]}