Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal - integration of sound mode, night mode etc. "switches" #68

Open
websterek opened this issue May 10, 2024 · 3 comments
Open

Proposal - integration of sound mode, night mode etc. "switches" #68

websterek opened this issue May 10, 2024 · 3 comments

Comments

@websterek
Copy link

Integration with current functions works flawlessly!
Sadly it's missing many options of the soundbar exposed by API like changing sound mode (ex. standard, game, adaptive) or "switches" (ex. night mode).

I found post on HA forum with fork adding this functionality, sadly it is not updated anymore. Maybe you could check that implementation and add some of it to your official one?

Here is a link: https://community.home-assistant.io/t/how-to-change-the-sound-mode-on-a-samsung-soundbar-solution/552430/7

@andrewjohnsson
Copy link

andrewjohnsson commented May 10, 2024

I hope I'll have enough time to create a PR to include these features, but currently I've just created a couple of REST commands in configuration.yml to toggle Night mode on and off:

  night_mode_on:
    url: !secret smartthings_soundbar_command_url
    method: post
    headers:
      authorization: !secret smartthings_pat_token
    content_type: "application/json"
    payload: '{
       "commands":[
          {
             "component":"main",
             "capability":"execute",
             "command":"execute",
             "arguments":[
                "/sec/networkaudio/advancedaudio",
                {
                    "x.com.samsung.networkaudio.nightmode": 1
                }
             ]
          }
       ]
    }'
  night_mode_off:
    url:  !secret smartthings_soundbar_command_url
    method: post
    headers:
      authorization: !secret smartthings_pat_token
    content_type: "application/json"
    payload: '{
       "commands":[
          {
             "component":"main",
             "capability":"execute",
             "command":"execute",
             "arguments":[
                "/sec/networkaudio/advancedaudio",
                {
                    "x.com.samsung.networkaudio.nightmode": 0
                }
             ]
          }
       ]
    }'

Secret values:

  • smartthings_pat_token should be "Bearer "
  • smartthings_soundbar_command_url should be
https://api.smartthings.com/v1/devices/<SOUNDBAR ID>/commands/"

P.S. the rest of the modes have following names:

  • "x.com.samsung.networkaudio.voiceamplifier"
  • "x.com.samsung.networkaudio.bassboost"

@andrewjohnsson
Copy link

sound mode can be changed by native HA service media_player.select_sound_mode
values are:

  • adaptive sound
  • surround
  • standard
  • game

@xSignificant
Copy link

xSignificant commented Jun 9, 2024

sound mode can be changed by native HA service media_player.select_sound_mode

values are:

  • adaptive sound

  • surround

  • standard

  • game

DTS Virtual:X is surround correct?

Can't seem to get it to switch to surround sound mode. value set as standard, game and adaptive sound works fine.

Maybe DTS Virtual:X uses a different value?

UPDATE: The value for DTS is "DTS Virtual:X" for the people that needs this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants