-
Notifications
You must be signed in to change notification settings - Fork 1
Module thc_RandomLight
Andreas Drollinger edited this page Nov 8, 2019
·
15 revisions
Configures the geographical location and time zone.
Parameters | Description |
---|---|
[-longitude <Longitude> | Geographical longitude |
[-latitude <Latitude> | Geographical latitude |
[-zone <Zone>] | Time zone in hours (e.g. +2). If set to 'auto' or '' the time zone will be automatically evaluated. Default: 'auto' |
-
thc::RandomLight::Configure \
-longitude 6.8250 -latitude 47.1013 -zone "auto"
Defines the random control settings for one device
Parameters | Description |
---|---|
Device | Device identifier |
-time <OnOffTimeExpressionList> | List of 4 time values {On1, Off1, On2, Off2} that corresponds to the light enable and disable times in the morning and the evening. The time is specified in hours and it can be an expressions (e.g. $SunriseT-0.3) |
[-min_interval <MinInterval> | Minimum interval time in hours. Default is 0.5 (=30'). |
[-probability_on <ProbabilityOn> | Value between 0 and 1 that specifies the probability that the light is on. Default: 0.5 |
[-default 0|1 | If set to '1' the device is considered to be switched on if no other devices is on. |
-
thc::RandomLight::Define LightSalon,state \
-time {7.2 $SunriseT-0.3 $SunsetT+0.0 21.5} \
-min_interval 0.30 -probability_on 0.2
Applies random settings to the lights
Parameters | Description |
---|---|
[Force] | If define the lights are set to this value (needs to be 0 or 1). |
-
thc::DefineJob -tag RdmLight -repeat 1m -description "Random light" {
thc::RandomLight::Control }
thc::RandomLight::Control 0
Evaluates sun rise and set time. These two times are stored respectively inside the variables SunriseT and SunsetT. The geographical location and time zone has to be defined to use this function.
-
::thc::RandomLight::Configure \
-longitude 6.8250 -latitude 47.1013 -zone auto
thc::DefineJob -tag EvalSun -time 01h -repeat 24h -init_time +0 \
-description "Evaluate the sun shine time" {
thc::RandomLight::EvaluateSunRiseSunSet }
thc::RandomLight::Configure <thc::RandomLight::Define>
THC, Tight Home Control - See THC index register - THC repository on github.com/Drolla/thc