2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 02:59:49 +00:00

Preparing the release, last doc changes

git-svn-id: https://svn.fhem.de/fhem/trunk@47 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2007-04-14 08:22:18 +00:00
parent 4c7783fec7
commit d1f2fc42db
7 changed files with 184 additions and 43 deletions

View File

@ -319,7 +319,4 @@
- webpgm2 adapted to the new syntax, added device specific attribute
and "set" support, gnuplot files are configurable, links to the
documentation added.
support.
- TODO: bugfix: more thorough serial line initialization
- bugfix: more thorough serial line initialization

View File

@ -223,9 +223,15 @@ FHZ_Define($$)
$po->stopbits(1);
$po->handshake('none');
# This part is for some Linux kernel versions whih has strange default
# settings. Device::SerialPort is nice: if the flag is not defined for your
# OS then it will be ignored.
$po->stty_icanon(0);
$po->stty_parmrk(0);
$po->stty_icrnl(0);
$po->stty_echoe(0);
$po->stty_echok(0);
$po->stty_echoctl(0);
$hash->{PortObj} = $po;
$hash->{FD} = $po->FILENO;

View File

@ -1,8 +1,13 @@
##############################################
# Example for notifying with perl-code, in a proper file, not inline.
# Add the following line to the configuration file (02_fs20):
# notifyon btn3 {MyFunc("@", "%")}
# and put this file in the <modpath>/FHEM directory.
# Example perl functions. Put this file into the FHEM directory.
#
# # Activate 2 rollades at once with one button, open them to
# # a different degree.
# define ntfy_1 notifyon btn3 {MyFunc("@", "%")}
#
# # Swith the heater off if all FHT actuators are closed,
# # and on if at least one is open
# define at_1 at +*00:05 { fhem "set heater " . (sumactuator()?"on":"off") };
package main;
use strict;
@ -12,7 +17,19 @@ sub
PRIV_Initialize($$)
{
my ($hash, $init) = @_;
$hash->{Category} = "none";
}
sub
sumactuator()
{
my $sum = 0;
foreach my $d (keys %defs) {
next if($defs{$d}{TYPE} ne "FHT");
my ($act, undef) = split(" ", $defs{$d}{READINGS}{"actuator"}{VAL});
$act =~ s/%//;
$sum += $act;
}
return $sum;
}
sub
@ -22,11 +39,11 @@ MyFunc($$)
Log 2, "Device $a1 was set to $a2 (type: $defs{$a1}{TYPE})";
if($a2 eq "on") {
fhz "roll1 on-for-timer 10";
fhz "roll2 on-for-timer 16");
fhem "set roll1 on-for-timer 10";
fhem "set roll2 on-for-timer 16";
} else {
fhz "roll1 off";
fhz "roll2 off";
fhem "set roll1 off";
fhem "set roll2 off";
}
}

View File

@ -363,7 +363,7 @@ split in multiple lines<br><br>
<li>KS300: ks300</li>
<li>WS300: ws300pc</li>
<li>EM1010: em1010pc</li>
<ul>
</ul>
</li><br>
<a name="repeater"></a>
@ -393,7 +393,7 @@ split in multiple lines<br><br>
<br>
Notes:<br>
</ul>
<ul>
<li>See <a href="#delattr">delattr</a> to delete attributes.</li>
</ul>
</ul>

View File

