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 :

    If I follow the same syntax and try to activate multiple cameras at once like this :

    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 ?
  • Hi Pete, sorry but it's only possible to set one camera to Active mode per request to ssControlActiveMode. So for multiple cameras you'll have to issue this multiple times, each time with a different camera number.
  • It's not a problem, I can loop through them, but in that case I have an additional question.

    Is the http spec on this page :
    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 ?
  • Hi Pete,

    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!
  • Hi Ben, the -1 suggestion sound very nice. If you could implement that in a future version, that would be a welcome addition.
  • Hi Pete, great - I've implemented this and sent you a link to a beta version you can download and test with this functionality. Let me know how you get on.
  • Hello Ben,

    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
  • Hi 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!
  • Hi Ben, this works beautiful.
    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.
  • Hi Ben, I just ran into a small issue. I'm not sure if it is supposed to work like this.

    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.
  • Hi Pete,

    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.
  • Thanks Ben, indeed the schedule was causing this.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!