Jump to content

Still having difficulty with Variable


Roman

Recommended Posts

I have a Variable called Christmas time.

 

It is currently working fine and showing me the Variable $Christmas_Time_State as a State Variable 0

 

Now at sunset I tell the ISY within the program folder called sunset to run several commands one of which is to run Christmas Lights Alarm Off currently the STATE $Christmas_Time_State is set at 0.

 

Here is my problem all the Christmas lights are turning on, and they are not yet suppose to be for$Christmas_Time_State is 0...

 

Here is the program folder (Christmas Lights Alarm Off) I created that within sunset it asks that it run...

 

If
       $Christmas_Time_State is 1
   And $Alarm is 0

Then
       Set 'Christmas Tree' On
       Set 'Christmas Lights Family Room' On
       Set 'Christmas Lights Outdoors' On

Else
       Run Program 'Christmas Lights Alarm ON' (If)

 

Problem I am having is $Christmas_Time_State = 0 yet all the THEN commands are running?

 

Even if the ELSE statement ran that is fine for the program Christmas Lights Alarm ON looks as follows: (so I figure even if this one is called and $Christmas_Time_State = 0 then nothing will happen as far as turning on Christmas lights go)

 

If
       $Christmas_Time_State is 1
   And $Alarm is 1

Then
       Set 'Christmas Lights Outdoors' On

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

 

What have I missed that the ISY seems to get confused..

Link to comment

Terminology seems to be getting us in trouble.

 

There is a reference to a Folder with Action statements but Folders do not have Action statements.

 

There is a reference to doing something at Sunset but nothing posted uses Sunset.

 

Seems like the actual Folder is missing and perhaps the Programs that are controlling the Variables used in the posted objects.

 

As noted before the Programs | Summary page provides information about if a Folder is True or False, if and when a Program is triggered (Last Run Time) and what clause was run (Status True or False).

Link to comment

I noticed that my Variable Alarm was not a STATE variable.. I have updated this.

 

All other variables are state...

 

Top program should run first if true, based on the IF statement of the 2 variables being Christmas time being 1 and Alarm = 0 this way based on my thinking should trigger the THEN part of the program.

 

Should Christmas time = 1 and Alarm = 1 (on) then based on my thinking the ELSE statement should trigger.

 

By triggering the ELSE statement the second code is then run.

 

In the 2nd code the only time Christmas Outdoor lights would turn on is if both Variable STATE of Christmas Time is Equal to 1 and Alarm is equal to 1.

 

Christmas Time variable so far is being calculated correctly.

 

Am I overthinking this??? Too many conditions to trigger programs???

Link to comment

A static variable value combination does not trigger a Program. A State variable has to change value while the Folder the Program is under is True. If the Variable values are established while the Folder is False, changing the Folder to True does not trigger the program until the variable value changes.

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

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