Enable / Disable Camera via API

Hi everybody,

is there a way that i disable and Enable a camera via API?

Kind Regards
Matthias

Hi Matthias,
Yes it is. Here is information about the WebAPI for control of Netcam Studio.

-Henrik

I have it working. i now have a way to detect if someone of the family is in the house. at this time all camaras are disabled and if no one is in the house all cameras will be enabled and motion detection will turned on! thanks for that greate produkt!
Matze

1 Like

Hey @matzeeg3
How does the code look like, with which you where able to enable/disable?
I don’t find the webservice-function to do it.
Regards, Thomas

so first of all you start with this:

http://ipofnetcam:8124/Json/GetCameras?authToken=yourtoken

copy all informations from the output to an textfile for later use.
then you can use this url:

http(s)://ipofnetcam:8124/Json/StartStopVideoSource?sourceId=(IDfromJsonbefore)&enabled=(true/or/false)&authtoken=(yourauthtoken)

i have running openhab witch detects the presense state of my familie by checking the wifi status via unifi and then i run a rule if some one leave or ener the house.
have fun with that informations.

  • matze

Excellent! Thank you very much for the contribution!
-Henrik

1 Like

Thanks, matze
That works great!
(needed two attempts though because I took “SourceUID” instead of “Id”. the latter is the very first Number that is returned an in my case just a 0)

1 Like