Vizio_SmartCast_API icon indicating copy to clipboard operation
Vizio_SmartCast_API copied to clipboard

Vizio SoundBar API

Open trevorharwell opened this issue 6 years ago • 8 comments

I have been experimenting with using this for the Vizio SoundBar. It seems that a lot of the same APIs exist but I cannot figure out how to get access to the full list. I don't have a way to decompile the app but if someone could post the URLs that would be incredibly helpful! (@shafeey)

trevorharwell avatar Nov 28 '18 21:11 trevorharwell

I would like to know this as well. Any updates?

LuckyStyle avatar Jan 02 '19 14:01 LuckyStyle

Apologies, I somehow skipped the notification. I've attached a decompiled source of the SmartCast apk in case you want to take a better look. the "com\vizio\vue\devicecontrol\api" path may be a good starting point to look into. In particular, VZRestEndpoint.class contains all the text strings required to construct the query URL. You can look into the content here.

Soundbar control in the app has only a few settings compared to the TV. you can replace "tv_settings" by "audio_settings" in the query to make it work for anything supported in the soundbar. However, I had trouble setting the volume directly by a value. Any value greater than 18 doesn't work. You can set the volume to anything by sending remote keypress events, or set the volume to a value < 18. Couldn't figure out what causes this.

Hope you can figure out what you are looking for.

VizioSmartCast_Decompiled.zip

shafeey avatar Jan 03 '19 20:01 shafeey

That's exactly what I needed! Thanks!!!

API INPUT URLS: Get currently selected input: GET /menu_native/dynamic/audio_settings/input/current_input

Get list of inputs: GET /menu_native/dynamic/audio_settings/input

Change Input: PUT /menu_native/dynamic/audio_settings/input/current_input

LuckyStyle avatar Jan 03 '19 22:01 LuckyStyle

Changing the volume directly is not working at all for me. It returns a success response, but it doesnt actually make the change. Any Ideas?

Using: /menu_native/dynamic/audio_settings/audio/volume

{"REQUEST": "MODIFY","VALUE": 10,"HASHVAL": hashval}

LuckyStyle avatar Jan 05 '19 17:01 LuckyStyle

Have you managed to figure out what key press values to use? I'm attempting to build a modified https://github.com/vkorn/pyvizio to support SoundBars. Here's the keymap I've put together so far to replace https://github.com/vkorn/pyvizio/blob/master/pyvizio/protocol.py#L58-L69

    VOL_DOWN = (5, 0)
    VOL_UP = (5, 1)
    MUTE_OFF = (5, 2)
    MUTE_ON = (5, 3)
    MUTE_TOGGLE = (5, 4)
    INPUT_NEXT = (7, 1)
    CH_DOWN = (8, 0)
    CH_UP = (8, 1)
    CH_PREV = (8, 2)
    POW_OFF = (11, 0)
    POW_ON = (11, 1)
    POW_TOGGLE = (11, 2)
    DOWN = (3, 0)
    LEFT = (3, 1)
    RIGHT = (3, 7)
    UP = (3, 3)
    OK = (3, 2)
    BACK = (4, 0)
    MENU = (4, 8)
    PLAY = (2, 3)
    PAUSE = (2, 2)
    SKIP_FWD = (2, 0)
    SKIP_BACK = (2, 1)

I have yet to test it

raman325 avatar Mar 05 '19 05:03 raman325

So it seems that some of the keys work for Sound Bars (listed below), but I still cannot figure out how to emulate the button to change inputs or to go to the next track or previous track even though I see those buttons on my remote. I've tried various tuples, including the options in my list above that are not included below, without success.

    VOL_DOWN = (5, 0)
    VOL_UP = (5, 1)
    MUTE_OFF = (5, 2)
    MUTE_ON = (5, 3)
    MUTE_TOGGLE = (5, 4)
    POW_OFF = (11, 0)
    POW_ON = (11, 1)
    POW_TOGGLE = (11, 2)
    PLAY = (2, 3)
    PAUSE = (2, 2)

raman325 avatar Mar 07 '19 03:03 raman325

Old thread that pointed me in the right direction. Was able to modify the volume value. Still can't figure out how to properly send PUT requests for the keypress function. Any help would be appreciated.

Uk0kA avatar Dec 29 '19 15:12 Uk0kA

~@Uk0kA can you link to the thread?~

Regarding your question, the curl command is here: https://github.com/exiva/Vizio_SmartCast_API#send-remote-control-button-press

You need to refer to the Appendix for the appropriate Codeset and Code, and the Action is "KEYPRESS"

EDIT: Nevermind about the question, I was being dumb when testing this

raman325 avatar Feb 01 '20 22:02 raman325