-
Notifications
You must be signed in to change notification settings - Fork 0
Module thc_Timer
This module provides a Timer that allows controlling device states at a certain time, and in a certain interval. User can set and delete timers from the default web application (see Web interface). The timer settings are backed up in the recovery file defined by ConfigureRecoveryFile, and restored after a restart of THC.
Registers a new timer task. A timer task allows controlling a device state at a certain time and in a certain interval.
Parameters | Description |
---|---|
<Time> | Timer time. Absolute and relative time definitions are accepted. Supported formats: See the -time argument of <DefineJob>. |
<Device> | Device that will be controlled |
<Command> | Device control command. Allowed commands are: 'On', 'Off', 'Switch', 'Set <Value>'. The commands are case insensitive. |
[<Repeat>] | Task repetition. Absolute time definitions are accepted. No repetition will be performed if set to "". Supported formats: See the -repeat argument of <DefineJob>. |
[<Description>] | Timer description (for logging purposes). |
Timer job identifier
thc_Timer::Define "2015-01-06 08:30" Surveillance,state Off 7d
-> timer0
thc_Timer::Define 08h30m LightLiving,state Switch 5m "Light switch"
-> timer1
thc_Timer::Delete, thc_Timer::List
Delete one or multiple timer tasks.
Parameters | Description |
---|---|
TaskTag | Jobs specified by its tags. This argument can be repeated to delete multiple jobs. The 'timer' prefix can be omitted. |
-
thc_Timer::Delete timer15 timer7
thc_Timer::Delete 15 7
thc_Timer::Define, thc_Timer::List
List all active timer tasks. The returned result is a list of timer task definitions. Each timer task definition itself is a list composed by the following elements:
- Task identifier
- Next execution time
- Controlled device
- Device control command
- Repetition
- Description
-
Timer task list
thc_Timer::List
-> {timer2 {Tue Jan 06 08:30:00 CET 2015} Surveillance,state On {} \
{Timer 2: Surveillance,state On @ 2015-01-06 08:30, rep=''}} \
{timer3 {Tue Jan 06 09:30:00 CET 2015} Surveillance,state Off 3600 \
{Timer 3: Surveillance,state Off @ 2015-01-06 09:30, rep='1h'}}
THC, Tight Home Control - See THC index register - THC repository on github.com/Drolla/thc_v1