<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to TimeSpec_Syntax</title><link>https://sourceforge.net/p/linknx/wiki/TimeSpec_Syntax/</link><description>Recent changes to TimeSpec_Syntax</description><atom:link href="https://sourceforge.net/p/linknx/wiki/TimeSpec_Syntax/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 20 Jun 2014 06:26:46 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/linknx/wiki/TimeSpec_Syntax/feed" rel="self" type="application/rss+xml"/><item><title>TimeSpec_Syntax modified by jef2000</title><link>https://sourceforge.net/p/linknx/wiki/TimeSpec_Syntax/</link><description>&lt;div class="markdown_content"&gt;&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#general"&gt;General&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#constant"&gt;Constant:&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#variable"&gt;Variable:&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#sunrise-sunset-and-noon"&gt;Sunrise, sunset and noon:&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id="general"&gt;General&lt;/h2&gt;
&lt;p&gt;The type of timespec is determined by the &lt;em&gt;&lt;strong&gt;type&lt;/strong&gt;&lt;/em&gt; attribute.&lt;br /&gt;
Supported values for this attribute are: &lt;em&gt;&lt;strong&gt;constant&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;variable&lt;/strong&gt;&lt;/em&gt; (default is &lt;em&gt;&lt;strong&gt;const&lt;/strong&gt;&lt;/em&gt;). Since version 0.0.1.25, &lt;em&gt;&lt;strong&gt;sunrise&lt;/strong&gt;&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;sunset&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;noon&lt;/strong&gt;&lt;/em&gt; are also available. &lt;/p&gt;
&lt;h2 id="constant"&gt;Constant:&lt;/h2&gt;
&lt;p&gt;Optional attributes &lt;em&gt;&lt;strong&gt;year&lt;/strong&gt;&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;month&lt;/strong&gt;&lt;/em&gt;, &lt;strong&gt;day&lt;/strong&gt;, &lt;em&gt;&lt;strong&gt;hour&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;min&lt;/strong&gt;&lt;/em&gt; are numbers and define together one or more points in time matching the timespec. The default value is -1 and is considered as a wildcard value.&lt;br /&gt;
Optional attribute &lt;em&gt;&lt;strong&gt;wdays&lt;/strong&gt;&lt;/em&gt; is a string containing the days of the week where the timespec can match. 1 is monday and 7 is sunday (e.g. "67" means the timespec will match only during weekend days). Default value is "1234567".&lt;br /&gt;
Optional attribute &lt;em&gt;&lt;strong&gt;exception&lt;/strong&gt;&lt;/em&gt; tells if the timespec must match taking into account the exception days defined in &lt;em&gt;&lt;strong&gt;services&lt;/strong&gt;&lt;/em&gt; section of configuration.&lt;br /&gt;
Value true or yes means the timespec will match only during exception days.&lt;br /&gt;
Value false or no means the timespec will not match during exception days.&lt;br /&gt;
If &lt;em&gt;&lt;strong&gt;exception&lt;/strong&gt;&lt;/em&gt; attribute is not specified, the default value is dont-care and means&lt;br /&gt;
that the exception days list is not taken into account.&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;at hour="7" min="30" wdays="12345" exception="no" /&amp;gt; will match at 7:30 AM every weekday except days in the exception days list.&lt;br /&gt;
&amp;lt;at hour="10" min="0" wdays="12345" exception="yes" /&amp;gt; will match at 10:00 AM every weekday that is also in the exception days list.&lt;br /&gt;
&amp;lt;at hour="7" min="30" wdays="12345" /&amp;gt; will match at 7:30 AM every weekday whatever is in the exception days list. &lt;/p&gt;
&lt;h2 id="variable"&gt;Variable:&lt;/h2&gt;
&lt;p&gt;Similar to &lt;em&gt;&lt;strong&gt;constant&lt;/strong&gt;&lt;/em&gt; timespec, but with additional optional &lt;em&gt;&lt;strong&gt;time&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;date&lt;/strong&gt;&lt;/em&gt; attributes referring to objects of type EIS3 and EIS4 respectively. For every wildcard in the timespec, the value will be obtained from the correcponding object.&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;at type="variable" time="wakeup_time" wdays="12345"&amp;gt; will match at the time stored in object "wakeup_time" every weekday.&lt;br /&gt;
&amp;lt;at type="variable" hour="22" min="00" date="alarm_date"&amp;gt; will match at 10:00 PM on the day stored in "alarm_date". &lt;/p&gt;
&lt;h2 id="sunrise-sunset-and-noon"&gt;Sunrise, sunset and noon:&lt;/h2&gt;
&lt;p&gt;These timespec types are only available since version 0.0.1.25.&lt;br /&gt;
This needs a new entry in &amp;lt;services&amp;gt; section of configuration file to specify the geographic coordinates (longitude and latitude). Example:&lt;br /&gt;
&amp;lt;location lon="-4.20" lat="50.54"/&amp;gt;&lt;/p&gt;
&lt;p&gt;In &amp;lt;at .../&amp;gt; or &amp;lt;until .../&amp;gt; elements, you can set &lt;em&gt;&lt;strong&gt;type&lt;/strong&gt;&lt;/em&gt; attribute to &lt;em&gt;&lt;strong&gt;sunrise&lt;/strong&gt;&lt;/em&gt; , &lt;em&gt;&lt;strong&gt;sunset&lt;/strong&gt;&lt;/em&gt; or &lt;em&gt;&lt;strong&gt;noon&lt;/strong&gt;&lt;/em&gt;. Of course, using &lt;em&gt;&lt;strong&gt;hour&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;min&lt;/strong&gt;&lt;/em&gt; attributes is useless, but &lt;em&gt;&lt;strong&gt;day&lt;/strong&gt;&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;month&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;year&lt;/strong&gt;&lt;/em&gt; still works, even if in most case you will use &lt;em&gt;wdays&lt;/em&gt; and/or &lt;em&gt;&lt;strong&gt;exception&lt;/strong&gt;&lt;/em&gt; instead. The &lt;em&gt;&lt;strong&gt;offset&lt;/strong&gt;&lt;/em&gt; is a number of seconds added to the computed sunrise/set time. (negative offset should be possible also). A number followed by letter "d", "h", "m" or "s" will be interpreted as a number of days, hours, minutes or seconds. &lt;/p&gt;
&lt;p&gt;Here is an example of condition that becomes true on modays and tuesdays 2 hours before sunrise and becomes false the same days at 23:58.&amp;nbsp;: &lt;/p&gt;
&lt;p&gt;&amp;lt;condition type='timer' trigger='true'&amp;gt;&lt;br /&gt;
&amp;lt;at type='sunrise' wdays='12' offset="-2h"/&amp;gt;&lt;br /&gt;
&amp;lt;until hour='23' min='58' wdays='12'/&amp;gt;&lt;br /&gt;
&amp;lt;/condition&amp;gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jef2000</dc:creator><pubDate>Fri, 20 Jun 2014 06:26:46 -0000</pubDate><guid>https://sourceforge.net26e7b01c09af8adf38d9d77f3fb6156c8af4ec93</guid></item></channel></rss>