No announcement yet.

scripting help

  • Filter
  • Time
  • Show
Clear All
new posts

  • scripting help

    Hi all...
    I would like to send an URLAction (call specific url & with json control Ispy cctv)

    here is my script:
    Public Sub Main(parms as object)
    dim s
    const server_url = "http://192.x.x.x:89/allon"
    const headers = "Content-Type: application/x-www-form-urlencoded"
    const data = ""

    s=hs.URLAction(server_url, "POST", data, headers)
    End Sub
    It gives me no errors, everything seems to be OK.... But I get no change in Ispy behaviour.
    If I try the same address from web browser, everything works as expected...

    Any idea, what to do/change or anything?

  • #2
    A web browser is going to be doing a HTTP GET rather than a POST, change POST to GET in the hs.URLAction. Also that script has no output so might not visually do anything..
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P


    • #3
      Thank you for your help... still newbie on that field, sorry...

      that was it... working OK!