Last active
August 29, 2015 14:11
-
-
Save acidprime/ffa7dbaae3e2693e5682 to your computer and use it in GitHub Desktop.
Simple Script to pause the roku when my front door is opened.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Simple Lua to Pause roku when door is unlocked. | |
-- http://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide | |
-- load the http module | |
local http = require("socket.http") | |
http.request{ | |
method = "POST", | |
url = "http://roku.wallcity.org:8060/keydown/play", | |
headers = | |
{ | |
["Accept"] = "*/*", | |
["Accept-Language"] = "en-us", | |
["Content-Type"] = "application/x-www-form-urlencoded", | |
["content-length"] = string.len("") | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment