Please login or register.

Login with username, password and session length

Author Topic: Conditionals seem to be ignored  (Read 11169 times)

quadmasta

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Conditionals seem to be ignored
« on: April 02, 2006, 04:03:22 PM »

Hi all.  I'm just getting started with X10 and the macros are driving me nuts.

I've got a macro called "Watch a movie" that's supposed to check to see if the desk light is on and dim it to 38% if it's on and then launch a java program to allow control of my projector.

I've got these conditions: 
Trigger Conditions A7 On and
The time is between Dawn and 12:00 pm and
Module Status On - Desk Lamp
End Trigger Conditions
Turn Desk Lamp ON and dim to 38%
Run Program - C:\ProjectorController\projectorcontroller.bat

I've tried storing it in the interface and I've tried only running it from the PC after clearing the interface memory. If the light is off the macro still runs and turns the light on at 100% and then dims it down.

Why is it ignoring my conditions?
Logged

Don N

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 311
Re: Conditionals seem to be ignored
« Reply #1 on: April 02, 2006, 08:19:14 PM »

I don't see in your Macro where the lamp is ever turned off.  So therefore, the lamp will always be on.  Or, are you turning the lamp off manually?
Logged

quadmasta

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Conditionals seem to be ignored
« Reply #2 on: April 02, 2006, 08:46:15 PM »

I'm turning the lamp off manually.  I believe EVERY conditional is being ignored.

I created a macro that runs when the lamp gets turned off that clears Flag 1 and I created another that runs when the lamp gets turned on that sets flag 1.

I made a 3rd macro called Dim the light.  This macro is supposed to check to see if the flag is set.  If the flag is set it's supposed to dim the lamp and run the projector control program.  If the flag is not set it's supposed to just run the control program. 

Seemingly regardless of what happens, the lamp gets messed with.  Also, when I fire the Dim the light macro, the macros linked to the lamp go crazy too.

I took a video of what's happening.  In case it's hard to read (probably is) the top row is the lamp, the macro to set the flag, the macro to clear the flag.
The second row is another lamp (not part of the macro), the macro with the conditional in it, and the else macro.

You'll need the DiVX or XViD codec
http//www.divx.com or http://www.xvid.com

Click here to watch Macro-craziness
Logged

stolzb

  • Jr. Member
  • **
  • Helpful Post Rating: 1
  • Posts: 13
Re: Conditionals seem to be ignored
« Reply #3 on: April 07, 2006, 02:31:11 PM »

Couple of questions:

What is the A7 trigger?  Is is button on a remote?  If so, why the time conditional?

On checking the status of the light,  is it a two way module?  If so, I haven't had much luck with status polling on two way modules. If its not a 2 way module, then it won't report status. 

If you are wanting a flag to be set to indicate status when you manually turn on the light, without a two way module, then it won't set or clear a flag.  The  2 way module is supposed to send a signal depending on the status of the light. 

If A7 is being triggered by a remote control, you may try setting your light to A7 as well.  Lose the time conditional if you are just setting a scene for a movie.

Its also possible that you have some noise/sigal sucking problems.





Logged

jeffspl311

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Conditionals seem to be ignored
« Reply #4 on: April 15, 2006, 04:21:46 PM »

I have an even more straight forward example. I have created a macro to be triggered by a motion sensor. The macro text is as follows:

Trigger Conditions M13 On and
It's nighttime
End Trigger Conditions
Turn Office Desk ON and dim to 50%

Office Desk is J13 btw. I have all the latest updates. And yes, all the clocks are set correctly. Trust me, I'm not a noob.

It's currently 1:17pm right now... NOT nighttime. So I trigger the Macro from the AHP software by clicking on it where it says "Run Macro"... Sure enough, the conditional is ignored and the light goes on!

Any help is appreciated, or I'm planning to return this while I still can.

Cheers,
Jeff
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: Conditionals seem to be ignored
« Reply #5 on: April 17, 2006, 12:25:08 PM »

If you click on the "Run Macro" button in AHP, the macro will always run. This is by design. We assumed that if you click on the button yourself that you really want to run the events in that macro. You can test the condition by using a remote control or mini-controller to trigger the macro.
Logged

jeffspl311

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Conditionals seem to be ignored
« Reply #6 on: April 17, 2006, 05:45:18 PM »

If you click on the "Run Macro" button in AHP, the macro will always run. This is by design. We assumed that if you click on the button yourself that you really want to run the events in that macro. You can test the condition by using a remote control or mini-controller to trigger the macro.

