The goal was to have a bunch of motion sensors around outside the house.
When one is triggered a camera would turn on and start recording.
Getting this working was definitely harder than I expected.
I used the IWitness and Smart Macro plugins to implement this setup.
The camera and recorder turn on in less than 1 second.
The actual recording is very close to what I set it to + a second or so.
No multiple 2 minute files. - See -
http://www.x10community.com/forums/index.php?topic=11529.msg65856#msg65856It doesn't crash.
Other macros can run and don't get stuck during the recording phase.
Anyway here is the setup and the macros I use.
I hope someone else finds this useful and it saves you some time.
Flow Charts
Main Process - Monitors the sensors
Switch Process - Watches the P1 (Recording On) Switch
The setup
1) Change the codec from the default cinipaq codec to the Microsoft Video 1 codec
my CPU usage went from 96% to 34% with this change alone.
I currently have my frame rate set to 12 frames per second.
75% compression quality. Key Frame every 12 frames 320 x 240.
2) Set the motion sensor and the camera to the same address.
That way when the sensor triggers it will start the camera.
Mine are set to B3.
You can have multiple sensors addressed to the same camera.
You can also have multiple cameras each with its own sensor.
The camera will switch automaticly when the sensor triggers turning off the currently on camera and on the other.
The
sensor on macro for the camera will;
If you are already recording do nothing. Recording will continue untill the delay times out.
If you are not recording recording will start.
3) Create a phantom switch I used a Appliance Module (3-Pin) Addressed to P1.
The Macros
1) Sensor On - Trigger B3 on - Stored in interface for speed
2) Recording On - Trigger P1 on
3) Recording Control - Trigger P1 on - Has to run on the interface to stay out of the way of AHP.
4) Recording Stop - Trigger P1 off
When the Motion sensor triggers
it turns on the associated camera
and
triggers the
Sensor on macro.
The
Sensor On macro turns on the
Recording On phantom switch.
The phantom switch triggers
The
Recording on macro
and
The
Recording control macro
The
Recording on macro just starts recording video.
The
Recording control macro is the brains of the outfit. It makes sure its only runs once, delays then turns off the
Recording on phantom switch.
Turning off the phantom switch triggers
The
Recording stop macro whch stops the recording.
Good Luck