PaulMichaels Posted May 10, 2016 Posted May 10, 2016 (edited) I'm trying to set up some programs that will control my fan speed by both the wall switch (KeypadLinc where I have OFF, LOW, MED, HIGH buttons) and a wireless mini remote where one button is used to cycle the speeds. I also have it beeping to indicate what speed it's set to since I may not be able to see the light that is lit up on the KeypadLinc. Any ideas what I'm doing wrong here? Here is an example of the fan medium program. It seems that this works one time (from off to low or what not) but then after that somehow all the programs run at the same time, and it beeps a bunch of times FanSpeed is a Integer variable FanSpeed 0 is off , 1 is low, 2 medium, 3 is high Fan Med - [ID 0023][Parent 002B] If Control 'Bedroom / Fan / Fan Medium Button' is switched On Or-( | Control 'Bedroom / Remote - Fan Speed' is switched On | Or Control 'Bedroom / Remote - Fan Speed' is switched Off | And $FanSpeed is 1 -) Then $FanSpeed = 2 Set Scene 'Bedroom / Fan / Fan Medium' On Set Scene 'Bedroom / Fan / Fan Medium' Beep Set Scene 'Bedroom / Fan / Fan Medium' Beep Else - No Actions - (To add one, press 'Action') Edited May 10, 2016 by PaulMichaels
oberkc Posted May 10, 2016 Posted May 10, 2016 (edited) First, i am not sure that I can accurateli infer you full intention fron the program. Is it your intention to turn the fan from low to medium when you press the remote OFF?! Personally, I would probably use scenes to control the fan via keypad and a program to relate remote commands to the scenes. One think that appears suspicous is your parenthesese. (I believe the last one is in the wrong place...should be ahead of AND statement.) I am also suspicous that, somehow, your variable is defined as a STATE type, but without seeing all your programs and knowing what buttons you pressed, it would be speculation on my aprt why your other programs would be running Edited May 10, 2016 by oberkc
Xathros Posted May 10, 2016 Posted May 10, 2016 I'm trying to set up some programs that will control my fan speed by both the wall switch (KeypadLinc where I have OFF, LOW, MED, HIGH buttons) and a wireless mini remote where one button is used to cycle the speeds. I also have it beeping to indicate what speed it's set to since I may not be able to see the light that is lit up on the KeypadLinc. Any ideas what I'm doing wrong here? Here is an example of the fan medium program. It seems that this works one time (from off to low or what not) but then after that somehow all the programs run at the same time, and it beeps a bunch of times FanSpeed is a Integer variable FanSpeed 0 is off , 1 is low, 2 medium, 3 is high Fan Med - [ID 0023][Parent 002B] If Control 'Bedroom / Fan / Fan Medium Button' is switched On Or-( | Control 'Bedroom / Remote - Fan Speed' is switched On | Or Control 'Bedroom / Remote - Fan Speed' is switched Off | And $FanSpeed is 1 -) Then $FanSpeed = 2 Set Scene 'Bedroom / Fan / Fan Medium' On Set Scene 'Bedroom / Fan / Fan Medium' Beep Set Scene 'Bedroom / Fan / Fan Medium' Beep Else - No Actions - (To add one, press 'Action') What kind of variable is: $FanSpeed ? Make sure your using an integer and not a state variable here. -Xathros
oberkc Posted May 10, 2016 Posted May 10, 2016 Xathros, $fanspeed is an integer variable accordong to original post, but one does wonder. I suspect all programs are running because the are all triggered by the same remote button.
Xathros Posted May 10, 2016 Posted May 10, 2016 Completely missed that line in the original post! Think we need another set of parens to make the logic logical... If Control 'Bedroom / Fan / Fan Medium Button' is switched On Or-( Or-( | | Control 'Bedroom / Remote - Fan Speed' is switched On | |Or Control 'Bedroom / Remote - Fan Speed' is switched Off | -) | And $FanSpeed is 1 -) -Xathros
PaulMichaels Posted May 10, 2016 Author Posted May 10, 2016 Xathros you hit the nail on the head. The extra set of parenthesis was the issue! Thank you so much!
oberkc Posted May 10, 2016 Posted May 10, 2016 Logically, the second (outside) set of brackets is not needed.
Recommended Posts