Jump to content

FanLinc and KPL with automatic temperature-based and manual mode control


MrTinker

Recommended Posts

Posted (edited)

I'm currently working on a new configuration for the FanLinc/KPL combos I have (will be six total shortly). Originally, I set them up as "recommended" with four KPL buttons in Non-Toggle On mode for each state (Off, Low, Med, High). I then automated turning them on Low and Med based on temperature. However, I have others in the house that wanted to be able to control them manually still so I set about changing the scenes and buttons to accommodate this.

 

Here's the setup I'm currently testing and am looking at other thoughts, ideas to simplify, etc.

 

Changed KPL buttons (A, B, C, D) back to Toggle mode.

 

Created state variable sFanManualMode<Room> (eg: sFanManualModeOffice)

0 = manual mode off, 1 = manual mode on

 

AutoInit program to set the Init of the state variable any time the variable changes

eg:

If

$sFanManualModeOffice is $sFanManualModeOffice

Then

$sFanManualModeOffice Init To $sFanManualModeOffice

Else

<No actions>

 

Off scene:

Motor (responder) - Set to Off

KPL B (responder) - Set to Off

KPL C (responder) - Set to Off

KPL D (responder) - Set to Off

 

Low scene:

Motor (responder) - Set to Low

KPL B (controller) - Set to 100%

KPL C (responder) - Set to Off

KPL D (responder) - Set to Off

 

Med scene:

Motor (responder) - Set to Med

KPL B (controller) - Set to Off

KPL C (responder) - Set to 100%

KPL D (responder) - Set to Off

 

High scene:

Motor (responder) - Set to High

KPL B (controller) - Set to Off

KPL C (responder) - Set to Off

KPL D (responder) - Set to 100%

 

Mode scene:

KPL A (controller) - Set to 100%

 

Programs to change variable

SetOfficeFanManualMode-Off

If

Control 'Office-KPL / Office-KPL - A' is switched off

Then

$sFanManualModeOffice = 0

Else

<No action>

 

SetOfficeFanManualMode-On

If

Control 'Office-KPL / Office-KPL - A' is switched on

Then

$sFanManualModeOffice = 1

Else

<No actions>

 

For some fans, I also want to override any manual setting at night (temps here typically drop off nicely at night so I want the fan to lower speed and stop as the temps inside the house go lower). For such fans, I have this program:

 

SetOfficeFanManualMode-Off-Time

From 10:00:00PM

To 6:00:00AM (next day)

Then

$sFanManualModeOffice = 0

Set Scene 'OfficeCeilingFanMode' Off

Else

<No actions>

 

Programs to control the fan automatically based on temp

OfficeCeilingFan-AutoLowSpeed

If

Status 'Thermostat' >= 73 (Temperature)

and Status 'Thermostat' < 75 (Temperature)

and $sFanManualModeOffice is 0

Then

Set Scene 'OfficeCeilingFanLow' On

Else

<No actions>

 

OfficeCeilingFan-AutoMedSpeed

If

Status 'Thermostat' >= 75 (Temperature)

and $sFanManualModeOffice is 0

Then

Set Scene 'OfficeCeilingFanMed' On

Else

<No actions>

 

OfficeCeilingFan-AutoOff

If

Status 'Thermostat' < 73 (Temperature)

and $sFanManualModeOffice is 0

Then

Set Scene 'OfficeCeilingFanOff' On

Else

<No actions>

 

This all seems to work quite well (after some instruction to others in the house on how the switches now work). The only issue is changing manual mode remotely (ie not using KPL button E directly). If you send an Off to OfficeCeilingFanMode, the variable won't change and if you change the variable directly, KPL button A (which indicates manual mode) won't change with it. I created the below programs so the button would change properly if you change the variable directly, but I'm looking for ideas on how to do this better, if possible.

 

SetOfficeFanManualMode-Off-Variable

If

$sFanManualModeOffice is 0

Then

Set Scene 'OfficeCeilingFanMode' Off

Else

<No actions>

 

SetOfficeFanManualMode-On-Variable

If

$sFanManualModeOffice is 1

Then

Set Scene 'OfficeCeilingFanMode' On

Else

<No actions>

Edited by MrTinker
Posted

Hi MrTinker,

 

The problem is that you are using Control in your programs. Control events are sent based solely on physical activity on the switch. You might want to use status instead BUT this may not work since, if the status of a device is on and you keep turning it on, the program will not run.

 

With kind regards,

Michel

Posted

Maybe it's easier to state it this way: All I want to use the KPL button for is to set and indicate the status of a state variable (button light on = 1, button light off = 0). What are my options for doing this (with plusses and minuses for each method)?

 

It would be nice to be able to use a scene for changing the variable (remote use cases).

Posted

Ok, thanks Michel. I'm already doing that so it's good to have confirmation.

 

