Hi everyone,
I need to create a lua script to activate Hikvision camera thanks to the Synology Surveillance Station…
I’m using the web API to send HTTP requests, this time to activate an action, and the request looks like this : https://192.168.1.50:4970/webapi/entry.cgi?api=“SYNO.SurveillanceStation.ActionRule”&idList=“2”&version=“1”&method=“Disable”&_sid=MySID
Problem is that this request contains double quotes, and when running luup.inet.wget(“http_request”)(double quotes needed too…), it doesn’t work…
Could someone tell me how to proceed in this case to make it work ?
Thanks !
Kris
Use single quotes for the Lua call instead…
luup.inet.wget 'anything you like, "double quotes" ok too'
I thought about it, and I’ve tested it, but strangely, it didn’t work… don’t know why :-
I also tried to escape the double quotes by putting \ before each of them, but with no success…
Any other idea maybe ?
Hi,
I ended to resolve my issue, for those who want to know, the problem didn’t come from the quotes but from the fact that I was doing an httpS request…
Thus, I made my request a slight differently… :
local http = require(“socket.http”)
local https = require(“ssl.https”)
https.request(“https://my_url”)
hope it my help someone else.
Kris