NewRecurringEvent

Purpose

This function creates a new event with the trigger set to a specific time.  The event is initially created DISABLED.

Parameters

Parameter

Type

Description

evname

string

This is the name that will be given to the new event.

min

interger

This is the time interval in minutes the event will trigger (1 = every minute).

m

boolean

TRUE = include Monday

t

boolean

TRUE = include Tuesday

w

boolean

TRUE = include Wednesday

th

boolean

TRUE = include Thursday

f

boolean

TRUE = include Friday

sa

boolean

TRUE = include Saturday

su

boolean

TRUE = include Sunday

devices

string

This is a string with a list of device-command combinations like "B2:on,b3:dimto-50". Valid commands are any X10/ZWave command along with the following:

dimto: Dims the device to the specified value using the current dim level.  If the device was at 20% and the command "B2:dimto-50" was given, the actual X10 command sent would be "B2 bright 30%"

dim or bright: Will first send a bright 100% to the device then dim to the specified level.

dimr: Will do a relative dim and simply send the dim value. If the command was "B2:dimr-30", the X10 command "B2 dim 30" would be sent.

brightr: The same as "dimr" except the X10 bright command is used.

DeleteWhenTriggered

boolean

This is either TRUE for delete the trigger after it triggers or a FALSE to not delete it.

scr

string

This is the name of the script to run.

group (optional)

 

string

This is the group the event will appear in. This can be a new group. This is optional and may be omitted.

Returns

Return value: status
Type: boolean
Description: This returns TRUE if the event was successfully created and FALSE if it wasn't.

Example

The following would create an event name "newone" and run the script "check.txt" every minute only on Monday:

hs.NewRecurringEvent "newone",1,1,0,0,0,0,0,0,"",0,"check.txt","my group"