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

RFR documentation, small fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@489 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2009-11-28 11:14:13 +00:00
parent 1723aa8f94
commit c9ce0d5c43
7 changed files with 112 additions and 28 deletions

View File

@ -544,3 +544,4 @@
- feature: pgm3: Google-Weather, Battery-Check, Log-View added (MartinH)
- feature: CUL_RFR (RF_ROUTING) added
- feature: Command save retains now the order of the old config file
- feature: List parameter added (list .* RFR_MSGCNT)

View File

@ -526,7 +526,7 @@ CUL_ReadAnswer($$$)
}
if($buf) {
Log 5, "CUL/RAW: $buf";
Log 5, "CUL/RAW (ReadAnswer): $buf";
$mculdata .= $buf;
}
$mculdata = CUL_RFR_DelPrefix($mculdata) if($type eq "CUL_RFR");

View File

@ -18,10 +18,7 @@ CUL_RFR_Initialize($)
# Message is like
# K41350270
my $cl = $modules{CUL}->{Clients};
$cl =~ s/CUL_RFR//; # Dont want to be my own client.
$hash->{Clients} = $cl;
$hash->{Clients} = $modules{CUL}->{Clients};
$hash->{Match} = "^[0-9A-F]{4}U.";
$hash->{DefFn} = "CUL_RFR_Define";
$hash->{UndefFn} = "CUL_RFR_Undef";
@ -69,7 +66,7 @@ sub
CUL_RFR_Undef($$)
{
my ($hash, $name) = @_;
delete($defptr{$hash->{CODE}});
delete($defptr{$hash->{ID} . $hash->{ROUTERID}});
return undef;
}
@ -91,6 +88,13 @@ CUL_RFR_Parse($$)
}
my $hash = $defptr{$cde};
my $name = $hash->{NAME};
if($smsg =~ m/^T/) { $hash->{NR_TMSG}++ }
elsif($smsg =~ m/^F/) { $hash->{NR_FMSG}++ }
elsif($smsg =~ m/^E/) { $hash->{NR_EMSG}++ }
elsif($smsg =~ m/^K/) { $hash->{NR_KMSG}++ }
else { $hash->{NR_RMSG}++ }
CUL_Parse($hash, $iohash, $hash->{NAME}, $smsg, "X21");
return "";
}
@ -98,7 +102,7 @@ CUL_RFR_Parse($$)
sub
CUL_RFR_DelPrefix($)
{
my ($prefix, $msg) = split("U", shift);
my ($prefix, $msg) = split("U", shift, 2);
return $msg;
}

