mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
Sunrise doc changed
git-svn-id: https://svn.fhem.de/fhem/trunk@469 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
91a894d712
commit
16293e8ccf
@ -783,8 +783,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
This file is needed, as the save command will write only defines and
|
||||
attributes to the config file, any other commands / includes will be
|
||||
lost. E.g. it makes sense to set the <a href="FHZset">FHTcode</a> in
|
||||
this file or the coordinates of your house via
|
||||
<a href="#SUNRISE_EL">sunrise_coord</a>
|
||||
this file.
|
||||
</li><br>
|
||||
|
||||
<a name="logfile"></a>
|
||||
@ -3176,8 +3175,6 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
|
||||
|
||||
# Switch the lamp on from sunset to 11 PM
|
||||
# Copy 99_SUNRISE_EL.pm in the FHEM directory to have sunset_rel()
|
||||
{ sunrise_coord("8.686", "50.112", "") }
|
||||
define a9 at +*{sunset_rel()} set lamp on
|
||||
define a10 at *23:00:00 set lamp off
|
||||
|
||||
@ -3210,13 +3207,6 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
<li>if the current time is greater than the time specified, then the
|
||||
command will be executed tomorrow.</li>
|
||||
|
||||
<li>In order to use the sunrise()/sunset() functions,
|
||||
put { sunrise_coord(long, lat, "") } into your
|
||||
<a href="#lastinclude">lastinclude</a> file, as in the above example.
|
||||
If you are not using sunrise_coord, then the coordinates for
|
||||
Frankfurt am Main, Germany will be used.
|
||||
</li>
|
||||
|
||||
<li>For even more complex date handling you either have to call fhem from
|
||||
cron or filter the date in a perl expression, see the last example and
|
||||
the section <a href="#perl">Perl special</a>.
|
||||
@ -3765,13 +3755,18 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
sunrise, sunset,
|
||||
sunrise_rel, sunset_rel
|
||||
sunrise_abs, sunset_abs
|
||||
isday, sunrise_coord</pre>
|
||||
isday</pre>
|
||||
perl functions, to be used in <a href="#at">at</a> or FS20 on-till commands.<br>
|
||||
First you should call the sunrise_coord function with your exact longitude
|
||||
and latitude (see e.g. maps.google.com for the exact values, which should be
|
||||
in the form of a floating point value). This command should be part of the
|
||||
<a href="#lastinclude">lastinclude</a> file. The default value is Frankfurt
|
||||
am Main, Germany.<br><br>
|
||||
First you should edit SUNRISE_EL.pm, and set long and lat to the exact longitude
|
||||
and latitude values (see e.g. maps.google.com for the exact values, which
|
||||
should be in the form of a floating point value). The default value is
|
||||
Frankfurt am Main, Germany.
|
||||
<br><br>
|
||||
The default altitude ($altit in SUNRISE_EL.pm) defines the sunrise/sunset
|
||||
for Civil twilight (i.e. one can no longer read outside without artificial
|
||||
illumination), which differs from sunrise/sunset times found on different
|
||||
websites. See perldoc "DateTime::Event::Sunrise" for alternatives.
|
||||
<br><br>
|
||||
|
||||
sunrise()/sunset() returns the absolute time of the next sunrise/sunset,
|
||||
adding 24 hours if the next event is tomorrow, to use it in the timespec of
|
||||
|
@ -68,6 +68,9 @@ What is wrong with my USB?
|
||||
|
||||
<a href="#faq19">19. How do I set the dim100% from the at command?</a><br>
|
||||
|
||||
<a href="#faq20">20. Why do my Sunrise/Sunnset times differ from the ones on
|
||||
webseite XXX?</a><br>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
@ -251,16 +254,13 @@ by fhem.pl?</b>
|
||||
<ul>
|
||||
Look for the geographic coordinates of your home, e.g with a GPS
|
||||
receiver or with googleearth. Compute the latitude/longitude as needed, and
|
||||
enter them in your lastinclude file with the command:
|
||||
<pre>{sunrise_coord("<latitude>", "<longitude>", "") }</pre>
|
||||
enter them in your 99_SUNRISE_EL.pm file.
|
||||
After restart, { sunrise() } will return the time of the next sunrise,
|
||||
in a HH:MM:SS format.<br><br>
|
||||
in a HH:MM:SS format. Also note <a href="#faq20">faq20</a><br><br>
|
||||
|
||||
Note: 99_SUNRISE_EL.pm is the ExtraLight version of the original
|
||||
99_SUNRISE.pm, which needs the DateTime::Event::Sunrise perl module, which
|
||||
in turn is usually difficult to install. If you still want to use the
|
||||
original module, then the initialization string will be slightly different:
|
||||
<pre>{sunrise_coord("<latitude>", "<longitude>", "Europe/Berlin") }</pre>
|
||||
in turn is usually difficult to install.
|
||||
</ul>
|
||||
|
||||
<a name="faq12"></a>
|
||||
@ -442,6 +442,41 @@ See <a href="USB.html">USB compendium</a> for help.
|
||||
type, e.g. <code>FHT</code>) can be used. A single <code>%</code>
|
||||
looses its special meaning if any of these parameters appears in the
|
||||
definition.</li>
|
||||
</ul>
|
||||
|
||||
<a name="faq20">
|
||||
<b>20. Why do my Sunrise/Sunnset times differ from the ones on webseite XXX?</b>
|
||||
<ul>
|
||||
There are different ways of defining sunrise/sunset. To quote "perldoc
|
||||
DateTime::Event::Sunrise" :<br>
|
||||
<ul>
|
||||
<li>0 degrees<br>
|
||||
Center of Sun's disk touches a mathematical horizon
|
||||
<li>-0.25 degrees<br>
|
||||
Sun's upper limb touches a mathematical horizon
|
||||
<li>-0.583 degrees<br>
|
||||
Center of Sun's disk touches the horizon; atmospheric refraction
|
||||
accounted for
|
||||
<li>-0.833 degrees<br>
|
||||
Sun's supper limb touches the horizon; atmospheric refraction
|
||||
accounted for
|
||||
<li>-6 degrees<br>
|
||||
Civil twilight (one can no longer read outside without artificial
|
||||
illumination)
|
||||
<li>-12 degrees<br>
|
||||
Nautical twilight (navigation using a sea horizon no longer possible)
|
||||
<li>-15 degrees<br>
|
||||
Amateur astronomical twilight (the sky is dark enough for most
|
||||
astronomical observations)
|
||||
<li>-18 degrees<br>
|
||||
Astronomical twilight (the sky is completely dark)
|
||||
</ul>
|
||||
<br>
|
||||
The default in fhem is -6, as we most often deal with lamps & reading. Most
|
||||
websites use -0.833, the difference is normally about 30 minutes. You can
|
||||
change it in 99_SUNRISE.pm by setting the $altit variable.
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user