So reading through the doc I see that I can view all of the controls that the camera is capable of by going to curl http://server/zm/api/controls/5.json
But I would like to do something with my home automation. So using SmartThings I'm able to tell ZM thanks to its awesome API to force an alarm in certain areas based off of a door opening or something else. But what I would also like to do is say if my living room motion sensor detects motion, I want to be able to tell ZM to use the PTZ to pan to preset 2 record for like a minute then stop the recording and pan back to home position. I can tell from ZMNinja (Awesome app btw, hands down one of the best purchases I've ever made for my phone) that it is possible to control the camera through the API I just don't know what the appropriate API call would be to have it do this. Thank you all in advance for your help with this and I really do enjoy seeing where ZM is headed and I can't get rid of the zmodo cameras, and replace with IP fast enough.
Using ZM API with a PTZ
Re: Using ZM API with a PTZ
PTZ control is achieved by sending POST commands to zms, not via the API layer of ZM
Something like this: (where id = monitor ID, control is the ptz command sent to it)
To figure out other ptzControl commands, either take look at monitors-modal.html code of zmNinja in templates/ & associated MonitorModalController.js in js/ or open up your ZM web console, go to PTZ controls, right click and inspect source.
Something like this: (where id = monitor ID, control is the ptz command sent to it)
Code: Select all
curl -X POST "http://server.com/zm/index.php?view=request" -d
//"request=control&user=admin&passwd=xx&id=4&control=moveConLeft"
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Using ZM API with a PTZ
Thank you @asker for your help with this. I apologize for my delayed response was out in the woods all last week.