I found this thread and started to test these commands recently from the API referenced here (https://github.com/exiva/Vizio_SmartCast_API). I can confirm once you pair a device and receive an auth token, it is good across all IP’s and MACs (tested with separate devices not associated with the pairing process). I have found that trying to change the input source to a specific name has a problem.
I used the “GET /menu_native/dynamic/tv_settings/devices/name_input”:
curl -k -H "Content-Type: application/json" -H "AUTH: xxxx" -X GET https://192.168.1.xxx:7345/menu_native/dynamic/tv_settings/devices/name_input
Generated this source list and HDMI1 is of interest to me:
{“STATUS”: {“RESULT”: “SUCCESS”, “DETAIL”: “Success”}, “HASHLIST”: [3913157447, 3258122002, 2001023066], “GROUP”: “G_DEVICES”, “NAME”: “Name Input”, “PARAMETERS”: {“FLAT”: “TRUE”, “HELPTEXT”: “FALSE”, “HASHONLY”: “FALSE”}, “ITEMS”: [{“HASHVAL”: 4003165621, “CNAME”: “cast”, “NAME”: “CAST”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “READONLY”: “TRUE”, “VALUE”: {“NAME”: “SMARTCAST”, “METADATA”: “”}}, {“HASHVAL”: 193593639, “CNAME”: “hdmi1”, “NAME”: “HDMI-1”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “VALUE”: {“NAME”: “HDMI-1 Switch”, “METADATA”: “”}}, {“HASHVAL”: 292178829, “CNAME”: “hdmi2”, “NAME”: “HDMI-2”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “VALUE”: {“NAME”: “HDMI-2”, “METADATA”: “”}}, {“HASHVAL”: 3938325493, “CNAME”: “hdmi3”, “NAME”: “HDMI-3”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “VALUE”: {“NAME”: “HDMI-3”, “METADATA”: “”}}, {“HASHVAL”: 1344491825, “CNAME”: “hdmi4”, “NAME”: “HDMI-4”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “VALUE”: {“NAME”: “HDMI-4”, “METADATA”: “”}}, {“HASHVAL”: 2214376780, “CNAME”: “comp”, “NAME”: “COMP”, “TYPE”: “T_DEVICE_V1”, “ENABLED”: “FALSE”, “VALUE”: {“NAME”: “COMP”, “METADATA”: “”}}], “URI”: “/menu_native/dynamic/tv_settings/devices/name_input”, “CNAME”: “name_input”, “TYPE”: “T_MENU_V1”}
Trying to change the source input: “PUT /menu_native/dynamic/tv_settings/devices/name_input”
curl -k -H "Content-Type: application/json" -H "AUTH: xxxxx" -X PUT -d '{"REQUEST": "MODIFY","VALUE": "HDMI-1","HASHVAL": 193593639}' https://192.168.1.xxx:7345/menu_native/dynamic/tv_settings/devices/current_input
I receive a hashcode invalid error when using the provided code when pulled from “GET /menu_native/dynamic/tv_settings/devices/name_input” and haven’t found a way to directly change the source. Help on this would be great!
{"STATUS": {"RESULT": "HASHVAL_ERROR", "DETAIL": "Hashval error"}, "URI": "/menu_native/dynamic/tv_settings/devices/current_input", "PARAMETERS": {"HASHVAL": 193593639, "REQUEST": "MODIFY", "VALUE": "HDMI-1"}}
Anyhow, I am going to start writing a device handler to make web requests with this API; we’ll see how this goes with a basic interface without the fancy discovery and pairing process; perhaps I’ll add that in later once it is up and going.