Using enable/disable alerts API.

95 views
Skip to first unread message

Brian Wilson

unread,
Sep 3, 2020, 4:38:16 PM9/3/20
to Camect User Forum
Hi there. I noticed that the Camect API was updated and now allows you to enable/disable camera alerting via API. Is this enabled yet within the Camect platform, because I can't tell if it's working. 

I've tried this:

$ curl -vvv --user admin:password https://xxxxxxx.l.home.camect.com/api/EnableAlert -d Reason=reason -d Enable=0 -d CamId=e3938273809xxxxx

And get a response of "{}".  If I go look at the camera's alert settings in the UI, it still shows as enabled. If we are providing a reason, where is this reason captured and is it accessible so I can verify if alerts were enabled/disabled properly?

I've also tried sending CamId[0]=e3938273809xxxxx but that doesn't appear to work either (this is how it appears the API is doing it).  If I put in "CamID" (with capital D) I get a warning which makes me think my command *should* work. {"err_msg":"cannot find field 'HAEnableAlertRequest.CamID'"}* 

CamectChao

unread,
Sep 3, 2020, 4:51:27 PM9/3/20
to Camect User Forum, wil...@bubba.org
On Thursday, September 3, 2020 at 1:38:16 PM UTC-7 wil...@bubba.org wrote:
Hi there. I noticed that the Camect API was updated and now allows you to enable/disable camera alerting via API. Is this enabled yet within the Camect platform, because I can't tell if it's working. 

I've tried this:

$ curl -vvv --user admin:password https://xxxxxxx.l.home.camect.com/api/EnableAlert -d Reason=reason -d Enable=0 -d CamId=e3938273809xxxxx

And get a response of "{}".  If I go look at the camera's alert settings in the UI, it still shows as enabled. If we are providing a reason, where is this reason captured and is it accessible so I can verify if alerts were enabled/disabled properly?

I've also tried sending CamId[0]=e3938273809xxxxx but that doesn't appear to work either (this is how it appears the API is doing it). 
Both work.
Currently the UI doesn't expose the state if set from the API. This is sth. we'll do later.

wil...@bubba.org

unread,
Sep 3, 2020, 8:51:33 PM9/3/20
to Camect User Forum, CamectChao, wil...@bubba.org
Just confirming as I'm not getting any alerts now and I've sent re-enable commands to all my cameras:

-d Reason=reason -d Enable=0 -d CamId=e3938273809xxxxx (this means Disable alerts (email and telegram) - which also means it will not detect/highlight people/events)

-d Reason=reason -d Enable=1 -d CamId=e3938273809xxxxx (this means enable alerts - which should go back to detecting/highlighting people/events)

Brian Wilson

unread,
Sep 4, 2020, 12:23:50 PM9/4/20
to Camect User Forum
Also how long should it take for this to take effect? 

I disabled alerts via API on 2 cameras and 2 minutes later it still alerted me to someone on that camera.  Can more than one camera have disabled alerts at a time?  

CamectChao

unread,
Sep 5, 2020, 4:52:45 AM9/5/20
to Camect User Forum, wil...@bubba.org
On Friday, September 4, 2020 at 9:23:50 AM UTC-7 wil...@bubba.org wrote:
Also how long should it take for this to take effect? 

I disabled alerts via API on 2 cameras and 2 minutes later it still alerted me to someone on that camera. 
That sounds like sth. was wrong. Can you share the alert with us so I can debug it? 
Can more than one camera have disabled alerts at a time?  
Yes 
Reply all
Reply to author
Forward
0 new messages