23.08.2017, 11:51
I just needed to post here before I saw what I had to do:
This script reboots the Chromecast:
I still cant force the screensaver back though.
This script reboots the Chromecast:
Code:
require'socket.http'
response_body = {}
request_body = [[{"params":"now"}]]
socket.http.request{
url = "http://192.168.22.99:8008/setup/reboot";
method = "POST";
headers = {
["Content-Type"] = "application/json";
["Content-Length"] = string.len(request_body)
};
source = ltn12.source.string(request_body);
sink = ltn12.sink.table(response_body);
}
I still cant force the screensaver back though.