com.udi.insteon.client
Class InsteonOps

java.lang.Object
  extended by com.udi.insteon.client.InsteonOps

public class InsteonOps
extends java.lang.Object

Utility class for all permissible Insteon Operations

Author:
UD Architect

Field Summary
static double[] rampRates
          A 32 element array of all possible ramp rates as follows (all in seconds):
540 ,480 ,420 ,360, 300 ,270 ,240 ,210, 180 ,150 ,120 ,90 , 60 ,47 ,43 ,38.5, 34 ,32 ,30 ,28 , 26 ,23.5,21.5,19 , 8.5 ,6.5 ,4.5 ,2 , 0.5 ,0.3 ,0.2 ,0.1
The index to the array should be used in the calls to perform a ramp rate operation on ISY
 
Constructor Summary
InsteonOps()
           
 
Method Summary
static int convertOnLevelToPercent(int onlevel)
          Converts an On-Level integer to a percentage
static int convertOnLevelToPercent(java.lang.String onlevel)
          Converts an On-Level String to a percentage
static short convertPercentToOnLevel(int percent)
          Converts an On Level percentage to Insteon format (short)
static java.lang.String convertPercentToOnLevelString(int percent)
          Converts an On Level percentage to Insteon format (String)
static java.lang.String formatNodeAddress(java.lang.String address, java.lang.String deviceType)
           
static java.util.ArrayList<UDNode> getAssociatedDevices(UDNode node, UDProxyDevice device)
          Returns an ArrayList [sorted] of all the associated UDNodes for a given UDNode
static java.lang.String getFormattedInsteonAddress(java.lang.String address)
           
static java.lang.String getFormattedInsteonAddress(java.lang.String address, boolean format_x10)
          Returns a formatted version of the node address, for display in the GUI.
static java.lang.String getInsteonAddress(java.lang.String address, boolean extended)
          Returns an UDI formatted address as it's Insteon counterpart format
static java.lang.String getInsteonGroup(java.lang.String address)
          Returns the Insteon representation of the UDNode
static int getNumIOInputs(UDNode node)
          Returns the number of inputs for an I/O device
static int getNumIOOutputs(UDNode node)
          Returns the number of outputs for an I/O device
static UDNode getPrimaryNode(UDNode node)
          Return the node that represents the device itself.
static boolean hasAssociatedDevices(UDNode node)
          Checks to see whether or not a node as associated nodes.
static boolean hasSense(UDNode node)
          Checks to see whether or not a device has load sensing capabilities
static boolean isBatteryPoweredDevice(char type, char subType)
           
static boolean isBatteryPoweredDevice(UDNode node)
           
