Jump to content

What is the difference between Control / Status?


RichTJ99

Recommended Posts

In pulling data from an old ISY, I have a few notification programs about doors that are left open.

 

 

Door Open (dont mind the not specified item):

 

If
       Control  is switched On
   And Control  is not switched Off

Then
       Repeat Every  5 minutes and 30 seconds
          Send Notification to All

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


 

Other:

 

If
       Status   is On

Then
       Repeat Every  5 minutes and 30 seconds
          Send Notification to All

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


Link to comment

If Control is checking actual inbound commands from a device. If Control triggers only when there is command flow from the device that matches the command.

 

If Status is checking the device Status the ISY maintains for each node. If Status triggers only when Status changes but can be used in a compound If statement to check current Status when triggered by some other condition.

 

If Control cannot check after the fact because it is looking at actual command flow from the device.

 

A Program checking for If Control 'xxxx' is switched On triggers for each On command. Pressing a paddle On three times in a row will trigger the Program three times. If Status triggers the Program once as the Status changes only once.

Link to comment

So is there a way to combine multiple programs into one?

 

What I would like:

 

1. When the door is opened, I get an email.

2. If door stays open more than 5 minutes, I should get an email (every 5 minutes) until the door is closed.

3. When door is closed I get an email.

 

I have it set this way:

 

Office Door Opened:

If
       Control 'Office: Front Door - Opened' is switched On

Then
       Send Notification to 'Default' content 'OPEN Office Front Door'

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

 

Office Door Closed:

If
       Control 'Office: Front Door - Opened' is switched Off

Then
       Send Notification to 'Default' content 'Office Front Door - Closed'

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

 

Office Door Left opened:

If
       Control 'Office: Front Door - Opened' is switched On
   And Control 'Office: Front Door - Opened' is not switched Off

Then
       Repeat Every  5 minutes and 30 seconds
          Send Notification to 'Default' content 'OPEN Office Front Door'

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

Link to comment

Something like this - syntax is not exact but I think it conveys the idea

 

If Status ‘Front Door†is On

Then

Send Notification ‘Front Door Opened’

Repeat every 5 minutes

Send Notification ‘Front Door Open’

Else

Send Notification ‘Front Door Closed’

Link to comment

If
       Control 'Office: Front Door - Opened' is switched On
   And Control 'Office: Front Door - Opened' is not switched Off

Then
       Repeat Every  5 minutes and 30 seconds
          Send Notification to 'Default' content 'OPEN Office Front Door'

Else
       Send Notification to 'Default' content 'Office Front Door - Closed'

 

So when the door is opened, it will start sending an email every 5 minutes...when it closes, the repeat will be interrupted and the Else will run sending the door closed email.

 

If you wanted different emails for "just opened" and "left open", you would do:

If
       Control 'Office: Front Door - Opened' is switched On
   And Control 'Office: Front Door - Opened' is not switched Off

Then
       Send Notification to 'Default' content 'Office Front Door - Opened'
       Wait 5 minutes and 30 seconds
       Repeat Every  5 minutes and 30 seconds
          Send Notification to 'Default' content 'Office Front Door - Left Open'

Else
       Send Notification to 'Default' content 'Office Front Door - Closed'

Link to comment

EDIT: I got beat to it. This is the same stuff.

 

If you used the "else" clause on your third program to send the door closed message, you could delete the other 2.

 

The third program triggers when one of two things happen, the door opens, and the door closes. These are the only 2 possible changes that can occur to the door so that should encompass all possible triggers.

 

When the door opens, it will run true, it will send the message from the "then" clause, then it will keep sending tgat message every 5 minutes until it is interrupted. When someone closes the door, the program will trigger (which interrupts the repeating then), but it will trigger as false. This will run the "else" clause which can contain your door closed message. Since this clause doesn't have a repeat, this program will end.

 

If you wanted one message when the door first opened, a different message after the door was left open, then place the first message before the repeat, then wait 5 minutes, then the repeat every 5 minutes with your other message after the repeat.

Link to comment

So control is a light being on, so if control is on for a light, its only the light turning on, a status is if someone presses on & its already on, then you would get multiple notices (or actions)?

 

I will try out that script! Thanks that looks like a much easier way than having 3 separate notifcication scripts

Link to comment

I may have spoke to soon. I am using this & Now I am only getting door closed messages.

 

If
       Control 'Office: Front Door - Opened' is switched On
   And Control 'Office: Front Door - Opened' is switched Off

Then
       Send Notification to 'Default' content 'Office: Front door open'
       Wait  5 minutes 
       Repeat Every  5 minutes 
          Send Notification to 'Default' content 'Office: Front door left open'

Else
       Send Notification to 'Default' content 'Office: Front door closed'


 

I am guessing all its using is the else. I only get messages about it being closed.

Link to comment
So control is a light being on, so if control is on for a light, its only the light turning on, a status is if someone presses on & its already on, then you would get multiple notices (or actions)?

You don't get multiple notices.

 

You have to think like a timeline...

000000000011111111112222222222333333333344444444445555555555
012345678901234567890123456789012345678901234567890123456789
-----N++++++++++F-----------N++++++++++++++++F----------N++

So the first two lines are numbering (00 through 59)...the last line is actions across this section of time... N represents the switch being turned on... F represents it being turned off... From that, you should see that - means it is off and + means it is on.

 

With that timeline, "Control is Switched On" is true 3 times in this timeline...at times 05, 28, and 56 (where the N's are). "Control is Switch Off" is true exactly twice...at times 16 and 45 (where the F's are). "Status is On" is true from 05 through 15 (the N and its following +'s) and then again from 28 through 44.

 

So let's say a program runs at time 10...at that time "Status is On" is true, but "Control is Switched On" is not. The "Control" statements are only true in the instant of the action, but Status is true for the duration.

 

Stated differently..."Control" responds to the action and "Status" response to the current state.

 

Hopefully that helps...

 

 

 

I may have spoke to soon. I am using this & Now I am only getting door closed messages.

It needs to be "is not Switched Off"...you are saying "Control is Switched On and Control is Switched Off"...that would require it to be simultaneously switched in both directions which is not possible so it is always false.

Link to comment

Archived

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


×
×
  • Create New...