Jump to content

Using ContLinc and RemLinc as Flags


f11

Recommended Posts

Someone else here was discussing their use of "flags" to initiate actions. I realized that the ContLinc and RemLinc buttons could be used without linking them to anything but just using programmatic control.

 

It further occurred to me that if you can program ISY to watch for multiple button pushes (say CL-1-ON followed by CL-2-OFF and CL-3-ON, or 101 "binary"), you could control a lot more than five end devices. Not that you'd want to take this to the nth degree, since it gets hard to remember many more than a handful of codes per controller, but you could sub-divide the ContLink into a 5 bit "encoder" for up to 31 tasks by toggling the five buttons, or 3-bit and 2-bit encoders for up to 12 tasks.

 

I haven't tried to program a "decoder" for such an approach, so I don't know if the ISY syntax will allow it. Has anyone tried this?

 

Rod

Link to comment

Rod, I am doing this using ISY with X-10 PalmPad controllers (and Maxi-/Mini-Controllers). It works great. I haven't actually done it with a ControLinc/RemoteLinc, but believe it should work. I think the (decoding) programming would be identical regardless of the device.

 

I did think about trying to use a ControLinc that way, but decided that with only five button-pairs, it just didn't offer enough control. That's because I didn't want to ever press more than two buttons. The two-button-press maximum was not just laziness, but a requirement in order to not overtax the memory [meaning the little grey cells, not the ISY's memory :lol: !].

 

With an eight button-pair PalmPad with the slide switch in the 1-8 position, I can can discretely control every device in the house (up to 64) with only two button presses. With the slide switch in the 9-16 position I have control of 48 scenes with only one or two button presses.

 

The way I set up the device control is that the first button press (1-8 ) determines the area (usually a room), and the second button press determines the device within that area. The first button press can be either the On or the Off button, the programming equates them. The second button press, of course, determines On or Off for the specified device.

 

Having to remember 64 device codes may seem daunting at first, but I've found it to be relatively easy. I first chose the area codes beginning at the front entrance and basically using a clockwise rotation through the house, eg. Living Room, Dining Room/Kitchen, Master Bedroom, etc. Then within each area, I started at the (primary) entrance to the area, and numbered the devices in clockwise rotation. So the button sequence 2-2 would be area two (Dining Room/Kitchen) device two (Counter Light). After a little bit of use, most codes are easily remembered. In particular, the area codes (first button press) become automatic. If you forget the number of a device within a room (for those infrequently used devices), it is very easily remembered by simply counting devices clockwise from the entrance.

 

For the scene controls (slide switch in 9-16 position), I chose to have the sixteen buttons (9-16, On and Off) represent sixteen scenes. If the Bright button is first pushed, this shifts the palette to an additional set of sixteen scenes; if the Dim button is first pushed, one more sixteen-scene palette is chosen. I placed the most common/frequently-used scenes on the 'Normal' palette, requiring only a single button press (no Bright or Dim). Then I placed related scenes on the same button using the Bright palette for 'More' of a given scene and the Dim palette for 'Less' of a given scene.

 

One could also use the Bright as 'Up' for second floor scenes, and Dim as 'Down' for basement scenes. Or any other variation that makes it easy for the user to remember. I haven't yet used anywhere near 48 scenes, though.

 

This same scheme could be used with a ControLinc, but it would yield only five areas, with five devices each. With the X-10 controllers, I've used seven areas (one still available), with eight devices in each, so for me the ControLinc just doesn't provide enough control in this approach. But with the X-10 controllers this system works very well for me. Of course, I have a host of other controllers set up in very simple mode for my wife's use, as she has no interest in remembering button combinations :wink: .

 

Hope this provides some food for thought. Please let us know how you do set up your controls. I'm always interested in a better way of doing things.

Link to comment
Of course, I have a host of other controllers set up in very simple mode for my wife's use, as she has no interest in remembering button combinations

Now there's a shocker for you.

 

Do post some examples if you would. It sounds like this could easily be applied to the Harmony/IR543 combination, since the 543 only does one house code and you could easily expand it out this way.

 

By the way Joe, me thinks you got way too much time on your hands.

:wink:

Link to comment
Joe,

 

