Jump to content

Need help with a timer program controlling an insteon outlet


satwar

Recommended Posts

I have a program that controls an outlet to be "on" for 2 hours then "off" for a minute then "on" again for 2 hours etc.

 

If

$Allow_to_Run is 1

 

Then

Repeat Every 1 minute

Set 'Outlet' On

Wait 2 hours

Set 'Outlet' Off

 

Else (blank)

 

I would like to enhance the program to only do this 4 times and then set the outlet "off" for 16 hours, then repeat the 2 hour "on/off" cycle again.

 

Thanks in advance for your help

Link to comment

Logically, i suppose you could try:

 

If

$allowtorun is 1

Then

Repeat 4 times

Set outlet on wait 2 hours

Set outlet off

Wait 1 minute

Repeat

Run next program (then path)

Else

Halt next program

 

Next program:

If

Nothing

Then

Wait 16 hours

Run last program (if path)

Link to comment

One program could do it by calling itself

 

If

    $Allow_to_Run is 1

 

Then

    Repeat for 4 times

        Set 'Outlet' On

        Wait 2 hours

        Set 'Outlet' Off

        Wait 1 minute

    Repeat 1 times

    Wait 16 hours

    Run (if) program.self

 

Else

     Set 'Outlet' Off

Link to comment

Archived

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


×
×
  • Create New...