Macros and Mailing ( external triggers)

Started by partridgewest, October 27, 2010, 01:03:06 AM

Previous topic - Next topic

partridgewest

Greetings all,
   I m starting a new project and while I don't have a lot of experience with AHP I m pretty handy with programming and computers. 
I m hoping find some related experience with  mailing macros. I m trying to test  a macro, just to make sure the mailing function works, without ANY conditions or triggers. Is there a way to fire a macro?

Speaking of mail, the macro will basically watch the inside of the USPS mailbox(via a motion sensor), when activity is triggered, it sends an email message out that the mail has arrived.  The 2nd time in a day resets the macro ( ie. Mail has been retreived but I think we can make it once and then loop it....).  Later I ll fine tune the app, but for the most part I m trying to test the single mail command in the macrodesigner.

Thanks for all replies!

Frank

Noam

Create the macro that sends the e-mail (the CM15A must be connected to the PC all the time for this to work, and I think (not 100% sure) that AHP needs to be running (might only need the X10nets.dll loaded).

Use the HouseCode/UnitCode of the motion sensor as the trigger for the macro.

Should be pretty easy to test it, by opening the mailbox, and seeing if you get an e-mail.
You can test the macro without the motion sensor, just by clicking on it in AHP.

JMac

Isn't it true also that by clicking on the blue "Run Macro" (Room View), you by pass the conditionals?

Noam

Yes, but it looks like the OP isn't worried about the conditions at this point, just trying to make sure the e-mail portion works.

partridgewest

#4
Thanks everyone for the quick responses.  The email alert works but puts a time stamp of 4 hours earlier. (sigh) kinda slow on the uptake, it takes maybe 10 minutes for the alert to go thru.  I m sending to email, but will send to mobile once I get the bugs worked out.

Now for the big thing issue which is probably just something I missed :
 
          I have the motion sensor working and sending X10 signals.  IN AHP when it flips the light on the switch moves to on, ( and my macro also executing but that's another story )  The dimmer stays at 0 %.  Strange.   I switched this out and  used an appliance module icon instead since I read somewhere there's iffy performance with the lamp module.   No luck. I thought maybe it was a x10 code issue. I switched out the an "on" command on the macro for an ALL LIGHTS ON.  Switches move to on but the lamp does not.  so other than having a fancy remote control ( my pc ) is there a way to get this to work?  I have the CM15A running the show. 

I have a few applications with the LM465 and MS14A noted above, I m just going to have to duplicate this over a few sensors and xpdf's.  I think the issue's with the AHP as it's quite strange to be "on" but not on when the software does it.

Thanks again to all.



partridgewest

Finally got the macro to work properly. as it turns out the macro setting was off.
Doubly difficult to trouble shoot, but the mail works as a  print statement tracing program execution. Does anyone have suggestions for using a logfile with this? something sort of unix/dos like like  print " executing Macro1a subroutine"  date >> logfile.out

Thanks



anthonylavado

If the built in logging from the Activity Monitor isn't enough, AHP has a function that lets you run a Windows command as part of a Macro. I'm sure you could tie it to a DOS batch file that appends data to a text file. I'd have to bust out my batch command reference books. Can you tell it's been a while?
Follow me on Twitter: @anthonylavado
Now making guest appearances in the Home Automation Chat Room

partridgewest


At the end of the day, all the print statements are stripped out.  X10 takes a long time to execute.

Probably better if we can get x10 to run on linux