Z-Wave Driver

Modified on 2012/01/08 15:32 by Administrator — Categorized as: Driver

The Z-Wave driver connects to a Z-Wave network to provide control of Z-Wave devices. This driver requires a Leviton Vizia RF RZC0P/VRC0P device be connected to a serial port on the computer. This driver auto-detects z-wave nodes on startup which can take several minutes immediately after the driver starts which can cause actions for the driver to be delayed. It is best to wait several minutes (depending on the # of z-wave nodes) before executing actions on the driver.

You must have a Vizia RF+ VRC0P with a +3 on the back label to use the Lock and Unlock actions.

Manufacturer: Leviton

Primary Communications Port: Serial


Configuration Settings


Events

Light Level Changed

Occurs when the level of a z-wave node changes.

Whenever Filter:


EventArgs:


Light On/Off State Changed

Occurs when the z-wave node 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:


Scene Button Press

Occurs when a scene button is pressed.

Whenever Filter:

none

EventArgs:


Instance Properties

StartupPollingCompleted

Gets a value indicating if the device discovery and name and level polling that is done at startup has completed.

Accessibility : Read Only

Type: Boolean

LightLevels

Gets or sets the percent on level of a z-wave node. 0-99

Accessibility : Read Only

Type: Array

LightOnOffs

Gets or sets the z-wave node to a fully on state or fully off.

Accessibility : Read Only

Type: Array

LightNames

Gets a z-wave node's name.

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

TurnOnLight ( Number )

Turns on the specified node.

Syntax

void TurnOnLight( Number nodeID )

Parameters

nodeID : The id of the light.

TurnOffLight ( Number )

Turns off the specified node.

Syntax

void TurnOffLight( Number nodeID )

Parameters

nodeID : The id of the light.

SetLightLevel ( Number, Number )

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

Syntax

void SetLightLevel( Number nodeID, Number percentOn )

Parameters

nodeID : The id of the light.
percentOn : The percent level to set the light to. Valid values: 0 to 99 where 0 is typically off and 99 is fully on.

TurnOnAllLights

Turns all lights on by broadcasting the command. Broadcast commands don’t have an acknowledgment so there is no guarantee that all nodes will receive the message.

Syntax

void TurnOnAllLights( )

Parameters

none

TurnOffAllLights

Turns all lights off by broadcasting the command. Broadcast commands don’t have an acknowledgment so there is no guarantee that all nodes will receive the message.

Syntax

void TurnOffAllLights( )

Parameters

none

TurnOnLightByName ( String )

Turns on the specified node.

Syntax

void TurnOnLightByName( String name )

Parameters

name : The name of the light.

TurnOffLightByName ( String )

Turns off the specified node.

Syntax

void TurnOffLightByName( String name )

Parameters

name : The name of the light.

SetLightLevelByName ( String, Number )

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

Syntax

void SetLightLevelByName( String name, Number percentOn )

Parameters

name : The name of the light.
percentOn : The percent level to set the light to. Valid values: 0 to 99 where 0 is typically off and 99 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.

StartDimUp ( Number )

Start increasing the level of a node by it's default fade rate until it reaches it's maximum level or StopDim() is called.

Syntax

void StartDimUp( Number nodeID )

Parameters

nodeID : The id of the node.

StartDimDown ( Number )

Start decreasing the level of a node by it's default fade rate until it reaches it's lowest level or StopDim() is called.

Syntax

void StartDimDown( Number nodeID )

Parameters

nodeID : The id of the node.

StopDim

Stop dimming a node that is currently dimming or brightening.

Syntax

void StopDim( )

Parameters

none

SetGroupLevel ( Number, Number )

Sets the level of a group.

Syntax

void SetGroupLevel( Number groupID, Number percentOn )

Parameters

groupID : The id of the group.
percentOn : The percent level to set the group to. Valid values: 0 to 99 where 0 is typically off and 99 is fully on.

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.

Lock ( Number )

Locks a lock.

Syntax

void Lock( Number nodeID )

Parameters

nodeID : The id of the node.

Unlock ( Number )

Unlocks a lock.

Syntax

void Unlock( Number nodeID )

Parameters

nodeID : The id of the node.