This driver triggers events based on date and time, time intervals and sunrise/sunet.
Manufacturer: N/A
Configuration Settings
- Latitude : The latitude for sunrise/sunset calculations. Valid format examples are:
-35.123 (Negative for South & West)
35° 7' 22.8" S
35 deg 7 min 22.8 sec S
When using the geographic coordinates, do not use a negative sign since it is implied by entering W.
When using the decimal format, use a negative sign only for South.
- Longitude : The longitude for sunrise/sunset calculations. Valid format examples are:
-35.123 (Negative for South & West)
35° 7' 22.8" W
35 deg 7 min 22.8 sec W
When using the geographic coordinates, do not use a negative sign since it is implied by entering S.
When using the decimal format, use a negative sign only for West.
- Time Zone : (optional) The timezone for all date calculations used in this device. Defaults to the local timezone of the driver service. The time zone is used to calculate the UTC offset and to determine when DST is being observed.
Events
Ready State Changed
The device's running and ready state changed.
Whenever Filter:
none
EventArgs:
- Number NewValue : The new property value.
- Number PreviousValue : The previous property value.
At Sunrise
Occurs at a sunrise.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
EventArgs:
none
At Sunset
Occurs at a sunset.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
EventArgs:
none
At a Specific Date & Time
Occurs once at a specific date and time.
Whenever Filter:
- DateTime : Specifies the exact date and time when the event will occur.
EventArgs:
none
Daily At a Specific Time
Occurs every day at a specific time.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
- Time : Specifies the exact time in 24 hour ISO time format: HH:MM:SS
EventArgs:
none
Every # of Seconds
Occurs every X seconds.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
- Seconds : Specifies the numeric interval in seconds.
EventArgs:
none
Every # of Minutes
Occurs every X minutes.
Whenever Filter:
- Minutes : Specifies the numeric interval in minutes.
- DaysOfWeek : Indicates the days on which the rule should be run.
EventArgs:
none
Every # of Hours
Occurs every X hours.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
- Hours : Specifies the numeric interval in hours.
EventArgs:
none
At Random Intervals
Occurs at random intervals between a specified minimum and maximum duration.
Whenever Filter:
- DaysOfWeek : Indicates the days on which the rule should be run.
- MinimumInterval : Specifies the minimum interval duration in the format HH:MM:SS, where 1hr & 30min would be 01:30:00.
- MaximumInterval : Specifies the maximum interval duration in the format HH:MM:SS, where 2hr & 45min would be 02:45:00.
EventArgs:
none
At Scheduled Intervals
Occurs based on an advanced schedule.
Whenever Filter:
- EndType : Specify if and how the schedule will end.
- EndByDateAndTime : (optional) Enter the date and time at which no more recurrences will occur. This is only applicable if the End Type is set to End by a Specific Date.
- EndAfterOccurances : (optional) Enter the number of times this event will occur. This is only applicable if the End Type is set to End After a # of Occurances.
- RecurrenceType : The frequency of occurrences for the recurrence pattern.
- StartDateAndTime : Enter the date and time of the first occurance.
- Interval : The number of units of a given recurrence type between occurrences. For example, setting the Interval to 2 and the Recurrence Type to Weekly would cause the event to occur every second week.
EventArgs:
none
Instance Properties
IsDarkOutside
Gets a value indicating if it is dark outside.
Accessibility : Read Only
Type:
BooleanIsLightOutside
Gets a value indicating if it is light outside.
Accessibility : Read Only
Type:
BooleanSunrise
Gets the date/time of the next sunrise. This could be tomorrow if today's sunset has already occurred.
Accessibility : Read Only
Type:
DateTimeSunset
Gets the date/time of the next sunset. This could be tomorrow if today's sunset has already occurred.
Accessibility : Read Only
Type:
DateTimeCurrentDateTime
Gets the current date/time in the device's timezone.
Accessibility : Read Only
Type:
DateTimeDayOfWeek
Gets the day of the week. 0=Sunday, 1=Monday, etc.
Accessibility : Read Only
Type:
NumberDayOfYear
Gets the day of the year.
Accessibility : Read Only
Type:
NumberDay
Gets today's day of the month.
Accessibility : Read Only
Type:
NumberMonth
Gets today's month of the year.
Accessibility : Read Only
Type:
NumberYear
Gets today's year.
Accessibility : Read Only
Type:
NumberHour
Gets the current time's hour component.
Accessibility : Read Only
Type:
NumberMinute
Gets the current time's minute component.
Accessibility : Read Only
Type:
NumberSecond
Gets the current time's second component.
Accessibility : Read Only
Type:
NumberMillisecond
Gets the current time's millisecond component.
Accessibility : Read Only
Type:
NumberIsWeekday
Gets a value indicating today's date is a weekday day (Monday through Friday).
Accessibility : Read Only
Type:
BooleanIsWeekend
Gets a value indicating today's date is a weekend day (Saturday or Sunday).
Accessibility : Read Only
Type:
BooleanMoonPhases
Gets the moon phases for the next 30 days.
Accessibility : Read Only
Type:
ArrayDeviceDisplayName
The display name for this device.
Accessibility : Read Only
Type:
StringDeviceStartTime
The date and time when this device was started.
Accessibility : Read Only
Type:
DateTimeDeviceLifecycleStage
The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping
Accessibility : Read Only
Type:
NumberDeviceIsRunningAndReady
Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.
Accessibility : Read Only
Type:
Boolean
Instance Methods
OffsetDays ( Number )
Gets the current date/time offset by the specified number of days.
SyntaxParametersdays : A number of whole and fractional days. The value can be negative or positive.
OffsetHours ( Number )
Gets the current date/time offset by the specified number of hours.
SyntaxParametershours : A number of whole and fractional hours. The value can be negative or positive.
OffsetMilliseconds ( Number )
Gets the current date/time offset by the specified number of milliseconds.
SyntaxParametersmilliseconds : A number of whole and fractional milliseconds. The value can be negative or positive. Note that this value is rounded to the nearest integer.
OffsetMinutes ( Number )
Gets the current date/time offset by the specified number of minutes.
SyntaxParametersminutes : A number of whole and fractional minutes. The value can be negative or positive.
OffsetMonths ( Number )
Gets the current date/time offset by the specified number of months.
SyntaxParametersmonths : A number of months. The months can be negative or positive.
OffsetSeconds ( Number )
Gets the current date/time offset by the specified number of seconds.
SyntaxParametersseconds : A number of whole and fractional seconds. The value can be negative or positive.
OffsetYears ( Number )
Gets the current date/time offset by the specified number of years.
SyntaxParametersyears : A number of years. The value can be negative or positive.
GetMoonPhase ( DateTime )
Gets the moon phase for the specified date.
SyntaxParametersdate : The date.
SetPropertyForDuration ( String, TimeSpan, Object, Object )
Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.
SyntaxParameterspropertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.
SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )
Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.
SyntaxParameterspropertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.