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

How come the SmartThings app can read and set the Sound Mode of my soundbar (Standard/Surround/Game/Adaptive), but the SmartThings API does not expose the value or capability to set it.

More importantly; how can I achieve control over the Sound Mode of my soundbar?
Is it somehow a local network call from the app?

components:
  - id: main
    label: main
    capabilities:
      - id: ocf
        version: 1
      - id: execute
        version: 1
      - id: refresh
        version: 1
      - id: switch
        version: 1
      - id: audioVolume
        version: 1
      - id: audioMute
        version: 1
      - id: audioTrackData
        version: 1
      - id: mediaInputSource
        version: 1
      - id: mediaPlayback
        version: 1
      - id: audioNotification
        version: 1
      - id: samsungvd.soundFrom
        version: 1
      - id: samsungvd.groupInfo
        version: 1
    categories:
      - name: NetworkAudio
        categoryType: manufacturer

Hi, @proza!

OCF devices like the soundbar work at a plugin level (app) instead of an API level. This means the communication is ST App <> Physical device.

In this post (more details section), I included some info about how these devices work:

There are other devices in the same situation, like Air Conditioners. That’s why I previously created a report to get more info about this but the team hasn’t replied yet.

I pinged the team again and mentioned your case, I’ll keep you updated.

1 Like

Just today I started messing with the API, in order to get that and only that information: my soundbar’s (HW-Q90R) current sound mode.

I was planning to write a small automation that would alert me if I would start watching something, and the mode wouldn’t be “Standard”.

Similarly, it would alert me if I was listening to music and mode wouldn’t be “Adaptive”.

Very unfortunate that this information cannot be exposed…

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!