Controlling a camera of Surveillance Station with web api of the Synology Diskstation

Hi,

since we installed an ip cam at the front door with motion detection I wanted to make it possible to control dynamically when the camera is active and when not. I wanted to make it depend on times and if anybody is home.

As I have a Synology NAS with Surveillance Station running on it I use this for motion detection.

I found a way with using pimatic and the web api of the diskstation to realize it.
Here in the forum you can find solutions for checking if anybody is home (e.g. who is home).
So I made these rules to realize what I wanted (pimatic-shell-execute has to be installed):

Changed the script an put in a possibility to send a value to a variable in pimatic.
With this there’s the chance to set a rule for fallback if the switch failed.

These are the rules for using this variable (you need to set up 2 variables in pimatic, one to set from the script and another one to compare with, in this case: $camStatusFeedback and $camStatusTarget.

Interesting… Which ip camera do you use?
Last time I use motion, that it can only use only for usb camera that connected to motion server. I dont know if it able to connect to ip camera.

Do you mind to share motion config?

I use an INSTAR IN-5907HD camera.
If you want to use the Surveillance Station for motion detection as I do it definitely must be an ip camera.
Maybe there is a missunderstanding, do you want to use “Motion” from here?