X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: roadking on October 06, 2006, 01:42:34 PM

Title: macro works wiithout conditions, but not with
Post by: roadking on October 06, 2006, 01:42:34 PM
I've read all the posts I can find on this topic and tried several suggestions but cannot solve the problem.

I have AHP with smartmacros.  I"m trying to test conditions in a macro.   The macro works fine with no conditions, but ANY condition I add causes the macro to fail.

Without conditions I can trigger with an EagleEye motion sensor (#N1) or trigger via AHP.  It works fine and turns on a light (#C1).   With any condition I can trigger via AHP command and it works fine.  But if I trigger with the EagleEye I can watch the macro execute (blink), but it does not turn on light #C1.

N and C are set as "transceived house codes". 

Any help will be appreciated.   Here is the event log when triggered with the EagleEye;

Event    Date/Time    Action    Data
0    10/06/2006 12:34:42 pm    Receive RF    N1 On
1    10/06/2006 12:34:43 pm    Receive    N1 (Master Bath Sensor)
2    10/06/2006 12:34:43 pm    Receive    N On (Master Bath Sensor)
Title: Re: macro works wiithout conditions, but not with
Post by: JimC on October 06, 2006, 02:28:03 PM
It would be more helpfull if you gave us the specific macro with the conditions. Are the conditions being met? If it is a time sensitive condition is the time set correctly in AHP? Have you tried downloading the macro to the interface? 

Quote
I can watch the macro execute (blink

It is normal for this to happen but the light (C1) will only turn on if the conditions are met.

If you give us the specific macro with the conditions I am sure someone on this forum can help.
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 06, 2006, 03:07:16 PM
This is same problem I have... note if you put an 'else clause' that will ALWAYS execute.  Check out the 'smartmacros don't appear to work' thread.  Still no resolution as of this time.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: roadking on October 06, 2006, 03:44:55 PM
AHP will not let me select and copy my AHP screen with the Macro.   I've seen others post copies of the screen.   How do you copy the AHP screen to a post on this board?
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 06, 2006, 05:01:04 PM
I use a program called ClipMate.  It is a sophisticated clipboard program.  You could do a <Shift><PrintScreen> then paste into some document and edit it to what you wish to send as an alternative.  http://www.thornsoft.com is the website of the people who sell ClipMate.  They may have a trial version you could use for a while even if you didn't want to buy it.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 06, 2006, 06:19:28 PM
A good freeware screen capture program called Screenshot Pilot is located here: www.colorpilot.com/screenshot.html (http://www.colorpilot.com/screenshot.html)

Easy to use many options to capture multiple screens, objects, areas, etc

Try setting your macro up like this screenshot and see if it works replacing the my "C8" trigger with your EagleEye setting and my "D2" lamp with your lamp module setting.  One thing to note, when you run a macro from within AHP by pressing "Run Macro" all conditions are bypassed and  only the commands execute.

Title: Re: macro works wiithout conditions, but not with
Post by: roadking on October 06, 2006, 06:21:40 PM
OK, the good news.  I found the problem.   If you select the radio button for "run from PC", it will ONLY run from the PC and the motion sensor will trigger the macro but it will fail.   But if you select "store in interface" it will work with the motion sensor AND can be triggered from AHP manually.

They should change the radio button to say "Run ONLY from PC"


So, now it's working fine. :) :) :)
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 06, 2006, 06:54:11 PM
You may have stumbled onto something that's implied in the SmartMacros Help file.

"If/Else In Smart Macros
Smart Macros supports IF-THEN-ELSE chaining. If multiple macros have the same address trigger (e.g., 2 macros both triggered by A4 ON), then the hardware interface will try to find the right macro to run. The ActiveHome hardware interface will check each macro in turn, in the order listed in the Macro Designer screen, to see which macro is available to run. If that macro's conditions are satisfied, then that macro will trigger. "

IF statement logic dictates that when there is no explicit else "execute statement if TRUE otherwise go the next statement".  The help file states the "hardware interface" will check the macro for a true condition and then trigger.  So the I think it's safe to assume that all conditionals, except for those using the security devices, are executed in the CM15a hardware!  This would also explain why conditionals are bypassed when you press the "Run Macro" button in AHP!

Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 07, 2006, 10:33:21 AM
I don't have that option on my screen.  Both Run from PC and Store in Interface are selected and greyed out and next to that is a comment that says 'Macro must be run from the PC'.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 07, 2006, 04:31:46 PM
If the radio buttons are greyed out and the screen shows "Must be run from PC" this means that you have a security module as a trigger for this macro.  I ran some tests and it appears that the conditions for "Armed State" and "Sensor State" are evaluated properly, but any time, time range, date, etc. are not and the macro executes anyway.  I've also found that flags may not be set by the macro and multiple commands aren't always processed.  The following macro always executes and the chime sounds but the light never turns on and the flag is never set!
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 08, 2006, 09:40:17 AM
If the radio buttons are greyed out and the screen shows "Must be run from PC" this means that you have a security module as a trigger for this macro.

Can also mean that it is an 'advance function' such as email or send X10 address.

I think that my problem is related to the CM15a... think it is capute.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 08, 2006, 12:10:31 PM
I learn something new every day, thanks!  I haven't delved into the advance functions yet but I still believe that the logic for conditionals and flags are handled in the CM15a hardware and if the macro must be run from the PC only specific condtions are evaluated, such as OnAlert conditions, MyHouse email, and so on.

From SmartMacros Help File:

Flags and Advanced Macro Condtions
The ActiveHome interface supports up to 16 flag variables. You can set or clear flags in a macro command. And you can check those flags in macro conditions to determine whether or not to trigger a macro. If you would like to see for yourself what flags are set on the ActiveHome interface, check the Hardware Status Report from the main File menu.

Only macros that run in the ActiveHome hardware can set flags. If you doubleclick on a macro from the ActiveHome software it runs the macro in software and the flags won't be set.

The following macro doesn't execute if the radio button "Run from PC" is selected, but works correctly if it's stored in the CM15a interface.

Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 08, 2006, 03:19:58 PM
delibaker & RJMiller
There is a way to get macros that have to be run from the pc to use the logic stored on the interface!
By using Phantom/Dummy/Virtual modules!
In order to have a security module trigger the macro posted by delibaker you make a macro triggered by the security module that only turns on C1(C1 is your dummy module) AHP sends the C1 on command which also triggers the macro posted!
Note: You Should have "Multiple modules can use same address" checked under "Preferences"  for AHP
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 09, 2006, 07:52:21 AM
Thanks Tuiceman!  Using your suggestion of a Phantom/Virtual module worked.  I wanted an ActiveEye motion sensor to sound a chime during business hours and if it were after hours and the security system wasn't armed, arm it!  It's a bit klutzy to test conditions in the interface and set Phantoms to run actions that only run on the PC.  If AHP knows where the macro runs from why didn't X10 just include the logic in software to test conditionals only when it runs from the PC?  Maybe in a future release!
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 09, 2006, 08:48:20 AM
Glad you found it Helpful! ;) And it's nice to see you can get it to do what you want now. :)
Using the phantom trick frees up some sensors,  I changed most of  my motion sensors to the security ones where I could ::) ;). 
 The macros are a little slower to start but I can live with the small delay! ::) ;) :)
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 09, 2006, 06:11:05 PM
I thought of changing to the security sensors also, but if the security motion sensor fires the arming macro the DS7000 sometimes issues a trouble alarm and doesn't arm.  This seems to happen only when the light on the DS7000 corresponding to the activated motion sensor is still lit when the arm command is issued.  I guess thats the same trouble alarm when there is an open door/window sensor when arming the system.
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 09, 2006, 06:51:10 PM
I don't own a DS7000 but I would think you could use some motion sensors double duty using else commands with Smartmacros.
I understand you couldn't do this if you armed the system and stayed home!   ::) ;) :D
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 11, 2006, 06:14:34 PM
Tuiceman, I know this sounds dense but I still don't understand what a phantom module is... I know... one that doesn't exist...

