Trying to send a http.request from Vera, what am I doing wrong?

So I broke the Surveillance station plugin by updating my Synology NAS to DSM 7.0 version.
I am loosing hope that the plugin will ever be updated to I am looking for a workaround.
What I am trying now is to set up a webhook rule in Surveillance Station and I just send a http request to trigger it.

Trying the following code in Vera:

local http = require("socket.http")
http.TIMEOUT = 5
result, status = http.request("http://192.168.1.3:5010/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method="Incoming"&version=1&token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

But for some reason it does not work. Using the same URL in chrome browser I get the expected result.

What is wrong with my luup code?

Found the problem:

I had to remove the “” from “Incoming” so that it is only method=Incoming

I don’t know what you’re trying to do, but I’m just setting home mode via my own code and I had to change:

  • SYNO.API.Auth call to use version = 6 and method=login, lowercase

And that’s all.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules