Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch don't work, Webhooks error Synology Surveillance Station #157

Open
Vaifranz opened this issue Feb 13, 2022 · 4 comments
Open

Switch don't work, Webhooks error Synology Surveillance Station #157

Vaifranz opened this issue Feb 13, 2022 · 4 comments

Comments

@Vaifranz
Copy link

Vaifranz commented Feb 13, 2022

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

@benzman81
Copy link
Owner

Looks like nodejs dns cannot resolv the „.local“ domain. You should try the real hostname or the diskstations IP.

@Vaifranz
Copy link
Author

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.

@benzman81
Copy link
Owner

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.

@Vaifranz
Copy link
Author

Ok, thanks, I stay tune.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants