homebridge-http-webhooks
homebridge-http-webhooks copied to clipboard
Switch don't work, Webhooks error Synology Surveillance Station
Hi, thanks for your work for this plugin, I have a problem with a switch not activating, I use this plugin in Synology NAS with DSM 7.0.1, Homebridgr is installed as an add-on package and not via docker. Having said that, I have a problem with an activation, it always brings me the same error:
[2/13/2022, 9:33:11 PM] [HttpWebHooks] Switch state for 'homemode'...
[2/13/2022, 9:33:11 PM] [HttpWebHooks] Request to 'http://net-server.local:7500/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method="Incoming"&version=1&token=JNajtOcHN6pMokpSCIAagh3Ye5lNbr8FcP0mYSSeJMkGxoEkUEozteNQuZvOS9gX' finished with status code '-1' and body 'undefined'. Error: getaddrinfo ENOTFOUND net-server.local
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'net-server.local'
}
this is my configuration
"webhook_port": "51828",
"cache_directory": "/volume3/homebridge/node-persist/storage",
"switches": [
{
"id": "homemode",
"name": "Home Mode",
"rejectUnauthorized": false,
"on_url": "http://net-server.local:7500/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method=\"Incoming\"&version=1&token=JNajtOcHN6pMokpSCIAagh3Ye5lNbr8FcP0mYSSeJMkGxoEkUEozteNQuZvOS9gX",
"on_method": "GET",
"on_body": "{\"on\":true}",
"off_url": "http://net-server.local:7500/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method=\"Incoming\"&version=1&token=GyjT6gc4NPxDkoSCHkSfvGWAQmJtOVK3y54XHWSUapNxe5iLcjZFANj8tW0c7fgp",
"off_method": "GET",
"off_body": "{\"on\":false}"
}
],
"platform": "HttpWebHooks"
the same error also with HTTPS, what am I wrong? Retrive state work perfect. Thanks in advance
Looks like nodejs dns cannot resolv the „.local“ domain. You should try the real hostname or the diskstations IP.
Thanks, the switch works fine, I don't know how nodejs works unfortunately, however I'm trying to replace it with the Security System device, but I have no idea how to change the status of the device with a single command, I've already done the return ones (Current and Target) and work fine, but I don't know how to set the single command to toggle on and off, if possible I would be grateful for help.
Well, not much I can tell, but there is a single url that can be called on state change. The api of the security system needs to handle it, for now.
Ok, thanks, I stay tune.