Jump to content

Make a button or switch control a variable timer (House Fan)


BitSmith

Recommended Posts

I’ve seen several posts wanting to set a timer.  Here’s a setup that will allow you to turn on and off your device normally, as well as use an adjustable timer – all from a keypad or switch.

I have a house fan that I want to set for short times or up to a few hours at bed time.

Requirement:  Minimum two devices, one to actually control the fan (ApplianceLinc) and one to be the controller.  In my case I have an 8-button KeyPadLinc (KPL) at the top of the stairs and another downstairs. Note that the ApplianceLinc controls the fan and the switch has no load connected.

User instructions:  To turn the fan on or off, simply press the button on the KPL.  On turns the fan on, Off turns the fan off.  When you double click the button from either off or on position, the value of Fan_Increment will be added to the variable Fan_Remaining_Minutes.  Each successive double click will add that many more minutes to the limit of the variable.  The LED on the KPL will blink to let you know the command has been received.

That allows up to FFFF FFFF hex or 4,294,967,295 dec minutes, or 8171 years.  Of course that would take 143,165,576 double clicks, and all that clicking would take you a very long time to do.

 

Variable

Initial Value

Current Value

Usage

Fan_Remaining_Minutes

0

0

Describes how long to stay on.

Fan_Increment

30

30

Specifies your desired increment. 

 

Scene:

House Fan

 

 

Fan

(Responder)

 

Upstairs Button H

(Responder)

 

Downstairs Button H

(Responder)

 

 

 

Scene:

House Fan LEDs Only

 

 

Upstairs Button H

(Responder)

 

Downstairs Button H

(Responder)

 

Programs:

 

 

 

 

 

 

 

Normal On:

If

 

Control ‘Upstairs Button H’ is switched On

 

 

Or

Control ‘Downstairs Button H’ is switched On

 

 

 

 

 

Then

 

Set Scene ‘House Fan’ On

 

 

 

$Fan_Remaining_Minutes = 0

 

 

 

 

 

Else

 

No Actions

 

 

 

 

 

 

 

 

Normal Off:

If

 

Control ‘Upstairs Button H’ is switched Off

 

 

Or

Control ‘Downstairs Button H’ is switched Off

 

 

 

 

 

Then

 

Set Scene ‘House Fan’ Off

 

 

 

$ Fan_Remaining_Minutes = 0

 

 

 

Stop program ‘Decrement’

 

Else

 

No Actions

 

 

 

 

 

 

 

 

Increment:

If

 

Control ‘Upstairs Button H’ is switched Fast On

 

 

Or

Control ‘Upstairs Button H’ is switched Fast Off

 

 

Or

Control ‘Downstairs Button H’ is switched Fast On

 

 

Or

Control ‘Downstairs Button H’ is switched Fast Off

 

 

 

 

 

Then

 

Set Scene ‘House Fan’ On

 

 

 

Set Scene ‘House Fan LEDs Only’ Off

 

 

 

Set Scene ‘House Fan LEDs Only’ On

 

 

 

$Fan_Remaining_Minutes += $Fan_Increment

 

 

 

Run Program ‘Decrement’ (If)

 

 

 

 

 

Else

 

No actions

 

 

 

 

 

 

 

 

Decrement:

If

 

$Fan_Remaining_Minutes > 0

 

 

 

 

 

Then

 

Wait 1 minute

 

 

 

$Fan_Remaining_Minutes -= 1

 

 

 

Run Program ‘Decrement’ (If)

 

 

 

 

 

Else

 

Set Scene ‘House Fan’ Off

 

 

 

 

 

If you're using MobiLinc, you can watch the variable Fan_Remaining_Minutes change on your mobile device immediately!

Cheers, AL.


 

 

 

Link to comment

Thanks, larryllix for the suggestion. This is my first post (in several years). I was searching for a way, but at that time of night didn’t get there. I didn’t have to work for the HTML, I wrote in MsWord, where making the tables is super easy, then pasted that. 
 

Next, I will post how to adjust this so it can have a both a delay-on as well as the delay-off..

 

Link to comment
  • 3 months later...

Hi! Thank you (BitSmith and Larryllix) for offering up some of your experience an knowledge to us newbies. I haven't used an isy994i in a long time, and the last time it was using Indigo on a macbook about 6 years ago. I have very little experience writing programs but am very familiar with Insteon devices.

I have a specific problem I'm trying to solve. If you can help me with this I would be so grateful.

Controller:  8-button KeypadLinc (7)
Responder: SwitchLinc Dimmer Switch (14)

I want to use each column of buttons on the keypads as a timer control for a single LED light, controlled by a SwitchLinc Dimmer. I set the toggle on the KeypadLincs to ON only so that each press should start a timer, as follows:

Left side of KeypadLinc 1 controls LED 1
A= 30 mins
C= 60 mins
E= 90 mins
G= 120 mins

Right side of KeypadLinc 1 controls LED 2
B= 30 mins
D= 60 mins
F= 90 mins
H= 120 mins
etc...

Any suggestions?

Thanks in advance!

Link to comment

Archived

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


×
×
  • Create New...