Premise Email a Security Camera Still when sensor triggered

Motorola Premise

Shinyshoes

Member
So I finally have my driveway sensor installed. I have it set up to play a notification over the whole-house audio system (nuvo) as well as send an email to me.

I also have a IP security camera set up facing the driveway. (Axis) I would really like it if the email that I am getting sent would include a picture from my security camera.

Can somebody point me in the right direction?
 
I would call Axis and see what methods are available. Sometimes you can modify an http address to call a CGI script that is within the camera.

http://www.myhomeserver.com/?page_id=80
"Snapshot image and Mobile Snapshot: Another feature that we really appreciate is the ability to get a snapshot JPG image from the camera by going to a simple URL. This was something that was lacking in the older Linksys cameras and was one of the most common questions on the Linksys support forums. This is a feature that is very handy if you have a cell phone or mobile device that does not support streaming. We use a simple URL format http://MyName.MyLinksysCamera.com/img/snapshot.cgi that takes the current image and feeds that JPG image back to the browser. If the camera is set to 640×480, that’s the size of the image it returns. For mobile use, http://MyName.MyLinksysCamera.com/img/mobile.cgi will return a fixed 160×120 image for quicker access from your cell phone. These options should allow you to view a current still image from the camera, no matter what browser or device you are using."

You'd need to write a vbscript that would
1. tell the camera to take a picture and copy the file from the camera (probably by using a script to browse the to webpage and calling a cgi script)
2. then email the image along with data on what triggered the device.

If vbscript can't directly do this (I think it can), there's probably a dll file you can use with vbscript to browse the web and download an image.

The script would be part of a module to extend the camera class, allowing home objects of camera type (sys://Schema/Device/Security/Camera) to have a second bound object of sensor type.
 
Depending on the type of axis camera you need to configure an "Event Server" and "Event Type".
This can be found under the Event Config menu. It is pretty straight forward once you are in there.

Hope this helps!Axis Event.png

So I finally have my driveway sensor installed. I have it set up to play a notification over the whole-house audio system (nuvo) as well as send an email to me.

I also have a IP security camera set up facing the driveway. (Axis) I would really like it if the email that I am getting sent would include a picture from my security camera.

Can somebody point me in the right direction?
 
Second to what JFab said. A lot of Axis IP cameras have digital inputs included that can be used as event triggers, so hopefully all of what you seek can be incorporated easily inside the Axis camera itself.
 
I figured most of the more expensive cameras must have digital inputs for a hardwired connection to contacts. In most installs then do you always run 18/4 and ethernet to each camera or does Axis offer some sort of base station that you'd terminate the contacts to? Does Axis really not offer a way to trigger an event via tcp/ip (http or telnet)?

This hardwired method doesn't seem as versatile compared to a software method (e.g. CGI call over http based on a home automation software triggered event).

The reason I'm asking is I'd like to do something similar to what's being discussed. I'd like to have my doorbell event in Premise trigger an IP camera to take a picture and display it at some http address. I already use my doorbell to trigger events in Premise (right now it makes an announcement and pauses my TV). If media center is being used, a message box also appears alerting the user.
 
Thanks for the replies guys! My camera does indeed have those digital inputs that can be used as triggers to take a snapshot. That is not the issue.

Depending on the type of axis camera you need to configure an "Event Server" and "Event Type".
This can be found under the Event Config menu. It is pretty straight forward once you are in there.
I guess it is not so striaght forward for me. I had poked through the Event Server section of my camera and read through it in the manual but it might be a bit beyond me. From my understaning, there needs to be a CGI script residing on the HTTP server that will receive the upload from the Camera. Does somebody already have the CGI script already written that they would be willing to share? Is CGI the same regardless of the server? Can I use the CGI script for Apache found Here? I have never done CGI before.......

I guess the only other option for me would be to set up an FTP server on my premise box and then use the FTP Event server to send the image over from the camera.

Does anyone else in here use an Axis Camera?
 
Attached is a very old program I used to use around 2000 to do security cam captures. Its very basic. Today I utilize HS to get the pictures in a different. The program is simple and it just works. I am currently using Zoneminder for my security DVR. It should work in the same way with your Axis camera.


I was looking thru my old camera captures scripts and all of them utilize HS calls; so they wouldn't be much help.

Here's an Axis script I found googling.

<html>
<head>
<title>MJPG Live Demo</title>
</head>
<body>
<center>
<h2>Motion JPEG image</h2>
<!-- Cut from here to the end of image display comment -->
<!-- Note: If you do not see a JavaScript below in the view source window you must -->
<!-- first save the html file from your browser, then open the saved -->
<!-- file in a text editor, for instance Notepad.-->

<script LANGUAGE="JavaScript">// Set the BaseURL to the url of your camera
// Example: var BaseURL = "http://172.21.1.122/";
// Since this file is located inside the unit itself, no base url is specified here

var BaseURL = "http://[myCamera]/";

// DisplayWidth & DisplayHeight specifies the displayed width & Height of the image.
// You may change these numbers, the effect will be a stretch or a shrink of the image

var DisplayWidth = "320";
var DisplayHeight = "240";

// This is the filepath to the image generating file inside the camera itself

var File = "axis-cgi/mjpg/video.cgi?resolution=320x240";

// No changes required below this point

var output = "";
if ((navigator.appName == "Microsoft Internet Explorer") &&
(navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
{

// If Internet Explorer for Windows then use ActiveX
output = '<OBJECT ID="Player" width='
output += DisplayWidth;
output += ' height=';
output += DisplayHeight;
output += ' CLASSID="CLSID:745395C8-D0E1-4227-8586-624CA9A10A8D" ';
output += 'CODEBASE="';
output += BaseURL;
output += 'activex/AMC.cab#version=2,0,21,0">';
output += '<PARAM NAME="MediaURL" VALUE="';
output += BaseURL;
output += File + '">';
output += '<param name="MediaType" value="mjpeg-unicast">';
output += '<param name="ShowStatusBar" value="0">';
output += '<param name="ShowToolbar" value="0">';
output += '<param name="AutoStart" value="1">';
output += '<param name="StretchToFit" value="1">';
output += '<BR><B>Axis Media Control</B><BR>';
output += 'The AXIS Media Control, which enables you ';
output += 'to view live image streams in Microsoft Internet';
output += ' Explorer, could not be registered on your computer.';
output += '<BR></OBJECT>';
} else {

// If not IE for Windows use the browser itself to display
theDate = new Date();
output = '<IMG SRC="';
output += BaseURL;
output += File;
output += '&dummy=' + theDate.getTime().toString(10);
output += '" HEIGHT="';
output += DisplayHeight;
output += '" WIDTH="';
output += DisplayWidth;
output += '" ALT="Camera Image">';
}
document.write(output);
document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
// document.Player.UIMode = "MDConfig";
// document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?ImageSource=0"
// document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi";
</SCRIPT>

<!-- End of image display part -->
</body>
</html>
 

Attachments

Back
Top