NewDevFunc

This command is obsolete in Version 2.0 and should not be used.  Please use NewEventEx in combination with AddAction, or NewRecurringEvent or NewTimeEvent.

Purpose

This function creates a new class of type devfunc.  This class is used to describe the function of an X10 device in an event.  There is one function for each X10 device in the event.

The attributes of this class are:

devid
The reference ID of the device.  Reference ID's are stored as the property .ref with the actual device.  The ID can be obtained using GetDevice.  The ID must be set for the device to be referenced properly from an event.

func
The X10 command to be sent to the device.  These are standard X10 codes like 2 for ON, 3 for OFF, etc.  If the device is a thermostat, this property describes the following settings:

0=heat 1=cool 2=auto 3=do not set

dimto
The type of dimming to be performed on the module if the function is dim or bright.  The settings are:

DIMTO_RELATIVE = 0
DIMTO_ABSOLUTE = 1
DIMTO_ABSOLUTE_BRIGHT_FIRST = 2

If the device is a thermostat, this holds the actions for the fan.  The settings are:

0=on 1=off 2=auto 3=do not set

dim_percent
The percentage to dim or brighten a device.  If the device is a thermostat, this property holds the temperature to set the setpoint to.  If set to -99, no setpoint is set.

secs_delay
Holds the number of seconds to delay before executing the device actions.

new_string
The string to set in the device.  The new string will be displayed as the device status.

Parameters

None.

Returns

Return value: devfunc
Type: object
Description: This is a reference to a device function class.