Jump to content

Simple Timer Using Keypadlinc?


Go to solution Solved by tazman,

Recommended Posts

Posted (edited)

Hi All - hoping someone can help with a quick answer here that has been eluding me.

In my powder room I have one 6 button Keypadlinc. The load on/off controls the lights. Buttons A & B are linked to a scene for the same lights. I would like to set button C to turn on the fan in that room but so that it automatically turns off after 30 minutes. The fan itself is wired to a microcontroller.

I created a program:

If 'Powder Room.C' Status is On

Then Set 'Powder Room Fan' On
Wait 30 minutes

Else Set 'Powder Room Fan' Off

This works in that if someone pushes the button, it turns the fan on and the button is lit. If someone pushes it again to turn the light off, it turns the fan off.

The problem is that I can't get it to actually turn off Powder Room.C after 30 minutes. If I just add a line that says "Set 'Powder Room Fan' Off after Wait 30 minutes, it will turn the fan off, but it won't actually turn the light off. The admin panel will not let me add a switch off line to "then".

I realize there may be a way to do this by changing the button toggle, but my preference is to have button C show the current status of the fan -- if the fan is on, the light is lit up. That way someone in the bathroom has confirmation that the fan is currently on.

Would love any feedback on how to make this work! Seems pretty simple but can't get over being able to turn button C off.

Thanks!

Edited by PeterP
  • Solution
Posted

You can not control the secondary buttons directly so the fix is to put the button in a scene then you can control the scene in your program.

Posted

The way I do that kind of thing is to have the button turn on a scene, and include a virtual switch in the scene (use the "Virtual" plugin to create the switch). Then have a program that looks for the status of the virtual switch getting turned on, waits 1800 seconds (30 minutes) then turns off the button and virtual switch.

Posted
7 hours ago, PeterP said:

I would like to set button C to turn on the fan in that room but so that it automatically turns off after 30 minutes.

I would approach the problem differently.  I don't think this requires anything fancy such as virtual switches or variables or such.  Why not:

- create a scene with button C as controller and the fan as responder.

- create a program such as

     if status button c is on

     then 

          wait 30 minutes

          turn of newly-created scene

     else

          nothing

Posted

Yep, that's what I thought @tazman's suggestion was 😅

Here is my final program, nice and simple:

If
        'Powder Room / Powder Room Fan' Status is On
 
Then
        Set 'Powder Room / Powder Room Fan Control' On
        Wait  30 minutes 
        Set 'Powder Room / Powder Room Fan Control' Off
 
Else
   - No Actions - (To add one, press 'Action')

I added the first line of 'then' to set the scene in case the fan is triggered by something else, such as Alexa or directly in the app, then it will also light up the 'C' button through that scene.

I also like @Guy Lavoie's approach but need to further look into how these virtual variables work.

Posted
2 hours ago, PeterP said:

Yep, that's what I thought @tazman's suggestion was 😅

Here is my final program, nice and simple:

If
        'Powder Room / Powder Room Fan' Status is On
 
Then
        Set 'Powder Room / Powder Room Fan Control' On
        Wait  30 minutes 
        Set 'Powder Room / Powder Room Fan Control' Off
 
Else
   - No Actions - (To add one, press 'Action')

I added the first line of 'then' to set the scene in case the fan is triggered by something else, such as Alexa or directly in the app, then it will also light up the 'C' button through that scene.

I also like @Guy Lavoie's approach but need to further look into how these virtual variables work.

Yes, that should solve your need. You can keep it simple because there is only one way to turn on the fan. When you have more than one trigger, such as a 3 way setup, then you need to create a second scene that gets triggered by that alternate switch so that it can also "turn off" the keypadlinc C button. I actually call those scenes "reverse" scenes. The alternative is to use a program, as you have done. A program will work fine if it's a single device like the fan that is being controlled because you can watch it's status with If statements. If there are multiple devices though (I have 3 switches in the kitchen that often get turned on and off as a scene, but can also be controlled individually) well there is no "If scene Status..." command in IoX to trigger on. That's where the virtual switch comes in. I have the virtual switch turned on and off as part of the scene, but it can't get turned on manually... So now my program can watch the status of that virtual switch to keep the keypadlinc button correctly lit or not. Keypadlinc buttons are great in toggle mode, but need a bit more programming to keep in sync.

Posted

Thanks @Guy Lavoie. I'm just finishing a renovation on our house and setting up Insteon and other smart home stuff, and I think I will have that scenario of multiple locations to turn something on, so will refer back to this, or look further into virtual switches.

I'm actually a bit surprised that something like turning off a secondary button isn't built-in to UD...

Btw, unrelated, have you ever done an "all off" scene like in a hotel? Do I just create a scene and add all of the lights, fans, and whatever as responders to that scene, and add secondary Keypadlinc buttons as controllers (like by my front door, garage, etc.)?

Posted
7 minutes ago, PeterP said:

I'm actually a bit surprised that something like turning off a secondary button isn't built-in to UD...

Btw, unrelated, have you ever done an "all off" scene like in a hotel? Do I just create a scene and add all of the lights, fans, and whatever as responders to that scene, and add secondary Keypadlinc buttons as controllers (like by my front door, garage, etc.)?

Well turning on/off keypadlinc button backlights isn't something distinct or particular, it's just a regular Insteon device as far as commands go. You're controlling a light. I'm grateful that Insteon designed-in the capability and programmability that the keypadlinc has. The toggle mode would really be annoying to use if there was no way to keep a button's next on or off command in sync with the actual status of the device it's controlling. Now not only is the next button press always correct, but you also get a visual indication with the backlight. I love it.

Yes, I've done scenes similar to "all off". My previously mentioned kitchen lights are a good example. I can (by programmed Insteon commands or Alexa) I can control individual lights, I have a kitchen scene that control all 3 together, a "back of the house" scene that controls those 3 lights plus two others, and a "ground floor" scene that controls those and every other light on the floor, which gets turned off when I arm my alarm system. The beauty with Insteon scenes is that the response speed stays the same, whether you control 2 lights or 20. The multiple link system can appear to be daunting at first, but it is very well thought out.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...