@ -10,13 +10,88 @@
<h2>FHEM FAQ</h2>
<b>I get "undefined" messages in the log after upgrading fhem.pl</b>
<a href="#faq1">1. I am using fhem.pl with an fhz1000.pl config file and fhem.pl
won't start</a><br><br>
<a href="#faq2">2. I get "undefined" messages in the log after upgrading
fhem.pl</a><br><br>
<a href="#faq3">3. I switched on a FS20 device directly (without the remote),
but the fhem.pl did not noticed it. Is it a bug?</a><br><br>
<a href="#faq4">4. I have some FS20/FHT/HMS devices. How do I know their
housecode?</a><br><br>
<a href="#faq5">5. I have the code for my devices in the ELV notation, which
contains 1,2,3 and 4, but you require a hex code. How should I convert
it?</a><br><br>
<a href="#faq6">6. I replaced my FHZ1X00PC, now the FHT80b's does not work
anymore. Help me!</a><br><br>
<a href="#faq7">7. I can specify an optional ml/raincounter for a KS300. Why
do you think that 255 should be the default?</a><br><br>
<a href="#faq8">8. The time specification of the builtin at command is not very
flexible. Please add day/month/weekday to it.</a><br><br>
<a href="#faq9">9. I defined my FS20STR as an FHT device, but I do not get
any data from it.</a><br><br>
<a href="#faq10">10. How to convert the FHT8b code seen in its display to the
hex code needed by fhem.pl?</a><br><br>
<a href="#faq11">11. I'd like to use this sunrise/sunset stuff, can you help
me?</a><br><br>
<br>
<br>
<br>
<br>
<a name="faq1"></a>
<b>1. I am using fhem.pl with an fhz1000.pl config file and fhem.pl won't
start</b>
<ul>
The syntax changed, you have to modify you config file:
<ul>
<li>logfile/modpath/pidfile/port/verbose "renamed" to "attr global xx</li>
<ul>
<li>change logfile <xxx> to attr global logfile <xxx></li>
<li>change modpath <xxx> to attr global modpath <xxx></li>
<li>change pidfile <xxx> to attr global pidfile <xxx></li>
<li>change port <xxx> to attr global port <xxx></li>
<li>change verbose <xxx> to attr global verbose <xxx></li>
</ul>
<li>savefile renamed to "attr global statefile" (<b>not</b> savefile)</li>
<li>at/notify "renamed" to "define at/notify"<br>
This means you have to give a name to each of your at's or
notify commands. E.g.:
<ul>
<li><code>at *07:00 set lamp on</code><br>
&nbsp;&nbsp;becomes<br>
<code>define wake_me at *07:00 set lamp on</code></li>
<li><code>notify fire:on "send_sms"</code><br>
&nbsp;&nbsp;becomes<br>
<code>define fire_alarm notify fire:on "send_sms"</code><br>
</ul>
This seems to be tedious at the beginning but you get easy
deletion and attribute specification for these commands.
</ul>
</ul>
<a name="faq2"></a>
<b>2. I get "undefined" messages in the log after upgrading fhem.pl</b>
<ul>
Stop fhem.pl, delete the previous .save file and restart fhem.pl.
If the problem still exists, send a bugreport.
</ul>
<b>I switched on a FS20 device directly (without the remote), but
<a name="faq3"></a>
<b>3. I switched on a FS20 device directly (without the remote), but
the fhem.pl did not noticed it.<br>Is it a bug?</b>
<ul>
The protocol used by the FS20 family is quite simple: it is </b>not</b>
@ -28,7 +103,9 @@
To answer the question: it is not a bug :-)
</ul>
<b>I have some FS20/FHT/HMS devices.<br>
<a name="faq4"></a>
<b>4. I have some FS20/FHT/HMS devices.<br>
How do I know their housecode?</b><br>
<ul>
If you already programmed some devices, then just start fhem.pl with one
@ -38,9 +115,11 @@
devices do not have a proper code, so you can use anything.
</ul>
<b>I have the code for my devices in the ELV notation, which contains 1,2,3 and
4, but you require a hex code.<br>
How should I convert it?</b>
<a name="faq5"></a>
<b>5. I have the code for my devices in the ELV notation, which contains 1,2,3
and 4, but you require a hex code.<br> How should I convert it?</b>
<ul>
The code used by ELV is in the "quaternal" (?) system plus one added to each
digit, so you can even use the 4 button remote for programming. To convert,
@ -68,7 +147,9 @@
</ul>
<b>I replaced my FHZ1X00PC, now the FHT80b's does not work anymore.<br>
<a name="faq6"></a>
<b>6. I replaced my FHZ1X00PC, now the FHT80b's does not work anymore.<br>
Help me!</b>
<ul>
The FHT80b's are talking to a single FHZ1XXX device, which has a unique
@ -86,7 +167,9 @@ Help me!</b>
</ul>
</ul>
<b>I can specify an optional ml/raincounter for a KS300.<br>
<a name="faq7"></a>
<b>7. I can specify an optional ml/raincounter for a KS300.<br>
Why do you think that 255 should be the default?</b>
<ul>
The manual talks about 0.3l resolution, but I wanted to calibrate my device.
@ -104,8 +187,10 @@ Why do you think that 255 should be the default?</b>
You are welcome to do your own experiments, I am interested in the results.
</ul>
<b>The time specification of the builtin at command is not very flexible.<br>
Please add day/month/weekday to it.</b>
<a name="faq8"></a>
<b>8. The time specification of the builtin at command is not very
flexible.<br> Please add day/month/weekday to it.</b>
<ul>
I think the command is complex and flexible enough. Use a perl expression
for this functionality like (described in the commandref.html):
@ -113,13 +198,19 @@ Please add day/month/weekday to it.</b>
</ul>
<b>I defined my FS20STR as an FHT device, but I do not get any data from it.</b>
<a name="faq9"></a>
<b>9. I defined my FS20STR as an FHT device, but I do not get any data from
it.</b>
<ul>
The FS20STR is an FS20 device, even if it looks like an FHT80b.
You'll get "only" on-for-timer and off-for-timer events sent.
</ul>
<b>How to convert the FHT8b code seen in its display to the hex code needed by fhem.pl?</b>
<a name="faq10"></a>
<b>10. How to convert the FHT8b code seen in its display to the hex code needed
by fhem.pl?</b>
<ul>
Convert the first 2 digits first from decimal to hex, then the next two. Example:<br>
<pre>
@ -130,7 +221,9 @@ Please add day/month/weekday to it.</b>
E.g The FHT8b code 1121 is 0b15 for the fhem.pl
</ul>
<b>I'd like to use this sunrise/sunset stuff, can you help me?</b>
<a name="faq11"></a>
<b>11. I'd like to use this sunrise/sunset stuff, can you help me?</b>
<ul>
First you (most probably) have to install the DateTime::Event::Sunrise perl
module, as it is not part of the standard distributions. If it is not

