Insteon PLM Driver

Modified on 2010/12/15 10:59 by Administrator — Categorized as: Driver

Image
This driver supports the Smarthome PowerLinc Modem (PLM) Serial & USB Interface (2412S, 2412U, 2413S, 2413U).

Manufacturer: SmartLabs, Inc.

Primary Communications Port: Serial, USB

Table of Contents [Hide/Show]


Configuration Settings
Events
   Light On/Off State Changed
   Ready State Changed
   Received X10 Data
   Received X10 Command
   Received X10 Preset Dim Command
   Device Level Changed
Instance Properties
   Connected
   FirmwareVersion
   PlmAddress
   LightLevels
   LightOnOffs
   LightNames
   DeviceDisplayName
   DeviceStartTime
   DeviceLifecycleStage
   DeviceIsRunningAndReady
Instance Methods
   TurnOnGroup ( Number )
   TurnOffGroup ( Number )
   BrightenGroup ( Number )
   DimGroup ( Number )
   TurnOnLight ( String )
   TurnOnLight ( String, Number )
   TurnOffLight ( String )
   TurnOffLight ( String, Number )
   TurnOnAllLights
   TurnOnAllLights ( String )
   TurnOffAllLights
   TurnOffAllLights ( String )
   AllUnitsOff ( String )
   SetLightLevel ( String, Number )
   SetLightLevelForDuration ( Number, TimeSpan, Number, Number )
   TurnOnLightForDuration ( Number, TimeSpan )
   Brighten ( String, Number, Number )
   Dim ( String, Number, Number )
   TurnOnLightByName ( String )
   TurnOffLightByName ( String )
   SetLightLevelByName ( String, Number )
   SendRawX10 ( Number, Number )
   SendX10Command ( String, Number, Number )
   SendX10PresetDimCommand ( String, Number, Number )
   TurnOnLight ( Number )
   TurnOffLight ( Number )
   SetLightLevel ( Number, Number )
   Dim ( Number )
   Dim ( String )
   Brighten ( Number )
   Brighten ( String )
   StartDimming ( Number )
   StartDimming ( String )
   StartBrightening ( Number )
   StartBrightening ( String )
   StopFading ( Number )
   StopFading ( String )
   SetPropertyForDuration ( String, TimeSpan, Object, Object )
   SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )


Configuration Settings


Events

Light On/Off State Changed

Occurs when the light changes from on to off or off to on. Any level greater than zero is considered on.

Whenever Filter:


EventArgs:


Ready State Changed

The device's running and ready state changed.

Whenever Filter:

none

EventArgs:


Received X10 Data

Occurs when X10 data is received. The event information includes the two bytes of received data. This event requires a technical understanding of X10 data.

Whenever Filter:

none

EventArgs:


Received X10 Command

