Jump to content

Using F6 to toggle a light, Keypad Press seems to battle


IVB

Recommended Posts

Posted

I'm trying to create a program where the F6 button on a keypad toggles a zWave light.

 

I did two programs with:

 

IF BackKeypad.F6 is pressed

AND Backyard=On

Then Backyard=Off

 

and a 2nd program with

IF BackKeypad.F6 is pressed

AND Backyard=Off

Then Backyard=On

 

As soon as I press F6, the lights start flashing, as if they're being turned on/off.  It goes on for a few minutes. The only thing I can think of is that the pressed event lasts a while, so the two programs are triggering each other.

 

Is that my issue? Should I use variables? I tried but the below didn't work at all, as if the variable satisfying the if wasn't being picked up.

 

IF BackKeypad.F6 is pressed

AND Backyard=On

Then BackVar=0

 

and a 2nd program with

IF BackKeypad.F6 is pressed

AND Backyard=Off

Then BackVar=1

 

If BackVar=0

Then Backyard=Off

Then BackVar=2

 

If BackVar=1

Then Backyard=On

Then BackVar=2

 
 
 
Posted

You like to live dangerously! :)

 

If this is in ISY more information is required about your parameters.

 

 

IF BackKeypad.F6 is pressed

AND Backyard=On <---needs to not cause triggers, whatever this is

 

Then

set Backyard Off

Else

set Backyard off

 

If backyard input is a device it will always cause triggers and may oscillate. A variable and another program will be necessary.

 

Variable Flipper Program

IF BackKeypad.F6 is pressed

 

Then

$sVariable += 1 <---must be state variable

$sVariable %= 2

Else

----

 

Driver Program (enabled)

If

$sVariable = 1

Then

turn Backyard On

Else

turn Backyard Off

 

EDIT: Not a good way to do this. See following post.

Posted

eh, hmmm, i don't have permission to quote your latest reply, but thats clever, that should do it. Backyard is a zWave appliance module, into which lights are plugged.

 

Thanks!

 

BTW in response to a statement I made earlier, I can't seem to leave my server that runs well enough alone, and i'm the cause of M$ instability. I'm now segregating rules into:

 

Level 1: Elk. Rules that are fully contained within the Elk, such as low voltage lights connected to relays, go here.

Level 2: ISY. Rules that are fully contained within the Elk&ISY, such as the above

Level 3: CQC.

 

wish me luck...

Posted

I'm trying to create a program where the F6 button on a keypad toggles a zWave light.

 

<snippage>

I don't like the above program as it could cause flashing.

 

Light Toggle Program

IF

     BackKeypad.F6 is pressed

     AND $Variable is not 1  <--- must be a non-triggering element

 

Then

   $Variable   = 1   <---must be Integer variable

   set backYard On

 

Else

   $Variable = 0

    set Backyard Off

Posted

eh, hmmm, i don't have permission to quote your latest reply, but thats clever, that should do it. Backyard is a zWave appliance module, into which lights are plugged.

 

Thanks!

 

BTW in response to a statement I made earlier, I can't seem to leave my server that runs well enough alone, and i'm the cause of M$ instability. I'm now segregating rules into:

 

Level 1: Elk. Rules that are fully contained within the Elk, such as low voltage lights connected to relays, go here.

Level 2: ISY. Rules that are fully contained within the Elk&ISY, such as the above

Level 3: CQC.

 

wish me luck...

I ain't got no stinkin' Elk so I know not what I have done :)

See my  second post.

Posted

hey, for the lurkers who have Elks, if I press the F6 button, how long does that event stay in effect? I'm wondering why this'll oscillate for minutes. Shouldn't that trigger only last (seconds, subseconds)?

 

IF BackKeypad.F6 is pressed

AND BackyardLight=On

 

Then

   set BackyardLight Off

Else

  set BackyardLight On

Posted

hey, for the lurkers who have Elks, if I press the F6 button, how long does that event stay in effect? I'm wondering why this'll oscillate for minutes. Shouldn't that trigger only last (seconds, subseconds)?

 

IF BackKeypad.F6 is pressed

AND BackyardLight=On <---this cannot be a triggering element

 

Then

set BackyardLight Off

Else

set BackyardLight On

Your program oscillates.

You are changing the trigger element that runs your program.

 

If it is ON turn it Off

 

Ohh..it changed to Off, turn it ON

 

ohh...it changed to ON, turn it Off

Posted

Make 2 programs.

 

Program1:

IF BackKeypad.F6 is pressed
 
Then
   Run Program2 If
Else
  <none>
 
 
Program2 (disabled)
IF BackyardLight=On
 
Then
   BackyardLight=Off
Else
  BackyardLight=On
Posted

Oh, I didn't know that a "disabled" program would run via a THEN command. Thats pretty cool.

 

I got it all working with Larry's way, thx all. Climbing the learning curve slowly...

Archived

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

×
×
  • Create New...