Jump to content

Drapes modified


JimV

Recommended Posts

I am trying to adapt the drapes programs that 'tcster' reported on Mar 23, 2008 to a single KPL. His programs allowed the user to open and close the drapes with KPL switches while maintaining the integrity of his timed based programs to open and close the drapes. I have tried to adapt his code to a single KPL button with limited success.

 

The first two programs open and close the drapes based on time of day and work well.

 

Drapes Morning

If

Time is 9:30:00AM

 

Then

Set 'Drape plug' On

Wait 20 seconds

Set 'Drape plug' Off

 

Else

-No Actions

 

Drapes Evening

If

Time is Sunset

 

Then

Set 'Drape plug' On

Wait 20 seconds

Set 'Drape plug' Off

 

Else

-No Actions

 

I also have two programs adapted from 'tcster' that open and close the drapes using a KPL button and again they work well by themselves.

 

Drapes Button Open

If

Status 'Kitch KPL-D' is On

 

Then

Set 'Drape plug' On

Wait 20 seconds

Set 'Drape plug' Off

 

Else

-No Actions

 

Drapes Button Close

If

Status 'Kitch KPL-D' is Off

 

Then

Set 'Drape plug' On

Wait 20 seconds

Set 'Drape plug' Off

 

Else

-No Actions

 

What 'tcster' was able to do and I am not is to set the condition of the KPL-D button depending if the drapes are open (On) or closed (Off). Setting this condition allowed him to add code that determined if the drapes were, for example, opened before 9:30AM by using the KPL-D button and preventing the "timed" program from incorrectly shutting the drapes. I cannot find a way to change the On/Off status of the KPL-D button other than when the button is pressed manually, but not when the timed programs run.

 

I hope I am clear in what I am asking and would like to thank you in advance for any assistance you can provide.

Link to comment

Hi JimV,

 

To set the state of a KPL button the button must be in a scene and then you control the scene.

 

Drapes Morning

If

Time is 9:30:00AM

And Status 'Kitch KPL-D' is On

 

Then

Set 'Drape plug' On

Wait 20 seconds

Set 'Drape plug' Off

Set Scene 'Kitch KPL-D Button' Off

 

Else

-No Actions

 

Rand

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...