Please login or register.

Login with username, password and session length

Author Topic: Macros and Mailing ( external triggers)  (Read 8299 times)

partridgewest

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Macros and Mailing ( external triggers)
« on: October 27, 2010, 01:03:06 AM »

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
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Macros and Mailing ( external triggers)
« Reply #1 on: October 27, 2010, 09:41:12 AM »

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.
Logged

JMac

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 462
Re: Macros and Mailing ( external triggers)
« Reply #2 on: October 27, 2010, 11:31:23 AM »

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

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Macros and Mailing ( external triggers)
« Reply #3 on: October 27, 2010, 11:41:20 AM »

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.
Logged

partridgewest

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Macros and Mailing ( external triggers)
« Reply #4 on: October 28, 2010, 01:30:14 AM »

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.


« Last Edit: October 28, 2010, 01:36:57 AM by partridgewest »
Logged

partridgewest

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Macros and Mailing ( external triggers)
« Reply #5 on: October 28, 2010, 02:08:42 PM »

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


 
Logged

anthonylavado

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 198
  • At a position relative to the observer.
    • anthonylavado.com
Re: Macros and Mailing ( external triggers)
« Reply #6 on: October 28, 2010, 07:52:57 PM »

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?
Logged
Follow me on Twitter: @anthonylavado
Now making guest appearances in the Home Automation Chat Room

partridgewest

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Macros and Mailing ( external triggers)
« Reply #7 on: October 28, 2010, 08:45:32 PM »


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

Logged
 

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