Announcement

Collapse
No announcement yet.

HTTP POST and hs.getURLACTION

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP POST and hs.getURLACTION

    I'm trying to control my Roku from a script and can get information
    from it using a HTTP Get command but can't control it using a POST
    command.

    The Roku Developer docs have an example using
    $ curl -d '' http://192.168.1.134:8060/keypress/home, but I can't get that to
    work using HomeSeers URLAction function.

    Could someone provide me with an example?

    Thank you.
    Don

  • #2
    here is a vb script that works for me .

    it sends the command ''home''


    Code:
    Sub Main(parm as object)
    dim debug = false
    const server_url = "http://192.168.1.209:8060/keypress/Home"
    const data = ""
    const headers="Content-Type: application/x-www-form-urlencoded"
    dim s = hs.URLAction(server_url, "POST", data, headers)
    If debug Then hs.writelog("POST response", s)
    End Sub
    Attached Files

    Comment


    • #3
      Thanks Matt: Just installed your plugin and like it a lot.
      Don

      Comment

      Working...
      X