Execute Upon State Change

From LinuxMCE
Revision as of 19:54, 30 March 2015 by Marie.o (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

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

  1. go into Advanced / Configuration / Events.
  2. Click 'Create Advanced Event'
  3. 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

  1. Click 'Edit' in the 'Criteria' column.
  2. Click 'Add Segment'
  3. 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'.
  4. 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.