I tried changing the Control conditions of the KPLs in the programs to Status conditions, but then they don't respond properly to button presses (the Then portion that changes the variable didn't seem to get triggered as the variable was not changing when I would press the button while I had everything on the bench). Thus it appears what I have outlined above is the best way to handle what I'm trying to accomplish. I'll see how it goes (so far it's been operating pretty well).

Posted

For my own setup, I automated the ceiling fans with temperature sensors, but made it so that pressing any of the buttons to change the fan state caused an override of the automated temperature control for a set time period. For instance, my living room fan has a 1 hour override if you manually select a button. The bedroom I set for 4 hours, on the theory that if you're sick, that's where you'll be.

Posted

Thanks builderb. I did experiment with that a bit, but I didn't put it on a timer (I was just changing it back to automatic at a particular time of the day, in the evening before people would typically be going to bed so it would be automated at night while we were sleeping). I guess the part I didn't like about that was that I didn't know whether or not it was in automatic or manual mode (which is why I then made the change to use what was the Fan Off button to instead reflect the state).

 

Good to get other ideas out there though for others to think through how they want to do it :)

Posted

Hey no problem, happy to toss out ideas. My main goal is to make the automation features of my house invisible to most users. Thus, I care less about whether the fan is being controlled manually or automatically, and more about whether it's doing what the user expects. I also try to make it so a total stranger would be able to operate the expected basics without instruction (including the entertainment system). I try to keep those goals in mind as I plan my automation setup.

 

I actually use the same concept with my motion detection lights too. For the most part, the motion sensor controls the light. But if someone manually turns it on or off, I assume they are doing so for a reason. The timer is my way of ensuring automated control resumes after an appropriate interval without any human interaction.

Posted

builderb, I'm going to try your method on one of my FanLinc/KPL combos. Are you using a variable (like I outlined above) to track manual/automatic mode or how are you doing it? I assume you're using the Control conditions for the KPL button presses in programs to capture when to override automatic? Perhaps you can share more of your config/programs and how you're doing it? I assume that your fan speed related KPL buttons are set for Non-Toggle (On)?

 

When I was using button presses to override, I had also setup FastOn (for the Fan Off KPL button) to set the state variable back to 0 (ie automatic mode). You wouldn't have a visual clue that it was changed, but you at least have a way to set it immediately if you so wish. I don't believe most people would think to use a double-press.

Posted

builderb, I'm going to try your method on one of my FanLinc/KPL combos. Are you using a variable (like I outlined above) to track manual/automatic mode or how are you doing it? I assume you're using the Control conditions for the KPL button presses in programs to capture when to override automatic? Perhaps you can share more of your config/programs and how you're doing it? I assume that your fan speed related KPL buttons are set for Non-Toggle (On)?

 

When I was using button presses to override, I had also setup FastOn (for the Fan Off KPL button) to set the state variable back to 0 (ie automatic mode). You wouldn't have a visual clue that it was changed, but you at least have a way to set it immediately if you so wish. I don't believe most people would think to use a double-press.

 

I'm not actually tracking manual vs. automatic modes. It would be relatively easy to have the button press change a variable too though, then have the timer change it back. You might even consider using an 8-button KPL, put the fan controls on the bottom four, and use one of the spare keys as an indicator / controller of the manual / auto distinction. Personally I don't really like the 8-button design, since it's not very intuitive to non-trained users. But, it's an option. I'm also more of a set-it-and-forget-it kind of guy. I'd rather fine tune the temperature set points for the fan and the length of the timer to where I'm not needing to worry about whether it's in manual or automatic mode. My first guesses for set points were not the best, but after some consultation with the family (and a notepad for tracking times when anyone felt too hot and needed to adjust the fan, which I could later check my temperature database to see what the temperature was when a complaint was registered), we rarely need the manual control. All I need to know is that within an hour of someone messing with the fan, it'll be back to normal.

 

Now, with my speechifying done, here's some code. I'm no professional, and there's likely plenty of room for improvement, but this is a working system. I do have the four fan control buttons set up as mutually exclusive, per the guide here. I also have scenes set up with the four KPL fan control buttons as responders that I use to keep the buttons in sync with the fan motor speed. I have four programs that set the fan speed based on temperature, Fan Auto [High:Medium:Low:Off]. Then, I have a Fan Auto Disable on Press program that disables the four programs that set the fan speed based on temperature, waits, then enables them. I also have a Fan Auto Enable Disable program with no condition that I can call from a program to enable and disable the system (I'd tie this to your manual control plans).

 

Fan Auto Disable on Press:

Fan Auto Disable on Press - [ID 009A][Parent 0090]

If
        Control (Old) 'LR-CeilingFan-Off' is switched On
     Or Control (Old) 'LR-CeilingFan-Low' is switched On
     Or Control (Old) 'LR-CeilingFan-Medium' is switched On
     Or Control (Old) 'LR-CeilingFan-High' is switched On
 
