Please login or register.

Login with username, password and session length

Author Topic: TIP: Video Recording Setup and Macros that Really Work On Time and No Crashes  (Read 44683 times)

ajleduc

  • Full Member
  • ***
  • Helpful Post Rating: 13
  • Posts: 41

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#msg65856
It 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
« Last Edit: January 20, 2007, 09:37:16 PM by ajleduc »
Logged

Don N

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 311

ajleduc --  Very informative.  Nicely presented too. 

I spent a lot of time doing the same thing you did, trying to get my two wireless cameras (front yard/back yard) working reliably.  It took me longer than I thought it would too.  It took so long to find a combination that wouldn't crash my system.  Anyway, my "Preferences" are setup the same as you've indicated.  I used iWitness and Smart Macros.  About the only difference between your setup and mine is, I use the motion sensor itself to control the recording.  The camera starts recording when the motion sensor is triggered to an "On" state.  The camera stops recording when the motion sensor is triggered to an "Off" state.  This eliminates the need for a phantom module and the use of flags.
« Last Edit: January 13, 2007, 02:57:58 PM by Don N »
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com

ajleduc,

WOW!  I don't even have a camera setup and I clicked you a "helpful" just because this is an excellent write-up!! and I appreciate the amount of time and effort that must have gone into it!

X10 should hire you to write their manuals, even if it's just online manuals!

Thanks for sharing!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

ajleduc

  • Full Member
  • ***
  • Helpful Post Rating: 13
  • Posts: 41

-Bill- (of BXVC) and Don N,
Thanks of the positive posts. 
Just wanted to add,
  Much of what is in this post is what I learned from all the X10 Community.

Don N,
Quote
This eliminates the need for a phantom module and the use of flags.

  I used the flag to try to prevent what I think Tuicemen refereed to as flooding in one of his posts.

  Early on I noticed that when I got hit by a bunch of motion sensor triggers AHP would crash.
  I know I could have set the time out on the motion sensor to something greater that 1 second. 
  I felt that would have decreased the sensitivity of the system as a whole.
  Although I am new enough at this that I am not sure that overall system sensitivity is something that should be worried about.
Logged

Drews

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 45

ajleduc,

WOW!  I don't even have a camera setup and I clicked you a "helpful" just because this is an excellent write-up!! and I appreciate the amount of time and effort that must have gone into it!

X10 should hire you to write their manuals, even if it's just online manuals!

Thanks for sharing!

Actually, X10 should hire him as a programmer to program this stuff into their software rather than expecting everyone else to make it work for them. This elaborate (but correct macro of his) should be the default behavior of both the Vanguard software and the AHP software when you associate a motion sensor with a camera and tell it to record. I'm running Vanguard and the from what I've seen of the motion sensor setup and recording, it behaves as if there's NO CODE behind it at all, just a dummy meaningless faux setup screen.
Logged

IPS

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 285

I am new at this so please bear with me. I installed AHP with iwitness, Smart Macro, MyHouse, AHP Security. After installing VA11A, my computer was often hanging up. Then couple of days ago, I read in that changing codec to microsoft 1 fixes this problem. And it has. But I can not install WMD audio because it causes fatal error message, on blue screen and computer restarts itself. In fact it does it so fast that I can't even read it. So now I stop before WMD driver starts to install. Result is that I can not view the video as window media player does not play AHP video.

To add to my vows, I copied your tip and after the macro stopped, I could not see the cameras on my laptop. I could see them on TV but not laptop. So I deleted the last instruction to turn off B Addressed modules.

So now, for the time being, I would like to be able to see the videos being recorded. So any help from you geeks will be appreciated. I windows XP home.
Logged

IPS

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 285

come on fellows am sure some of you out there know the answers to my problems. Help me out please!
Logged

DeltaNu1142

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 63

Back on point...  ajleduc, this is a brilliant post, thanks.  I set up the two cameras in front of my house in a matter of a few minutes, and it works great.  This really SHOULD be a built-in function as previously mentioned, with user-defined delay. +1 to you...
Logged
CM15A with modded antenna - AHP & Smart Macros - IR543 - RR501s - cameras, switches, and sensors oh my!

tom j

  • Hero Member
  • *****
  • Helpful Post Rating: 16
  • Posts: 1270

ajleduc --  Very informative.  Nicely presented too. 

I spent a lot of time doing the same thing you did, trying to get my two wireless cameras (front yard/back yard) working reliably.  It took me longer than I thought it would too.  It took so long to find a combination that wouldn't crash my system.  Anyway, my "Preferences" are setup the same as you've indicated.  I used iWitness and Smart Macros.  About the only difference between your setup and mine is, I use the motion sensor itself to control the recording.  The camera starts recording when the motion sensor is triggered to an "On" state.  The camera stops recording when the motion sensor is triggered to an "Off" state.  This eliminates the need for a phantom module and the use of flags.

Say Don & ajleduc do you have problems with bright sunlight triggering your motion detectors? that's why I never got into recording cuz I get so many false alarms from my motion detectors during daylight hours, my eagle eyes work great at night with a small piece of tape across the bottom of the sensor so that it obscures the view somewhat not allowing it to pickup little critters on the ground like squirrels and possibly small rodents, this is the country afterall just wondering if anyone else has experienced these problems and is there anyway modification that one can do to get around this, currently just have my setup for nighttime operation. Thanks

