Create "Smart App" that can switch inputSource on my Samsung soundbar (HW-N950/N960)

Does this still work? Trying to utilize it with a HW-Q800B if possible?

I’d love to know how to use this on HW-Q950A Soundbar or similar. Local control of the soundbar would be amazing. Hate having to rely on an external SmartThings API.

Anyone figure it out? I tried firing off those test commands on ports 55001 or 56001 or 55000 against my Soundbar IP address but nothing happens. I also tried running nmap on the Soundbar to determine any other open ports. Then I tried the test commands on those open ports as well…but nothing happens :frowning:

I use a combination of Todd Austin’s edge bridge and web requestor to achieve this.

I then link various SmartThings API calls to automations, using Aqara cube.

Double tap it to toggle HDMI 1 and 2, Rotate to volume up and down. Flip it mute, and a few other things I don’t remember.

Could you give me a link to the"web requester" you’re referring to. I found the Edge Edge. Thanks!

Web requestor example entry to set HDMI 1 …

Web Request1:

post:http://[enter your edge bridge up address here]:8088/api/forward?url=https://api.smartthings.com/v1/devices/[long alphanumeric string for your device id of the soundbar]/commands]

Web Request 1 body:

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

Is a “Hub” required as well for this? Does a Hub need to be a physical device?

Edge drivers require a physical ST hub. Can be a v2/v3/Aeotec hub, Smart Station hub, Connect Home or Wi-Fi hub, or a Samsung Refrigerator or TV hub.

1 Like

Mmmm…I use Home Assistant. Is there a recommended ST Hub I can plug into Home Assistant?

A ST hub is not going to “plug into” a Home Assistant device. There are others in this community (such as @JDRoberts) who can comment more authoritatively than I about whether there is a way to bridge the two environments and if you would still be able to trigger soundbar input changes from HA over such a bridge. I’m skeptical at best…

No it doesn’t ‘plug into.’ Homeassistant uses a cloud integration (using the new SmartThings API) to connect to SmartThings.

There are integrations and methods in HA to have your homeassistant device send the web requests stated in the posts above natively without using SmartThings.

For instance, a shell command script that implements curl? If you can make that work - you could theoretically implement a whole template media player that sent the commands - and no I do not have the code - you will have to research the HomeAssistant community forums for the specific ways to make that work.

1 Like

As @h0ckeysk8er and @nathancu said, nothing simple. The following topic discusses some of the details of how people are integrating the two.

Smartthings to Home Assistant in 2023?

You shouldn’t need the Edge Bridge for this, because you’re communicating to a LAN device. Edge Bridge is strictly for non-LAN devices outside your network.

I previously was using the Web Requestor for this, but found it a bit cumbersome. Now, I use TAustin’s HTTP Device Creator, which allows me to have a button for each Input, eliminating the need for extra buttons / routines.

1 Like

I have calls go to the public SmartThings api, so needed it for that. I never tried going direct.

See THIS is what I’d want to do. DIRECT communication with the LAN Connected Soundbar. But I have no clue what the HTTP POST commands would be…everything I read sends commands to the external Samsung Smartthings API which then in turn commands the Soundbar.

I’m looking to for the commands which directly control the Soundbar locally. Any clues?

I cant seem to find it, but there used to be a site that listed most of the commands. The Input switch is ```

http://soundbarIP:56001/UIC?cmd=%3Cname%3ESetFunc%3C/name%3E%3Cp%20type=%22str%22%20name=%22function%22%20val=%22hdmi1%22/%3E%2050

Change HDMI to HDMI2, etc per button.

Ah shucks…ok. Yes, I tried those command already. I’m actually using a Samsung HW-Q950A Soundbar. I tried those commands on both port 56001 and 55001. It just gives a “connection refused” response :frowning:

Tried firing off the curl command from my computer. Or do these local command have to come from a “SmartHub” device??? They cannot just be simple curl commands from any local server/computer?

I use this without issue on a HW-Q950A, so it definitely works. I’m using @TAustin’s HTTP Device button Edge driver to send the HTTP PUSH Request to the soundbar to change the Inputs. Though I have done it also by putting the request into a browser address bar. Make sure you’re on the same subnet as your Soundbar.

Holy crap! It works. I had to power cycle the soundbar, for some reason it sucks with maintaining Wifi connection.

Do you know what the commands are for Volume or Power?

1 Like

I don’t believe you can volume up/down, but there is a way to set a specific volume number. There is a wealth of info and commands here:

1 Like