Occurs when an X10 command code is received (except the preset dim command which has it's own event).

Whenever Filter:


EventArgs:


Received X10 Preset Dim Command

Occurs when an X10 preset dim command code is received.

Whenever Filter:


EventArgs:


Device Level Changed

Occurs when an Insteon device level change notification is received.

Whenever Filter:


EventArgs:


Instance Properties

Connected

Gets a value indicating if a connection is established with the Insteon PLM.

Accessibility : Read Only

Type: Boolean

FirmwareVersion

Gets the firmware version.

Accessibility : Read Only

Type: Number

PlmAddress

Gets the address of the PLM.

Accessibility : Read Only

Type: String

LightLevels

Gets the levels for all lights.

Accessibility : Read Only

Type: Array

LightOnOffs

Gets or sets the light to a fully on state or fully off.

Accessibility : Read Only

Type: Array

LightNames

Gets the names or all lights/devices.

Accessibility : Read Only

Type: Array

DeviceDisplayName

The display name for this device.

Accessibility : Read Only

Type: String

DeviceStartTime

The date and time when this device was started.

Accessibility : Read Only

Type: DateTime

DeviceLifecycleStage

The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping

Accessibility : Read Only

Type: Number

DeviceIsRunningAndReady

Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.

Accessibility : Read Only

Type: Boolean

Instance Methods

TurnOnGroup ( Number )

Turns on the specified group.

Syntax

void TurnOnGroup( Number groupNumber )

Parameters

groupNumber : The group number (1-254)

TurnOffGroup ( Number )

Turns off the specified group.

Syntax

void TurnOffGroup( Number groupNumber )

Parameters

groupNumber : The group number (1-254)

BrightenGroup ( Number )

Brighten a group by one step (of 32 between on and off).

Syntax

void BrightenGroup( Number groupNumber )

Parameters

groupNumber : The group number (1-254)

DimGroup ( Number )

Dim a group by one step (of 32 between on and off).

Syntax

void DimGroup( Number groupNumber )

Parameters

groupNumber : The group number (1-254)

TurnOnLight ( String )

Turns on the specified device by address.

Syntax

void TurnOnLight( String deviceAddress )

Parameters

deviceAddress : The device address. XX.XX.XX

TurnOnLight ( String, Number )

Turns on the specified light.

Syntax

void TurnOnLight( String houseCode, Number unitCode )

Parameters

houseCode : The house code of the device. (A-P)
unitCode : The unit code (1-16).

TurnOffLight ( String )

Turns off the specified device by address.

Syntax

void TurnOffLight( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

TurnOffLight ( String, Number )

Turns off the specified light.

Syntax

void TurnOffLight( String houseCode, Number unitCode )

Parameters

houseCode : The house code of the device. (A-P)
unitCode : The unit code (1-16).

TurnOnAllLights

Turns all lights on.

Syntax

void TurnOnAllLights( )

Parameters

none

TurnOnAllLights ( String )

Turn on all lights for the specified house code.

Syntax

void TurnOnAllLights( String houseCode )

Parameters

houseCode : The X10 house code of the devices. (A-P)

TurnOffAllLights

Turns all lights off.

Syntax

void TurnOffAllLights( )

Parameters

none

TurnOffAllLights ( String )

Turn off all lights for the specified house code.

Syntax

void TurnOffAllLights( String houseCode )

Parameters

houseCode : The X10 house code of the devices. (A-P)

AllUnitsOff ( String )

Turns off all units in the specified house code.

Syntax

void AllUnitsOff( String houseCode )

Parameters

houseCode : The X10 house code of the device. (A-P)

SetLightLevel ( String, Number )

Sets the specified device's level to the specified percent.

Syntax

void SetLightLevel( String deviceAddress, Number percentOn )

Parameters

deviceAddress : The device address. XX.XX.XX
percentOn : The percent level to set the device to. Valid values: 0 to 100 where 0 is typically off and 100 is fully on.

SetLightLevelForDuration ( Number, TimeSpan, Number, Number )

Sets a light's level for a duration of time and then sets the light to a subsequent level.

Syntax

void SetLightLevelForDuration( Number iD, unknown duration, Number initialPercentOn, Number finalPercentOn )

Parameters

iD : The id of the light.
duration : The amount of time to wait before setting the light level to the specified subsequent light level.
initialPercentOn : The percent level to set the light to.
finalPercentOn : The percent level to set the light to after the duration has passed.

TurnOnLightForDuration ( Number, TimeSpan )

Turns a light fully on for a duration of time and then turns the light off.

Syntax

void TurnOnLightForDuration( Number iD, unknown duration )

Parameters

iD : The id of the light.
duration : The amount of time to wait before turning off the light.

Brighten ( String, Number, Number )

Brightens an X10 device.

Syntax

void Brighten( String houseCode, Number unitCode, Number percent )

Parameters

houseCode : The X10 house code of the device. (A-P)
unitCode : The X10 unit code (1-16).
percent : The percent to brighten.

Dim ( String, Number, Number )

Dims an X10 device.

Syntax

void Dim( String houseCode, Number unitCode, Number percent )

Parameters

houseCode : The X10 house code of the device. (A-P)
unitCode : The X10 unit code (1-16).
percent : The percent to brighten.

TurnOnLightByName ( String )

Turns on the specified light.

Syntax

void TurnOnLightByName( String name )

Parameters

name : The name of the light.

TurnOffLightByName ( String )

Turns off the specified light.

Syntax

void TurnOffLightByName( String name )

Parameters

name : The name of the light.

SetLightLevelByName ( String, Number )

Sets the % level of the specified light by device name.

Syntax

void SetLightLevelByName( String name, Number percentOn )

Parameters

name : The name of the light.
percentOn : The brightness percent level to set the device to. (0-99)

SendRawX10 ( Number, Number )

Sends a two byte X10 message.

Syntax

void SendRawX10( Number byte1, Number byte2 )

Parameters

byte1 : The first byte to send in the X10 message.
byte2 : The second byte to send in the X10 message.

SendX10Command ( String, Number, Number )

Sends a full X10 Command to the powerline.

Syntax

void SendX10Command( String houseCode, Number unitCode, Number commandCode )

Parameters

houseCode : The X10 house code of the device. (A-P)
unitCode : The X10 unit code (1-16).
commandCode : The X10 command code (1-16).

0 = All Units Off
1 = All Lights On
2 = On
3 = Off
4 = Dim
5 = Bright
6 = All Lights Off
7 = Extended Code
8 = Hail Request
9 = Hail Acknowledge
12 = Extended Data (analog)
13 = Status = On
14 = Status = Off
15 = Status Request

SendX10PresetDimCommand ( String, Number, Number )

Sends an X10 preset dim command to the powerline.

Syntax

void SendX10PresetDimCommand( String houseCode, Number unitCode, Number level )

Parameters

houseCode : The X10 house code of the device. (A-P)
unitCode : The X10 unit code (1-16).
level : The preset dim level (1-32).

TurnOnLight ( Number )

Turns on the specified light.

Syntax

void TurnOnLight( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

TurnOffLight ( Number )

Turns off the specified light.

Syntax

void TurnOffLight( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

SetLightLevel ( Number, Number )

Sets the % level of the specified light by device id.

Syntax

void SetLightLevel( Number deviceID, Number percentOn )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.
percentOn : The brightness percent level to set the device to. (0-99)

Dim ( Number )

Dims an Insteon device by device id one step (of 32 between on and off).

Syntax

void Dim( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

Dim ( String )

Dims an Insteon device by device address one step (of 32 between on and off).

Syntax

void Dim( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

Brighten ( Number )

Brighten an Insteon device by device id one step (of 32 between on and off).

Syntax

void Brighten( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

Brighten ( String )

Brighten an Insteon device by device address one step (of 32 between on and off).

Syntax

void Brighten( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

StartDimming ( Number )

Start dimming an Insteon device by device id.

Syntax

void StartDimming( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

StartDimming ( String )

Start dimming an Insteon device by device address.

Syntax

void StartDimming( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

StartBrightening ( Number )

Start brightening an Insteon device by device id.

Syntax

void StartBrightening( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

StartBrightening ( String )

Start brightening an Insteon device by device address.

Syntax

void StartBrightening( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

StopFading ( Number )

Stop fading an Insteon device by device id.

Syntax

void StopFading( Number deviceID )

Parameters

deviceID : The device id of the device as configured in the Device List setting for this Insteon device.

StopFading ( String )

Stop fading an Insteon device by device address.

Syntax

void StopFading( String deviceAddress )

Parameters

deviceAddress : The Insteon device address. XX.XX.XX

SetPropertyForDuration ( String, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, Number arrayIndex, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.