View File

@ -10,11 +10,41 @@
<h1>FHEM</h1>
GPL'd FHZ FS20 HMS FHT KS300 WS300 server for linux, formerly known as
GPL'd FHZ, FS20, FHT, HMS, KS300 and WS300 server for linux, formerly known as
fhz1000.pl
<h2>News (as of =DATE=, Version =VERS=)</h2>
<ul>
<li>bugfix: deny at +{3}... (only +*{3} allowed), reported by Bernd, 25.01
<li>bugfix: allow numbers greater then 9 in at +{<number>}
<li>feature: new 50_WS300.pm from Martin (bugfix + rain statistics, 26.01)
<li>feature: renamed fhz1000 to fhem
<li>feature: added HISTORY and README.DEV
<li>doc: Added description of attribute "model".
<li>bugfix: delete the pidfile when terminating. (reported by Martin and Peter)
<li>feature: attribute showtime in web-pgm2 (show time instead of state)
<li>feature: defattr (default attribute for following defines)
<li>feature: added em1010.pl to the contrib directory
<li>doc: added linux.html (multiple devices, udev-links)
<li>REORGANIZATION:
<ul>
<li>at/notify "renamed" to "define <name> at/notify"
<li>logfile/modpath/pidfile/port/verbose "renamed" to "attr global xxx"
<li>savefile renamed to "attr global statefile"
<li>save command added, it writes the configfile and the statefile
<li>delattr added
<li>list/xmllist format changed
<li>disable attribute for at/notify/filelog</li>
See HISTORY for details and reasoning and the <a href="faq.html">FAQ</a>
for an uprading HOWTO.
</ul>
<li>added rename command
<li>webpgm2 adapted to the new syntax, added device specific attribute
and "set" support, gnuplot files are configurable, links to the
documentation added.
<li>bugfix: more thorough serial line initialization
</ul>
<h2>Description</h2>
@ -53,12 +83,18 @@ description and <a href="faq.html">faq.html</a> for the F.A.Q.
http://www.koeniglich.de/fhem/fhem.html</a><br>
Download: <a href="http://www.koeniglich.de/fhem/fhem-=VERS=.tar.gz">
http://www.koeniglich.de/fhem/fhem-=VERS=.tar.gz</a><br>
FAQ: <a href="http://www.koeniglich.de/fhem/faq.html">
http://www.koeniglich.de/fhem/faq.html</a><br>
Linux driver installation: <a href="http://www.koeniglich.de/fhem/linux.html">
http://www.koeniglich.de/fhem/linux.html</a><br>
Google-Group: <a href="http://groups.google.com/group/FHZ1000-users-on-unix">
http://groups.google.com/group/FHZ1000-users-on-unix</a><br>
Martins Web frontend: <a href="http://www.martin-haas.de/fhz">
Martins Web frontend (webpgm3): <a href="http://www.martin-haas.de/fhz">
http://www.martin-haas.de/fhz</a><br>
fhz1000 on Nas/Routers: <a href="http://www.martin-haas.de/fhz/nslu2fhz">
http://www.martin-haas.de/fhz/nslu2fhz</a><br>
CVS@berlios: <a href="http://developer.berlios.de/projects/fhem">
http://developer.berlios.de/projects/fhem</a><br>
LinViex (home automation frontend): <a href="http://sourceforge.net/projects/linviex">
http://sourceforge.net/projects/linviex</a><br>
@ -72,19 +108,10 @@ description and <a href="faq.html">faq.html</a> for the F.A.Q.
<ul>
<h3>Linux driver</h3>
<ul>
For kernels newer than 2.6.14 add one of the following lines
to /etc/modprobe.conf:<br>
<pre>
# FHZ1000 PC
options ftdi_sio vendor=0x0403 product=0xf06f
# FHZ1300 PC
options ftdi_sio vendor=0x0403 product=0xe0e8</pre>
If in doubt, look at the id of the device with lsusb.
For older kernels apply the patch from the doc directory to your kernel.<br>
Recompile your kernel and reboot or load/reload the ftdi_sio module.
<br>See also our <a href="linux.html">hints for GNU/Linux</a>.
See <a href="http://www.koeniglich.de/fhem/linux.html">
http://www.koeniglich.de/fhem/linux.html</a><br>
For kernels older then 2.6.x apply the patch from the doc directory to your
kernel, recompile it kernel and reboot or load/reload the ftdi_sio module.
</ul>
<h3>Perl modules</h3>

View File

@ -1115,6 +1115,7 @@ CommandReload($$)
use strict "refs";
$modules{$m} = \%hash;
$modules{$m}{ORDER} = 99 if(!$modules{$m}{ORDER});
return undef;
}