Execute Upon State Change: Difference between revisions
Appearance
Created page with "If you want to have LinuxMCE do something, when a device (a light switch for example) does something, that is not directly related to the switch, for example a single button o..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Tutorials]] | |||
[[Category: Scenarios]] | |||
If you want to have LinuxMCE do something, when a device (a light switch for example) does something, that is not directly related to the switch, for example a single button on the wall should change the house mode, you can do that. | If you want to have LinuxMCE do something, when a device (a light switch for example) does something, that is not directly related to the switch, for example a single button on the wall should change the house mode, you can do that. | ||
| Line 9: | Line 11: | ||
# Click 'Edit' in the 'Criteria' column. | # Click 'Edit' in the 'Criteria' column. | ||
# Click 'Add Segment' | # Click 'Add Segment' | ||
# Select 'State | # Select 'State', pick the device, and the value that state must have, for the event to be triggered. In my example, I use a light, and compare it to '=' 'OFF/0'. | ||
# Clicking 'Update' saves this. | # Clicking 'Update' saves this. | ||
Latest revision as of 18:54, 30 March 2015
If you want to have LinuxMCE do something, when a device (a light switch for example) does something, that is not directly related to the switch, for example a single button on the wall should change the house mode, you can do that.
In Web Admin
- go into Advanced / Configuration / Events.
- Click 'Create Advanced Event'
- Name it whatever you feel like, and select the 'State changed'
This will create a new event. This new event does no contain any kind of information for now. First, the criteria needs to be added, this is done by
- Click 'Edit' in the 'Criteria' column.
- Click 'Add Segment'
- Select 'State', pick the device, and the value that state must have, for the event to be triggered. In my example, I use a light, and compare it to '=' 'OFF/0'.
- Clicking 'Update' saves this.
After the criteria is added (the page doesn't change), click on 'Edit Commands' and add the necessary commands to be executed.
No need for a reload. The event works right away on the next state change.