Class SpecificInsteonLight

All Implemented Interfaces:
Comparable<NamedBean>, AnalogIO, PropertyChangeProvider, DigitalIO, Light, NamedBean, VariableLight

public class SpecificInsteonLight extends SerialLight
Implementation of the Light Object for Insteon receivers on Insteon 2412S interfaces.

Uses X10 dimming commands to set intensity unless the value is 0.0 or 1.0, in which case it uses on/off commands only.

Since the dim/bright step of the hardware is unknown then the Light object is first created, the first time the intensity (not state) is set to other than 0.0 or 1.0, the output is run to it's maximum dim or bright step so that we know the count is right.

Keeps track of the controller's "dim count", and if not certain forces it to zero to be sure.

  • Field Details

  • Constructor Details

    • SpecificInsteonLight

      Create a Light object, with only system name.

      'systemName' was previously validated in SerialLightManager

      Parameters:
      systemName - text for systemName of light
      tc - tc for connection
    • SpecificInsteonLight

      public SpecificInsteonLight(String systemName, SerialTrafficController tc, String userName)
      Create a Light object, with both system and user names.

      'systemName' was previously validated in SerialLightManager

      Parameters:
      systemName - text for systemName of light
      tc - tc for connection
      userName - text for userName of light
  • Method Details

    • getMaxHops

      public int getMaxHops()
    • setMaxHops

      public void setMaxHops(int maxHops)
    • initIntensity

      protected void initIntensity(double intensity)
      Invoked the first time intensity is set.
      Overrides:
      initIntensity in class SerialLight
      Parameters:
      intensity - The next intensity value that will be set
    • sendIntensity

      protected void sendIntensity(double intensity)
      Send a Dim/Bright command to the Insteon hardware to reach a specific intensity. Acts immediately, and changes no general state.

      This sends "Dim" commands.

      Specified by:
      sendIntensity in class AbstractVariableLight
      Parameters:
      intensity - new intensity
    • getNumberOfSteps

      protected int getNumberOfSteps()
      Number of steps from dim to bright is maintained in specific SerialTrafficController implementation
      Specified by:
      getNumberOfSteps in class AbstractVariableLight
      Returns:
      number of steps
    • sendOnOffCommand

      protected void sendOnOffCommand(int newState)
      Send a On/Off Command to the hardware
      Overrides:
      sendOnOffCommand in class SerialLight
      Parameters:
      newState - new state