Do Something When Sensors Change

From LinuxMCE
Revision as of 22:54, 20 July 2015 by Marie.o (Talk | contribs) (Initial page to show how to create events for sensor changes)

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

One of the things that is very common, is to automatically execute commands when a sensor detects some change in temperature or brightness. The following steps are all executed within web admin.

This information is true as of svn 30915

Add A Sensor

If you do not yet have a sensor, you need to add one.

Add a sensor is either automatic, if your hardware supports it, or you manually add a new device of device template Brightness Sensor (DT #1745) or Temperature Sensor (DT #1744) below your hardware interface in the device tree, or in the Lighting or Climate part of the wizard.

After adding the sensor, make sure to quickly reload the router, as instructed to do by your Orbiter.

Create A Rule

A rule consists of criterias and commands.

Create Criteria

  • Clicking on Advanced / Configuration / Events in web admin will bring you a page showing all your currently defined events, with the option to "Create an advanced event".
  • Click "Create Advanced Event" and select the Brightness (under General) or Temperature Change (under Climate) event.
  • Click on Edit for the Criteria and Add a Segment.
  • Choose State from the drop down.
  • Choose the sensor device in the next drop down.
  • Choose Brightness for brightness sensors (or Current Temp for temperature sensors)
  • Select the comparison as well as the value to compare it with.
  • Click Update
  • Go to Create Commands

Create Commands

  • Click Edit Event Commands
  • Select the device that you want to send a command to
  • Fill in the blanks
  • Press test to make sure the device works.
  • Click Save
  • You are done! - That was easy, wasn't it.