Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Conditions, flags and module status  (Read 19017 times)

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Conditions, flags and module status
« on: December 14, 2007, 05:27:00 PM »

I'm new here and have been poking around trying to learn how to set up very basic automation, primarily for timed control of lights and relocation of manual light contols.  At first glance, AHP seemed to be pretty slick (especially being able to address ALL house/module  codes with one device)  but I seem to be discovering that it may really be quite crippled in function even with "Smart Macros." 

First question - what hardware modules can be polled to get their ON/OFF status? (I'll probably be using mostly Socket Rockets- for a number of reasons) 

Am I correct in my understanding that only *1* house code can be monitored for module status? (i.e. a maximum of 16 modules can be monitored)

This means that a nice convenient system of having garage lights on "G," kitchen lights on "K,"  living room lights on "L" and outdoor lights on "O"  may be nothing more than wishful thinking if I wanted to control each group with single "toggle" button. This would trigger a macro which, for each press of the button, would cycle to the next in sequence of,  for example, (1) OFF, (2) only light #1 on, (3) only light #2 on, (4)  #1 and #2 on. This would be based upon testing the ON/OFF condition of the modules for each of the lights.

And while I realize that there may be the possibility of using "flags" to keep track of the status of each module (only assuming it is always activated through AHP, right?), the whole system seems tremendously less flexible than I had originally thought. Anyone have any comments or guidance?

KLF
   
Logged

Walt2

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 28
  • Posts: 787
Re: Conditions, flags and module status
« Reply #1 on: December 15, 2007, 07:59:54 PM »


First question - what hardware modules can be polled to get their ON/OFF status? (I'll probably be using mostly Socket Rockets- for a number of reasons) 
   

Very few.  They are called "2-way".  Matter of fact, I believe X10 has actually discontinued their two 2-way modules; LM14A and AM14A.

AHP/CM15A actually keeps track of the module status real time.  It rarely needs to poll a module to order to find out its current status.

Plus remember, there is no harm in turning 'off' a module that is already 'off', and likewise, there is no harm in turning 'on' a module that is already 'on'.


Am I correct in my understanding that only *1* house code can be monitored for module status? (i.e. a maximum of 16 modules can be monitored)
   

Well, AHP can keep track of all the modules.  It is only the CM15A which is limited (due to little internal memory) to keeping track of only 16 module's on/off status when running by itself (not attached to a PC running AHP).


And while I realize that there may be the possibility of using "flags" to keep track of the status of each module (only assuming it is always activated through AHP, right?), ...
   

There are only 16 flags, and I believe only 14 of them are actually available for general usage.


..., the whole system seems tremendously less flexible than I had originally thought. Anyone have any comments or guidance?
   

AHP/CM15A is more powerful than the AH/CM11A, but less powerful than the AH2/CM14A.  What I can suggest, is that many times if you change how you are attacking a problem, and try using a different strategy/approach, there is usually a solution that works within the AHP/CM15A's capabilities.
« Last Edit: December 15, 2007, 08:09:34 PM by Walt2 »
Logged
* Sears Home Control System, Radio Shack Plug 'n Power, NuTone, Stanley LightMaker, BSR, HomeLink.
* Tecmar Device Master, CP290 (LightHouse), CM11A (AH), CM14A (AH2), CM15A (AHPro).

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991
Re: Conditions, flags and module status
« Reply #2 on: December 15, 2007, 10:27:49 PM »

OK, for the uninformed, what's a AH2/CM14A?

I presume AH2 is an untested version of AHP.
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Conditions, flags and module status
« Reply #3 on: December 16, 2007, 12:06:24 AM »

quote author=Puck link=topic=14153.msg78600#msg78600 date=1197677731]
I'm not sure what you mean by "relocation of manual light contols"?
Quote

Well, in simpler and clearer terms, "putting a switch where I want it"

Quote
Well, AHP can keep track of all the modules.  It is only the CM15A which is limited (due to little internal memory) to keeping track of only 16 module's on/off status when running by itself (not attached to a PC running AHP).

I'm really interested only in "computer free" operation. And that obviously severely limits the modules that can be "monitored."

Quote
AHP/CM15A is more powerful than the AH/CM11A, but less powerful than the AH2/CM14A.  What I can suggest, is that many times if you change how you are attacking a problem, and try using a different strategy/approach, there is usually a solution that works within the AHP/CM15A's capabilities.

Then can you (or anyone) suggest how to create a macro (without having to check module status) that will advance to the next "step" for any single push of a button?  For discussion purposes lets assume there are a number of 3 light arrays and for each one we want the sequence to include the following 5 steps: All-on, #1 on, #1 and 2 on, #1 and #3 on,   Alll-off.

I'm really looking for a interface that lets me do what I would like directly without having to become overly clever. I'm not looking for a hobby, I'm looking for a convenient way to control a few lights. If I need to use the SDK and program in another language I'll do that, although I have not yet seen how one would upload to the CM15A  using the SDK interface. I'd probably be using VB6.   

KLF

 
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Conditions, flags and module status
« Reply #4 on: December 16, 2007, 01:13:48 PM »

Quote from: Klf
Then can you (or anyone) suggest how to create a macro (without having to check module status) that will advance to the next "step" for any single push of a button?  For discussion purposes lets assume there are a number of 3 light arrays and for each one we want the sequence to include the following 5 steps: All-on, #1 on, #1 and 2 on, #1 and #3 on,   Alll-off.
If you have the SmartMacro plug-in you can do most of this. AHP only sends "All Lights ON" and  "All Units OFF" not "ALL ON"
To do what you want you need to use elses and flags as conditions! EG:
First time you press trigger#

Condition if Flag 1,2 off
send all lights on
set flag 1


Second time you press Trigger #
Else macro
condition if flag 1 set & flag 2 off set
send A1 on
Set flag 2


Third time you press Trigger #
Else macro
condition if flag 1,2 set
send all off
clear flag 1,2

You'd expand the use of flags to the number you wish in your case 5. Do an Advanced search on flags and conditions for more examples and suggestions
« Last Edit: December 16, 2007, 01:20:33 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Conditions, flags and module status
« Reply #5 on: December 16, 2007, 04:00:21 PM »

If you have the SmartMacro plug-in you can do most of this. AHP only sends "All Lights ON" and  "All Units OFF" not "ALL ON"
To do what you want you need to use elses and flags as conditions! EG:
First time you press trigger#

Condition if Flag 1,2 off
send all lights on
set flag 1


Second time you press Trigger #
Else macro
condition if flag 1 set & flag 2 off set
send A1 on
Set flag 2


Third time you press Trigger #
Else macro
condition if flag 1,2 set
send all off
clear flag 1,2

You'd expand the use of flags to the number you wish in your case 5. Do an Advanced search on flags and conditions for more examples and suggestions


Thanks. That's pretty straightforward, but wouldn't it be simplest to just use a flag to represent each light?
But that would still require use of 9 flags for the scenario I described (3 arrays), correct?   

KLF
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Conditions, flags and module status
« Reply #6 on: December 16, 2007, 05:37:05 PM »

You need one flag per button press, if I understand what your trying to do correctly! The last button press clears the flags so a total of 4 flags(sorry I was wrong when I stated 5) for a 5 press scenario! If each of your scenarios is 5 button presses long then you'd need 4 X 3 flags = 12
If you assign a flag for each light you'd have to make 2  macros for each light, One when it was turned on it set the flag and another macro that when it turned off the flag was cleared! Then you'd still have to make a macro that responded to the button presses and since you can turn a module on with its own address your sequence press wouldn't work as desired! In the end you'd be making more work for your self! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Walt2

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 28
  • Posts: 787
Re: Conditions, flags and module status
« Reply #7 on: December 16, 2007, 07:36:56 PM »

OK, for the uninformed, what's a AH2/CM14A?

I presume AH2 is an untested version of AHP.

Nope, AH2/CM14A is product that never made it out of beta-test.   It was intended to be a follow-on to the AH/CM11A.

Think of AHP/CM15A with unlimited number of conditionals per macro, more conditional tests (like checking dim level), to be able to manually check and modify flags, control IR devices (like turn your TV 'on'),  set DST rules, do firmware updates, and much more.
Logged
* Sears Home Control System, Radio Shack Plug 'n Power, NuTone, Stanley LightMaker, BSR, HomeLink.
* Tecmar Device Master, CP290 (LightHouse), CM11A (AH), CM14A (AH2), CM15A (AHPro).

Walt2

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 28
  • Posts: 787
Re: Conditions, flags and module status
« Reply #8 on: December 16, 2007, 07:47:27 PM »

Will not the OP quickly run out of flags, if he does it this way?  I mean, expand your pseudo code to control, say, 36 light sets with 3 lights in each set.

Remember, the OP doesn't want to check module status because 16 is not enough.  That same limitation will also affect flags.

If you have the SmartMacro plug-in you can do most of this. AHP only sends "All Lights ON" and  "All Units OFF" not "ALL ON"
To do what you want you need to use elses and flags as conditions! EG:
First time you press trigger#

Condition if Flag 1,2 off
send all lights on
set flag 1


Second time you press Trigger #
Else macro
condition if flag 1 set & flag 2 off set
send A1 on
Set flag 2


Third time you press Trigger #
Else macro
condition if flag 1,2 set
send all off
clear flag 1,2

You'd expand the use of flags to the number you wish in your case 5. Do an Advanced search on flags and conditions for more examples and suggestions

Logged
* Sears Home Control System, Radio Shack Plug 'n Power, NuTone, Stanley LightMaker, BSR, HomeLink.
* Tecmar Device Master, CP290 (LightHouse), CM11A (AH), CM14A (AH2), CM15A (AHPro).

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Conditions, flags and module status
« Reply #9 on: December 16, 2007, 08:15:10 PM »

You need one flag per button press, if I understand what your trying to do correctly! The last button press clears the flags so a total of 4 flags(sorry I was wrong when I stated 5) for a 5 press scenario! If each of your scenarios is 5 button presses long then you'd need 4 X 3 flags = 12
If you assign a flag for each light you'd have to make 2  macros for each light, One when it was turned on it set the flag and another macro that when it turned off the flag was cleared! Then you'd still have to make a macro that responded to the button presses and since you can turn a module on with its own address your sequence press wouldn't work as desired! In the end you'd be making more work for your self! ;)


OK bear with me here. Wouldn't one flag per light work? 
Lets make the lights a1,a2,a3 and use corresponding flags 1,2,3
The trigger will be some other single button press

______________________________________
Trigger press #1    ;if all lights are off, turn 1 on
Condition if Flag 1,2,3 off
send A1 on
set flag 1

Trigger press #2    ;if 1 is on, turn on 1 & 2
Condition if Flag 1 set
send A2 on
set flag 2

Trigger press #3   ;if 1 & 2 are on, turn on only 1 & 3 
Else macro
condition if flag 1 set & flag 2 set         
send A2 off                                     
clear flag 2
send A3 on
set flag 3

Trigger press #3 ;if 1 & 3 are on, turn all on 
Else macro
condition if flag 1 set & flag 3 set
send A2 on
set flag 2

Trigger press #4  ;if all are on turn all off 
Else macro
condition if flag 1 set & flag 2 set & flag 3 set
send Alll off
clear flag 1,2,3
______________________________________

Isn't that just one macro? (it might be necessary to have three conditions at each step)

Please keep in miind that I have not actually used this stuff yet so I'm merely trying to demonstrate the logic to be used rather than be precise with regard to syntax, etc.
I do, however, have programming experience.

However even assuimg that my logic is correct I am still frustrated with the limited number of available flags. I would for instance like to control two such arrays of 4 or 5 lights in my kitchen alone.   

KLF
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Conditions, flags and module status
« Reply #10 on: December 16, 2007, 09:39:09 PM »

Walt2: Yes the OP would run out of flags but they want to press one button to run multiple macros,with lights on different Housecodes!  If you have a better method, please  do tell! ;)