But what does it do?

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 11, 2006, 11:09:15 PM
Basicaly a dummy/phantom module Makes AHP think it needs to send a plc signal for that device.
You can then trigger macros from that signal /trigger( the device isn't real but the signal sent from AHP is ;) )
AHP needs  a module house code/unit code as a macro trigger.
There are many uses for Phantom Modules and users keep thinking up more uses for them with each added plug-in!
I'll start a thread listing some uses and that may help you under stand, others can then post uses they came up with for the Phantom Modules!
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 12, 2006, 09:26:49 AM
Basicaly a dummy/phantom module Makes AHP think it needs to send a plc signal for that device.
You can then trigger macros from that signal /trigger( the device isn't real but the signal sent from AHP is ;) )
AHP needs  a module house code/unit code as a macro trigger.
There are many uses for Phantom Modules and users keep thinking up more uses for them with each added plug-in!
I'll start a thread listing some uses and that may help you under stand, others can then post uses they came up with for the Phantom Modules!

So, if I make a dummy appliance module with code A4...

Then I would make a macro that sends a code to A4 when it sees what I REALLY am interested in triggering on?  Then what is the trigger... A4?  So another macro triggers on A4 and does something?  I am not sure what this gets me over where I started.  Not trying to be dense but am not sure why this is being done.  Flowchart?

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: JMac on October 12, 2006, 10:40:31 AM
Why does this work in the daytime?
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 12, 2006, 10:45:07 AM
First you make a module A4  then you make a macro that is triggered when ever that module is turned "On or Off"  via palm pad,macro or flipping the vertual switch in AHP!

Your "A4" is only a macro trigger it does Nothing else except you can see in AHP that it was triggered by the state of the Phantom switch!

In your case:
[/color][/b]
Now once it works as you wish!
[/color][/b]
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 12, 2006, 10:52:12 AM
Why does this work in the daytime?
Have you checked your AHP time Zone configuration? ??? ;)
I never had much success with that condition  :'(::) ??? ;)
 I use the" if it is after dusk  "or" before dawn" conditions
You may have to as well! ;)
Title: Re: macro works wiithout conditions, but not with
Post by: JMac on October 12, 2006, 11:32:54 AM
The time zone is correct and I tried the time "before and after", but it seems time conditionals are not being cosidered.
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 12, 2006, 11:41:32 AM
Is the macro stored in the interface? Many must be inorder to work with conditionals! ;) :D
Title: Re: macro works wiithout conditions, but not with
Post by: JMac on October 12, 2006, 11:50:33 AM
Well, I saved it and down loaded it to the interface and it shows in the macro report file.
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 12, 2006, 12:02:11 PM
JMac
Humm ::) I'm wondering if the send e-mail (something that must be ran from the PC) is screwing it up ??? ::)
Try taking the send e-mail out of the macro, test it .
If it works properly you may have to use a phantom trigger for sending email then add the phantom module in the spot where send e-mail is now! ;)
Seems alot of these macro problems lately are involving e-mail!   ::) ???
Title: Re: macro works wiithout conditions, but not with
Post by: JMac on October 12, 2006, 12:11:53 PM
No, deleting the email command doesn't help.  The conditionals just aren't being considered, it seems.  Thanks for all your help;we'll keep working on it
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 12, 2006, 12:36:04 PM
First yom make a module A4  then you make a macro that is triggered when ever that module is turned "On or Off"  via palm pad,macro or flipping the vertual switch in AHP!

