Closed brubaked closed 4 years ago
Alright, made some more progress.
The following opens youtube.
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXXXX" -X PUT -d '{"VALUE": {"MESSAGE": "https://www.youtube.com/tv", "NAME_SPACE": 5, "APP_ID": "1"}}' https://XXX.XXX.XX.XXX:7345/app/launch
Running the following while another app is on screen
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXX" -X GET https://XXX.XXX.XX.XXX:7345/app/current
Gives the MESSAGE, NAME_SPACE, and APP_ID necessary to launch any other app directly.
Actually, it looks like you can open apps while leaving the "message" field set to null
.
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXXXX" -X PUT -d '{"VALUE": {"MESSAGE": null, "NAME_SPACE": 5, "APP_ID": "1"}}' https://XXX.XXX.XX.XXX:7345/app/launch
for example works.
I was able to get a list of app APP_ID, NAME_SPACE, and MESSAGE parameters from the apk source: https://github.com/vkorn/pyvizio/issues/22#issuecomment-583148703
@brubaked @raman325 Great find! I'll start updating the doc with the table of apps and command to launch.
Can you verify the docs are correct now? in commit 6a27e7b
Also if someone can give the response from a successful /app/launch
??
Running
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXXXX" -X PUT -d '{"VALUE": {"MESSAGE": "https://www.youtube.com/tv", "NAME_SPACE": 5, "APP_ID": "1"}}' https://XXX.XXX.XX.XXX:7345/app/launch
results in
{"STATUS": {"RESULT": "SUCCESS", "DETAIL": "Success"}}
thanks 👍
Docs added, thanks again for the information!
Sorry I just noticed that you have "name_space" and "app_id" as integer here:
`{
"VALUE": {
"MESSAGE": String,
"NAME_SPACE": Integer,
"APP_ID": Integer
}
}`
I believe it should be
`{
"VALUE": {
"MESSAGE": String,
"NAME_SPACE": Integer,
"APP_ID": String
}
}`
Running
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXXXX" -X PUT -d '{"VALUE": {"MESSAGE": "https://www.youtube.com/tv", "NAME_SPACE": 5, "APP_ID": "1"}}' https://XXX.XXX.XX.XXX:7345/app/launch
is successful (note "APP_ID": "1"), while running
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXXXX" -X PUT -d '{"VALUE": {"MESSAGE": "https://www.youtube.com/tv", "NAME_SPACE": 5, "APP_ID": 1}}' https://XXX.XXX.XX.XXX:7345/app/launch
(note "APP_ID": 1) results in
{"STATUS": {"RESULT": "INVALID_PARAMETER", "DETAIL": "Invalid parameter"}, "URI": "/app/launch"}
Fixed 73ca1cb
I recently noticed that the Vizio smartphone app (android) added support to open all the smart apps from within the app. I poked around the decompiled app and found the following endpoints in Vizio/vue/devicecontrol/api/enums/VZRestEndpoint.java:
I can get the current app with the following curl command:
curl -k -H "Content-Type: application/json" -H "AUTH: XXXXXXXX" -X GET https://XXX.XXX.XX.XXX:7345/app/current
Here is the output:
{"STATUS": {"RESULT": "SUCCESS", "DETAIL": "Success"}, "ITEM": {"TYPE": "T_APP_V1", "VALUE": {"MESSAGE": "https://www.youtube.com/tv", "NAME_SPACE": 5, "APP_ID": "1"}}, "URI": "/app/current"}
I'm not sure what the syntax to launch an app is though. Any help is appreciated.