KLF: you can't just assign a flag to a light they have to be told when to set/clear themselves
You need a macro to set\clear each flag for each light, flags can only be set cleared with a macro! However you show all the same housecode for your lights so in that case you could use House code "A" as the monitored house code and use the module condition as the if!
Quote
I do, however, have programming experience
This may be a problem as AHP seems to follow a logic that causes programmers to loose their hair! ;)
Quote
Please keep in miind that I have not actually used this stuff yet so I'm merely trying to demonstrate the logic to be used rather than be precise with regard to syntax, etc
Since this is the case search the forums for Posts on flag useage! Also visit the x10wiki and read up on AHP and Smartmacros! AHP doesn't follow Logic the way Most Programmers see it! As you stated it has limitations understanding them all will help when & if you get it! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Conditions, flags and module status
« Reply #11 on: December 16, 2007, 10:58:39 PM »


KLF: you can't just assign a flag to a light they have to be told when to set/clear themselves
You need a macro to set\clear each flag for each light, flags can only be set cleared with a macro!
I thought that was exactly what I was suggesting.  (1) Turn the light on and set its flag or (2) Turn the light off and clear its flag

Quote
However you show all the same housecode for your lights so in that case you could use House code "A" as the monitored house code and use the module condition as the if!
Two problems there as I understand it. (1) That precludes using "module conditions" for a different array using a different housecode (or, at best, just adds another 16 codes that can be checked) and (2) requires "two way" modules if WALT2's earlier response is correct about what is necessary to be able to poll modules.     