Then
        Disable Program 'Fan Auto Off'
        Disable Program 'Fan Auto Low'
        Disable Program 'Fan Auto Medium'
        Disable Program 'Fan Auto High'
        Wait  1 hours 
        Enable Program 'Fan Auto Off'
        Enable Program 'Fan Auto Low'
        Enable Program 'Fan Auto Medium'
        Enable Program 'Fan Auto High'
 
Else
   - No Actions - (To add one, press 'Action')
 

And here's the Enable Disable one:

Fan Auto Enable Disable - [ID 0099][Parent 0090]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Enable Program 'Fan Auto Off'
        Enable Program 'Fan Auto Low'
        Enable Program 'Fan Auto Medium'
        Enable Program 'Fan Auto High'
 
Else
        Disable Program 'Fan Auto Off'
        Disable Program 'Fan Auto Low'
        Disable Program 'Fan Auto Medium'
        Disable Program 'Fan Auto High'
 

One last note that probably won't apply to you, but I have a Hue bulb in the ceiling fan. This was something of a challenge, since you do not want to dim fan bulb with a Hue bulb in it. Plus you want the Hue bulb powered all the time. So, rather than using a scene to control the power supply of the FanLinc, I use the on/off buttons on my KPL to send a resource command to turn the Hue bulb on and off. Because of this, I used the fast on and fast off control commands to actually turn off the power to the FanLinc light if I needed to. 

 

Hope some of this is helpful! Let me know if you have any questions.

Posted

Funny enough, I've been working on tweaking the temps at which the fan starts (low) and then changes to med. I haven't bothered to set a high speed automatically because I personally think it's too fast and medium (along with AC being engaged) will be as high as I need.

 

I didn't even though of enabling/disabling programs so that adds an interesting option.

 

I have a mix of 6 and 8 button KPLs tied to the FanLincs (depends on what else is in the room that I need to control) so I'd like the keep the operation of the fans from the KPLs as consistent as possible thus limiting the fan control to four buttons. I do have one (in my wife's parents' bedroom) that I haven't even created automated programs for because they "don't like it" and want to control everything manually. Using your method, the controls would be consistent and, as you did, I'd just need to work on tweaking the temps and timings for the automated overrides for all the other fans to try to make everyone happy (hahahaha). I'll probably still do the FastOn (for Fan Off) to set it back to automated immediately just for my own use.

 

Too bad I don't have a way to automate the opening of windows in the house since it's hard to get anyone else to do it (free AC in the summer mornings/evenings here in CO but still people can't open a window, lol).

 

Thanks again for sharing your thoughts and setup. I appreciate such input (even if I might not use it for the situation I'm inquiring about, answers may come in handy for something else down the road).

Posted

Funny enough, I've been working on tweaking the temps at which the fan starts (low) and then changes to med. I haven't bothered to set a high speed automatically because I personally think it's too fast and medium (along with AC being engaged) will be as high as I need.

 

I didn't even though of enabling/disabling programs so that adds an interesting option.

 

I have a mix of 6 and 8 button KPLs tied to the FanLincs (depends on what else is in the room that I need to control) so I'd like the keep the operation of the fans from the KPLs as consistent as possible thus limiting the fan control to four buttons. I do have one (in my wife's parents' bedroom) that I haven't even created automated programs for because they "don't like it" and want to control everything manually. Using your method, the controls would be consistent and, as you did, I'd just need to work on tweaking the temps and timings for the automated overrides for all the other fans to try to make everyone happy (hahahaha). I'll probably still do the FastOn (for Fan Off) to set it back to automated immediately just for my own use.

 

Too bad I don't have a way to automate the opening of windows in the house since it's hard to get anyone else to do it (free AC in the summer mornings/evenings here in CO but still people can't open a window, lol).

 

Thanks again for sharing your thoughts and setup. I appreciate such input (even if I might not use it for the situation I'm inquiring about, answers may come in handy for something else down the road).

 

Oh yes, enabling and disabling programs is quite powerful. I use it all the time. Using folder conditions is another really useful way to change from one program setup to another.

 

A couple of things still on my agenda for these fan setups: using variables in place of the set points in my auto-on programs so that I can shift the set points to different values for home / away / summer / winter / morning / evening, etc. with a simple program. For instance, I'd still like them to come on when I'm not home, but probably at a couple degrees higher than when I'm home. The living room has a wood-burning stove, so during the winter I'd like the low speed to come on pretty early, and stay that way no matter how warm the LR gets. Changing those set points via variable will be much easier (and less confusing later on) than writing separate programs, or using folders.

 

Also, I still need to figure out how best to implement a delay after an automatic state change, to avoid situations where the temperature is fluctuating just at the set point threshold, causing the fans to switch states every minute or so. I figure if the auto-on changes the fan state, it should wait at least 5-10 minutes before it will allow another change. I haven't done this yet because I suspect the solution will involve re-writing my programs to involve integer variables and state variables (yet another useful way to be selective about when programs run).

Guest
This topic is now closed to further replies.

×
×
  • Create New...