croven Posted January 27, 2016 Share Posted January 27, 2016 I use sighthound to record video events on my security cameras. I would like to be able to have sighthound send commands to my isy when it sees people in its video feeds. I could use the program below to turn on lights and such but I wanted to keep track of the events to some degree. although sighthound does a better job than any other cctv software I seen on detecting people, it sill has false positives. most of my cameras have over lapping fields of view. I would like the isy to act only when both cameras indicate that they see a person. this should reduce the false positives to almost zero. I believe I will need to use rules to get this to work correctly. any suggestions? http://forum.universal-devices.com/topic/6828-command-line-interface-to-99i-with-source/ Link to comment
KeviNH Posted January 27, 2016 Share Posted January 27, 2016 (edited) I suggest ignoring the "command line" link you included, it just makes things more confusing adds an extraneous layer of indirection. Instead, use curl to directly make REST calls to the ISY. Yes, you would write rules in Sighthound (Basic or Pro). I would make one rule for each camera, action would look like: curl.exe -ns http://10.3.3.3/rest/vars/set/2/9/1 Where 10.3.3.3 is your ISY's IP, and 9 is the number corresponding to the state variable for that camera. On the ISY994, I would make a state variable for each camera, e.g. $S.Cam1_SawPerson and $S.Cam2_SawPerson and then make an ISY program like this, one for each variable: Camera 1 If $S.Cam1_SawPerson > 0 Then Send Notification to 'WebPage' content 'WebPage Eventlog append Automated Event' Wait 1 minute $S.Cam1_SawPerson = 0 Comment: Camera 1 saw a person, so we log this and then clear the variable 1 minute later. Repeat the above for Camera2, Camera3, etc. Now you can write a program that has as a condition "$S.Cam1.SawPerson > 0 And $S.Cam2.SawPerson > 0". This program would only be true if both cameras saw a person within a minute of one another: Both cameras 1 and 2 If $S.Cam1_SawPerson > 0 And $S.Cam2_SawPerson > 0 Then Set 'KitchenLights' On Comment: Camera 1 & Camera 2 both saw a person, so turn on the light Basically, you are using the SightHound to increment state variables, and let the ISY deal with the AND logic and resetting the variables back to zero. This works better than directly calling programs, as you could, for example, have the second program only turn on the light if the time is after sunset. Edited January 27, 2016 by KeviNH Link to comment
croven Posted January 28, 2016 Author Share Posted January 28, 2016 I suggest ignoring the "command line" link you included, it just makes things more confusing adds an extraneous layer of indirection. Instead, use curl to directly make REST calls to the ISY. Yes, you would write rules in Sighthound (Basic or Pro). I would make one rule for each camera, action would look like: curl.exe -ns http://10.3.3.3/rest/vars/set/2/9/1 Where 10.3.3.3 is your ISY's IP, and 9 is the number corresponding to the state variable for that camera. On the ISY994, I would make a state variable for each camera, e.g. $S.Cam1_SawPerson and $S.Cam2_SawPerson and then make an ISY program like this, one for each variable: Camera 1 If $S.Cam1_SawPerson > 0 Then Send Notification to 'WebPage' content 'WebPage Eventlog append Automated Event' Wait 1 minute $S.Cam1_SawPerson = 0 Comment: Camera 1 saw a person, so we log this and then clear the variable 1 minute later. Repeat the above for Camera2, Camera3, etc. Now you can write a program that has as a condition "$S.Cam1.SawPerson > 0 And $S.Cam2.SawPerson > 0". This program would only be true if both cameras saw a person within a minute of one another: Both cameras 1 and 2 If $S.Cam1_SawPerson > 0 And $S.Cam2_SawPerson > 0 Then Set 'KitchenLights' On Comment: Camera 1 & Camera 2 both saw a person, so turn on the light Basically, you are using the SightHound to increment state variables, and let the ISY deal with the AND logic and resetting the variables back to zero. This works better than directly calling programs, as you could, for example, have the second program only turn on the light if the time is after sunset. Thanks, that's what I need to know Link to comment
Recommended Posts