exiva / Vizio_SmartCast_API

API documentation for Vizio SmartCast TV's
173 stars 33 forks source link

More keycode uses come to light with recent update. #8

Open Brandon-Beck opened 6 years ago

Brandon-Beck commented 6 years ago

Here is what I have figured out so far in the last 2-3 days since I found your wonderful API documentation

DPAD

NAV

I got nothing after 17.

TRANSPORT

Everything after 10 for TRANSPORT returned URI NOT FOUND. not sure what other things between 0-10 are. Perhaps testing again with netflix instead of chromecast will reveal rewind/ff, audio lang, subtitle lang, sd/hq video or something. But I havn't setup the tv for that since the update. I always use chromecast.

On that note, I would assume ASCII will be useful for logging in. though I haven't looked into it yet.

there is also a '/oobe/currentstate', though I have no clue what oobe stands for, may be useless.

Still looking to see if I can pull any more use out of it. Hoping to at find a short 10 second rewind button like the app has on my phone, if that works from a non-casting device. I used this API and parts of pyvizio to write a alexa skill to control the tv. It only works for me since it requires a bridge on the same network as the tv. Probably won't publish it since Vizio plans on releasing an alexa app soon.

p.s. Thanks for documenting this! Our tv remote is lost in one of our 11 couches, and crunchyroll always steps the volume up/down by 7 which was always too loud or quiet. All my old frustrations fade away with Alexa, ask vizio to set the volume to 20

exiva commented 6 years ago

I assume most of these newly used controls are for the new Smartcast functionality?

Brandon-Beck commented 6 years ago

yes, for the new smart-tv interface. You can test the D-PAD on the new home screen, which you can get to with nav 15 or 16. The DPAD can also be used for navigating menus like the display settings panel. I discovered their uses by spamming the TV, you may be able to pull more by dissecting the app source.

Which reminds me, there is also a /menu_native/static which seems to shows you all possible values for T_LIST types. Could be used to dynamically create menus for tv settings, with dropdown options for T_LIST types containing only values that tv supports. Eg. /menu_native/static/tv_settings/audio/digital_audio_out

    "ITEMS": [
        {
            "TYPE": "T_LIST_V1",
            "CNAME": "digital_audio_out",
            "GROUP": "G_AUDIO",
            "NAME": "Digital Audio Out",
            "ELEMENTS": [
                "Auto",
                "PCM",
                "Dolby D",
                "Bitstream"
            ]
        }
    ]

/menu_native/dynamic/tv_settings/audio/digital_audio_out

    "ITEMS": [
        {
            "HASHVAL": 655175175,
            "CNAME": "digital_audio_out",
            "TYPE": "T_LIST_V1",
            "NAME": "Digital Audio Out",
            "VALUE": "PCM"
        }
    ]
jkantr commented 6 years ago

Sorry to barge into this thread, I think it's somewhat related?

So when they pushed the new smartcast on-screen stuff, they also sent me a free remote, the XRT136

I'm preeeeety sure it's not IR... and the remote has one-touch buttons for apps like Netflix and Hulu. Is it possible there are codes for these also? I use this documentation for an echo app, would love to get commands in to launch with voice ^_^

Brandon-Beck commented 6 years ago

@jkantr Note that the remote specs you linked state

Key Features
IR Front: Yes
IR Side: No
Bluetooth: No
WiFi Direct: No
Backlit: No
Qwerty Keyboard: No

You can test by covering the front of the remote with your hand and pushing buttons, but it probably is not wifi/bluetooth though. One touch access to Netflix is common across most vizio smart-tv models with their IR remotes. I have 1 with a keyboard, IR Front, and IR Side (the side IR allows you to hold the remote sideways while typing on the keyboard).

But I believe it is a planned feature that we will be able to exploit soon, if it isn't already implemented. The Launch Codeset seems promising, but I was unable to get anything to happen by spamming it with the normal Integer values of 0-50 when I tested. And there does not yet seem to be a way to launch Netflix from the android app directly, or at least it doesnt allow you to do so without Netflix installed on the phone.

jkantr commented 6 years ago

Ah I see, alright this all makes sense, thank you. Sorry I missed it in the specs.

Brandon-Beck commented 6 years ago

As a workaround, you could launch netflix by sending Nav 15, and then a few DPAD commands. Unfortunatly, DPAD doesn't seem to play well with keylist array, or rather, it ignores multiple DPAD commands until the TV starts the swipe animation, I think. So you can automate it, but you still have to look at the Home screen for a couple of seconds