Skip to content

Insteon Explicit MH Control

galiven edited this page Nov 7, 2014 · 2 revisions

When controlling Insteon devices via Insteon controllers, you have at least two options:

  1. Utilize Scene programming creating a direct link between the Insteon device button (controller) and the Insteon device(s) to be controlled (responders) -- allowing MH to simply monitor the device states (described on the Linking and Scene Page); OR
  2. Force MisterHouse to behave as an intermediary controller between the controlling device (e.g., button) and controlled device (e.g., light).
The first option is recommended for most situations for two reasons: (1) dimming is faster/more responsive and (2) the Scene will still function even when MisterHouse is not running.

The second option is needed when the control required is more complicated than simply dim/on/off. For example, if the responder should turn fully ON during the day, but dim at night, then we need to have MisterHouse involved in controlling the scene.

Example

Strategy (2) (force MH to behave as an intermediary controller) relies on traditional MH "glue logic" to relate the input from some controller (e.g., button) to some device to be controlled. For example:

if ($hall_kpl_a->state_now) {
   if ($hall_kpl_a->state eq ON) {
      $living_accent_light->set(ON);
      # do anything else appropriate
   } elsif ($hall_kpl_a->state eq OFF) {
      $living_accent_light->set(OFF);
   }
}
or, alternatively:
# be explicit with each state as some states should not be tied
$hall_kpl_a->tie_items($living_accent_light, ON);
$hall_kpl_a->tie_items($living_accent_light, OFF);
Clone this wiki locally