Quote
AHP seems to follow a logic that causes programmers to loose their hair! ;)
Hardly sounds like a strong recommendation for the system. And I said previously, I'm not looking for a hobby - I'm looking for some tools.   

Quote
... search the forums for Posts on flag useage!
Been there, done that. Couldn't find definitive answers to the questions I have asked (although I had not originally recognized that "flags" might even be necessary to accomplish the goal I described).  That why I asked question.  I downloaded the Smart Macros manual. It describes the basic concept but has almost no content about actually using the software. That's  not very encouraging about the whole system

Quote
Also visit the x10wiki and read up on AHP and Smartmacros! AHP doesn't follow Logic the way Most Programmers see it! As you stated it has limitations understanding them all will help when & if you get it! ;)
Again, really not much helpful information there. I'm not looking for the sales pitch. I know what I want to do I'm just trying to figure out whether it's reasonably feasible. The problem I see with x10 in general is that it has not yet really made the transition from its origins 20+ years ago to the modern digital age.  This is perhaps best demonstrated by the extreme kludginess demonstrated here:
http://www.x10.com/products/x10_th2807.htm
With the Thermostat Controller, you can make sure your heating bills stay low. X10's Thermostat Set-Back Controller works like a lit match placed beneath your thermostat

If that comes from the same folks that created the software, I can see why the software lacks "logic."
The SmartHome Powerlinc is looking appealing, though I am having similar difficulty learning specifics of its operation. However Smarthome, to their credit, does provide a full download of their basic software so that it can at least be seen prior to puchase.

