Jump to content

Simple logic not working. Keypad and X10


johnjces

Recommended Posts

Posted (edited)

I have a lot of X10 devices which I will slowly replace as money allows. I have four (4) X10 plug in dimmer modules in my kitchen for under/above counter lights. I also have an Insteon keypad with the main switch/relay connected to the main kitchen lights and the four keypad buttons set to toggle on/off with a key press.

 

Currently the cabinet lights work great with Houselinc and the Keypad Linc with events, i.e. when button ON is pressed it sends X10-On. The inverse works just as well (off). Again, on-off for all four of these X10 dimmers work just fine when using HouseLinc.

 

I have been slowly reprogramming my home with a refurbished ISY and what should be simple logic for turning these X10 units on and off is all messed up!

 

When I press the button for the Above Sink light, it may turn on or it and the Below Cabinet lights may turn on. Or when I go to turn on the Below Cabinet lights, the Above sink light turns on and the Below Cabinet lights turn off. There almost always seems to be one on one off and sometimes both on and when you turn the one on that is on and turn it may turn off but leave what it turned on and wasn't supposed to turn on - on. I hope this makes sense in writing. I can post a video that would more clearly show this messed up state.

 

Currently I am using State Variables to check when the button is either on or off. I tried not using variables and had the exact same weird results. The variables change as they should! Everytime!

 

Note too that I can run the IF portion and things run correctly when the keypad is either on or off. Runs right every time. I can run the THEN portion and again things run fine as does the ELSE which I have used off and on.

 

Here is what I have so far only trying to get two of the lights to work;

Set Above Sink On - [ID 000E][Parent 0009]

If
        Status  'Kitchen Switch / Above Sink - X10' is On
 
Then
        $AboveSinkOn  = 1
 
Else
        $AboveSinkOn  = 0
 


And we have...

Set Below Cabinets On - [ID 0011][Parent 0009]

If
        Status  'Kitchen Switch / Under Cabinets - X10' is On
 
Then
        $BelowCabsOn  = 1
 
Else
        $BelowCabsOn  = 0
 


Now here are the programs that are supposed to turn on and off only themselves.

Above Sink On - [ID 0012][Parent 000D][Not Enabled]

If
        $AboveSinkOn is 1
    And Status  'Kitchen Switch / Above Sink - X10' is On
 
Then
        Repeat 2 times
           Send X10 'A1/On (3)'
 
Else
   - No Actions - (To add one, press 'Action')
 


I have also tried the Else by sending X10 A1 / Off same results so I separated it into two programs.

Above Sink Off - [ID 0014][Parent 000D][Not Enabled]

If
        $AboveSinkOn is 0
    And Status  'Kitchen Switch / Above Sink - X10' is Off
 
Then
        Repeat 2 times
           Send X10 'A1/Off (11)'
 
Else
   - No Actions - (To add one, press 'Action')
 


And for the Below Cabinet lights:

Under Cabinets On - [ID 0013][Parent 000D][Not Enabled]

If
        $BelowCabsOn is 1
    And Status  'Kitchen Switch / Under Cabinets - X10' is On
 
Then
        Repeat 2 times
           Send X10 'A2/On (3)'
 
Else
   - No Actions - (To add one, press 'Action')
 


 and

Under Cabinets Off - [ID 0015][Parent 000D][Not Enabled]

If
        $BelowCabsOn is 0
    And Status  'Kitchen Switch / Under Cabinets - X10' is Off
 
Then
        Repeat 2 times
           Send X10 'A2/Off (11)'
 
Else
   - No Actions - (To add one, press 'Action')
 


Remember, it may or may not turn on/off the other X10 Device and sometimes it doesn't turn on/off itself. Remember again that I can right click and run these perfectly without any other lights turning on or off.

 

Thanks for thoughts/help

 

I am starting to think there is a bug in this refurbished unit in the manner it evaluates or sends stuff... but again, works when I right click and run just fine.

 

John

 

PS. The repeats are to ensure that the X10 gets down the lines. It makes no difference whether I repeat the command or not.

 

Edited by johnjces
Posted (edited)

Most of your programs are disabled and I see nothing to call them as a subroutine either.

 

The enable/disable affects the triggers in the IF section. Without a trigger the program will never run automatically.

 

 

Your variables must be State variables for this to work. You did mention they are but most of us prefix our Stat variable with a small "s" like this $sVariableName.

Edited by larryllix
Posted (edited)

I must admit that I would like a better description of what you WANT to happen. I find it difficult to look at a set of programs and try to figure out why it is not working as expected without knowing what is expected.

 

It might also help to better understand what devices are....are "above sink" and "under cabinets" insteon devices? These are different than A1 and A2 x10 commands?

 

Having said these things, the only thing that strikes me as unusual is the same as larryllix. Why did you disable the last four programs?

 

I also cannot escape the suspicion that these programs are more complicated than need be. For example, program ID 0012 has two conditions, a variable and a device status. In essence, these conditions are redundant, since the variable is ultimately based on the status of the device. When the "above sink" is ON, the variable will be 1 and, when OFF, the variable will be zero. Basically, both conditions are the same.

Edited by oberkc
Posted (edited)

Thanks for the replies....

 

In my original post I mention that the devices I am controlling are X10 plug in dimmer modules.

 

The Insteon controller is a switchlinc pad, On-Off and four keys, A, B, C, D.

 

All I want is for A, (the above sink button) to turn on and off the light above the sink and nothing else. As for B, all I want for it is to turn on and off the under cabinet lights.

 

