2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

Bugfix: zombie FS20 devices and some small changes

git-svn-id: https://svn.fhem.de/fhem/trunk@59 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2007-05-16 11:25:11 +00:00
parent 58c12bdc0a
commit e9fc76f38b
8 changed files with 22 additions and 11 deletions

View File

@ -329,3 +329,4 @@
- feature: modify command added
- feature: The "-" in the name is not allowed any more
- bugfix: disabled notify causes "uninitialized value" (STefan, 1.5)
- bugfix: deleted FS20 items are still logging (zombie) (Gerhard, 16.5)

View File

@ -290,13 +290,14 @@ FS20_Undef($$)
{
my ($hash, $name) = @_;
foreach my $c (keys %{ $hash->{CODE} } ) {
delete($defptr{$c}{$name});
$c = $hash->{CODE}{$c};
delete($defptr{$c}{$name}) if($defptr{$c});
}
return undef;
}
sub
FS20_Parse($)
FS20_Parse($$)
{
my ($hash, $msg) = @_;

View File

@ -63,7 +63,7 @@ KS300_Undef($$)
#####################################
sub
KS300_Parse($)
KS300_Parse($$)
{
my ($hash,$msg) = @_;

View File

@ -176,9 +176,9 @@ WS300_Undef($$)
#####################################
sub
WS300_Parse($)
WS300_Parse($$)
{
my $msg = shift;
my ($hash, $msg) = @_;
my $ll = GetLogLevel("WS300Device");
$ll = 5 if($ll == 2);
@ -639,7 +639,7 @@ NEXTPOLL:
{
if($rcount == 42)
{
WS300_Parse($inbuf);
WS300_Parse($hash, $inbuf);
goto NEXTPOLL;
}
else
@ -650,7 +650,7 @@ NEXTPOLL:
}
if($ic == 0x33)
{
WS300_Parse($inbuf) if($rcount == 39);
WS300_Parse($hash, $inbuf) if($rcount == 39);
$cmd=0x32;
}
$polling=0;

View File

@ -15,7 +15,7 @@ FileLog_Initialize($)
$hash->{UndefFn} = "FileLog_Undef";
$hash->{NotifyFn} = "FileLog_Log";
$hash->{AttrFn} = "FileLog_Attr";
$hash->{AttrList} = "disable:0,1 logtype";
$hash->{AttrList} = "disable:0,1 logtype nrarchive archivedir";
}
@ -55,6 +55,13 @@ FileLog_Undef($$)
return undef;
}
sub
HandleArchiving($)
{
my ($log) = @_;
if(!
}
#####################################
sub
@ -83,6 +90,7 @@ FileLog_Log($$)
my $cn = ResolveDateWildcards($log->{FILENAME}, @t);
if($cn ne $log->{CURRENT}) { # New logfile
HandleArchiving($log);
$fh->close();
$fh = new IO::File ">>$cn";
if(!defined($fh)) {

View File

@ -13,7 +13,7 @@ where <code> is one of:
810e04d70213a001b16d000003000000 RM100-2 smoke on
810e04d70213a001b16d000000000000 RM100-2 smoke off
81xx04xx0101a00180c2030011 FS20 dev: 1234 button: 03 on (11)
81xx04xx0101a0011234030011 FS20 dev: 1234 button: 03 on (11)
To send it:
set FHZ raw 04 0101a00180c2030011
set FHZ raw 04 0101a0011234030011

View File

@ -1581,6 +1581,7 @@ DoTrigger($$)
# Log/notify modules
my $ret = "";
foreach my $n (sort keys %defs) {
Log 5, "$dev trigger: Checking $n for notify";
$ret .= CallFn($n, "NotifyFn", $defs{$n}, $defs{$dev});
}

View File

@ -1,4 +1,4 @@
#Tue May 1 08:43:03 2007
#Tue May 1 17:03:03 2007
setstate FHZ fhtbuf: 1c
setstate FHZ 2006-02-12 14:03:39 fhtbuf 23
setstate FHZ 2006-03-26 08:47:36 init2 deadbeefdeadbe