Your "A4" is only a macro trigger it does Nothing else except you can see in AHP that it was triggered by the state of the Phantom switch!

In your case:
  • make the module
  • Be sure that the house code you assigned it to is in AHP as a transcieved housecode
  • In the macro your having problems with add it as the trigger!("A4 ON")
  • Save to the interface
  • Test with a plam pad
[/color][/b]
Now once it works as you wish!
  • Make another macro using the trigger you wish eg: security sensor
  • in this macro simply add your phantom module ("A4 ON")nothing else
  • Save
  • trigger the security sensor
[/color][/b]

Ok, I understand.  I have sent my interface back under RMA... I have two more coming as of yesterday.  Hopefully will be more successful with them.

Also looks like a lot more people having problems with SmartMacros.  I think it is too easy to get hung up on the email as a source of problem.  For a lot of us email is the first and most reliable (in our mind) way of testing.  It really does function very reliably it seems.  Only thing about it is that it is an 'advanced function' so requires that it be run on PC.  Same as sending an X10 address onto the line.

Since I couldn't run a macro AT ALL unless it ran on the PC X10 decided it was a hardware problem.

Thanks.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: Tuicemen on October 12, 2006, 01:17:23 PM

Quote from: RJMiller
I think it is too easy to get hung up on the email as a source of problem.  For a lot of us email is the first and most reliable (in our mind) way of testing

True I don't believe it is a e-mail problem  or a smartmacro problem as many of us have it running smoothly!
The problem seems to be either the users CM15A or a configuration error! Which happens to be when using an 'advanced function'   which as you stated e-mail is! ;) :D
Most reasons why a smartmacro don't working properly is a configuration error which can be a simple as not having modules specified correctly in AHP or not saving/downloading to the interface! ;)
Title: Re: macro works wiithout conditions, but not with
Post by: delibaker on October 12, 2006, 06:49:06 PM
Well, I saved it and down loaded it to the interface and it shows in the macro report file.

Jmac, I don't have the email option, I'll assume that is from the MyHouse plugin, and I've run test macros using the condition "Nighttime" and the reverse, "Daytime", without any problem.   

On the macro designer screen for your macro with email does it have the radio buttons greyed out and to the right in yellow stating "Macro must be run from PC"?  If it does, that could be your problem.  AHP only has the logic for testing plugin specific conditions when run from the PC and ignores eveything else.

BTW, the Macro Report shows all macros whether stored in the interface or on the PC
Title: Re: macro works wiithout conditions, but not with
Post by: RJMiller on October 16, 2006, 05:32:19 PM
Received two more CM15a's.  Now things work... work sort of strange but works.  I have used Tuiceman's advice with regards to phantom modules as I don't see any way else to do what I need.  I am rapidly using up house F's module numbers.  I tried to use flags to decrease the number of modules required but something seems 'funny' about how flags work.

  RJ
Title: Re: macro works wiithout conditions, but not with
Post by: azbaja on November 16, 2006, 03:51:23 PM
Why does this work in the daytime?

My problem too.  Looks like I need to read more.