Soundbar HW-N850 Integration

I am trying to control the Soundbar via Smarthings API from my own Smarthome system with my own API implementation…

Using iPhones Smarthings App everythings works fine but it uses probably a Device Plugin.

Controlling a Series Q9 TV also works fine with my API implementation.

For the soundbar only the switch and refresh command works correct and I can get all capabilities as expected.

But the setVolume and setInputSource does not work. They deliver http Status OK but have no effect.

URL:

"https://api.smartthings.com/v1/devices/1b13a59d-ad52-4818-87a6-7d3d658a1ada/commands"

JSON payload for setVolume :

{"commands":[{"component":"main","capability":"audioVolume","command":"setVolume","arguments":[10]}]}

JSON payload for setInputSource :

{"commands":[{"component":"main","capability":"mediaInputSource","command":"setInputSource","arguments":["optical"]}]}

I hope somebody can help

Hi! Did you ever figure this out? I have an HW-N950 and the setVolume works just fine, however the setInputSource does not :frowning:

Here are my commands:

curl https://api.smartthings.com/v1/devices/secret/commands -H “Authorization: Bearer: token” -d ‘{“commands”:[{“component”:“main”,“capability”:“audioVolume”,“command”:“setVolume”,“arguments”:[10]}]}’

curl https://api.smartthings.com/v1/devices/secret/commands -H “Authorization: Bearer: token” -d ‘{“commands”:[{“component”:“main”,“capability”:“mediaInputSource”,“command”:“setInputSource”,“arguments”:[“HDMI2”]}]}’

(replace secret and token with device id and token)

Any help is greatly appreciated!

Same for me… setVolume, Switch etc work fine. setInputSource does not.
However, it works perfectly fine on a different soundbar (MS650)…

However the N950 always responds back in the log as having changed the input… while it actually doesnt…

Great… Can we report a bug so this can be fixed in the next firmware?

Also, what log are you referring to?

Dont know where to report it…
I mean the live logging tool on the Smartthings Website.

Actually… now i get an error… maybe we can use this to fix it…

This is what i get now:

 10:33:39 AM: error groovy.lang.MissingPropertyException: No such property: statusCode for class: physicalgraph.scheduling.AsyncResponse @line 241 (postOcfCommandHandler)
 
 10:33:29 AM: debug postOcfCommand(/oic/route/DEVICEID/sec/networkaudio/mode, [mode:HDMI])
 
 10:33:29 AM: debug Input Source is being set to HDMI

So the command gets recognized and interpreted by Smartthings, but then there is a problem with sending it to the Soundbar via OCF. However, also the AudioVolume does not work anymore today… only the switch (On/off)

Volume control still works fine for me on my HW-N950. It is just the input that doesn’t work.

Perhaps we can try to report this as a bug here: https://support.smartthings.com/hc/en-us/articles/200902450-How-to-contact-SmartThings-support. At the bottom there is also Email support available.

I have now access to an Q9F 2018 QLED Smart TV from Samsung. So I tried the same command for changing inputsource on this TV. This is the command used:

curl https://api.smartthings.com/v1/devices/xxxxx/commands -H “Authorization: Bearer: xxxxx” -d “{“commands”:[{“component”:“main”,“capability”:“mediaInputSource”,“command”:“setInputSource”,“arguments”:[“HDMI”]}]}”

And here is the result:

{“requestId”:“xxxxx”,“error”:{“code”:“ConstraintViolationError”,“target”:null,“message”:“The request is malformed.”,“details”:[{“code”:“NotValidValue”,“target”:"[0].capability",“message”:“mediaInputSource is not a valid value.”,“details”:}]}}

It looks line mediaInputSource is simply not an accepted capability???

When I query the Q9F device capabilities I get “switch”, “refresh”, “ocf” ?, “audioVolume”, “execute”, “tvChannel” but no "mediaInputSource". Clear that the command whil fail. The HW.N850 soundbars capabilities include “mediaInputSource”.

When I send this command to the soundbar I get “good” answer. But nothing happens.

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

I already reported the bug in november 2018, they informed me that they forwarded it to engineering in Korea.

1 Like