Jump to content

Program Failing to Trigger as Expected


belias

Recommended Posts

I have a program that's set to turn on my entry hall lights under a variety of conditions (I know lots of parenthesis, but it keeps things clean and usually more reliable). For some reason, the program will not trigger for a "Kitchen Motion - Sensor, CONTROL ON" event even when it's between 4:30am and 9:00pm and the Entry Hall LIghts [Gar] is off. Yet, it DOES trigger for a "Garage Motion - Sensor, CONTROL ON" event. Can anybody see what I'm missing here?

 

FYI, I have checked the log file and it clearly shows the "Kitchen Motion - Sensor" going to 100% but the program is not triggered. If I keep walking past the kitchen to the garage and trigger the garage motion sensor, the program triggers fine.

 

Any help would be greatly appreciated. Thanks!

 

If
       Status  'Entry Hall / Rear Entry Hall Lights [Gar]' is Off
   And (
            (
                 From     4:30:00AM
                 To       9:00:00PM (same day)
             And (
                      Control 'Kitchen / Kitchen Motion - Sensor' is switched On
                   Or Control 'Garage / Garage Motion - Sensor' is switched On
                   Or $sKitchenMotionPowerLoss is 0
                 )
            )
         Or (
                 Time is  4:30:00AM
             And Status  'Kitchen / Kitchen Motion - Sensor' is On
            )
       )

Then
       Wait  2 seconds
       Set Scene 'Entry Hall / Rear Entry Hall' On

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

Link to comment

Did the Program not trigger or it triggered but evaluated False?

 

May have to start with a more basic If. Once confirmed the If Control Kitchen MS will trigger True add additional checks, confirming correct operation of each addition until the condition that prevents the trigger or False evaluation is determined.

 

With the Garage and Kitchen Motion On ORed together it is not obvious why it does not work with the information posted.

Link to comment
I have a program that's set to turn on my entry hall lights under a variety of conditions (I know lots of parenthesis, but it keeps things clean and usually more reliable). For some reason, the program will not trigger for a "Kitchen Motion - Sensor, CONTROL ON" event even when it's between 4:30am and 9:00pm and the Entry Hall LIghts [Gar] is off.

 

It appears to me that this combination of conditions SHOULD fire true, based on the logic. The problem is to find out why. Is it possible that the ISY does not accurately reflect the status as you believe it? Can you recreate the conditions, making sure that the ISY accurately knows all the relevant statuses (stati?).

Link to comment

I agree with oberkc in that the program should work.

 

Are you sure the ISY is receiving the "control on" from the device. Just because the status is listed as "on", doesn't mean it received an "on" command just now, only that the last time it received any command, it was an "on" command.

 

Try writing a simple program that has only that motion sensor control on listed in the if section. Then check your program summary page to see if it is triggering that program last run time as expected when you walk in front of it.

Link to comment

arw01

 

The same thing that changes Status to On triggers an If Control xxxx is switched On statement. Assuming they are logically coded the same (both looking for On) they are both triggered by a Motion On message from the Motion Sensor when the Motion Sensor senses motion.

 

If Control can be useful in an Occupancy sensing situation because If Control triggers on consecutive Motion On messages where If Status triggers only once for consecutive Motion On messages.

 

Just depends on what the Program is trying to accomplish.

Link to comment

I've done some more troubleshooting with this (following the suggestions offered here), and I'm still at a loss. The program _IS_ triggered, however evaluates to FALSE when the "Kitchen Motion - Sensor" is switched ON. The ISY status is correct for all of the incorporated devices: Rear Entry Hall Lights [Gar] is OFF; and Kitchen Motion - Sensor going from OFF to ON as I walk in front of it, and the time is within the range specified. Also, the program correctly evaluates to TRUE for all of the other conditions (Garage Motion - Sensor switching ON, etc.).

 

What's interesting is that splitting the program into four separate programs solves the issue. This works as expected:

 

Entry On 1

If
       Status  'Entry Hall / Rear Entry Hall Lights [Gar]' is Off
   And From     4:30:00AM
       To       9:00:00PM (same day)
   And Control 'Kitchen / Kitchen Motion - Sensor' is switched On

Then
       Wait  2 seconds
       Set Scene 'Entry Hall / Rear Entry Hall' On
       Send Notification to 'Brian E-Mail + Brian Push'

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

 

 

Entry On 2

 

If
       Status  'Entry Hall / Rear Entry Hall Lights [Gar]' is Off
   And From     4:30:00AM
       To       9:00:00PM (same day)
   And Control 'Garage / Garage Motion - Sensor' is switched On

Then
       Wait  2 seconds
       Set Scene 'Entry Hall / Rear Entry Hall' On
       Send Notification to 'Brian E-Mail + Brian Push'

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

 

 

Entry On 3

 

If
       Status  'Entry Hall / Rear Entry Hall Lights [Gar]' is Off
   And From     4:30:00AM
       To       9:00:00PM (same day)
   And $sKitchenMotionPowerLoss is 0

Then
       Wait  2 seconds
       Set Scene 'Entry Hall / Rear Entry Hall' On
       Send Notification to 'Brian E-Mail + Brian Push'

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

 

 

Entry On 4

 

If
       Status  'Entry Hall / Rear Entry Hall Lights [Gar]' is Off
   And Time is  4:30:00AM
   And Status  'Kitchen / Kitchen Motion - Sensor' is On

Then
       Wait  2 seconds
       Set Scene 'Entry Hall / Rear Entry Hall' On
       Send Notification to 'Brian E-Mail + Brian Push'

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

 

 

Any idea what might be going on here?

 

Thanks.

Link to comment

What is not present in the 4 Program implementation is

 

Or (

Time is 4:30:00AM

And Status 'Kitchen / Kitchen Motion - Sensor' is On

)

 

The original single Program triggers True when the Kitchen Motion Sensor detects motion and enters a Wait. Because the Status of the Kitchen Motion Sensor has changed the If is reevaluated, now False and runs the Else. The

 

Set Scene 'Entry Hall / Rear Entry Hall' On

 

following the Wait does not run because of the reevaluation that happens when the Wait is executed and Kitchen Motion Sensor Status has changed.

Link to comment

LeeG: Thank you - makes perfect sense. This also explains why the Garage Motion Sensor would result in the program evaluating to TRUE (which was driving me nuts).

 

I'll separate this into two separate programs and it should resolve things.

 

Thanks again!

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...