How do I activate multiple camera's at once with http request ?
I'm looking at the http manual, and to get a live feed there is this example :
++viewlive?cameraNum=1&cameraNum=2&cameraNum=3&imageSize=640x480&method=0
If I follow the same syntax and try to activate multiple cameras at once like this :
++ssControlActiveMode?cameraNum=1&cameraNum=2
I get the message "The control message was received OK", but only the first camera is enabled.
Is it possible to enable multiple camera's with one http request, and ifso, what would the syntax be ?
++viewlive?cameraNum=1&cameraNum=2&cameraNum=3&imageSize=640x480&method=0
If I follow the same syntax and try to activate multiple cameras at once like this :
++ssControlActiveMode?cameraNum=1&cameraNum=2
I get the message "The control message was received OK", but only the first camera is enabled.
Is it possible to enable multiple camera's with one http request, and ifso, what would the syntax be ?
Comments
Is the http spec on this page :
http://www.bensoftware.com/securityspy/helphttpspec.html
a complete overview of all available commands ?
I'm putting together a small php page that is essentially a much simplified version of the web interface's status window (where you can put cameras in active or passive mode).
I'd like to issue a request through http and get back a list of all available cameras : does such a command exist ?
Is there also a command that can request the camera names ?
I can then loop through the list of cameras to get their current status, and put them in passive or active mode. Or group them and put everything in active mode with one button.
I'd rather not hardcode the cameranumbers.
I just want to create a small and easy to use script where I can activate all my cameras at once when leaving the house. The SecuritySpy webinterface is not really easy to use on an iPhone when standing outside in the blistering cold and rain, nor is Remote Patrol, so I'm rolling my own solution.
Ideally it will be just one button somewhere on my iPhone that activates everything and toggles between active and passive...
Hopefully I can someday use iBeacons, just leaving the house would be enough to activate everything without touching anything...
Also I'd like to cast my vote for https support, I've seen that you mentioned it somewhere on this forum and that it's on your todo list ?
Scroll to the bottom of the page that you linked to and you will see described a "++systemInfo" request - this is the one you will need in order to get the full list of camera names, numbers and other camera information.
Would it help if I modified the ssControlActiveMode/ssControlPassiveMode requests so that if you pass -1 as the cameraNum, this would set all the cameras to Active or Passive mode? This would be quite easy to do.
If you need anything else please let me know as there are a few undocumented requests that do other things, however all the main/most useful ones are described on the above page.
Yes, HTTPS support is most certainly on the "to do" list!
Thanks.
I have been using the above script for a while now, and decided to turn things around.
Instead of putting my cameras in active or passive mode with a toggle on a webpage, I now leave them active all the time so they can do time-lapse recording.
Instead, I am rebuilding my web page so I can enable motion detection per camera, or maybe only toggle e-mail notification, but I'm not sure how that will work with Remote Patrol. Do you now if the Remote Patrol push notifications are based on the e-mail notification setting, or the global motion detection setting per camera ?
My links are working fine (I can post to ++camerasetup and save), but I cannot read back the motion detection status.
The ++systemInfo XML does not have an entry if a motion detection is enabled or disabled for a certain camera (nor does it tell me if e-mail notification is on or off), yet in your web interface I can see these settings, so it must be possible.
Can you tell me how I can request the motion detection status and/or e-mail notification settings for each camera ?
Thanks, Peter
The push notifications work independently from the email notifications. So even if you turn off the email notifications in SecuritySpy, the push notifications will still operate, as long as you have enabled them in the Remote Patrol iOS app (and the camera is in Active mode with motion detection enabled).
I have added the information you need to the ++systemInfo XML page - download an updated beta version of SecuritySpy from the same link as last time.
Hope this helps!
The extra info in the XML file also might come in handy, thank you for this.
This build does have some kind of debugging enabled, I suppose it is for your testing.
It creates a Debug file.c on the desktop and it starts filling up.
Just thought I'd mention it.
When I have all my cameras in active mode (for time-lapse recording), and when I go into camera settings and enable (or disable doesn't matter which) motion detection and exit out of the camera settings, the corresponding camera switches from active to passive.
It would be nice if the camera could stay active, and be able to only switch motion detection on or off.
Sorry about that - I've uploaded a new beta with the debugging stuff turned off!
As for the Active/Passive thing, it sounds like the camera is on a schedule that tells it to be in Passive mode at that particular time. If it's not on a schedule it will remember the last setting you set manually; if it is on a schedule then it will obey the schedule instead.
Hope this helps.