static boolean isClimateControlDevice(UDNode node)
          Checks for thermostats (i.e.
static boolean isClimateControllerNode(UDNode node)
          Returns true if the given thermostat node may be used as a controller in a scene.
static boolean isCompanion(UDNode node)
           
static boolean isControLinc(UDNode node)
          Checks for ControLinc
static boolean isControllerOnly(UDNode node)
          Return true if the node may be used as a group controller, but not a group responder.
static boolean isDimmable(UDNode node)
          Whether or not a node is dimmable
static boolean isDualBandOutletLinc(UDNode node)
          Checks to see whether or not a device is a dual band OutletLinc
static boolean isEnergyDisplay(char type, char subType)
          Checks for Energy Display
static boolean isEnergyDisplay(UDNode node)
          Checks for Energy Display
static boolean isEZBridge(UDNode node)
           
static boolean isEZIO2(UDNode node)
          Checks for EZIO-2x4 device
static boolean isEZIO4O(UDNode node)
          Checks for EZIO4O device
static boolean isEZIO6I(UDNode node)
          Checks for EZIO6I device
static boolean isEZIO8(UDNode node)
          Checks for EZIO-7x8 (8SA) device
static boolean isEZIO8T(UDNode node)
          Checks for EZIO-8T (8x30 device
static boolean isEZSwitch(UDNode node)
           
static boolean isFanLinc_Fan(UDNode node)
          Checks for FanLinc Fan node
static boolean isFanLinc(UDNode node)
          Checks for FanLinc
static boolean isIconOnOffSwitch(UDNode node)
          Checks for IconOnOffSwitch
static boolean isIconSwitchDimmer(UDNode node)
          Checks for IconSwitchDimmer
static boolean isIconSwitchRelay(UDNode node)
          Checks for IconSwitchRelay
static boolean isIMeterSolo(UDNode node)
           
static boolean isInLineLincRelayDualBand(UDNode node)
           
static boolean isInlineLincWSense(UDNode node)
          Checks for InlineLinc with Sense
static boolean isInsteonBridge(UDNode node)
           
static boolean isInsteonController(UDNode node)
          Checks to see whether or not a device is a controller
static boolean isIOAnalogInput(UDNode node)
          Checks to see whether or not a node is an I/O "analog" input
static boolean isIOController(UDNode node)
          Checks to see whether or not this node is the main controller for an I/O device.
static boolean isIODevice(UDNode node)
          Checks for I/O (i.e.
static boolean isIOInput(UDNode node)
          Checks to see whether or not a node is an I/O input
static boolean isIOLinc(UDNode node)
           
static boolean isIOLincSensor(UDNode node)
          Returns true if the node is an IOLinc sensor node
static boolean isIOOutput(UDNode node)
          Checks to see whether or not a node is an I/O output
static boolean isIRLincReceiver(UDNode node)
           
static boolean isIRLincTx(UDNode node)
           
static boolean isIrrigationController(UDNode node)
          Checks to see whether or not this node is the main controller for an Irrigation device.
static boolean isIrrigationDevice(UDNode node)
          Checks for Irrigation (i.e.
static boolean isIrrigationValves(UDNode node)
          Checks to see whether or not this node is a valve.
static boolean isKeypadLinc(UDNode node)
          Checks for KeypadLinc
static boolean isKeypadLincButton(UDNode node)
          Checks to see whether or not a node is a KeypadLinc button
static boolean isKeypadLincRelay(UDNode node)
           
static boolean isKeypadLincV2(UDNode node)
          Checks for KeypadLinc v2
static boolean isKPLTimer(UDNode node)
          Checks for Countdown Timer
static boolean isLampLinc(UDNode node)
          checks for LampLinc
static boolean isLampLincBiPhy(UDNode node)
          checks for LampLinc BiPhy
static boolean isLightDevice(UDNode node)
          Checks for any Insteon Light controller/responder device
static boolean isLLV2(UDNode node)
          Checks for LampLinc v2
static boolean isLoadController(UDNode node)
           
static boolean isMorningLinc(UDNode node)
           
static boolean isMotionSensor(UDNode node)
           
static boolean isPrimaryNode(UDNode node)
          Whether or not a node is the primary node for a device such as KPL load button
static boolean isRemoteLinc(UDNode node)
          Checks for RemoteLinc
static boolean isRemoteLinc2(char type, char subType)
          Checks for RemoteLinc2
static boolean isRemoteLinc2(UDNode node)
          Checks for RemoteLinc2
static boolean isRemoteLinc2Switch(UDNode node)
          Checks for RemoteLinc2Switch
static boolean isResponderOnly(UDNode node)
          Return true if the node may be used as a group responder, but not a group controller.
static boolean isSameDevice(UDNode n1, UDNode n2)
          Checks to see whether or not two nodes are actually referring to the same device
static boolean isSwitchedDevice(UDNode node)
          Checks to see whether or not a device is switched
static boolean isSwitchLinc(UDNode node)
          Checks for SwitchLinc
static boolean isSwitchLincTimer(UDNode node)
          Checks for 2476ST - SwitchLincTimer
static boolean isSwitchLincV3(UDNode node)
           
static boolean isSwitchLincWSense(UDNode node)
          Checks for 2476S
static boolean isSynchroLinc(UDNode node)
           
static boolean isTimerLinc(UDNode node)
           
static boolean isToggleLinc(UDNode node)
          Checks for ToggleLinc
static boolean isTriggerLinc(UDNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rampRates

public static double[] rampRates
A 32 element array of all possible ramp rates as follows (all in seconds):
540 ,480 ,420 ,360, 300 ,270 ,240 ,210, 180 ,150 ,120 ,90 , 60 ,47 ,43 ,38.5, 34 ,32 ,30 ,28 , 26 ,23.5,21.5,19 , 8.5 ,6.5 ,4.5 ,2 , 0.5 ,0.3 ,0.2 ,0.1
The index to the array should be used in the calls to perform a ramp rate operation on ISY

Constructor Detail

InsteonOps

public InsteonOps()
Method Detail

convertOnLevelToPercent

public static int convertOnLevelToPercent(int onlevel)
Converts an On-Level integer to a percentage

Parameters:
onlevel - - the on level
Returns:
- the on level in percentage format

convertOnLevelToPercent

public static int convertOnLevelToPercent(java.lang.String onlevel)
Converts an On-Level String to a percentage

Parameters:
onlevel - - the on level
Returns:
- the on level in percentage format

convertPercentToOnLevel

public static short convertPercentToOnLevel(int percent)
Converts an On Level percentage to Insteon format (short)

Parameters:
percent - - the on level percentage
Returns:
- Insteon/short format of the on level (0x00 to 0xFF)

convertPercentToOnLevelString

public static java.lang.String convertPercentToOnLevelString(int percent)
Converts an On Level percentage to Insteon format (String)

Parameters:
percent - - the on level percentage
Returns:
- Insteon/String format of the on level (0x00 to 0xFF)

isIOLincSensor

public static boolean isIOLincSensor(UDNode node)
Returns true if the node is an IOLinc sensor node

Parameters:
node -
Returns:
- whether or not the node is an IOLinc sensor node

isControllerOnly

public static boolean isControllerOnly(UDNode node)
Return true if the node may be used as a group controller, but not a group responder.

Parameters:
node - the UDNode to be checked
Returns:
true if the node may be used as a group controller, but not a group responder.

isResponderOnly

public static boolean isResponderOnly(UDNode node)
Return true if the node may be used as a group responder, but not a group controller.

Parameters:
node - the UDNode to be checked
Returns:
true if the node may be used as a group responder, but not a group controller.

isToggleLinc

public static boolean isToggleLinc(UDNode node)
Checks for ToggleLinc

Parameters:
node - - the UDNode to be checked
Returns:
- whether or not the node in question is ToggleLinc
See Also:
UDNode

isLampLinc

public static boolean isLampLinc(UDNode node)
checks for LampLinc

Parameters:
node - - the UDNode to be checked
Returns:
- whether or not the node in question is LampLinc
See Also:
UDNode

isIrrigationDevice

public static boolean isIrrigationDevice(UDNode node)
Checks for Irrigation (i.e. EZRain) device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an Irrigation Device
See Also:
UDNode

isIODevice

public static boolean isIODevice(UDNode node)
Checks for I/O (i.e. EZIO) device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an I/O Device
See Also:
UDNode

isClimateControllerNode

public static boolean isClimateControllerNode(UDNode node)
Returns true if the given thermostat node may be used as a controller in a scene.

Parameters:
node - A thermostat node
Returns:
True if the given thermostat node may be used as a controller in a scene.

isClimateControlDevice

public static boolean isClimateControlDevice(UDNode node)
Checks for thermostats (i.e. EZTherm)

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a thermostat
See Also:
UDNode

isFanLinc

public static boolean isFanLinc(UDNode node)
Checks for FanLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a thermostat
See Also:
UDNode

isFanLinc_Fan

public static boolean isFanLinc_Fan(UDNode node)
Checks for FanLinc Fan node

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a thermostat
See Also:
UDNode

isLightDevice

public static boolean isLightDevice(UDNode node)
Checks for any Insteon Light controller/responder device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an Insteon Light controller/responder device
See Also:
UDNode

isCompanion

public static boolean isCompanion(UDNode node)

isSwitchLinc

public static boolean isSwitchLinc(UDNode node)
Checks for SwitchLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a SwitchLinc
See Also:
UDNode

isSwitchLincV3

public static boolean isSwitchLincV3(UDNode node)

isSwitchLincWSense

public static boolean isSwitchLincWSense(UDNode node)
Checks for 2476S

Parameters:
node -
Returns:
- true or false

isSwitchLincTimer

public static boolean isSwitchLincTimer(UDNode node)
Checks for 2476ST - SwitchLincTimer

Parameters:
node -
Returns:
- true or false

isKPLTimer

public static boolean isKPLTimer(UDNode node)
Checks for Countdown Timer

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an KPL Timer
See Also:
UDNode

isIconSwitchDimmer

public static boolean isIconSwitchDimmer(UDNode node)
Checks for IconSwitchDimmer

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an IconSwitchDimmer
See Also:
UDNode

isIconSwitchRelay

public static boolean isIconSwitchRelay(UDNode node)
Checks for IconSwitchRelay

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an IconSwitchRelay
See Also:
UDNode

isIconOnOffSwitch

public static boolean isIconOnOffSwitch(UDNode node)
Checks for IconOnOffSwitch

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an IconOnOffSwitch
See Also:
UDNode

isKeypadLincRelay

public static boolean isKeypadLincRelay(UDNode node)

isKeypadLinc

public static boolean isKeypadLinc(UDNode node)
Checks for KeypadLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a KeypadLinc
See Also:
UDNode

isKeypadLincV2

public static boolean isKeypadLincV2(UDNode node)
Checks for KeypadLinc v2

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a KeypadLinc
See Also:
UDNode

isLLV2

public static boolean isLLV2(UDNode node)
Checks for LampLinc v2

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a LampLinc V2
See Also:
UDNode

isLampLincBiPhy

public static boolean isLampLincBiPhy(UDNode node)
checks for LampLinc BiPhy

Parameters:
node - - the UDNode to be checked
Returns:
- whether or not the node in question is LampLinc BiPhy
See Also:
UDNode

isInlineLincWSense

public static boolean isInlineLincWSense(UDNode node)
Checks for InlineLinc with Sense

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an InlineLinc w/Sense
See Also:
UDNode

isInLineLincRelayDualBand

public static boolean isInLineLincRelayDualBand(UDNode node)

isDualBandOutletLinc

public static boolean isDualBandOutletLinc(UDNode node)
Checks to see whether or not a device is a dual band OutletLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a dual band OutletLinc
See Also:
UDNode

hasSense

public static boolean hasSense(UDNode node)
Checks to see whether or not a device has load sensing capabilities

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question has load sensing capabilities
See Also:
UDNode

isSwitchedDevice

public static boolean isSwitchedDevice(UDNode node)
Checks to see whether or not a device is switched

Switched devices are not dimmable such as relays, ApplianceLincs, etc.

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a switched device
See Also:
UDNode

isControLinc

public static boolean isControLinc(UDNode node)
Checks for ControLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a ControLinc
See Also:
UDNode

isRemoteLinc2Switch

public static boolean isRemoteLinc2Switch(UDNode node)
Checks for RemoteLinc2Switch

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a RemoteLinc2 Switch
See Also:
UDNode

isRemoteLinc2

public static boolean isRemoteLinc2(char type,
                                    char subType)
Checks for RemoteLinc2

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a RemoteLinc
See Also:
UDNode

isRemoteLinc2

public static boolean isRemoteLinc2(UDNode node)
Checks for RemoteLinc2

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a RemoteLinc 2
See Also:
UDNode

isEnergyDisplay

public static boolean isEnergyDisplay(char type,
                                      char subType)
Checks for Energy Display

Parameters:
type - - The device type in question
subtype - - The device subtype in question
Returns:
- whether or not the type/subtype in question is an Energy Display
See Also:
UDNode

isEnergyDisplay

public static boolean isEnergyDisplay(UDNode node)
Checks for Energy Display

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an Energy Display
See Also:
UDNode

isRemoteLinc

public static boolean isRemoteLinc(UDNode node)
Checks for RemoteLinc

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a RemoteLinc
See Also:
UDNode

isIRLincReceiver

public static boolean isIRLincReceiver(UDNode node)

isInsteonBridge

public static boolean isInsteonBridge(UDNode node)

isEZBridge

public static boolean isEZBridge(UDNode node)

isEZSwitch

public static boolean isEZSwitch(UDNode node)

isMotionSensor

public static boolean isMotionSensor(UDNode node)

isTriggerLinc

public static boolean isTriggerLinc(UDNode node)

isIOLinc

public static boolean isIOLinc(UDNode node)

isTimerLinc

public static boolean isTimerLinc(UDNode node)

isBatteryPoweredDevice

public static boolean isBatteryPoweredDevice(UDNode node)

isBatteryPoweredDevice

public static boolean isBatteryPoweredDevice(char type,
                                             char subType)

isLoadController

public static boolean isLoadController(UDNode node)

isMorningLinc

public static boolean isMorningLinc(UDNode node)

isSynchroLinc

public static boolean isSynchroLinc(UDNode node)

isIMeterSolo

public static boolean isIMeterSolo(UDNode node)

isInsteonController

public static boolean isInsteonController(UDNode node)
Checks to see whether or not a device is a controller

Controllers are such devices as KeypadLinc, SwitchLinc, ControLinc, etc.

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an I/O Device
See Also:
UDNode

isKeypadLincButton

public static boolean isKeypadLincButton(UDNode node)
Checks to see whether or not a node is a KeypadLinc button

A KeypadLinc button is one which is not the main (loaded) button such as A, B, C, D, ... H

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is a KeypadLinc [not loaded] button
See Also:
UDNode

hasAssociatedDevices

public static boolean hasAssociatedDevices(UDNode node)
Checks to see whether or not a node as associated nodes.

Example: For a KeypadLinc 8 button, this method returns true since there are 7 more associated buttons (nodes).
For a SwitchLinc, on the other hand, this method returns false

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question has other associated buttons (nodes)
See Also:
UDNode

isIrrigationController

public static boolean isIrrigationController(UDNode node)
Checks to see whether or not this node is the main controller for an Irrigation device.

Main controller is usually the first node with the same address and without which all the other associated nodes would also have to be removed

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an Irrigation Controller
See Also:
UDNode

isIrrigationValves

public static boolean isIrrigationValves(UDNode node)
Checks to see whether or not this node is a valve.

Being an Irrigation valves which means that it's not an IrrigationController

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an Irrigation valve
See Also:
UDNode

isIOController

public static boolean isIOController(UDNode node)
Checks to see whether or not this node is the main controller for an I/O device.

Main controller is usually the first node with the same address and without which all the other associated nodes would also have to be removed

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an I/O device Controller
See Also:
UDNode

isEZIO2

public static boolean isEZIO2(UDNode node)
Checks for EZIO-2x4 device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an EZIO 2x4
See Also:
UDNode

isEZIO8

public static boolean isEZIO8(UDNode node)
Checks for EZIO-7x8 (8SA) device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an EZIO8SA
See Also:
UDNode

isEZIO8T

public static boolean isEZIO8T(UDNode node)
Checks for EZIO-8T (8x30 device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an EZIO8SA
See Also:
UDNode

isEZIO6I

public static boolean isEZIO6I(UDNode node)
Checks for EZIO6I device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an EZIO6I
See Also:
UDNode

isEZIO4O

public static boolean isEZIO4O(UDNode node)
Checks for EZIO4O device

Parameters:
node - - the UDNode in question
Returns:
- whether or not the node in question is an EZIO4O
See Also:
UDNode

getNumIOInputs

public static int getNumIOInputs(UDNode node)
Returns the number of inputs for an I/O device

Parameters:
node - - the UDNode to be checked
Returns:
- the number of inputs for an I/O device
See Also:
UDNode

getNumIOOutputs

public static int getNumIOOutputs(UDNode node)
Returns the number of outputs for an I/O device

Parameters:
node - - the UDNode to be checked
Returns:
- the number of outputs for an I/O device
See Also:
UDNode

isIOOutput

public static boolean isIOOutput(UDNode node)
Checks to see whether or not a node is an I/O output

Parameters:
node - - the UDNode in questions
Returns:
- whether or not the node in question is an I/O output
See Also:
UDNode

isIOInput

public static boolean isIOInput(UDNode node)
Checks to see whether or not a node is an I/O input

Parameters:
node - - the UDNode in questions
Returns:
- whether or not the node in question is an I/O input
See Also:
UDNode

isIOAnalogInput

public static boolean isIOAnalogInput(UDNode node)
Checks to see whether or not a node is an I/O "analog" input

Parameters:
node - - the UDNode in questions
Returns:
- whether or not the node in question is an I/O "analog" input
See Also:
UDNode

isIRLincTx

public static boolean isIRLincTx(UDNode node)

getFormattedInsteonAddress

public static java.lang.String getFormattedInsteonAddress(java.lang.String address,
                                                          boolean format_x10)
Returns a formatted version of the node address, for display in the GUI.

Parameters:
address - Address of the node
format_x10 - whether or not we format the X10 codes
Returns:
A formatted version of the node address

getFormattedInsteonAddress

public static java.lang.String getFormattedInsteonAddress(java.lang.String address)

formatNodeAddress

public static java.lang.String formatNodeAddress(java.lang.String address,
                                                 java.lang.String deviceType)

getInsteonAddress

public static java.lang.String getInsteonAddress(java.lang.String address,
                                                 boolean extended)
Returns an UDI formatted address as it's Insteon counterpart format

Parameters:
address - - the UDI formatted address
extended - - whether or not the UDI group should also be included
Returns:
- Insteon formatted address

isSameDevice

public static boolean isSameDevice(UDNode n1,
                                   UDNode n2)
Checks to see whether or not two nodes are actually referring to the same device

Parameters:
n1 - - first node
n2 - - second node
Returns:
- true if same device false otherwise

getInsteonGroup

public static java.lang.String getInsteonGroup(java.lang.String address)
Returns the Insteon representation of the UDNode

Parameters:
address - - the address for which we want the Insteon format
Returns:
- the Insteon representation of the UDNode

UDI represents node address (device addresses) in the following manner:
X X X G, where
Xs are hexadecimal Insteon address bytes
G represents the button number for that specific device. ,br/> As an example, a 6 button KeypadLinc with address 4 E8 52, would have the following UDNodes associated with it

  • 4 E8 52 1 - the main button which is loaded
  • 4 E8 52 3 - Button A
  • 4 E8 52 4 - Button B
  • 4 E8 52 5 - Button C
  • 4 E8 52 6 - Button D
  • See Also:
    UDNode

getAssociatedDevices

public static java.util.ArrayList<UDNode> getAssociatedDevices(UDNode node,
                                                               UDProxyDevice device)
Returns an ArrayList [sorted] of all the associated UDNodes for a given UDNode

Parameters:
node - - the UDNode for which we want associated nodes
device - - the UDProxyDevice to which this node belongs to
Returns:
- an ArrayList of all the associated UDNodes

getPrimaryNode

public static UDNode getPrimaryNode(UDNode node)
Return the node that represents the device itself.

Returns:
UDNode The node that represents the device itself.

isPrimaryNode

public static boolean isPrimaryNode(UDNode node)
Whether or not a node is the primary node for a device such as KPL load button

Parameters:
node - - the node in question
Returns:
- whether or not the node is the root for other nodes

isDimmable

public static boolean isDimmable(UDNode node)
Whether or not a node is dimmable

Parameters:
node -
Returns:
true if a dimmable device, false otherwise