start recording IP-Cam if alarm is triggered

Free domotica! Forums How can I …? Synology NAS start recording IP-Cam if alarm is triggered

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  macgreg0r 5 months, 4 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4155

    djandib
    Participant

    Problem:
    Instead of using the built-in movedetection of my IP-Cam, I want to start recording if an alarm is triggered (e.g. Door-/Windowsensor
    Solution (for cams using “hi3510”):
    – instead of start/stop recording, you simulate an alarm with the IO-Alarm config of you cam
    – try start using this url in browser:
    http://DDNS:PORT/cgi-bin/hi3510/param.cgi?cmd=setioattr&-io_enable=1&-io_flag=1
    – use you admin-account of you cam.
    – You should get the response “success” -> Record starts
    – try start using this url in browser:
    http://DDNS:PORT/cgi-bin/hi3510/param.cgi?cmd=setioattr&-io_enable=0&-io_flag=1
    – use you admin-account of you cam.
    – You should get the response “success” -> Record stops
    – write a little php and save it in directory “Pulsestation” (cam.php)
    ***
    <?php
    $username = ‘ADMIN’;
    $password = ‘PASSWORD’;

    $url1 = ‘http://DDNS:PORT/cgi-bin/hi3510/param.cgi?cmd=setioattr&-io_enable=1&-io_flag=1’;
    $url2 = ‘http://DDNS:PORT/cgi-bin/hi3510/param.cgi?cmd=setioattr&-io_enable=0&-io_flag=1’;

    if($_GET[‘secret’]==”best” && $_GET[‘action’]==1){
    $url = $url1;}
    elseif($_GET[‘secret’]==”best” && $_GET[‘action’]==2){
    $url = $url2;}

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    ‘Accept text/html’, ‘Content-Type text/html’
    ));
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_USERPWD, $username.”:”.$password);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 90);
    $output = curl_exec($ch);
    $info = curl_getinfo($ch);
    curl_close($ch);
    ?>
    ***
    – Now write a little Blocky like calles “CAM Rec”
    blocky

    – call it from your Alarm scene with Run Scene “CAM Rec”

    VOILA !!

    Andi

    #4208

    macgreg0r
    Participant

    That’s realy interesting.
    I was interested about buying a Fibaro motion detector but wondering about it’s integration and applications.
    You simultate the alarm trigger from the cam, is that mean that you have to configure “motion detection from cam” in surveillanceStation?

    But what is the advantage compared to integrated synology motion detection and self recording? sensivity? the possibility to start recording even if movement/trigger is not in camera scope?

    For security, I suggest to use internal names/ip and https (if possible) for your requests.

    #4209

    djandib
    Participant

    Hi Macgregor,
    I dont use surveillance Station, because its only free for one cam. I`ve got 4 …
    Normally you use the builtin motion dtection from the cam. It works. Ok.
    But, as I recogniced, if you are fast enough, you can see only the footprint..
    And I have a lot of wrong alerts.
    So I want to start recording if an alarm is triggered by zwave.
    One zwave door/window sensor activates ALL cameras.

    The next step is to move my cameras to the point the allert comes from.
    E.G. Alert at the main door: All cameras move to the place of the main door.
    Alert at the garden door: All cameras move to the place of the garden door.

    Andi

    #4214

    macgreg0r
    Participant

    Oh ok, I understand now :D.
    Great project.
    I only have 2 Cam and have 2 free licences with my syno.

    Out of subject:
    My only issue is that surveillance station is now working only with IE brother…and I do not have it anymore (windows 10 with edge / FF / chrome …). Synology wake up!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.