Manual reconnect attempt using HTTP Post
  • I have an IP camera running off battery, which only starts to stream when motion is detected locally with a PIR to save power. I want to force SecuritySpy to refresh the connection, as it looks as though the timeout gets progressively longer after a failed connection.
    Is there any way I can do an HTTP post to the securityspy server to force it to try and reconnect to my camera?
  • SecuritySpy does repeatedly attempt to reconnect, but like you say its timeout does get progressively longer (up to 30s).

    You can force a reconnect by sending two HTTP POST requests in sequence: one to disable the camera and then one to re-enable it:

    Send your POST to http://ss-server-address:port/++camerasetup

    To disable the camera, here is the POST data:

        cameraNum=X&camEnabledCheck=0&action=save

    To enable the camera, here is the POST data:

        cameraNum=X&camEnabledCheck=1&action=save

    Make sure to substitute in the actual camera number for the "cameraNum" parameter value (you can get this from the Camera Info window - click the header bar where you see the column names to add the "Camera Number" column).

    You will also have to supply authentication if this is enabled in SecuritySpy's web server.

    If you want to use AppleScript for this, check out the "Enabling and disabling a camera, and setting camera settings" example on the SecuritySpy AppleScript Examples page.
  • Excellent, will give that a go, thanks!

Howdy, Stranger!

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