BIN
fhem/docs/ccc.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -55,6 +55,7 @@
<a href="#CUL_EM">CUL_EM</a> &nbsp;
<a href="#CUL_FHTTK">CUL_FHTTK</a> &nbsp;
<a href="#CUL_WS">CUL_WS</a> &nbsp;
<a href="#CUL_RFR">CUL_RFR</a> &nbsp;
<a href="#DbLog">DbLog</a> &nbsp;
<a href="#EM">EM</a> &nbsp;
<a href="#EMEM">EMEM</a> &nbsp;
@ -1594,21 +1595,35 @@ A line ending with \ will be concatenated with the next one, so long lines
<a name="CUL"></a>
<h3>CUL</h3>
<ul>
<table>
<tr><td>
The CUL/CUR/CUN is a family of RF devices sold by <a
href="http://www.busware.de">busware.de</a>.
With the opensource firmware (see this <a
href="http://www.koeniglich.de/culfw/culfw.html">link</a>) they are capable
to receive and send different 868MHz protocols (FS20/FHT/S300/EM/HMS).<br>
to receive and send different 868MHz protocols (FS20/FHT/S300/EM/HMS).
It is even possible to use these devices as range extenders/routers, see the
<a href="#CUL_RFR">CUL_RFR</a> module for details.
<br>
<br>
Some protocols (FS20/FHT) are converted by this module so that the same
logical device can be used, irrespective if the radio telegram is received by
a CUL or an FHZ device.<br>
Other protocols (S300/EM) need their own modules. E.g. S300 devices are
processed by the CUL_WS module if the signals are received by the CUL,
similarly EMWZ/EMGZ/EMEM is handled by the CUL_EM module.
<br><br>
Some protocols (FS20, FHT and KS300) are converted by this module so that
the same logical device can be used, irrespective if the radio telegram is
received by a CUL or an FHZ device.<br> Other protocols (S300/EM) need their
own modules. E.g. S300 devices are processed by the CUL_WS module if the
signals are received by the CUL, similarly EMWZ/EMGZ/EMEM is handled by the
CUL_EM module.<br>
<br>
It is possible to attach more than one device in order to get better
reception, fhem will filter out duplicate messages.<br><br>
</td><td>
<img src="ccc.jpg"/>
</td></tr>
</table>
<a name="CULdefine"></a>
<b>Define</b>
@ -1706,10 +1721,10 @@ A line ending with \ will be concatenated with the next one, so long lines
</ul>
<br>
<a name="CULset"></a>
<a name="CUL_WSset"></a>
<b>Set</b> <ul>N/A</ul><br>
<a name="CULget"></a>
<a name="CUL_WSget"></a>
<b>Get</b> <ul>N/A</ul><br>
<b>Attributes</b>
@ -1765,19 +1780,15 @@ A line ending with \ will be concatenated with the next one, so long lines
STATE reading the current reading of your meter. For this purpose: multiply
the current reading (from the real device) with the corr1 value (RperKW),
and substract the RAW CUM value from it. Now set the basis reading of your
EMWZ device (named emwz) to this value:<br>
<pre>
{ $defs{emwz}{READINGS}{basis}{VAL} = &lt;computedvalue&gt; }</pre>
EMWZ device (named emwz) to this value.<br>
</ul>
<br>
<a name="CULset"></a>
<a name="CUL_EMset"></a>
<b>Set</b> <ul>N/A</ul><br>
<a name="CULget"></a>
<a name="CUL_EMget"></a>
<b>Get</b> <ul>N/A</ul><br>
<b>Attributes</b>
@ -1791,6 +1802,75 @@ A line ending with \ will be concatenated with the next one, so long lines
<br>
</ul>
<a name="CUL_RFR"></a>
<h3>CUL_RFR</h3>
<ul>
<table>
<tr><td>
The CUL_RFR module is used to "attach" a second CUL to your base CUL, and
use it as a repeater / range extender. RFR is shorthand for RF_ROUTER.
Transmission of the data uses the CC1101 packet capabilities with GFSK
modulation at 250kBaud after pinging the base CUL at the usual 1kBaud. When
configured, the RFR device can be used like another CUL connected directly to
fhem.
<br><br>
Before you can use this feature in fhem, you have to enable/configure RF
ROUTING in both CUL's:
<ul>
<li>First give your base CUL (which remains connected to the PC) an RFR ID
by issuing the fhem command "set MyCUL raw u0100". With this command
the base CUL will get the ID 01, and it will not relay messages to other
CUL's (as the second number is 00).
<li>Now replace the base CUL with the RFR CUL, and set its id by issuing
the fhem command "set MyCUL raw u0201". Now remove this CUL and attach the
original, base CUL again. The RFR CUL got the id 02, and will relay every
message to the base CUL with id 01.
<li>Take the RFR CUL, and attach it to an USB power supply, as displayed on
the image above. As the configured base id is not 00, it will activate RF
reception on boot, and will start sending messages to the base CUL.
<li>Now you have to define this RFR cul as a fhem device:
</ul>
</td><td>
<img src="cul_rfr.jpg"/>
</td></tr>
</table>
<br>
<a name="CUL_RFRdefine"></a>
<b>Define</b>
<ul>
<code>define &lt;name&gt; CUL_RFR &lt;own-id&gt; &lt;base-id&gt;</code> <br>
<br>
&lt;own-id&gt; is the id of the RFR CUL <b>not</b> connected to the PC,
&lt;base-id&gt; is the id of the CUL connected to the PC. Both parameters
have two characters, each representing a one byte hex number.<br>
Example:
<ul>
<code>define MyCUL raw u0100</code><br>
# Now replace the base CUL with the RFR CUL<br>
<code>define MyCUL raw u0201</code><br>
# Reattach the base CUL to the PC and attach the RFR CUL to a
USB power supply<br>
<code>define MyRFR CUL_RFR 02 01</code><br>
</ul>
</ul> <br>
<a name="CUL_RFRset"></a>
<b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
<a name="CUL_RFRget"></a>
<b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
<b>Attributes</b>
<ul>
Same as for the <a href="#CUL">CUL</a>.</ul><br>
</ul>
<br>
</ul>
<a name="EM"></a>
<h3>EM</h3>

BIN
fhem/docs/cul_rfr.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -155,7 +155,7 @@ my $nextat; # Time when next timer will be triggered.
my $intAtCnt=0;
my %duplicate; # Pool of received msg for multi-fhz/cul setups
my $duplidx=0; # helper for the above pool
my $cvsid = '$Id: fhem.pl,v 1.87 2009-11-25 11:13:44 rudolfkoenig Exp $';
my $cvsid = '$Id: fhem.pl,v 1.88 2009-11-28 11:14:12 rudolfkoenig Exp $';
my $namedef =
"where <name> is either:\n" .
"- a single device name\n" .
@ -1696,14 +1696,13 @@ RemoveInternalTimer($)
sub
SignalHandling()
{
if ($^O ne "MSWin32") {
if($^O ne "MSWin32") {
$SIG{'INT'} = sub { $sig_term = 1; };
$SIG{'QUIT'} = sub { $sig_term = 1; };
$SIG{'TERM'} = sub { $sig_term = 1; };
$SIG{'PIPE'} = 'IGNORE';
$SIG{'CHLD'} = 'IGNORE';
$SIG{'HUP'} = sub { CommandRereadCfg(undef, "") };
}
}