2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 05:06:35 +00:00

addvaltriggers

git-svn-id: https://svn.fhem.de/fhem/trunk@694 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2010-08-14 10:35:12 +00:00
parent 4b3aa39984
commit 6534b81f76
5 changed files with 27 additions and 8 deletions

View File

@ -81,7 +81,7 @@ CUL_Initialize($)
$hash->{StateFn} = "CUL_SetState"; $hash->{StateFn} = "CUL_SetState";
$hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " . $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
"showtime:1,0 model:CUL,CUN,CUR loglevel:0,1,2,3,4,5,6 " . "showtime:1,0 model:CUL,CUN,CUR loglevel:0,1,2,3,4,5,6 " .
"fhtsoftbuffer:1,0 sendpool"; "fhtsoftbuffer:1,0 sendpool addvaltrigger";
$hash->{ShutdownFn} = "CUL_Shutdown"; $hash->{ShutdownFn} = "CUL_Shutdown";
} }
@ -92,8 +92,11 @@ CUL_Define($$)
my ($hash, $def) = @_; my ($hash, $def) = @_;
my @a = split("[ \t][ \t]*", $def); my @a = split("[ \t][ \t]*", $def);
return "wrong syntax: define <name> CUL devicename <FHTID>" if(@a < 4 || @a > 5) {
if(@a < 4 || @a > 5); my $msg = "wrong syntax: define <name> CUL devicename <FHTID>";
Log 2, $msg;
return $msg;
}
CUL_CloseDev($hash); CUL_CloseDev($hash);

View File

@ -81,7 +81,7 @@ FHZ_Initialize($)
$hash->{StateFn} = "FHZ_SetState"; $hash->{StateFn} = "FHZ_SetState";
$hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " . $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
"showtime:1,0 model:fhz1000,fhz1300 loglevel:0,1,2,3,4,5,6 ". "showtime:1,0 model:fhz1000,fhz1300 loglevel:0,1,2,3,4,5,6 ".
"fhtsoftbuffer:1,0"; "fhtsoftbuffer:1,0 addvaltrigger";
} }
##################################### #####################################

View File

@ -1,6 +1,9 @@
FHEM: FHEM:
- CUL_WS safety check
- document autocreate rename anomaly (rename filelog only)
- implement PID
- implement wiki decisions
- autodetect physical hardware - autodetect physical hardware
- commonfunctions.pm
- fhem-to-fhem module - fhem-to-fhem module
- CUR built-in MENU creation support - CUR built-in MENU creation support
@ -8,3 +11,5 @@ Webpgm2
- plot data from multiple files in a single picture - plot data from multiple files in a single picture
- setting the dummy state via dropdown is not possible - setting the dummy state via dropdown is not possible
- click on the graph only correct for the day zoom - click on the graph only correct for the day zoom
- integrate weblink details in the SVG
- autocreate: multiple plots

View File

@ -1800,7 +1800,7 @@ A line ending with \ will be concatenated with the next one, so long lines
<li><a href="#attrdummy">dummy</a></li><br> <li><a href="#attrdummy">dummy</a></li><br>
<li><a href="#showtime">showtime</a></li><br> <li><a href="#showtime">showtime</a></li><br>
<li><a href="#loglevel">loglevel</a></li><br> <li><a href="#loglevel">loglevel</a></li><br>
<li><a href="#model">model</a> (CUL,CUR)</li><br> <li><a href="#model">model</a> (CUL,CUN,CUR)</li><br>
<li><a href="#sendpool">sendpool</a><br> <li><a href="#sendpool">sendpool</a><br>
If using more than one CUL/CUN for covering a large area, sending If using more than one CUL/CUN for covering a large area, sending
different events by the different CUL's might disturb each other. This different events by the different CUL's might disturb each other. This
@ -1812,6 +1812,10 @@ A line ending with \ will be concatenated with the next one, so long lines
attr CUN2 sendpool CUN1,CUN2,CUN3<br> attr CUN2 sendpool CUN1,CUN2,CUN3<br>
attr CUN3 sendpool CUN1,CUN2,CUN3<br> attr CUN3 sendpool CUN1,CUN2,CUN3<br>
</li><br> </li><br>
<li><a href="#addvaltrigger">addvaltrigger</a><br>
Create triggers for additional device values. Right now these are RSSI
and RAWMSG for the CUL family and RAWMSG for the FHZ.
</li><br>
</ul> </ul>
<br> <br>
</ul> </ul>

View File

@ -160,7 +160,7 @@ my $nextat; # Time when next timer will be triggered.
my $intAtCnt=0; my $intAtCnt=0;
my %duplicate; # Pool of received msg for multi-fhz/cul setups my %duplicate; # Pool of received msg for multi-fhz/cul setups
my $duplidx=0; # helper for the above pool my $duplidx=0; # helper for the above pool
my $cvsid = '$Id: fhem.pl,v 1.109 2010-08-02 12:47:55 rudolfkoenig Exp $'; my $cvsid = '$Id: fhem.pl,v 1.110 2010-08-14 10:35:12 rudolfkoenig Exp $';
my $namedef = my $namedef =
"where <name> is either:\n" . "where <name> is either:\n" .
"- a single device name\n" . "- a single device name\n" .
@ -1014,7 +1014,11 @@ LoadModule($)
if($modules{$m} && !$modules{$m}{LOADED}) { # autoload if($modules{$m} && !$modules{$m}{LOADED}) { # autoload
my $o = $modules{$m}{ORDER}; my $o = $modules{$m}{ORDER};
CommandReload(undef, "${o}_$m"); my $ret = CommandReload(undef, "${o}_$m");
if($ret) {
Log 0, $ret;
return "UNDEFINED";
}
if(!$modules{$m}{LOADED}) { # Case corrected by reload? if(!$modules{$m}{LOADED}) { # Case corrected by reload?
foreach my $i (keys %modules) { foreach my $i (keys %modules) {
@ -2160,9 +2164,12 @@ Dispatch($$$)
} else { } else {
if($defs{$found}) { if($defs{$found}) {
$defs{$found}{MSGCNT}++; $defs{$found}{MSGCNT}++;
my $avtrigger = ($attr{$name} && $attr{$name}{addvaltrigger});
if($addvals) { if($addvals) {
foreach my $av (keys %{$addvals}) { foreach my $av (keys %{$addvals}) {
$defs{$found}{"${name}_$av"} = $addvals->{$av}; $defs{$found}{"${name}_$av"} = $addvals->{$av};
push(@{$defs{$found}{CHANGED}}, "$av: $addvals->{$av}")
if($avtrigger);
} }
} }
$defs{$found}{"${name}_MSGCNT"}++; $defs{$found}{"${name}_MSGCNT"}++;