I would like to suggest the following enhancements to the Smart Macros module:
1. Functionality to pass arguments to the Windows command
2. Ability to specify multiple triggers for the macros
3. Ability to specify dynamically configurable priority for the macros
One more functionality that would be very desirable would be the ability to create a timer that triggers at a configurable interval.
Quote from: jawaid on July 28, 2006, 03:32:12 AM
One more functionality that would be very desirable would be the ability to create a timer that triggers at a configurable interval.
You can have conditions and timers for a macro. Were you thinking of something else?
If I want a macro to be exceuted every 15 minutes, I will have to put in 24 x 4 = 96 timers for the macro's trigger to execute the macro round the clock. A periodic timer which can be configured to go off at the specified interval would be nice. Or is it already available and perhaps I missed it? I am using a workaround but it slows things down.
Quote from: jawaid on July 29, 2006, 12:28:49 PM
...A periodic timer which can be configured to go off at the specified interval would be nice. Or is it already available...
Ok I see now. Unfortunately such a feature is not available. I believe any "interaval macro" such as that would be beyond the hardware abilities of the CM15A and would need to run from the computer. (This would create other problems.)
I can think of a work surrounds that while not ideal would avoid need for 96 timers. How are you making it work now? I would caution against an unlimited loop.
Also what is your application? If it is something that is imperative that it happen every 15 minutes without fail or duplication, I'd consider a dedicated hardware timer. X10 can not be relied upon for those conditions.
Steven r,
My workaround is to send an "on" command through ahcmd from the PC to a dummy module which triggers the macro I want to run periodically. The script running on the PC sends out this command at fixed intervals.
My application is to save images from the cameras at fixed intervals and also be able to take snapshots when motion is detected. I am using iWitness to take snapshots.
Quote from: jawaid on July 29, 2006, 01:51:03 PM
...My workaround is to send an "on" command through ahcmd from the PC to a dummy module which triggers the macro I want to run periodically. The script running on the PC sends out this command at fixed intervals....
I was thinking of chaining macros but if you have a reliable script running on the PC that sounds like a better idea, since your computer needs to stay on anyway for your application.
I'm not a programmer but while I don't think an "interval macro" could run from the CM15A, I think it could be added as a macro to run from the PC.
I had tried something like a chain but the results were weird and far from reliable. The script from the PC runs pretty well.
What I would like to do is to be able to read the PLC and RF commands/signals coming in and out of the AHP box so I can control the cameras directly. Any thoughts?
Quote from: jawaid on July 29, 2006, 02:20:16 PM
...What I would like to do is to be able to read the PLC and RF commands/signals coming in and out of the AHP box so I can control the cameras directly. Any thoughts?
I haven't taken on cameras and AHP yet so I'll have to defer that question to someone else.
Good luck.
Lacking the feature, I wonder if this might work?
Write either a SCRIPT or EXE that will send an ON to a "dummy module". Use the WINDOWS SCHEDULER to execute your SCRIPT or EXE on 15 minute intervals. Respond to the ON signal from the DUMMY MODULE by doing the stuff you want to do in AHP. If some is OUTSIDE of AHP then have your script or exe do some or all of the work.
If you are not familiar with the scheduler, run control panel, find SCHEDULED TASKS. Click ADD SCHEDULED TASK. a WIZARD pops up. You may need to browse to your script or exe. Choose DAILY. Take defaults for the rest, except the LOGON information of course. IMPORTANT: pick OPEN ADVANCED PROPERTIES FOR THIS TASK WHEN I CLICK FINISH, and then click FINISHED. Click the ADVANCED BUTTON. click REPEATING TASK. You can choose EVERY 15 MINUTES. Basically you are requesting schedule action each day, so start it at 1 minute past midnight, repeating every 15 minutes, and the duration should be like 23:58 so it is doing the 15 minute triggers all day every day. I know its confusing, but that's the way it works (at least on XP). There is ALSO a saftey feature here that if the task is NOT done in 15 minutes to stop the daily event (no more repeats) if you choose. If your application errors (maybe the disk is full), and throws up an error dialog, the application won't end itself normally, so think about this.
Just a thought.
Biker, I used a dummay module to trigger the macro and my script sends an ahcmd command every 15 minutes to turn on the dummy module. I did not use the Windows scheduler though I could have. I wrote this in Perl because eventually I want to expand this script and track more of the camera statuses.
How does one have a SCRIPT or EXE send an ON to a "dummy module?" Is there a code sample some place?
Quote from: ditylmb on January 05, 2007, 10:23:01 AM
How does one have a SCRIPT or EXE send an ON to a "dummy module?" Is there a code sample some place?
If you are familiar with scripting, or writing software in general, the information you need can be found in the AHP SDK which you can get here: http://www.x10.com/activehomepro/sdk/index.html
I didn't read every word of this thread, so I may just not answer your particular question, but maybe it'll help someone....
as far as a simple interval timer I created this...
Using an appliance module....
(http://www.geocities.com/methinksx10/TimerModule.JPG)
and this macro...
(http://www.geocities.com/methinksx10/LoopTimerMacro.JPG)
Then hit the "Run Macro" button and your off...
I don't use this timer so I don't know how it will act, but I use a similar looping macro for auto arming my security system (too ensure it gets armed or dies trying!!!) If I ever need this timer I will use it to see how it works, if someone else has more experience with this situation please chime in...
8)
Quote from: jawaid on July 28, 2006, 03:32:12 AM
One more functionality that would be very desirable would be the ability to create a timer that triggers at a configurable interval.
Yea, I agree.
I would like a macro that, say, can trigger once every 30 seconds. Have it repeat over and over again, until I break the loop.
This way, in an emergency, have the outside lights flash in some sort of attention grabbing pattern that would make the house "stand out" for quick ID by the police, ambulance, or fire company.