Please login or register.

Login with username, password and session length

Author Topic: Is it possible to:  (Read 5244 times)

LanceC

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 14
Is it possible to:
« on: February 26, 2011, 04:41:34 PM »

Hi.  I'm kind of new here.

I have AHP with SmartMacros and I'm wondering if it is possible to write a conditional macro like this:

When the macro is triggered it activates a device
THEN, only if it is nighttime does it activate another device

Is it possible to do that within just one macro?

Thank you.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Is it possible to:
« Reply #1 on: February 26, 2011, 07:04:49 PM »

Hi.  I'm kind of new here.

I have AHP with SmartMacros and I'm wondering if it is possible to write a conditional macro like this:

When the macro is triggered it activates a device
THEN, only if it is nighttime does it activate another device

Is it possible to do that within just one macro?

Thank you.

What you want to do IS possible, but I would do it a different way.
If you create two macros with the same trigger address, AHP will treat them as "OR" conditions, based on the order of the tabs at the top (AHP will add a tab for each one).

so, your first macro will be:

If it is Nighttime:
    Turn on Module 1
    Turn on Module 2

The second macro will be:
    Turn on Module 1

Since the second one is the "else" condition, it should only run when the first one's condition is invalid.
Therefore, at night, both modules will be turned on, but during the day, only the first one will be turned on.

I think that is what you were trying to accomplish.
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Is it possible to:
« Reply #2 on: February 26, 2011, 08:25:48 PM »

.......... is possible to write a conditional macro like this:
When the macro is triggered it activates a device
THEN, only if it is nighttime does it activate another device

Conditions default the the beginning of the macro... so as stated, no.

Is it possible to do that within just one macro?

No... not any way I know of. As a matter of fact... the typical biggest error when creating macros.. IMHO is trying to do too much with just one macro.
Logged
Home Automation is an always changing technology

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Is it possible to:
« Reply #3 on: February 26, 2011, 08:32:09 PM »

That was the point of my post.
Technically, it would be two macros. However, since they are nested as an If-Then-Else pair, then they only take up trigger address, and it wold be functionally the same as one macro. Only one trigger would be required to operate the way he wants to. (I think)
Logged

LanceC

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 14
Re: Is it possible to:
« Reply #4 on: February 27, 2011, 09:36:18 AM »

I was trying to do it within one macro just to save clutter in my AHP interface but I understand the need to do it in 2 steps as you've explained.  That will work.  Thank you.

But let me follow it up with this.  The macro is called with a timer, not manually triggereed.  It looks to me like the timer calls the macro by name and not by trigger code.  Can I create 2 macros with the same name and have it work the same way?

And yes, I realize I could do 2 timers but I'm trying to maintain an organizational structure in the timers.
Wake Up
Getting Ready to Leave <- I want this one to turn on the outside lights only if it is still dark.
Gone
Getting Home
Logged
 

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