KLF



 
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Conditions, flags and module status
« Reply #12 on: December 17, 2007, 04:34:54 PM »


KLF: you can't just assign a flag to a light they have to be told when to set/clear themselves
You need a macro to set\clear each flag for each light, flags can only be set cleared with a macro!
I thought that was exactly what I was suggesting.  (1) Turn the light on and set its flag or (2) Turn the light off and clear its flag
Sorry I miss read your post  :-[ must have shoveled too much snow ;)

Quote
Quote
However you show all the same housecode for your lights so in that case you could use House code "A" as the monitored house code and use the module condition as the if!
Two problems there as I understand it. (1) That precludes using "module conditions" for a different array using a different housecode (or, at best, just adds another 16 codes that can be checked) and (2) requires "two way" modules if WALT2's earlier response is correct about what is necessary to be able to poll modules.     
In AHP you can set one of the 16 house codes to be monitored this doesn't require two way modules however if someone turns On/Off an module locally the CM15A only sees the last state that was sent from it! Same problem would happen with flags! :(

Quote
AHP seems to follow a logic that causes programmers to loose their hair! ;)
Hardly sounds like a strong recommendation for the system. And I said previously, I'm not looking for a hobby - I'm looking for some tools. 
Unfortunately  that is true! Many long time programmers have set the AHP software aside and use the SDK or another software such as Mr-house or HomeDomination! Others still have no problems with it! Sorry you didn't find what you were looking for at the wiki ::)
Quote
The SmartHome Powerlinc is looking appealing, though I am having similar difficulty learning specifics of its operation. However Smarthome, to their credit, does provide a full download of their basic software so that it can at least be seen prior to purchase.
SmartHome Powerlinc does have it's problems too. Check out AccessHA Forum or the SmartHomes Forum and compare for yourself. I haven't used the SmartHome Powerlinc but others here and at AccessHA have used both!



 

Quote
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Conditions, flags and module status
« Reply #13 on: December 17, 2007, 10:08:58 PM »

Quote
I do, however, have programming experience

This may be a problem as AHP seems to follow a logic that causes programmers to loose their hair!...
So very true!  :( ;)
e.g. Some have discovered that if you start an else with a delay it will execute regardless of the conditions.
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. :)

KLF

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Conditions, flags and module status
« Reply #14 on: December 17, 2007, 11:05:58 PM »

Unfortunately  that is true! Many long time programmers have set the AHP software aside and use the SDK or another software such as Mr-house or HomeDomination! Others still have no problems with it! Sorry you didn't find what you were looking for at the wiki ::)

I think I'm probably headed in that direction. I had the chance to play with the "Smart Macros" interface a bit. I have a hard time believing anyone who has used or created "good" software would consider that to be anything but junk. It's so crippled that it's hard to consider it to be any form of software at all. I had not realized that it offers NOTHING BUT the flimsy drag-and-drop interface, simple to use but with no flexibilty or power whatsoever.       

SmartHome Powerlinc does have it's problems too. Check out AccessHA Forumr the SmartHomes Forum and compare for yourself. I haven't used the SmartHome Powerlinc but others here and at AccessHA have used both!

Thanks for the additional links. I am still trying to fully grasp what the benefits and burdens might be if and when I jump into the SDK for either Activehome or Smarthome. Obviously Activehome is a lot "cheaper", but that may be true in every sense of the term. All-in-all, it appears the biggest loss in either may be the inability to use the "standalone" capabilities of the respective hardware devices. But given that I have some programming experience, the SDK programming may actually be easier and quicker than trying to outwit the "SMART MACROS" plug-in (an apparent oxymoron if there ever was one).

KLF 


 

Logged
Pages: [1] 2
 

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