Difference between revisions of "Advanced Pages Events"
Jerry finn (Talk | contribs) |
Wierdbeard65 (Talk | contribs) m |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category: Admin Website]] | |
− | + | [[Category: Automation]] | |
− | + | {{versioninfo}} | |
+ | [[Image:AdvancedEvents.jpg|thumb|200px|Advanced Events Admin Page]] | ||
+ | |||
+ | The easiest way to add event handlers is using the '''Wizard > Events Handler > [[Respond to Events]]''' or '''Wizard > Events Handler > [[Timed Events]]'''. The most common event scenarios are "pre-built" there, such as responding to a sensor, or doing something when someone is watching media. Here in the advanced event section it is more complicated because you have total flexibility to define any event handler you want to respond to any event, and compare it against any criteria. | ||
+ | |||
+ | You could, for example, say that when the sun sets and it is less than 32 degrees outside and it is winter and the house is either in armed mode or extended away mode, or it is less than 20 degrees, then you want LinuxMCE to turn on a heat pump. You can see the flexibility is great, but, understandably it is more complicated to create such an event. | ||
+ | |||
+ | If you are familiar with programming concepts like '''if''' statements, then this will be fairly natural. First you choose the event you want the handler to respond to. In the above example it would be 'sun set'. The criteria section is where you build the 'if' clause that you want to be evaluated when LinuxMCE sees the event. You can nest criteria like: if( a=b and b=c and c=d and (d=e or e=f) ) by choosing 'add segment'. Each nesting level can be either an 'and' or an 'or'. If you want to mix them, as was in the a=b example, you create a new segment. You can also check the 'Not' box to make the segment be the inverse. For each expression you choose the 'what to compare', the 'operator' (ie <, >, =, <>) and what value to compare it to. | ||
+ | |||
+ | Then in the 'actions' section you choose what commands or actions you want executed when the event occurs and the criteria evaluates to true. |
Latest revision as of 08:48, 2 May 2010
Version | Status | Date Updated | Updated By |
---|---|---|---|
710 | Unknown | N/A | N/A |
810 | Unknown | N/A | N/A |
1004 | Unknown | N/A | N/A |
1204 | Unknown | N/A | N/A |
1404 | Unknown | N/A | N/A |
Usage Information |
The easiest way to add event handlers is using the Wizard > Events Handler > Respond to Events or Wizard > Events Handler > Timed Events. The most common event scenarios are "pre-built" there, such as responding to a sensor, or doing something when someone is watching media. Here in the advanced event section it is more complicated because you have total flexibility to define any event handler you want to respond to any event, and compare it against any criteria.
You could, for example, say that when the sun sets and it is less than 32 degrees outside and it is winter and the house is either in armed mode or extended away mode, or it is less than 20 degrees, then you want LinuxMCE to turn on a heat pump. You can see the flexibility is great, but, understandably it is more complicated to create such an event.
If you are familiar with programming concepts like if statements, then this will be fairly natural. First you choose the event you want the handler to respond to. In the above example it would be 'sun set'. The criteria section is where you build the 'if' clause that you want to be evaluated when LinuxMCE sees the event. You can nest criteria like: if( a=b and b=c and c=d and (d=e or e=f) ) by choosing 'add segment'. Each nesting level can be either an 'and' or an 'or'. If you want to mix them, as was in the a=b example, you create a new segment. You can also check the 'Not' box to make the segment be the inverse. For each expression you choose the 'what to compare', the 'operator' (ie <, >, =, <>) and what value to compare it to.
Then in the 'actions' section you choose what commands or actions you want executed when the event occurs and the criteria evaluates to true.