I trying to use Bosch Gen2 PIR to trigger IP camera to record video. I use SecuritySpy, which is a multi-camera video surveillance application for the Macintosh. Here is the code I am using:
//My First attempt to activate camera in SecuritySpy with motion
function onZoneNotReady(zone) {
if(zone.number == 6) {
helper.executeAppleScript(controller, 'tell application "SecuritySpy" to active mode "Front Door"');
helper.executeAppleScript(controller, 'tell application "SecuritySpy" to set motion "Front Door"');
}
}
When I run this script, I get the following message "Unhandled exception in script on line: 7 in function "onZoneNotReady": executeAppleScript(): AppleScript error: SecuritySpy got an error: Application isn’t running." Is this due to Apple sandboxing? Is there anyway around this or another way to trigger SecuritySpy to start recording?
I know both the IP cameras and SecuritySpy can be controlled with Html commands. This is the html command for SecuritySpy "http://<servername>/++ssControlActiveMode?cameraNum=<camera>". I'm not sure if HaikuHelper can send an html command. If anyone has any suggestions or could provide some help, I would greatly appreciate it.
//My First attempt to activate camera in SecuritySpy with motion
function onZoneNotReady(zone) {
if(zone.number == 6) {
helper.executeAppleScript(controller, 'tell application "SecuritySpy" to active mode "Front Door"');
helper.executeAppleScript(controller, 'tell application "SecuritySpy" to set motion "Front Door"');
}
}
When I run this script, I get the following message "Unhandled exception in script on line: 7 in function "onZoneNotReady": executeAppleScript(): AppleScript error: SecuritySpy got an error: Application isn’t running." Is this due to Apple sandboxing? Is there anyway around this or another way to trigger SecuritySpy to start recording?
I know both the IP cameras and SecuritySpy can be controlled with Html commands. This is the html command for SecuritySpy "http://<servername>/++ssControlActiveMode?cameraNum=<camera>". I'm not sure if HaikuHelper can send an html command. If anyone has any suggestions or could provide some help, I would greatly appreciate it.