Sorry, but that's a really lame-@ss design then, given that the conditional is PART OF THE MACRO... I expect that the whole macro, including testing the conditionals, is to be run when I click the "Run Macro" button in the AHP UI.

BTW, I was forced to click the button in the UI to test the macro, including the conditionals I assumed, precicesly because the conditionals seemed be be ignored when I was triggering with my remote control... so I was trying to eliminate variables.

I thought "ugrading" to AHP with smart macros would be fun... I didn't really NEED it since my current X10 controller works just fine... I WANTED it though because it looked cool and powerful. Good advertising guys... you fooled me, and I'm not easilly fooled. I wish I read this forum before I purchased. I'll be returning it today, thanks. I'm so very dissappointed, after being such a long time advocate of your equipment.

Cheers,
Jeff
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: Conditionals seem to be ignored
« Reply #7 on: April 17, 2006, 06:20:08 PM »

SmartMacros work, and we should be able to get the conditions you need working for you.

You've named a number of conditions, but it would be helpful to focus on one for testing. How about we look at the first one, where "A7 On" is the condition? Do you have the monitored house code in the interface set to 'A'? When you turn the A7 lamp on and off to test are you using a remote control, or the ActiveHome Pro screen? Dusk/Dawn conditions rely on your city setting in Hardware Configuration -- do you have that set?

By the way, the design decision for the "Run Macro" button was based on user input -- enough people felt that the macro events should always run when they click that button that we made it do that. We actually had users who were confused that the macro didn't execute when they clicked the button, even though they were the ones who put the conditions on their macros. I can see why you might think that it's lame design, but it wasn't done arbitrarily. We could create a preference for this, but there's a lot of preferences already for relatively minor options, and this hasn't come up that much.
Logged

jeffspl311

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Conditionals seem to be ignored
« Reply #8 on: April 18, 2006, 02:51:48 PM »

User's aren't UI designers. Users are not always right. I'm a UI designer with 17 years of experience... and even I'm not always right. On this, however, I'm damn sure. Clicking on the run macro button MUST perform the conditional logic.

Seriously, what is supposed to happen if the macro specifies if/then/else logic... are you going to run both the then and the else commands???

Your design decision is not defensible, and to hide behind uninformed user requests and not do your job as designers gives all UI designers a bad name, as this is NOT the right way to make UI decisions. Any first year UI designer learns this.

Cheers,
Jeff
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: Conditionals seem to be ignored
« Reply #9 on: April 18, 2006, 03:12:04 PM »

We feel that user input is an essential part of the design process, and while we make most decisions on our own, we involve users frequently, and also take input from these forums and other places. I don't think user expectations can be wrong. They may not be shared by most other users, they may not even make sense to most people, but that doesn't make them incorrect. Obviously we can't meet all the various user expectations in all cases all of the time, but we do use our customers to help guide us.

In this case we had more users who were confused by a button labeled "Run Macro" not running the events of the macro than we had people who needed or expected their trigger conditions to be processed. There's not just one way to look at it. In one sense, a macro and its conditions can be seen as absolute and inseparable. But, you can also see the conditions as applying to the independent or automatic triggers (remotes, sensors, etc.) only, and the "Run Macro" button as a separate thing.

In any case, the processing of conditions when triggered by remote or other controller should be working, and I'm still happy to help figure out why it isn't work for you or quadmasta.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Conditionals seem to be ignored
« Reply #10 on: April 24, 2006, 06:43:37 PM »

Why not change the "Run Macro" button into two buttons, "Run Macro With Conditions" and "Run Macro Without Conditions"? Of course, for users without Smart Macros, they would still only have one "Run Macro" button.
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Conditionals seem to be ignored
« Reply #11 on: April 24, 2006, 07:42:54 PM »

I believe conditional macros can be tested by setting up a dummy unit with the same code as the macro. Clicking on the dummy module i believe will trigger the macro conditionally.
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. :)

roger1818

  • Hero Member
  • *****
  • Helpful Post Rating: 28
  • Posts: 1072
  • Roger H.
Re: Conditionals seem to be ignored
« Reply #12 on: April 25, 2006, 12:07:03 AM »

Why not change the "Run Macro" button into two buttons, "Run Macro With Conditions" and "Run Macro Without Conditions"? Of course, for users without Smart Macros, they would still only have one "Run Macro" button.

I agree.  Something like that would be useful.  I would also like to see all of the macros that are else conditions of each other grouped together in one box.
Logged
 

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