Please login or register.

Login with username, password and session length

Author Topic: Calling macros in AHP without clogging the powerline?  (Read 3106 times)

jtykal

  • Sr. Member
  • ****
  • Helpful Post Rating: 12
  • Posts: 86
  • It was working fine yesterday...
    • Casa Bella - Vacation Condo in Fort Myers, FL
Calling macros in AHP without clogging the powerline?
« on: March 10, 2009, 02:23:23 AM »

From a macro running in AHP, I want to invoke another macro. (I've got this second macro assigned to "P2 ON"). The only time I ever call P2 ON is from another macro -- I never invoke P2 from an external RF or powerline command. It's just a "subroutine" call.

Is there a way to invoke this macro without the CM15A putting "P2 ON" onto the powerline?

I have lots of macros calling macros in my AHP setup, and I don't like what this is doing to the traffic on my powerline... TIA for any help!

(In my search for this answer, I did find a thread by Puck and Pajama Guy where they discussed using two CM15As and sending RF commands between them to keep the powerline clean. Clever, but I hope it's overkill...)
Logged
AHP-CM15A(ext.ant)-SmartMacros-OnAlert-DoorMonitor(custom)-Win7

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Calling macros in AHP without clogging the powerline?
« Reply #1 on: March 10, 2009, 09:41:07 AM »

...Is there a way to invoke this macro without the CM15A putting "P2 ON" onto the powerline?...
The short answer is No.
I don't believe the original programmers even intended or expected there would be a way for a macro to call another macro. This "feature" was a use discovered one. It requires a dummy module, in your case P2, and a signal being sent to it. I am pretty sure this has to be a power line signal. I don't think an RF signal will work.
 
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Calling macros in AHP without clogging the powerline?
« Reply #2 on: March 10, 2009, 10:32:42 AM »

jtykal
Using the windows command option and a third party software is the only way I know of so far!
Since your starting to play with VB2008 you may wish to look at this.
PC Companion and X10WavPlayer are examples but only fire sound events.
How ever there is a hidden option in PC Companion which will fire 1 x10 PLC event.
Never really thought about it when I included it for testing.
Syntax is:
PcCompanion ">SendOn<" 0
Sends the address for the telephone call trigger ON once
PcCompanion ">SendOff<" 0
Sends the Off signal for same address

Note: Option is available in the trial version

With AHP incapable of sending certain RF signals I can now see the need to expand on this feature
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jtykal

  • Sr. Member
  • ****
  • Helpful Post Rating: 12
  • Posts: 86
  • It was working fine yesterday...
    • Casa Bella - Vacation Condo in Fort Myers, FL
Re: Calling macros in AHP without clogging the powerline?
« Reply #3 on: March 10, 2009, 11:48:35 AM »

Thanks, steven r.  I tried testing with RF calls, and indeed, they do not work at all.

Of course, the powerline invocation is not reliable either, or I wouldn't have asked the question!  ;) I can see all of my "physical events" showing up properly on the Activity Monitor, but oftentimes my macro calls do not appear. AHP seems to be easily overwhelmed when asked to do more than one thing at a time. I have dummy modules on my monitored housecode indicating the open/close status of each door. (The macros for the DS10A open/close events just turn these dummy modules on/off.) These dummy modules are in the proper state almost 100% of the time (so I think my RF is OK...). However, the Module Status in AHP is not always updated properly, and the macros called as a result of the dummy module turning on/off are not always executed. Sigh...

Currently, the OnAlert security macros turning my dummy modules on/off are the only things running on the PC. All of my other macros/timers/etc. are running on the CM15A. Everything I've read in the forums tend to suggest that this is the optimal way to set things up. I've tried toying with delays in my macros with no success. It seems that if a new powerline event comes in before all of the macros associated with the previous event are completed, system behavior becomes non-deterministic. I'll be happy to send my AHP file to anyone who wants to have a look, and I welcome any additional suggestions.

Without this forum, AHP would have been shelfware for me a long time ago, so thank you all!  :)%

Logged
AHP-CM15A(ext.ant)-SmartMacros-OnAlert-DoorMonitor(custom)-Win7

jtykal

  • Sr. Member
  • ****
  • Helpful Post Rating: 12
  • Posts: 86
  • It was working fine yesterday...
    • Casa Bella - Vacation Condo in Fort Myers, FL
Re: Calling macros in AHP without clogging the powerline?
« Reply #4 on: March 10, 2009, 12:10:16 PM »

Thanks, Tuicemen. Using third party software is a good thought.  -:)
However, if I'm going to run another program, then I may as well work on writing my own! I've started on my "Door Monitor" app in Visual Basic. This simple app is much more accurate in reflecting the proper module state than AHP is. I'm sure I can extend this program to perform the other automation functions I need. (I just like being able to drag and drop pictures to change behavior rather than re-coding in VB.)
Going this route, all I would have in my AHP program is the OnAlert macros that pick up the security RF and turn dummy modules on/off. My program could then respond to these PLC events and do whatever other automation tasks I want. Plus, I can keep my powerline clean because I can make REAL function calls instead of turning on/off dummy modules.
I'm brand-new to VB2008, so I'm sure I'll have lots of things to discover as I work through this. Should be fun -- and probably a more practical use of my time than figuring out how to trick AHP into doing what it should.
Once again, thanks for the inspiration... >!


Logged
AHP-CM15A(ext.ant)-SmartMacros-OnAlert-DoorMonitor(custom)-Win7

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Calling macros in AHP without clogging the powerline?
« Reply #5 on: March 10, 2009, 01:35:55 PM »

Quote
However, if I'm going to run another program, then I may as well work on writing my own!

This is what I intended.
I only mentioned the PCC feature as proof it was possible!
However you could even do away with your dummy modules in AHP if intsead of tripping a dummy module it tripped a unique batch file for your program. This is basicaly how the security plug-in for PCC works no PLC activity! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
 

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