Tom j
Logged

ajleduc

  • Full Member
  • ***
  • Helpful Post Rating: 13
  • Posts: 41

TomJ:
I have had problems with the sensors picking up things that I don't want.  I have a lot of trees around, on windy days they trigger sensors like crazy.  I get home sometimes to find 200 - 300 1 minute videos. AHP doesn't like it much either sometimes crashes, maybe only once a month, its better than nothing. 
I have found its best to keep the videos relatively short somewhere around a minute, I may shorten this time up to less maybe a half minute.  I can open the folder (windows) and look at snap shots 1 minute a part. 

The number of videos isn't a problem though, I recently figured out what a while ago an x10 support person indicated we could do, no one could figure it out at the time.  You can open windows media player,  select all the videos in the video folder,  drag and drop them on windows media player, they will become part of the play list.  Hit play on the player, the player will sequence through all videos in your play list.  With the large number of videos I move the playback rate to 16x.  I can get through a lot of video in a short amount of time just looking for something that doesn't look right. 

Using that method I found a guy relieving him self in my driveway,  One guy going through the stuff in my jeep,  The delivery guy coming and going a bunch (delivering X10 products),  and the guy checking the electric meter.  So I figure although not perfect I will catch the things I want/need to see when they happen. 

The guy going through the car was a delivery man trying to find out if he was at the right address (looking for registration).  Although I don't like it, I guess I can live with it.  Whats neat was I got to call corporate and say HAY!, I got one of your guys going through my jeep on video... GOT YA ... THAT IS COOL!

I know there is a bunch more I can do to clean this stuff up, just time has been in short supply lately.  Summer in the north country.  I got 3 months to live than back in the deep freeze.

As time permitts, I have been just tring to place the sensors in different positions.  My current idea there is have them all facing the house.  If something comes between the house and sensor I will pick it up.  The house remains relatively stable, that is relative to the trees.  I would suspect that its tempature would increase slowly through the day and decrease slowly at night.  You have to do the antenna modification described in other posts, to get the distance for the sensors.
Another thing I found helpful is using industrial velcro on the sensors, moving them is easier that way.
Logged

DeltaNu1142

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 63
Re: TIP: Video Recording Setup and Macros that Really Work On Time and No Crashe
« Reply #10 on: September 18, 2007, 02:54:42 PM »

I thought I'd ask if anyone has experienced the same trouble I'm having, using this camera/sensor/macro configuration...

I usually get home and check my ActiveHome video panel only to find 40 - 50 or more "videos" in the range of 300kB.  These are not playable, and consist only of some static or just a black screen.  I'm at work now & (naturally) don't have access to ActiveHome, but I was wondering if anyone else is getting this?  For about a week, my setup worked just fine after following the steps above (catching delivery guys in the act), but seemingly without changing anything, it no longer works?!?
Logged
CM15A with modded antenna - AHP & Smart Macros - IR543 - RR501s - cameras, switches, and sensors oh my!

ajleduc

  • Full Member
  • ***
  • Helpful Post Rating: 13
  • Posts: 41
Re: TIP: Video Recording Setup and Macros that Really Work On Time and No Crashes
« Reply #11 on: September 18, 2007, 09:51:13 PM »

I thought I'd ask if anyone has experienced the same trouble I'm having, using this camera/sensor/macro configuration...

I usually get home and check my ActiveHome video panel only to find 40 - 50 or more "videos" in the range of 300kB. These are not playable, and consist only of some static or just a black screen. I'm at work now & (naturally) don't have access to ActiveHome, but I was wondering if anyone else is getting this? For about a week, my setup worked just fine after following the steps above (catching delivery guys in the act), but seemingly without changing anything, it no longer works?!?

I have seen the same thing a few times.  I go around and unplug and re-plugin all the cameras.  That seems to help, I think I have read some where in other posts that 2 cameras being on at the same time will interfer with each other.

Another possibility may be: http://www.x10community.com/forums/index.php?topic=13277.msg73992#msg73992

I have also gotten into the habit of doing the following on starting Activehome.
1) Click on the turn off all devices.
2) Turn off or clear all flags
3) Clear history
4) Purge delayed macros and events.
I don't know if it helps but most days everything works fine.
« Last Edit: September 18, 2007, 09:56:37 PM by ajleduc »
Logged

tav

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2

This simple fix worked for me based partially on info from this thread.
- As mentioned in this thread change codec to Microsoft Video 1---I couldn't even open the task manager while video record was on because I had no processor cycles available with the default cinepac codec

- macro should check flag 1 is not set upon entry and exit if it is set
- upon entry macro should immediately set flag 1
- start video record
- delay x number of seconds
- Turn off video record
- clear flag 1
- exit macro

This works for me and records the exact number of seconds i delay. No more and no less. The codec change is critical.
What I can't get to work is when I replace the video record with the auto stills - can't get that to work at all even though i see and hear the still icon. I also tried snapshots (Why do they have snapshots and stills anyway? What is the difference?) Snapshot followed by a delay followed by snapshot etc.. gives me a couple of snapshots only...no matter how many i put in the macro. Although I haven't yet tried either of these with the Microsoft codec.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.