How many programs did you end up creating? Is it one for each house/unit code? Would you care to share some examples?

 

Jeff and Jim, okay, here goes! This is likely to be a bit lengthy; I'll do my best to make it clear :lol: .

 

Under My Programs I have (among others) two folders titled Macros and X-10 Triggers. We'll come back to Macros in a bit.

 

Under X-10 Triggers there is one folder for each Housecode that has X-10 controllers set up. These folders are titled Housecode A for example (I'll use Housecode 'A' in the examples). Most of these are simple controllers which need no explanation. Only one Housecode has the complex programming, and all my master controllers are set to this Housecode.

 

Under this master-controller folder Housecode A, there are eight programs and eight folders. The programs are titled HCA Group n Flag, where n is a single digit (1 through 8 ) which represents the eight Areas (Rooms). The HCA portion stands for Housecode A, and would be modified appropriately in each additional Housecode folder used, in order that all program names be unique. Each of these eight programs is extremely simple, and looks like this:

 

Program 'HCA Group 1 Flag'
If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Wait  8 seconds
       Run program 'HCA Group 1 Flag' (Else Path)

Else
  - No Actions - (To add one, press 'Action')


When run, this 'Flag' program will remain True for 8 seconds, and then
become False.  When True, the corresponding group will be active.

 

These Flag programs get set when the corresponding Area (Room) button (the first button of the pair) is received. They have an eight second (adjust to suit) timeout, after which they expire. If no Device button (the second button or the pair) is pressed, this timeout prevents the program from being 'locked in' to that Area forever. If it stayed locked in, and an hour later you pressed another button thinking you were pressing an Area button while the program interpreted it as a Device button, confusion would result. This timeout also means that you must press the second button of the pair within eight seconds of the first. If you press Area 1 when you meant to press Area 2, just wait eight seconds for it to time out, then proceed normally. Eight seconds works well for me.

 

The eight folders are titled HCA Group n, where again n represents the Area. Each folder has a single condition:

 

Folder Conditions for 'HCA Group 1'
Add conditions to limit when programs in this folder are allowed to run.



If
       Program 'HCA Group 1 Flag' is True

Then
  Allow the programs in this folder to run.



 

When an Area button is pressed, the corresponding folder is enabled for eight seconds. Each of these Area folders contains sixteen programs--an On program and an Off program for each of the eight Devices within that Area. The On and Off programs cannot be combined into a single program in the usual way because we are dealing with button-pairs as opposed to single button presses.

 

The programs are named HCA m-n Off (or On), where m represents the Area and n represents the Device. The programs may contain anything you want. Since this section of the code is for direct, discrete device control, my programs are very simple:

 

Program 'HCA 1-1 Off'
If
       X10 'A1/Off (11)' is Received

Then
       Set 'Insteon Device Name' Off
       Run program 'HCA Group 1 Flag' (Else Path)

Else
  - No Actions - (To add one, press 'Action')



 

They simply turn the corresponding device on or off, and then run the Else Path of the corresponding Flag program to terminate it, so that the next button press will begin a new pair. This step is very important.

 

That takes care of the Device component of the code. Next we'll look at the Scene portion. Right now, I have a dinner engagement, so if you'll excuse me, I'll see you later.

 

Be sure to tune in again tomorrow. Same time, same forum :lol: !

Link to comment

Thanks Joe, That is pretty cool! I can see how you do this now (although it resulted in a mild brain cramp first). I like this idea. I have numerous outside lights and low voltage devices and one 8 button keypad link in the garage. 8 buttons is just not enough, I need about 12 to control everything individually. I don't want to have to cut out another gang. I think I will try something like this.

 

Thanks,

-jeffd

Link to comment

Finishing up Part I, let me start by first apologizing, for in the above explanation I forgot one very important element due to time constraints. Under the master-controller's Housecode folder Housecode A, in addition to the eight programs and eight folders described above, there is one more folder titled HCA Group Select, whose conditions are:

 

Folder Conditions for 'HCA Group Select'
Add conditions to limit when programs in this folder are allowed to run.



If
       Program 'HCA Group 1 Flag' is False
   And Program 'HCA Group 2 Flag' is False
   And Program 'HCA Group 3 Flag' is False
   And Program 'HCA Group 4 Flag' is False
   And Program 'HCA Group 5 Flag' is False
   And Program 'HCA Group 6 Flag' is False
   And Program 'HCA Group 7 Flag' is False
   And Program 'HCA Group 8 Flag' is False

Then
  Allow the programs in this folder to run.



 

Programs in this folder are allowed to run only when all eight Group Flag programs are False. When this condition is True, a button press will be interpreted as the first (Area) button of a button-pair.

 

This folder contains eight programs named HCA Group n Select where n once again represents the Area (first button) code. Each program is simply:

 

Program 'HCA Group 1 Select'
If
       X10 'A1/On (3)' is Received
    Or X10 'A1/Off (11)' is Received

Then
       Run program 'HCA Group 1 Flag'

Else
  - No Actions - (To add one, press 'Action')



 

with the corresponding House/Unit codes and Group Flag programs. This shows how the first (Area) button may be either an On or an Off button. When the Area button is pressed, the respective program in this folder runs, and sets the corresponding Group Flag program. When a Group Flag program gets set, it enables the appropriate Group folder, and disables this Group Select folder. In this way, the second (Device) button of the pair will operate a device, rather another area.

 

So it is these eight programs and nine folders (and their contents) which comprise the discrete device control portion of the system. Next, we'll look at the scene portion.

 

Thanks Joe, That is pretty cool! I can see how you do this now (although it resulted in a mild brain cramp first). I like this idea. I have numerous outside lights and low voltage devices and one 8 button keypad link in the garage. 8 buttons is just not enough, I need about 12 to control everything individually. I don't want to have to cut out another gang. I think I will try something like this.

 

Thanks,

-jeffd

 

Hi Jeff. This scheme in its full-blown form may be overkill for twelve devices with eight buttons. But, something similar (and greatly simplified) would likely work very well! I'm happy if this has been of help. Let us know how it goes.

Link to comment

In Part I we looked at the device portion of the system, and the eight programs and nine folders which comprise it, and live in the master-controller's Housecode folder which in these examples is Housecode A.

 

Here in Part II, we'll look at the scene portion, which is comprised of two programs and three folders that also live in the Housecode A folder. One could also choose to create HCA Device and HCA Scene folders under Housecode A to house these two components for organizational purposes; the operations would remain unchanged.

 

The two programs, titled HCA Shift Down Flag and HCA Shift Up Flag, are simply:

 

Program 'HCA Shift Down Flag'
If
       Program 'HCA Shift Up Flag' is False
   And X10 'A9/Dim (15)' is Received

Then
       Wait  8 seconds
       Run program 'HCA Shift Down Flag' (Else Path)

Else
  - No Actions - (To add one, press 'Action')



Program 'HCA Shift Up Flag'
If
       Program 'HCA Shift Down Flag' is False
   And X10 'A9/Bright (7)' is Received

Then
       Wait  8 seconds
       Run program 'HCA Shift Up Flag' (Else Path)

Else
  - No Actions - (To add one, press 'Action')



 

Pressing the Bright button (interpreted as 'Shift Up') will shift the next Scene button (9 - 16) to the upper palette, while pressing Dim ('Shift Down') will shift the next Scene button to the lower palette. Again, an eight second timeout prevents the program from remaining 'locked in' to either shift state, should the second button press never arrive. An added condition prevents the program from switching to the upper palette while it is currently in the lower palette, and vice versa. This is in preparation for future additions to the logic, but may be omitted if one doesn't mind the switch occurring.

 

The three folders are named HCA No Shift, HCA Shift Down, and HCA Shift Up. Their conditions are:

 

Folder Conditions for 'HCA No Shift'
Add conditions to limit when programs in this folder are allowed to run.



If
       Program 'HCA Shift Up Flag' is False
   And Program 'HCA Shift Down Flag' is False

Then
  Allow the programs in this folder to run.



Folder Conditions for 'HCA Shift Down'
Add conditions to limit when programs in this folder are allowed to run.



If
       Program 'HCA Shift Down Flag' is True

Then
  Allow the programs in this folder to run.



Folder Conditions for 'HCA Shift Up'
Add conditions to limit when programs in this folder are allowed to run.



If
       Program 'HCA Shift Up Flag' is True

Then
  Allow the programs in this folder to run.



 

Each of the three folders contains sixteen programs, which in the HCA No Shift folder are named HCA No Shift n On and HCA No Shift n Off, where n represents the Scene number (9 - 16). The programs in the other two folders are similarly named HCA Shift Down n On (or Off) and HCA Shift Up n On (or Off). These programs look like:

 

Program 'HCA No Shift 9 Off'
If
       X10 'A9/Off (11)' is Received

Then
       Run program 'Macro Name'

Else
  - No Actions - (To add one, press 'Action')



 

with the corresponding House/Unit codes and Macro names. The sixteen programs in the HCA Shift Up folder and the sixteen programs in the HCA Shift Down folder each contain the same condition as the corresponding program in the HCA No Shift folder, but each runs a different Macro.

 

Now we come to the Macro folder, which is a top-level folder along side the X-10 Triggers folder. This folder contains all of the Macros (read Scenes) which are triggered by the Scene portion of the X-10 Triggers system. The intent is to isolate the trigger (cause) from its action (effect). This allows the same Macro to have multiple (X-10, Insteon) triggers, while only being coded a single time. If the Macro requires modification, it need be changed in only one place rather each place one of its triggers occurs.

 

The reason I refer to these as Macros rather than Scenes is because Scene is a rather static term, which implies a single condition (may include ramp rates, of course), whereas many of my Macros are an entire sequence of events occurring over time, and changing depending on various conditions.

 

For example, what happens when I press my Movie button depends on the current movie state. If this is the first press of the button, then the system goes to a Movie Prep stage: turn on a kitchen light (make popcorn), turn on the theatre lights and a portion of the entertainment system (choose movie). Another press of the Movie button shifts the system to the Movie Start state: kitchen lights off, theatre lights fade down. In this state another Movie button press causes a shift to the Movie Stop state: theatre lights fade up, bathroom light on (refreshing pause), kitchen light on (fetch more beer). Finally, additional Movie button presses cause the state to alternate between Movie Start and Movie Stop. The final Movie Stop state is also appropriate to getting ready for bed, though I also have a Bedtime macro which does that and adds the bedroom lights as well.

 

So there you have it. Phew! A lot of typing, but worthwhile if it is actually of help to someone. :oops:

Link to comment

Thanks Joe. It was probably good for you anyway to do that. . . . keeps your mind sharp.

 

This would work well with the Harmony remote since you can have it send out any sequences and call the button whatever you want.

And then you can also automatically dim the lights when you go to Play, brighten them when you Pause, etc., like I'm doing now.

I hope yo kept this write-up in a Word document or something so you don't have to go looking for it if you need it!

 

Thx.

Link to comment

After that writeup, I think you'll have to change your handle to "Not Just Another Joe" :D .

 

Brilliant implementation, and exactly what I had in mind when I submitted the original post for this thread... except I'm trying to avoid using X10 products and was thinking of the 6-button RemLinc.

 

On the other hand, I have a LOT of old PalmPads around, and they were easily the most reliable part of my old X10 system, so maybe I better reconsider - besides, the PalmPad is more "hand friendly" than the RemLinc, and considerably cheaper!

 

Rod

Link to comment

Thanks for the kind words, guys. Glad it is helpful.

 

Just a note that if someone wanted to implement this scheme completely, the easiest way is to create all of the folders and programs at once, with no devices or macros/scenes assigned--just skeletal programs. After that, it's very easy to go in at any time and add or change devices/macros for specific triggers. Even though there are a large number of programs, they are so short that the whole system does not use an overly large amount of memory!

 

Rod, yes PalmPads would be way cheaper than RemoteLincs even if you were buying them new, never mind if you already have a bunch of them like you and I do :wink: . But if you've already got some RemoteLincs, the same scheme could be used. If it were implemented the same way, if would give you six Areas of six Devices each, for a total of 36. That may be enough for many applications, but if not, then by all means put those PalmPads to use.

 

While the scheme as I've implemented it may serve as a guide for others, there are many possible variations. If you or others experiment with some variations, or come up with an entirely new scheme, I hope you'll post them. A scheme for a ControLinc (only five button pairs) would be of great interest, for example!

Link to comment
  • 9 months later...

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...