I have disabled them so they won't interfere with my houselinc program which operates the lights perfectly from the Insteon keypad. Just copied and pasted them after I disabled them. Pretend they are enabled.

 

And yes, this logic should work just fine. Something weird is happening.

 

ALSO, I have simplified them way down when I first started this. No matter what I do, things just don't turn on or off as expected. I'll take and hopefully post some short videos.

 

John

Edited by johnjces
Posted

Thanks for the replies....

 

In my original post I mention that the devices I am controlling are X10 plug in dimmer modules.

 

The Insteon controller is a switchlinc pad, On-Off and four keys, A, B, C, D.

 

All I want is for A, (the above sink button) to turn on and off the light above the sink and nothing else. As for B, all I want for it is to turn on and off the under cabinet lights.

 

I have disabled them so they won't interfere with my houselinc program which operates the lights perfectly from the Insteon keypad. Just copied and pasted them after I disabled them. Pretend they are enabled.

 

And yes, this logic should work just fine. Something weird is happening.

 

ALSO, I have simplified them way down when I first started this. No matter what I do, things just don't turn on or off as expected. I'll take and hopefully post some short videos.

 

John

 

The ISY doesn't know the status of the X10 devices as they don't report back to the ISY. If you manually turn a X10 switch on or off, or control them from another controller,  then the ISY isn't aware of its current state. 

Posted

@ Techman,

 

Again, thanks for the replies and I guess I am not clear on what's happening or what's disabled/enabled.

 

I know this that X10 doesn't talk back to ISY for state and I am not controlling these devices from Houselinc or any other devices when trying to control it from the ISY using the Insteon keypad. All other controllers are disabled only the ISY is controlling them.

 

The state of the lamps is reflected in the state of the Insteon Keypad Button being On or Off.

 

I am not certain how I can explain this better, but understand, nothing else is controlling the X10 modules when I am attempting to control them using the ISY and the keypad.

 

Again, with HouseLinc enabled and the ISY disabled, even unplugged/off, it works just great!

 

When the ISY programs are enabled and the Houselinc is disabled/not running, it just works wrong and makes no sense. Understand again, I can run the ISY programs from the ISY Admin Console without issue.

 

John

Posted
All I want is for A, (the above sink button) to turn on and off the light above the sink and nothing else. As for B, all I want for it is to turn on and off the under cabinet lights.

 

So, you want a physical press of button A of a keypad to trigger an x-10 device, correct?

 

if

control buttonA is switched on

and

control buttonA is not switched off

then

send sppropriate x10 code (on)

else

send appropriate x10 code (off)

 

Create a similar program for the B button.  No need for variables.  No need for multiple programs.

 

I don't see anything jumping out at me regarding your current programs.  If I were there, and interested in troubleshooting, I would be watching each of the variables to see if they are responding as you expect, and watching the program logs to find out which were not executing when you expect and whether other ones WERE triggering that you did NOT expect.  I would watch the event viewer to watch for unexpected x-10 commands. 

 

I have no clue how or if the houselinc is affecting all this.  I can tell you that I consider it highly likely that there is something else yet undiscovered coming into play here.  I do not consider it likely that there is a programming bug.  Do the keypad buttons have any x-10 addresses assigned, possibly?  Are there other programs being triggered?  This should not be too hard to troubleshoot if you want to take the time.

Posted

@Oberkc, you are correct. Simple on/off of a couple lights controlled by X10 hardware.

 

 There are no known X10 codes assigned to the Swithclinc keypad.

 

The events (programs) in HouseLinc work as expected. Remember, the Houselinc software is not running when this occurs so cannot interfere.

 

I have watched the variables and they are changing as expected.  I have not looked for weird X10 housecodes so will check that out as I forgot about the logs the ISY produces. I also haven't thought about the little bit of extra code in checking the button status that you provided. As I stated, this should be really simple.

 

I will take the time and dig into this more.

 

You sir have helped a bunch! Thank-you! I will report back if I find something.

 

John

Posted

SOLVED!

 

It appears that sending direct X-10 commands, i.e., Send X10 'A2/On (3)' doesn't work too well. What works great is the A10-X10 module and assigning A1 to the X10 module you want to control. So now, my X10 device A2 has a name of BelowCabs. So, doing:

If
        Status  'Kitchen Switch / Under Cabinets - X10' is On
Then
        Set 'BelowCabs' On
Else
        Set 'BelowCabs' Off

 

... works perfectly and as it should. Setting all devices in this way allows everything to work great! Easy peasy! Simple logic. Just don't use

 

Send X10 'A2/On (3)'
 

John

Posted

I do not recall problems sending direct x10 codes (don't do that much anymore). I am wondering if the "repeat 2 times" from the earlier programs cause some sort of signal clashing. But, like I said, it has been a while. Did you try the "belowcabs" approach in the original programs at one point (or just a single x10 command)? I am a little curious about why the original programming did not work.

 

Glad you got it working.

Posted

I have seen reports the a 1 or 2 second delay between X10 commands being sent was recommended.

Especially if you had things like an active X10 phase coupler repeater in the setup.

Posted

In my programming that did not work, I just sent one X10 command and then did a repeat two times and neither made any difference whatsoever. The repeat was a later try and didn't remove it form my sample programs.

 

Oberkc, I have tried all combinations in trying to get things to work using direct X10 commands.

 

Weird and I hope the developers of this device might be following along and chime in on what may have been happening. It is working great now after using the X10 module and assigning it a name and using just like an Insteon device.

Guest
This topic is now closed to further replies.

  • Recently Browsing

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

  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...