How to send externalevent command from Domoticz to synology surveillance station?

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

How to send externalevent command from Domoticz to synology surveillance station?

Post by Jumper3126 »

Hi all,

I would like a snapshot to be taken by the Synology surveillance station, when a button is pressed in domoticz. I followed the instructions in the surveillance station and the command line I need to use is automatically generated.

Code: Select all

https://192.168.1.100:5001/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method="Trigger"&version=1&eventId=1&eventName="This is external event1"&account="{account}"&password="{password}"
I created a bash file with:

Code: Select all

#!/bin/bash
curl -k https://192.168.1.100:5001/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method="Trigger"&version=1&eventId=1&eventName="This is external event1"&account="xxx"&password="xxx"
If I run the bash file, I get:

Code: Select all

{"error":{"code":101},"success":false}
I think thismight be more a synology thing than a domoticz thing, but perhaps someone here knows how to solve this, and then it can be of value to others as well :)
mcwieger
Posts: 107
Joined: Tuesday 08 December 2015 9:59
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

Re: How to send externalevent command from Domoticz to synology surveillance station?

Post by mcwieger »

Quite an old post to reply to, but don't know if it has been solved...

Best guess is that the account you're using does not have the right permissions. I set up a separate user:
- admin user
- access to Surveillance Station app
- access to surveillance folder

Also make sure to use a password that does not contain characters that can give an issue if placed in a http command (e.g. a space is transformed into %20, which causes the request to fail). Try running the http request in a browser first until you get Success returned.
I moved to HomeAssistant. It was fun while it lasted!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest