Synology Surveillance Station Topic is solved

Moderator: leecollings

Post Reply
Atis
Posts: 37
Joined: Monday 30 March 2020 7:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Synology Surveillance Station

Post by Atis »

Hello,

I find synology Surveillance Station plugin for domoticz. I try 3 plugins but not work. I would like enable and disable some cameras.
Thank you,
azonneveld
Posts: 159
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Synology Surveillance Station

Post by azonneveld »

This can be done using the surveillance station API.

Described at page 55.

https://global.download.synology.com/do ... eb_API.pdf
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
Atis
Posts: 37
Joined: Monday 30 March 2020 7:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Synology Surveillance Station

Post by Atis »

azonneveld wrote: Sunday 22 November 2020 15:55 This can be done using the surveillance station API.

Described at page 55.

https://global.download.synology.com/do ... eb_API.pdf
Yes I find this API description, but I try and can not working.

http://192.168.10.2:5000/webapi/entry.c ... &password="*****"

I try enable Camera 1.
azonneveld
Posts: 159
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Synology Surveillance Station

Post by azonneveld »

Atis wrote: Monday 23 November 2020 14:00
azonneveld wrote: Sunday 22 November 2020 15:55 This can be done using the surveillance station API.

Described at page 55.

https://global.download.synology.com/do ... eb_API.pdf
Yes I find this API description, but I try and can not working.

http://192.168.10.2:5000/webapi/entry.c ... &password="*****"

I try enable Camera 1.
needs Admin account on SS. Test using a browser:
(I use '/cam' instead of the port)
Authenticate:

Code: Select all

http://IP/cam/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=1&account=USER&passwd=PW&session=SurveillanceStation
Execute command:

Code: Select all

http://IP/cam/webapi/entry.cgi?&api="SYNO.SurveillanceStation.Camera"&version=9&method="Disable"&idList="ID"
If that works, create a bash script (not tested):

Code: Select all

#!/bin/sh
wget --save-cookies /var/tmp/cookies.txt \
     --keep-session-cookies \
     -O "/var/tmp/cookies.txt" "http://IP/cam/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=1&account=USER&passwd=PW&session=SurveillanceStation"
	 
wget  --load-cookies /var/tmp/cookies.txt \
     "http://IP/cam/webapi/entry.cgi?&api="SYNO.SurveillanceStation.Camera"&version=9&method="Disable"&idList="ID""
Call script from Domoticz Lua using:

Code: Select all

os.execute ('(/home/pi/domoticz/scripts/SCRIPTNAME.sh > /dev/null)&')
This addition prevents Domoticz waiting for the response:

Code: Select all

 > /dev/null)&
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
Atis
Posts: 37
Joined: Monday 30 March 2020 7:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Synology Surveillance Station

Post by Atis »

azonneveld wrote: Tuesday 24 November 2020 8:40
Atis wrote: Monday 23 November 2020 14:00
azonneveld wrote: Sunday 22 November 2020 15:55 This can be done using the surveillance station API.

Described at page 55.

https://global.download.synology.com/do ... eb_API.pdf
Yes I find this API description, but I try and can not working.

http://192.168.10.2:5000/webapi/entry.c ... &password="*****"

I try enable Camera 1.
needs Admin account on SS. Test using a browser:
(I use '/cam' instead of the port)
Authenticate:

Code: Select all

http://IP/cam/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=1&account=USER&passwd=PW&session=SurveillanceStation
Execute command:

Code: Select all

http://IP/cam/webapi/entry.cgi?&api="SYNO.SurveillanceStation.Camera"&version=9&method="Disable"&idList="ID"
If that works, create a bash script (not tested):

Code: Select all

#!/bin/sh
wget --save-cookies /var/tmp/cookies.txt \
     --keep-session-cookies \
     -O "/var/tmp/cookies.txt" "http://IP/cam/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=1&account=USER&passwd=PW&session=SurveillanceStation"
	 
wget  --load-cookies /var/tmp/cookies.txt \
     "http://IP/cam/webapi/entry.cgi?&api="SYNO.SurveillanceStation.Camera"&version=9&method="Disable"&idList="ID""
Call script from Domoticz Lua using:

Code: Select all

os.execute ('(/home/pi/domoticz/scripts/SCRIPTNAME.sh > /dev/null)&')
This addition prevents Domoticz waiting for the response:

Code: Select all

 > /dev/null)&

One url can not include command, username, password? I need 2 steps? One login and one command?
azonneveld
Posts: 159
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Synology Surveillance Station

Post by azonneveld »

Atis wrote: Tuesday 24 November 2020 9:56 One url can not include command, username, password? I need 2 steps? One login and one command?
Perhaps, but this is how i use it.
If you find out how to simplify the requests, please post your findings.
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
Atis
Posts: 37
Joined: Monday 30 March 2020 7:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Synology Surveillance Station

Post by Atis »

azonneveld wrote: Tuesday 24 November 2020 10:16
Atis wrote: Tuesday 24 November 2020 9:56 One url can not include command, username, password? I need 2 steps? One login and one command?
Perhaps, but this is how i use it.
If you find out how to simplify the requests, please post your findings.
Thank you, the script working
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest