mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
holiday and structure doc added
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@372 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b2084c3500
commit
242d2889c9
14
contrib/he.holiday
Normal file
14
contrib/he.holiday
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Siehe auch
|
||||||
|
# http://de.wikipedia.org/wiki/Feiertage_in_Deutschland
|
||||||
|
|
||||||
|
1 01-01 Neujahr
|
||||||
|
1 05-01 Tag der Arbeit
|
||||||
|
1 10-03 Tag der deutschen Einheit
|
||||||
|
1 12-25 1. Weihnachtstag
|
||||||
|
1 12-26 2. Weihnachtstag
|
||||||
|
|
||||||
|
2 -2 Karfreitag
|
||||||
|
2 1 Ostermontag
|
||||||
|
2 39 Christi Himmelfahrt
|
||||||
|
2 50 Pfingsten
|
||||||
|
2 60 Fronleichnam
|
@ -70,10 +70,10 @@
|
|||||||
<a href="#M232Counter">M232Counter</a>
|
<a href="#M232Counter">M232Counter</a>
|
||||||
<a href="#M232Voltage">M232Voltage</a>
|
<a href="#M232Voltage">M232Voltage</a>
|
||||||
<a href="#SCIVT">SCIVT</a>
|
<a href="#SCIVT">SCIVT</a>
|
||||||
|
<a href="#structure">structure</a>
|
||||||
<a href="#WS2000">WS2000</a>
|
<a href="#WS2000">WS2000</a>
|
||||||
<a href="#WS300">WS300</a>
|
<a href="#WS300">WS300</a>
|
||||||
<a href="#X10">X10</a>
|
<a href="#X10">X10</a>
|
||||||
<a href="#weblink">weblink</a>
|
|
||||||
<a href="#FHEMRENDERER">FHEMRENDERER</a>
|
<a href="#FHEMRENDERER">FHEMRENDERER</a>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -81,12 +81,14 @@
|
|||||||
<br>
|
<br>
|
||||||
<b>Helper modules</b>
|
<b>Helper modules</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<a href="#FileLog">FileLog</a>
|
||||||
|
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
||||||
<a href="#at">at</a>
|
<a href="#at">at</a>
|
||||||
|
<a href="#dummy">dummy</a>
|
||||||
|
<a href="#holiday">holiday</a>
|
||||||
<a href="#notify">notify</a>
|
<a href="#notify">notify</a>
|
||||||
<a href="#watchdog">watchdog</a>
|
<a href="#watchdog">watchdog</a>
|
||||||
<a href="#FileLog">FileLog</a>
|
<a href="#weblink">weblink</a>
|
||||||
<a href="#dummy">dummy</a>
|
|
||||||
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -249,7 +251,9 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<li>if there is a device which exactly corresponds to the spec, then
|
<li>if there is a device which exactly corresponds to the spec, then
|
||||||
no special processing is done.</li>
|
no special processing is done.</li>
|
||||||
<li>the returned list can contain the same device more than once, so
|
<li>the returned list can contain the same device more than once, so
|
||||||
int tha last example the list will contain lamp3 twice.</li>
|
"set lamp1-lamp3,lamp3 on" switches lamp3 twice.</li>
|
||||||
|
<li>for more complex structuring demands see the <a href="#structure">
|
||||||
|
structure</a> device.
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -740,6 +744,12 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
|
|
||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<a name="allowfrom"></a>
|
||||||
|
<li>allowfrom<br>
|
||||||
|
Comma (,) separated list of ip-addresses or hostnames. If set,
|
||||||
|
only connections from these addresses are allowed.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="configfile"></a>
|
<a name="configfile"></a>
|
||||||
<li>configfile<br>
|
<li>configfile<br>
|
||||||
Contains the name of the fhem configuration file. If <a
|
Contains the name of the fhem configuration file. If <a
|
||||||
@ -747,6 +757,17 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
be written to this file.
|
be written to this file.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="holiday2we"></a>
|
||||||
|
<li>holday2we<br>
|
||||||
|
If this attribute is set, then the <a href="#perl">$we</a> variable
|
||||||
|
will be true, if the value of the <a href="#holiday">holiday</a>
|
||||||
|
variable referenced by this attribute is not none.<br>
|
||||||
|
Example:<br>
|
||||||
|
<ul>
|
||||||
|
attr global holiday2we hessen
|
||||||
|
</ul>
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="lastinclude"></a>
|
<a name="lastinclude"></a>
|
||||||
<li>lastinclude<br>
|
<li>lastinclude<br>
|
||||||
If this attribute is set, then the last command of the generated
|
If this attribute is set, then the last command of the generated
|
||||||
@ -767,17 +788,6 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
see the <a href="#FileLog">FileLog</a> section.
|
see the <a href="#FileLog">FileLog</a> section.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="nofork"></a>
|
|
||||||
<li>nofork<br>
|
|
||||||
If set and the logfile is not "-", do not try to background. Needed
|
|
||||||
on some Fritzbox installations.
|
|
||||||
</li><br>
|
|
||||||
|
|
||||||
<a name="mseclog"></a>
|
|
||||||
<li>mseclog<br>
|
|
||||||
If set, the timestamp in the logfile will contain a millisecond part.
|
|
||||||
</li><br>
|
|
||||||
|
|
||||||
<a name="modpath"></a>
|
<a name="modpath"></a>
|
||||||
<li>modpath<br>
|
<li>modpath<br>
|
||||||
Specify the path to the modules directory <code>FHEM</code>. The path
|
Specify the path to the modules directory <code>FHEM</code>. The path
|
||||||
@ -792,6 +802,17 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
modpath attribute definition time).
|
modpath attribute definition time).
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="mseclog"></a>
|
||||||
|
<li>mseclog<br>
|
||||||
|
If set, the timestamp in the logfile will contain a millisecond part.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
<a name="nofork"></a>
|
||||||
|
<li>nofork<br>
|
||||||
|
If set and the logfile is not "-", do not try to background. Needed
|
||||||
|
on some Fritzbox installations.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="pidfilename="></a>
|
<a name="pidfilename="></a>
|
||||||
<li>pidfilename<br>
|
<li>pidfilename<br>
|
||||||
Write the process id of the perl process to the specified file. The
|
Write the process id of the perl process to the specified file. The
|
||||||
@ -809,12 +830,6 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
non-localhost connections too.
|
non-localhost connections too.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="allowfrom"></a>
|
|
||||||
<li>allowfrom<br>
|
|
||||||
Comma (,) separated list of ip-addresses or hostnames. If set,
|
|
||||||
only connections from these addresses are allowed.
|
|
||||||
</li><br>
|
|
||||||
|
|
||||||
<a name="statefile"></a>
|
<a name="statefile"></a>
|
||||||
<a name="statefile"></a>
|
<a name="statefile"></a>
|
||||||
<li>statefile<br>
|
<li>statefile<br>
|
||||||
@ -847,7 +862,8 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<li>5 - debugging.</li>
|
<li>5 - debugging.</li>
|
||||||
</ul>
|
</ul>
|
||||||
Recommended level is 3 for normal use.
|
Recommended level is 3 for normal use.
|
||||||
</li>
|
</li><br>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -2419,6 +2435,64 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<a name="structure"></a>
|
||||||
|
<h3>structure</h3>
|
||||||
|
<ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="structuredefine"></a>
|
||||||
|
<b>Define</b>
|
||||||
|
<ul>
|
||||||
|
<code>define <name> structure <struct_type> <dev1> <dev2> ...</code>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
The structure device is used to organize/structure a devices in order to
|
||||||
|
set groups of them at once (e.g. switching everything off in a house).<br>
|
||||||
|
|
||||||
|
The list of attached devices can be modified through the addstruct /
|
||||||
|
delstruct commands. Each attached device will get the attribute
|
||||||
|
<struct_type>=<name><br> when it is added to the list, and the
|
||||||
|
attribute will be deleted if the device is deleted from the structure.
|
||||||
|
The structure devices can also be added to a structure, e.g. you can have
|
||||||
|
a building consisting of levels which consists of rooms of devices.
|
||||||
|
<br>
|
||||||
|
Example:<br>
|
||||||
|
<ul>
|
||||||
|
<li>define kitchen structure room lamp1 lamp2</li>
|
||||||
|
<li>addstruct kitchen TYPE=FS20</li>
|
||||||
|
<li>delstruct kitchen lamp1</li>
|
||||||
|
<li>define house structure building kitchen living</li>
|
||||||
|
<li>set house off</li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="structureset"></a>
|
||||||
|
<b>Set</b>
|
||||||
|
<ul>
|
||||||
|
Every set command is propagated to the attached devices. Exception: if an
|
||||||
|
attached devices has an attribute structexcluse, and the attribute value
|
||||||
|
matches (as a regexp) the name of the current structure.
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="structureget"></a>
|
||||||
|
<b>Get</b>
|
||||||
|
<ul>
|
||||||
|
get is not supported through a structure device.
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<b>Attributes</b>
|
||||||
|
<ul>
|
||||||
|
<li>structexclude<br>
|
||||||
|
exclude the device from set operations, see the set command above.</li>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="WS2000"></a>
|
<a name="WS2000"></a>
|
||||||
<h3>WS2000</h3>
|
<h3>WS2000</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@ -2595,7 +2669,41 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<li><a href="#fixedrange">fixedrange</a></li>
|
<li><a href="#fixedrange">fixedrange</a></li>
|
||||||
<li><a href="#plotsize">plotsize</a></li>
|
<li><a href="#plotsize">plotsize</a></li>
|
||||||
<li><a href="#plotmode">plotmode</a></li>
|
<li><a href="#plotmode">plotmode</a></li>
|
||||||
<li><a href="#label">label</a></li>
|
<a name="label">
|
||||||
|
<li>label<br>
|
||||||
|
Colon separated list of values. The values will be used to replace
|
||||||
|
<L#> type of strings in the .gplot file, with # beginning at 1
|
||||||
|
(<L1>, <L2>, etc.). Each value will be evaluated as a perl
|
||||||
|
expression, so you have access e.g. to the $value hash.<br><br>
|
||||||
|
|
||||||
|
If the plotmode is gnuplot-scroll or SVG, you can also use the min, max,
|
||||||
|
avg, cnt, lastv (last value) and lastd (last date) values of the
|
||||||
|
individual curves, by accessing the corresponding values from the data
|
||||||
|
hash, see the example below:<br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Fixed text for the right and left axis:<br>
|
||||||
|
<ul>
|
||||||
|
<li>Fhem config:<br>
|
||||||
|
attr wl_1 label "Temperature":"Humidity"</li>
|
||||||
|
<li>.gplot file entry:<br>
|
||||||
|
set ylabel <L1><br>
|
||||||
|
set y2label <L2></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>Title with maximum and current values of the 1st curve (FileLog)
|
||||||
|
<ul>
|
||||||
|
<li>Fhem config:<br>
|
||||||
|
attr wl_1 label "Max $data{max1}, Current $data{lastv1}"</li>
|
||||||
|
<li>.gplot file entry:<br>
|
||||||
|
set title <L1><br>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<a name="title">
|
||||||
|
<li>title<br>
|
||||||
|
A special form of label (see above), which replaces the string <TL>
|
||||||
|
in the .gplot file. It defaults to the filename of the logfile.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -2798,6 +2906,85 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<a name="holiday"></a>
|
||||||
|
<h3>holiday</h3>
|
||||||
|
<ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="holidaydefine"></a>
|
||||||
|
<b>Define</b>
|
||||||
|
<ul>
|
||||||
|
<code>define <name> holiday</code>
|
||||||
|
<br><br>
|
||||||
|
Define a set of holidays. The module will try to open the file
|
||||||
|
<name>.holiday in the <a href="#modpath">modpath</a>/FHEM directory.
|
||||||
|
If an entry in the holiday file matches the current day, then the STATE of
|
||||||
|
this holiday instance displayed in the <a href="#list">list</a> command
|
||||||
|
will be set to the holiday, else the state is set to the text none. Most
|
||||||
|
probably you'll want to query this value in some perl script: see $value in
|
||||||
|
the <a href="#perl">perl</a> section or the global attribute <a
|
||||||
|
href="#holiday2we"> holiday2we</a>.<br>
|
||||||
|
The file will be reread once every night, to compute the value for the
|
||||||
|
current day, and by each get command (see below).<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Holiday file definition:<br>
|
||||||
|
The file may contain comments (beginning with #) or empty lines.
|
||||||
|
Significant lines begin with a number (type) and contain some space
|
||||||
|
separated words, depending on the type. The different types are:<br>
|
||||||
|
<ul>
|
||||||
|
<li>1<br>
|
||||||
|
Exact date. Arguments: <MM-DD> <holiday-name><br>
|
||||||
|
Exampe: 1 12-24 Christmas
|
||||||
|
</li>
|
||||||
|
<li>2<br>
|
||||||
|
Easter-dependent date. Arguments: <day-offset>
|
||||||
|
<holiday-name>.
|
||||||
|
The offset is counted from Easter-Sunday. Note: the perl module
|
||||||
|
DateTime::Event::Easter must be installed to use this type of
|
||||||
|
holiday.<br>
|
||||||
|
Exampe: 2 1 Easter-Monday
|
||||||
|
</li>
|
||||||
|
<li>3<br>
|
||||||
|
Month dependent date. Arguments: <nth> <weekday>
|
||||||
|
<month <holiday-name>.<br>
|
||||||
|
Examples:<br>
|
||||||
|
<ul>
|
||||||
|
3 1 Mon 05 First Monday In May<br>
|
||||||
|
3 2 Mon 05 Second Monday In May<br>
|
||||||
|
3 -1 Mon 05 Last Monday In May<br>
|
||||||
|
3 0 Mon 05 Each Monday In May<br>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>4<br>
|
||||||
|
Interval. Arguments: <MM-DD> <MM-DD> <holiday-name>
|
||||||
|
.<br>
|
||||||
|
Example:<br>
|
||||||
|
<ul>
|
||||||
|
4 01-06 31-06 Summer holiday<br>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
See also he.holiday in the contrib directory for official holidays in the
|
||||||
|
german country of Hessen.
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<b>Set</b> <ul>N/A</ul><br>
|
||||||
|
|
||||||
|
<b>Get</b>
|
||||||
|
<ul>
|
||||||
|
<code>get <name> <MM-DD></code>
|
||||||
|
<br><br>
|
||||||
|
Return the holiday name of the specified date or the text none.
|
||||||
|
<br><br>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<b>Attributes</b><ul>N/A</ul><br>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="notify"></a>
|
<a name="notify"></a>
|
||||||
<h3>notify</h3>
|
<h3>notify</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@ -3402,7 +3589,10 @@ isday, sunrise_coord</pre>
|
|||||||
$yday, $isdst are set (see perldoc -f localtime), with the exception that
|
$yday, $isdst are set (see perldoc -f localtime), with the exception that
|
||||||
$month is in the range of 1 to 12, and $year is also corrected by 1900 (as
|
$month is in the range of 1 to 12, and $year is also corrected by 1900 (as
|
||||||
one would normally expect). Additionally $we is 1 if it is weekend (i.e
|
one would normally expect). Additionally $we is 1 if it is weekend (i.e
|
||||||
$wday == 0 || $wday == 6), and 0 otherwise. Example:
|
$wday == 0 || $wday == 6), and 0 otherwise. If the <a
|
||||||
|
href="#holiday2we>holida2we</a> global attribute is set, $we is 1 for
|
||||||
|
holidays too.
|
||||||
|
Example:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
define n2 notify piri:on { if($hour > 18 || $hour < 5) { fhem "set
|
define n2 notify piri:on { if($hour > 18 || $hour < 5) { fhem "set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user