mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
Small fixes + HMS added to the CUL
git-svn-id: https://svn.fhem.de/fhem/trunk@402 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cdfc267c3d
commit
4b44680ecf
@ -505,4 +505,6 @@
|
||||
- feature: Google Weather API support for FHEM (Boris 2009-06-01)
|
||||
- feature: lazy attribute for FHT devices (Boris 2009-06-09)
|
||||
- feature: tmpcorr attribute for FHT devices
|
||||
- feature: CUL_EM generates an event for each of the READINGS
|
||||
- feature: USF1000S support for FHEM added (Boris 2009-06-20)
|
||||
- feature: CUL supports HMS (culfw >= 1.22 needed)
|
||||
|
@ -48,14 +48,15 @@ CUL_Initialize($)
|
||||
# Provider
|
||||
$hash->{ReadFn} = "CUL_Read";
|
||||
$hash->{WriteFn} = "CUL_Write";
|
||||
$hash->{Clients} = ":FS20:FHT:KS300:CUL_EM:CUL_WS:USF1000:";
|
||||
$hash->{Clients} = ":FS20:FHT:KS300:CUL_EM:CUL_WS:USF1000:HMS:";
|
||||
my %mc = (
|
||||
"1:USF1000" => "^81..(04|0c)..0101a001a5ceaa00....",
|
||||
"2:FS20" => "^81..(04|0c)..0101a001",
|
||||
"3:FHT" => "^81..(04|09|0d)..(0909a001|83098301|c409c401)..",
|
||||
"4:KS300" => "^810d04..4027a001",
|
||||
"5:CUL_WS" => "^K.....",
|
||||
"6:CUL_EM" => "^E0.................\$"
|
||||
"6:CUL_EM" => "^E0.................\$",
|
||||
"7:HMS" => "^810e04....(1|5|9).a001",
|
||||
);
|
||||
$hash->{MatchList} = \%mc;
|
||||
$hash->{ReadyFn} = "CUL_Ready";
|
||||
@ -696,7 +697,8 @@ CUL_Read($)
|
||||
}
|
||||
|
||||
my $rssi;
|
||||
if($initstr =~ m/X2/ && $dmsg =~ m/[FEHTK]([A-F0-9][A-F0-9])+$/) { # RSSI
|
||||
my $rmsg = $dmsg;
|
||||
if($initstr =~ m/X2/ && $dmsg =~ m/[FTKEHR]([A-F0-9][A-F0-9])+$/) { # RSSI
|
||||
my $l = length($dmsg);
|
||||
$rssi = hex(substr($dmsg, $l-2, 2));
|
||||
$dmsg = substr($dmsg, 0, $l-2);
|
||||
@ -723,13 +725,19 @@ CUL_Read($)
|
||||
}
|
||||
|
||||
$dmsg = sprintf("81%02x04xx0101a001%s00%s",
|
||||
$len/2+5, substr($dmsg,1,6), substr($dmsg,7));
|
||||
$len/2+7, substr($dmsg,1,6), substr($dmsg,7));
|
||||
$dmsg = lc($dmsg);
|
||||
|
||||
} elsif($fn eq "T" && $len >= 11) { # Reformat for 11_FHT.pm
|
||||
|
||||
$dmsg = sprintf("81%02x04xx0909a001%s00%s",
|
||||
$len/2+5, substr($dmsg,1,6), substr($dmsg,7));
|
||||
$len/2+7, substr($dmsg,1,6), substr($dmsg,7));
|
||||
$dmsg = lc($dmsg);
|
||||
|
||||
} elsif($fn eq "H" && $len >= 13) { # Reformat for 12_HMS.pm
|
||||
|
||||
$dmsg = sprintf("81%02x04xxxx5%sa001%s0000%s",
|
||||
$len/2+8, substr($dmsg,6,1), substr($dmsg,1,4), substr($dmsg,5));
|
||||
$dmsg = lc($dmsg);
|
||||
|
||||
} elsif($fn eq "K" && $len >= 5) {
|
||||
@ -749,12 +757,15 @@ CUL_Read($)
|
||||
Log GetLogLevel($name,2), "CUL: unknown message $dmsg";
|
||||
goto NEXTMSG;
|
||||
}
|
||||
|
||||
$hash->{RSSI} = $rssi;
|
||||
$hash->{RAWMSG} = $rmsg;
|
||||
my $foundp = Dispatch($hash, $dmsg);
|
||||
if($foundp && $rssi) {
|
||||
if($foundp) {
|
||||
foreach my $d (@{$foundp}) {
|
||||
next if(!$defs{$d});
|
||||
$defs{$d}{RSSI} = $rssi;
|
||||
$defs{$d}{RSSI} = $rssi if($rssi);
|
||||
$defs{$d}{RAWMSG} = $rmsg;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,11 +59,11 @@ FHZ_Initialize($)
|
||||
$hash->{WriteFn} = "FHZ_Write";
|
||||
$hash->{Clients} = ":FHZ:FS20:FHT:HMS:KS300:USF1000:";
|
||||
my %mc = (
|
||||
"0:USF1000" => "^810c04..0101a001a5ceaa00...."
|
||||
"1:FS20" => "^81..(04|0c)..0101a001",
|
||||
"2:FHT" => "^81..(04|09|0d)..(0909a001|83098301|c409c401)..",
|
||||
"3:HMS" => "^810e04....(1|5|9).a001",
|
||||
"4:KS300" => "^810d04..4027a001",
|
||||
"1:USF1000" => "^810c04..0101a001a5ceaa00....",
|
||||
"2:FS20" => "^81..(04|0c)..0101a001",
|
||||
"3:FHT" => "^81..(04|09|0d)..(0909a001|83098301|c409c401)..",
|
||||
"4:HMS" => "^810e04....(1|5|9).a001",
|
||||
"5:KS300" => "^810d04..4027a001",
|
||||
);
|
||||
$hash->{MatchList} = \%mc;
|
||||
$hash->{ReadyFn} = "FHZ_Ready";
|
||||
@ -673,7 +673,16 @@ FHZ_Read($)
|
||||
$fhzdata = substr($fhzdata, 2);
|
||||
next;
|
||||
}
|
||||
Dispatch($hash, $dmsg);
|
||||
|
||||
$hash->{RAWMSG} = $dmsg;
|
||||
my $foundp = Dispatch($hash, $dmsg);
|
||||
if($foundp) {
|
||||
foreach my $d (@{$foundp}) {
|
||||
next if(!$defs{$d});
|
||||
$defs{$d}{RAWMSG} = $dmsg;
|
||||
}
|
||||
}
|
||||
|
||||
$fhzdata = substr($fhzdata, $len);
|
||||
|
||||
} else {
|
||||
|
@ -66,7 +66,8 @@ sub
|
||||
HMS_Undef($$)
|
||||
{
|
||||
my ($hash, $name) = @_;
|
||||
delete($defptr{$hash->{CODE}});
|
||||
delete($defptr{$hash->{CODE}})
|
||||
if(defined($hash->{CODE}) && defined($defptr{$hash->{CODE}}));
|
||||
return undef;
|
||||
}
|
||||
|
||||
@ -216,7 +217,7 @@ HMS_Parse($$)
|
||||
|
||||
} else {
|
||||
|
||||
Log 4, "HMS Device $dev (Unknown type: $type)";
|
||||
Log 3, "HMS Device $dev (Unknown type: $type)";
|
||||
return "";
|
||||
|
||||
}
|
||||
|
@ -1540,7 +1540,8 @@ A line ending with \ will be concatenated with the next one, so long lines
|
||||
The CUL is an USB device sold by <a href="http://www.busware.de">busware.de
|
||||
</a>. With the opensource firmware (see this <a
|
||||
href="http://groups.google.com/group/cul-fans">google discussion</a>) it is
|
||||
capable to receive/send different 868MHz protocols, e.g. FS20/FHT/S300/EM.<br>
|
||||
capable to receive and send different 868MHz protocols
|
||||
(FS20/FHT/S300/EM/HMS).<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
|
||||
|
@ -56,7 +56,7 @@ Currently implemented features:<br>
|
||||
<ul>
|
||||
<li>FS20 (Receive/Send, all devices)
|
||||
<li>EM (EM1000EM/EM1000GZ/EM1000WZ)
|
||||
<li>FHT (Only snoop functionality, no send!)
|
||||
<li>FHT (Receive/Send)
|
||||
<li>S300 (KS300, S300TH, S555TH, etc)
|
||||
/ul>
|
||||
</li>
|
||||
@ -104,11 +104,10 @@ commandref.html</a> and <a href="faq.html">faq.html</a> for more documentation,
|
||||
<a href="http://sourceforge.net/projects/linviex">
|
||||
http://sourceforge.net/projects/linviex</a><br>
|
||||
Protocol descriptions and other useful stuff: <a href="http://fhz4linux.info/">http://fhz4linux.info/</a><br>
|
||||
busware.de: <a href=http://shop.busware.de/product_info.php?products_id=29">
|
||||
CUL</a>, <a href="http://groups.google.com/group/cul-fans">
|
||||
CUL fans google group</a><br>
|
||||
|
||||
|
||||
CUL: <a href=http://shop.busware.de/product_info.php?products_id=29">
|
||||
Hardware shop</a>, <a href="http://www.koeniglich.de/culfw/culfw.html">
|
||||
firmware homepage</a>, <a href="http://groups.google.com/group/cul-fans">
|
||||
CUL fans google group</a><br>
|
||||
<br>
|
||||
|
||||
Device/OS Specific installation guides:<br>
|
||||
|
Loading…
Reference in New Issue
Block a user