Jump to content

Program not working


TheWabit

Recommended Posts

Posted (edited)

Hello,

 

I cant get this program to turn off the Island lights after 15 minutes. Checked the Summary - doesn't say "running then" either. Any ideas? BTW there are two ICON switches in a 3-way situation for the Island Light. See below for program details:

 

 

If
        From    Sunset
        To      Sunrise (next day)
    And Control 'Triggerlinc' is switched On
    And Status  'Island (Mudroom Door ICON)' is Off
    
 
Then
        Set Scene 'Island' On
        Wait  15 minutes
        Set Scene 'Island' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Edited by TheWabit
Posted

I assume the

 

Set Scene 'Island' On

 

is changing the Status of 'Island (Mudroom Door ICON)'.  As soon as the Status changes the Program is triggered again with a False result that drives the Else clause.  The Then clause is terminated because of the Wait and change in Island Status.

Posted

If turning the scene on when it's already on is not a problem, just delete, "And Status  'Island (Mudroom Door ICON)' is Off."

Posted

Stu's answer reminded me why I put that line in there (realizing now that it doesn't work). It was because if it is already on, obviously someone selected the switch on. So I didn't want someone to come in the door and set a timer for 15 minutes and it go off when someone obviously wants it on. Any way to accomplish this?

 

thanks!

Posted (edited)

For the most part, you need to split this into 2 programs.

 

Program 1

 

If
        From    Sunset
        To      Sunrise (next day)
    And Control 'Triggerlinc' is switched On
    And Status  'Island (Mudroom Door ICON)' is Off
    
Then
        run program 2 else clause
 

Else
   - No Actions - (To add one, press 'Action')

 

Program 2

 

If 

blank (or an optional condition if you want to terminate the wait)

 

Then

blank (or enable program 1 if you include a terminating statement in the if)

 

Else

Disable program 1

Set Scene 'Island' On

        Wait  15 minutes
        Set Scene 'Island' Off

Enable program 1

 

Also, if you wanted to terminate the 15 minute timer, you could include whatever you wanted to cause the termination in the "if" of program 2 and put "enable program 1" in the then clause of program 2.  Also please note that whatever you use in program 2 as the terminator condition in the if, should only have a true option (like "control triggerlinc is switched on") otherwise the else clause could run unintentionally.
 

Edited by apostolakisl
Posted

Thanks Apost!

 

My only question is since I have 2 ICON switches for that light in a 3-way situation, do both switches need to be in the "if" in program 1?

Posted (edited)

My only question is since I have 2 ICON switches for that light in a 3-way situation, do both switches need to be in the "if" in program 1?

 

Yes, since you are using "control", Both would need to be there, separated by an 'or'.

Edited by oberkc
Posted

So when I run this (open the door with the Triggerlinc), the light comes on, I check the program and "Program 1" has circle with a line through it and "Program 2" is all red. What would those mean?

Posted

I am sorry - I don't know how to capture the thumbnail but it is the document symbol next to the program name that is all red. When you go to "summary" in "activity", it says "running else". but it is stuck there because it has been way longer than 15 minutes and the light did not go off.

Posted

Solid green indicates that the program is running and the premise is true. Solid red indicates that the program is running and the premise is false.

Posted

So it doesn't seem to work. Here are the programs:

 

Program 1

 

 

If
        From    Sunset
        To      Sunrise (next day)
    And Control 'Triggerlinc' is switched On
    And Status  'Island (Kitchen ICON)' is Off
     Or Status  'Island (Mudroom Door ICON)' is Off
 
Then
        Run Program 'Mud Room Lightup - 2' (Else Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Program 2

 

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
   - No Actions - (To add one, press 'Action')
 
Else
        Disable Program 'Mud Room Light Up - 1'
        Set Scene 'Island' On
        Wait  15 minutes
        Set Scene 'Island' Off
        Enable Program 'Mud Room Light Up - 1'
 

The Triggerlinc turns the light on, program 1 disables, program 2 shows a "false" under status for the "if" (which would be normal from what I read). But after 15 minutes, the light stays on and nothing changes on the "details" tab (Program 1 is still disabled, etc)

Posted (edited)

Program 1 has a coding problem

 

If
     From Sunset
     To     Sunrise (next day)
And Control 'Triggerlinc' is switched On
And

    (

    Status 'Island (Kitchen ICON)' is Off
     Or Status 'Island (Mudroom Door ICON)' is Off
     )
Then
     Run Program 'Mud Room Lightup - 2' (Else Path)

 

Without the parens the Ored Status check is NOT anded with the TriggerLinc action

Edited by LeeG
Posted

So this is what I have now. I had the same result. Although I did notice that in you program above, the "And" and the ( are on separate lines. Would that matter? And if so, how can I separate the two?

 

 

If
        From    Sunset
        To      Sunrise (next day)
    And Control 'Triggerlinc' is switched On
    And (
             Status  'Island (Kitchen ICON)' is Off
          Or Status  'Island (Mudroom Door ICON)' is Off
        )
 
Then
        Run Program 'Mud Room Lightup - 2' (Else Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted (edited)

These programs ran successfully (I didn't include the schedule for simplicity. I used 5 second to save time. I also used a device in program 2 instead of a scene).

 

Program 1

If
        Control 'Triggerlinc' is switched On
    And Status  'Device 1" is not On
 
Then
        Run Program 'Program 2' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')

 

Program 2

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Disable Program 'Program 1'
        Set 'Device 1' On
        Wait  5 seconds
        Set 'Device 1' Off
        Enable Program 'Program 1'
 
Else
   - No Actions - (To add one, press 'Action')
 
Because this is a temporary condition, you need only be concerned about the primary device.

Edited by stusviews
Posted

The results are interesting - It worked the first time (had it set for 10 seconds), turned back off in 10. When I open the door subsequent times. The light does NOT turn on...

Posted

I just read your reply and tested the programs. The programs still function correctly. Did you move the jumper? How long did you wait between openings?

Posted

I did not move any jumpers. But for the last 2 hours of testing, it appears that waiting a very short period of time between openings causes that issue. I waited about 30 seconds the first time when I reported back that the light didn't work. But I tried waiting 5-10 minutes between attempts and it seemed to work fine. I think this will work but I am just curious what in the programming is causing it not to repeat the desired result when only waiting a short period of time. Thanks for all the help!

Posted (edited)

I did not move any jumpers. But for the last 2 hours of testing, it appears that waiting a very short period of time between openings causes that issue. I waited about 30 seconds the first time when I reported back that the light didn't work. But I tried waiting 5-10 minutes between attempts and it seemed to work fine. I think this will work but I am just curious what in the programming is causing it not to repeat the desired result when only waiting a short period of time. Thanks for all the help!

 

It would not be the program.  Once the timeout on program 2 is over and program 1 get re-activated, then it will run on receiving a triggerlinc command.  Perhaps you have a communciation issue?  Check to see if the status of device 1 is correct on your console.  Also, if device 1 is a dimmer, "not on" means "not 100%".  (this is probably not your problem, but you should be aware of that as many people assume not one is the same as off).

Edited by apostolakisl
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...