SunTimer

This module is a part of the NetHomeServer. The SunTimer is a week timer where you can configure multiple periods for each day of the week.

For each day of the week, you can specify multiple times when the connected lamp shall be activated like:

 08:00->10:00,17:00->21:00

You can also refer to sunrise R or sunset S like:

 08:00->R,S-00:30->21:00 

where S-00:30 means 30 minutes before sunset.

You have access to a random interval (I) which can be used to randomize the start or stop times. In the “Random Interval I” field you specify within which range the random value should vary. If you for example specify the “Random Interval I” as 01:00 (1 hour), then the time expression:

 15:00->19:00+I

Will end sometimes between 19:00 and 20:00.

You also have access to three variables (A, B and C) which may be used in the time expressions. They can for example be used to express time expressions relative to a specified time, for example wake up time in the morning. If you for example specify variable A as 08:00, then the time expression for the coffee maker might be:

 A+00:15->A+00:30 (can also be written as A+15->A+30)  

You can specify multiple start/end times and say that you want the first of them to be valid, for example:

 06:00->10:00/R

Which means that the lamp will be switched off at 10:00 or at sunrise, whichever occurs first. In a similar way you can choose the last occurrence by using the \ character instead.

In a time expression field you can use the Repeat character “ to mean “use the same value as for previous day”. This means that if you specify time intervals for Monday and the put ” character in the rest of the days, then all days will have the same schedule as Monday.

If a time interval is specified with a start time before or the same as the end time, then no switch commands are sent. If a time expression or a variable value is changed, then the current active command is resent. This also happens when the timer is activated or the server restarted.

Attributes

  • State [get] [init]
  • Location: Lat,Long [get] [set] Location of the timer as latitude,longitude in the form: 59.225527,18.000718
  • Timer Today [get] The calculated time periods for today
  • Sunrise(R) [get] Time the sun rises today in the specified location
  • Sunset(S) [get] Time the sun sets today in the specified location
  • Mondays [get] [set] On periods for Mondays, in the format specified above
  • Tuesdays [get] [set]
  • Wednesdays [get] [set]
  • Thursdays [get] [set]
  • Fridays [get] [set]
  • Saturdays [get] [set]
  • Sundays [get] [set]
  • Variable A [get] [set] Value of variable A which may be used in time expressions
  • Variable B [get] [set] Value of variable B which may be used in time expressions
  • Variable C [get] [set] Value of variable C which may be used in time expressions
  • Random Interval I [get] [set] Maximum time for the random interval. Value of variable I will be between 0 and this value
  • OnCommand [get] [set] Command to be executed at the start of a period, typically the on command in a lamp Item
  • OffCommand [get] [set] Command to be executed at the end of a period, typically the off command in a lamp Item

Actions

  • Enable timer Enables the timer
  • Disable timer Disables the timer

See also


Personal Tools