Alarm inputs - Not working

jaredtizzle

Young grasshopper
Mar 27, 2016
32
0
So, I've purchased a PIR for my camera on my front door and I'm trying to setup the alarm input.

4Xyjb5U.pngsVKF0Jc.pngEno0kJ1.jpgDEeQTbd.jpg


I've tried shorting the pins manually, and I still don't get a trigger. Even with the FTP upload setup on the camera to a FTP server on my pc, I don't get an image sent.

Any idea what I'm doing wrong?
 
Last edited by a moderator:
Hell, now my front door camera won't even trigger from motion. I've been moving it around while i'm checking connections and BI isn't triggering for anything :(
 
Hell, now my front door camera won't even trigger from motion. I've been moving it around while i'm checking connections and BI isn't triggering for anything :(
How are you powering the pir sensor?
As far as BI motion trigger, check all motion settings...if you cant figure out what you changed. Delete the camera and start again.
 
its an open collector, what are you shorting to? should be ground.. first make sure camera is recognizing the input change.
 
How are you powering the pir sensor?
As far as BI motion trigger, check all motion settings...if you cant figure out what you changed. Delete the camera and start again.

Deleted it and started again, removing the motion areas for now did the trick.. Still can't get the PIR to trigger it though. Using a piece of wire to short the connection to ground. Camera doesn't seem to be recognizing the change. Using an external POE injector to eliminate power problems. PIR is powered and checked that it is working with a multimeter. Late night for me tonight :|
 
It must be a config thing with the camera/BI. The connection is there, I can see the relay change states when it triggers with a MM. The camera just doesn't seem to throw the alert to BI. Checking the xml I get this:


http://192.168.1.12//IO/inputs/1/status

<?xml version="1.0" encoding="UTF-8"?>
-<IOPortStatus xmlns="http://www.hikvision.com/ver10/XMLSchema" version="1.0">
<ioPortID>1</ioPortID>
<ioPortType>input</ioPortType>
<ioState>active</ioState>
</IOPortStatus>

Active only appears when the PIR is triggered... sigh.
 
I don't know how BI pulls the events for each camera. But I've forwarded the input->output and It seems to work correctly.

http://192.168.1.12/IO/outputs/1/status
<?xml version="1.0" encoding="UTF-8"?>-<IOPortStatus xmlns="http://www.hikvision.com/ver10/XMLSchema" version="1.0">
<ioPortID>1</ioPortID>
<ioPortType>output</ioPortType>
<ioState>active</ioState>
</IOPortStatus>

- - - Updated - - -

Did you use find inspect in the BI camera config page?
Yes. I did that again just to make sure BI had all the info it needed for my camera. It identifies it as "other", so I'm not sure if that matters.

Opening port 80...HTTP request...
OK
2016-05-12T03:46:19.000Z
Requesting device information...
Manufacturer: HIKVISION
Model: DS-2CD2632F-IS
FirmwareVersion: V5.2.5 build 141201
GetCapabilities...
Querying services
Has Search services: /onvif/SearchRecording
Has Imaging services: /onvif/Imaging
Has media services: /onvif/Media
Has RTP_RTSP_TCP, requesting profiles
first profile is Profile_1
first source is VideoSource_1
requesting URI for profile Profile_1
RTSP URI: /Streaming/Channels/1?transportmode=unicast&amp;profile=Profile_1
Has Event services: /onvif/Events
Has WSPullPointSupport
RelayOutputs: 1
RelayOutput: AlarmOut_0/Monostable/closed
InputConnectors: 1
Has Device IO services: /onvif/DeviceIO
AudioOutputs: 1
AudioOutput: AudioOutputToken
Done
 
Confirmed that the camera is sending emails when the PIR is triggered. Seems to be a BI problem somehow..
 
Using my DS-2CD2132F-IS(V5.2.5 build 141201) I get external triggers in BI using the line crossing detection.


Does anyone know how BI checks for the external alarm?
Is it just the xml from http://192.168.1.11//IO/outputs/1/status


JvHDr0Z.png


This keeps showing up in my log. No idea what it means..
1 5/12/2016 12:57:38 PM FD PTZ: 12002: /IO/outputs/1/status
1 5/12/2016 12:58:50 PM FD PTZ: 12002: /IO/outputs/1/status
1 5/12/2016 1:02:26 PM FD PTZ: 12002: /IO/outputs/1/status


Threw an SD card in the camera so i could check the log. Getting very frustrated that BI isnt triggering... oh well.


N8gg6l3.png
 
Last edited by a moderator:
Update:
Created a simple workaround with PHP.

<?php

set_time_limit(0);
//Set Variables
$url = "http://admin:12345@192.168.1.12/IO/inputs/1/status";
$trigger = "http://localhost:81/admin?camera=FD&trigger&user=admin&pw=password";
$log = "C:/Users/Jared/Desktop/log.txt";




do {
sleep(1);
$now = date("F j, Y, g:i:s a");
//Get the webpage
$xmldata = file_get_contents($url);
//parse the data, or die.
$xml=simplexml_load_string($xmldata) or die("Error: Cannot create object");
$state = $xml->ioState;
switch($state)
{
case "inactive":
print $now." Inactive! \r\n";
break;
case "active":
print $now." Active! \r\n";
file_get_contents($trigger);
print $now." Triggered! \r\n";
file_put_contents($log, $now." Trigger activated! \r\n");
break;
default:
die("Error: Invalid state returned: ".$state);


}
} while ($xmldata !== false);
?>


Running from CLI, it checks the alarm status from the camera every second, and triggers BI if there is an alarm from my PIR.