-
API Server runs on port
9000using https. Will not respond to http.Don't port forward it. There are some commands that can be executed without authentication.
-
Certificate's CN is
BG2.prod.vizio.comso will likely fail SSL validation. -
API includes a
Statusobject,URIrequested, and Executiontimeon every response. It's included below, but excluded in all of the examples for redundancy.{ ... "STATUS": { "RESULT": String, "DETAIL": String }, "URI": String, "TIME": String }API does not seem to be fully restful, and doesn't apply proper status codes in responses. Verify request's result from the
statusobject. Result codes included where applicable. -
All requests made should contain a JSON body with the header
Content-Type: application/jsonset. -
When authentication is required, send
Auth: AUTH_TOKENheader with request. -
This does not cover any MyVizio Account APIs.
-
See an issue? Have a question? Open an issue, or find me on twitter @exiva
Perform an SSDP query for ST: urn:schemas-kinoma-com:device:shell:1
####Example
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:schemas-kinoma-com:device:shell:1
required to control set.
PUT /pairing/start
{
"DEVICE_NAME": String,
"DEVICE_ID": String
}
{
"ITEM": {
"PAIRING_REQ_TOKEN": Integer,
"CHALLENGE_TYPE": Integer
},
...
}
curl -k -H "Content-Type: application/json" -X PUT -d '{"DEVICE_ID":"12345","DEVICE_NAME":"cURL Example"}' https://myVizioTV:9000/pairing/start
Save DEVICE_ID, you'll need it for the challenge.
PUT /pairing/pair
{
"DEVICE_ID": String,
"CHALLENGE_TYPE": Integer,
"RESPONSE_VALUE": Integer,
"PAIRING_REQ_TOKEN": Integer
}
{
"ITEM": {
"AUTH_TOKEN": String
},
...
}
curl -k -H "Content-Type: application/json" -X PUT -d '{"DEVICE_ID": "12345","CHALLENGE_TYPE": 1,"RESPONSE_VALUE": "1234","PAIRING_REQ_TOKEN": 0}' https://myVizioTV:9000/pairing/pair
RESPONSE_VALUE key is the code displayed on the TV.
PUT /pairing/cancel
{
"DEVICE_NAME": String,
"DEVICE_ID": String
}
{
"ITEM": {},
...
}
curl -k -H "Content-Type: application/json" -X PUT -d '{"DEVICE_ID":"12345","DEVICE_NAME":"cURL"}' https://myVizioTV:9000/pairing/cancel
####Status Results
| RESULT | Meaning |
|---|---|
| INVALID_PARAMETER | Malformed Request |
| MAX_CHALLENGES_EXCEEDED | Too many failed pair attempts |
| SUCCESS | Successfully Paired |
| PAIRING_DENIED | Incorrect Pin |
| VALUE_OUT_OF_RANGE | Pin out of range |
| CHALLENGE_INCORRECT | Incorrect challenge |
| BLOCKED | Pairing in progress already |
The HTTP API server turns off when the set is sleeping. Send a WoL magic packet to turn it on. not supported when set runs in Eco mode.
Authenticated
PUT /key_command/
####Body
{
"KEYLIST": [{
"CODESET": Integer,
"CODE": Integer,
"ACTION": String
}]
}
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X PUT -d '{"KEYLIST": [{"CODESET": 5,"CODE": 0,"ACTION":"KEYPRESS"}]}' https://myVizioTV:9000/key_command/
You can string together long remote actions by adding to the keylist array.
| Action |
|---|
| KEYDOWN |
| KEYUP |
| KEYPRESS |
| Event Name | Codeset | Code |
|---|---|---|
| Volume Down | 5 | 0 |
| Volume Up | 5 | 1 |
| Mute Off | 5 | 2 |
| Mute On | 5 | 3 |
| Mute Toggle | 5 | 4 |
| Cycle Input | 7 | 1 |
| Channel Down | 8 | 0 |
| Channel Up | 8 | 1 |
| Previous Ch | 8 | 2 |
| Power Off | 11 | 0 |
| Power On | 11 | 1 |
| Power Toggle | 11 | 2 |
Authenticated
GET /menu_native/dynamic/tv_settings/devices/current_input
{
"ITEMS": [{
"NAME": String,
"CNAME": String,
"TYPE": String,
"VALUE": String,
"ENABLED": Boolean,
"HASHVAL": Integer
}],
"NAME": String,
"HASHLIST": Array,
"GROUP": String,
"PARAMETERS": {
"HASHONLY": String,
"FLAT": String,
"HELPTEXT": String
},
...
}
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X GET https://myVizioTV:9000/menu_native/dynamic/tv_settings/devices/current_input
Authenticated
GET /menu_native/dynamic/tv_settings/devices/name_input
{
"ITEMS": [{
"NAME": String,
"CNAME": String,
"TYPE": String,
"VALUE": {
"NAME": String,
"METADATA": String
},
"ENABLED": Boolean,
"HASHVAL": Integer
},
...
],
"NAME": String,
"HASHLIST": Array,
"GROUP": String,
"PARAMETERS": {
"HASHONLY": String,
"FLAT": String,
"HELPTEXT": String
},
...
}
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X GET https://myVizioTV:9000/menu_native/dynamic/tv_settings/devices/name_input
Authenticated
PUT /menu_native/dynamic/tv_settings/devices/current_input
{
"REQUEST": "MODIFY",
"VALUE": String,
"HASHVAL": Integer
}
PUT current_input |
From name_input |
|---|---|
| VALUE | ITEMS[x].NAME |
| HASHVAL | ITEMS[x].HASHVAL |
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X PUT -d '{"REQUEST": "MODIFY","VALUE": "HDMI-1","HASHVAL": 1384176329}' https://myVizioTV:9000/menu_native/dynamic/tv_settings/devices/current_input
Authenticated
GET /menu_native/dynamic/tv_settings/SETTINGS_CNAME
(See Settings CNAMEs for SETTINGS_CNAME values)
{
"ITEMS": [{
"NAME": String,
"CNAME": String,
"TYPE": String,
"VALUE": String,
"ENABLED": Boolean,
"HASHVAL": Int,
"ELEMENTS": Array
},
...
],
"NAME": String,
"HASHLIST": Array,
"GROUP": String,
"PARAMETERS": {
"HASHONLY": String,
"FLAT": String,
"HELPTEXT": String
},
...
}
ELEMENTS array is conditional.
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X GET https://myVizioTV:9000/menu_native/dynamic/tv_settings/picture
Authenticated
Warning Writing an invalid value may have the potential to brick sets. Use the TYPE key from SETTINGS_CNAME ITEMS array to determine the data type to write.
PUT /menu_native/dynamic/tv_settings/SETTINGS_CNAME/ITEMS_CNAME
{
"REQUEST": "MODIFY",
"HASHVAL": Integer,
"VALUE": String/Integer/Boolean
}
Obtain ITEMS_CNAME and HASHVAL values from the SETTINGS_CNAME ITEMS array.
curl -k -H "Content-Type: application/json" -H "AUTH: 123A456B" -X PUT -d '{"REQUEST": "MODIFY", "HASHVAL": 831638627, "VALUE": "On"}' https://myVizioTV:9000/menu_native/dynamic/tv_settings/picture/game_low_latency
| SETTINGS_CNAME |
|---|
| picture |
| picture/picture_size |
| picture/picture_position |
| picture/picture_mode_edit |
| picture/color_calibration |
| picture/color_calibration/color_tuner |
| picture/color_calibration/calibration_tests |
| audio |
| timers |
| network |
| channels |
| closed_captions |
| devices |
| system |
| system/system_information |
| system/system_information/tv_information |
| system/system_information/tuner_information |
| system/system_information/network_information |
| system/system_information/uli_information |
| mobile_devices |
| cast |
RESULT |
|---|
| success |
| failure |
| uri_not_found |
| aborted |
| busy |
| blocked |
| requires_pairing |
| requires_system_pin |
| requires_new_system_pin |
| net_wifi_needs_valid_ssid |
| net_wifi_already_connected |
| net_wifi_missing_password |
| net_wifi_not_existed |
| net_wifi_missing_password |
| net_wifi_needs_valid_ssid |
| net_wifi_auth_rejected |
| net_wifi_connect_timeout |
| net_wifi_connect_aborted |
| net_wifi_connection_error |
| net_ip_manual_config_error |
| net_ip_dhcp_failed |
| net_unknown_error |
ITEM |
|---|
| T_UNKNOWN_V1 |
| T_NO_TYPE_V1 |
| T_HIDDEN_NETWORK_V1 |
| T_DST_LIST_V1 |
| T_MENU_V1 |
| T_MENU_X_V1 |
| T_LIST_V1 |
| T_LIST_X_V1 |
| T_VALUE_ABS_V1 |
| T_VALUE_V1 |
| T_STRING_V1 |
| T_PIN_V1 |
| T_IP_ADDRESS_V1 |
| T_MAC_ADDRESS_V1 |
| T_MATRIX_V1 |
| T_HEADER_V1 |
| T_ROW_V1 |
| T_DEVICE_V1 |
| T_ACTION_V1 |
| T_APS_V1 |
| T_AP_V1 |
| T_PASSWORD_V1 |
| T_SOFTAP_CONFIG_V1 |
| T_LIST_PAIRED_DEVICES_V1 |
| T_TEST_CONNECTION_V1 |
| T_IETF_2822_STRING_V1 |
| T_DATE_V1 |
| T_LIST_CEC_DEVICE_V1 |
| T_MANUAL_IP_CONFIG_V1 |
| T_VIZIO_DEVICE_INFO_V1 |
| T_UPDATE_INFO_V1 |
| T_ARRAY_V1 |
| T_EMAIL_V1 |
| T_LIST_VALUES_V1 |
| T_CEC_DEVICE_V1 |
ed: I can't see where these are used, but included anyway for completion.
Add a MODIFIER pair to /key_command request if used.
| Event Name | Codeset | Code | Modifier |
|---|---|---|---|
| 0 | 0 | 48 | |
| 1 | 0 | 49 | |
| & | 0 | 38 | |
| * | 0 | 42 | |
| Backspace | 0 | 8 | |
| Bel | 0 | 7 | |
| Cancel | 0 | 14 | |
| , | 0 | 44 | |
| $ | 0 | 36 | |
| Esc | 0 | 27 | |
| ! | 0 | 33 | |
| \ | 0 | 47 | |
| - | 0 | 45 | |
| ( | 0 | 40 | |
| Linefeed | 0 | 10 | |
| % | 0 | 37 | |
| . | 0 | 46 | |
| + | 0 | 43 | |
| # | 0 | 35 | |
| " | 0 | 34 | |
| Return | 0 | 13 | |
| ) | 0 | 41 | |
| ' | 0 | 39 | |
| Space | 0 | 52 | |
| Tab | 0 | 9 | |
| Audio MTS | 5 | 5 | TYPE |
| MTS Cycle | 5 | 6 | TYPE |
| Picture Mode | 6 | 0 | |
| Wide Mode | 6 | 1 | |
| Wide Cycle | 6 | 2 |
| Name | Codeset |
|---|---|
| ASCII | 0 |
| Key Modifier | 1 |
| Transport | 2 |
| D-Pad | 3 |
| Nav | 4 |
| Audio | 5 |
| Video | 6 |
| Input | 7 |
| CH | 8 |
| Color | 9 |
| Launch | 10 |
| Power | 11 |
| 3D | 12 |
| CC | 13 |
| Factor | 14 |