So, when my ISY-994i detects motion when none of us are home, it automatically uses the CGI interface to the cameras to quickly move the camera and point it toward the area the motion was detected. It does this, then has a 1.5 second delay in it, then immediately runs a loop with the parameter "range(50)" in it to capture 50 jpg's from the camera and save them to disk naming them with the date, time, and a sequence number from 0 - 49..... very basic, but more than enough for what I need. Here is the code:
Code: Select all
print "Capturing 50 images..."
for item in range(50):
#print item
image1 = urllib2.urlopen("http://xxx.yyy.zzz.qqq:ppp/cgi-bin/CGIProxy.fcgi?usr=XXX&cmd=snapPicture2")
increment = str(item)
filename = sitename + "_" + today.strftime("%y%b%d_%H-%M-%S.%f") + "-" + increment + ".jpg"
output1 = open(rptFolder + "\\" + filename,'wb')
output1.write(image1.read())
output1.close()
print "Captured!"
The PROBLEM I have is that, intentionally, capturing the 50 images takes about 20 or so seconds and during that time, EventGhost doesn't do anything else. It runs that single macro, and only one at a time apparently. Even though the person maybe move to another room, trip another detector, flip a switch, etc... that I want to run some other events.....
Is there any way to get EventGhost to just start the image capture than move on right away and process it's other tasks at the same time?