Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Looping Macros  (Read 6518 times)

chrischris

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Looping Macros
« on: July 08, 2011, 11:51:27 PM »

I'm having what I can only figure must be a software issue with Smart Macros.  I'm unable to make a loop of any kind or even kick off another macro by calling it.  When testing my macros and watching the log in activity monitor I can see the macro called then it just stops.  After calling X10 tech support they suggested I have a corrupted file and I went through the very complete uninstall and reinstall of all my software and plugins to the latest builds. Still no luck same behavior, no loop.  I'm stumped please help?
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 298
  • Posts: 13009
Re: Looping Macros
« Reply #1 on: July 09, 2011, 06:06:00 AM »

Can you post a sample of what you where trying?
Logged

chrischris

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Looping Macros
« Reply #2 on: July 09, 2011, 08:02:05 AM »

I believe that something like this should run continuous, not that you should try to run a loop with out a planned break, but it should, mine AHP just P2 at the bottom and stops in my log

New Macro 1 P2 On
(P3) New AM466 ON
Delay for 5 Seconds
(P3) New AM466 OFF
Delay for 5 Seconds
(P2) Appliance Control ON

LOL, ITS TO EARLY FOR THIS, I WAS GOING TO RUN THIS BROKEN EXAMPLE IN A LOG FILE FOR YOU , AND NOW IT RUNS IN A LOOP, I'LL LOOK AT THIS CLOSER AND REPOST
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 50
  • Posts: 2810
Re: Looping Macros
« Reply #3 on: July 09, 2011, 10:14:40 PM »

As far as I know, you still can't directly call one macro from another.
The workaround is to add a "dummy" appliance module on the same address as the macro you are trying to call.
Put that dummy into the first macro, at the point you want to call the second macro.
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: Looping Macros
« Reply #4 on: July 10, 2011, 10:44:22 AM »

As far as I know, you still can't directly call one macro from another.
The workaround is to add a "dummy" appliance module on the same address as the macro you are trying to call.
Put that dummy into the first macro, at the point you want to call the second macro.

I am a bit confused on this.  All macros have an X10 H/U code trigger correct?  If that is the case you should be able to signal a macros trigger address and "call" that macro from another without the need for adding a dummy appliance module.  Granted when you call the macro from another you would use an "Appliance Control" on or off to trigger it, but you should not need the dummy module to do it.

I currently have a couple macros that run batch files that use a CURL call to my LCD projector over the network and tell it to turn on and off (I8 on, and I8 off).  I do not have a dummy appliance module for the projector.  I also have my "Start Basement" macro which turns on my basement lights and dims them to 50% and then calls I8 on to turn my projector on.  My "Start Basement" macro calls my projector on macro directly. 

Unless I am misunderstanding your definition of a dummy appliance module, it seems that this CAN be done as in my description above.  The way I think of a dummy appliance module is actually having an appliance module such as an AM466 defined in AHP on an address where I don't actually have an appliance module running in my house at that address.  The reason you would do this is to use it as kind of a pseudo-flag that you can check the state of.  There are reasons you may want to use a dummy module instead of a flag.  One reason is that if you want to have a condition to check in another macro that you can easily set and clear, it is easier to set a dummy module that you can trigger from a remote or say an XPT wall switch versus having to create macros that set and clear a flag.  It saves the actual flags for other more important things.
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 50
  • Posts: 2810
Re: Looping Macros
« Reply #5 on: July 10, 2011, 11:20:43 AM »

Yes, it is a shortcoming on AHP, and I'm pretty sure it was never fixed.
When you try to have AHP call one macro from another, I don't think ti actually sends that commandout over the powerline. For whatever reason, that doesn't trigger the second macro. If you tell it to turn on an appliance module on the same address (even if you don't actually have a module plugged in and set to that address), it sends the command out on the powerline, which will trigger the second macro.

I may be wrong on this, but I don't think the developers ever fixed this.
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: Looping Macros
« Reply #6 on: July 10, 2011, 11:32:28 AM »

When you try to have AHP call one macro from another, I don't think ti actually sends that commandout over the powerline.

How are you having it "CALL" the other macro?  The only way to do that is through a module control on the trigger that the macro is set to.  In my "Start Basement" macro, I "CALL" my projector on macro by issuing an "I8 on".  I guess where my confusion is would be as to why AHP would not send the "I8 on" over the powerline.
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.
 

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