2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

Module 14_SD_WS07: Corrected syntax error which caused a crash an raised loglevels

git-svn-id: https://svn.fhem.de/fhem/trunk@9948 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mrsidey 2015-11-20 23:36:07 +00:00
parent cf6353c7ce
commit b8c119e87c
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it. # Do not insert empty lines here, update check depends on it.
- bugfix: 14_SD_WS07 - corrected syntax error and raised loglevels
- bugfix: 55_GDS.pm - correct wrong cumulation in alerts (1st try) - bugfix: 55_GDS.pm - correct wrong cumulation in alerts (1st try)
- feature: new module 10_DUOFERNSTICK and 30_DUOFERN added - feature: new module 10_DUOFERNSTICK and 30_DUOFERN added
- feature: 59_Weather: prevent retrieval of older forecasts than the - feature: 59_Weather: prevent retrieval of older forecasts than the

View File

@ -2784,7 +2784,7 @@ ZWave_Parse($$@)
my @vals = ("learnReady", "nodeFound", "slave", my @vals = ("learnReady", "nodeFound", "slave",
"controller", "protocolDone", "done", "failed"); "controller", "protocolDone", "done", "failed");
$evt = ($id eq "00" || hex($id)>@vals+1) ? "unknownArg" : $vals[hex($id)-1]; $evt = ($id eq "00" || hex($id)>@vals+1) ? "unknownArg" : $vals[hex($id)-1];
if(($evt eq "slave" || $evt eq "controller") && if($evt eq "slave" &&
$arg =~ m/(..)....(..)..(.*)$/) { $arg =~ m/(..)....(..)..(.*)$/) {
my ($id,$type6,$classes) = ($1, $2, $3); my ($id,$type6,$classes) = ($1, $2, $3);
return ZWave_SetClasses($homeId, $id, $type6, $classes) return ZWave_SetClasses($homeId, $id, $type6, $classes)

View File

@ -98,7 +98,7 @@ SD_WS07_Parse($$)
#} #}
my $bitData2 = substr($bitData,0,8) . ' ' . substr($bitData,8,1) . ' ' . substr($bitData,9,3); my $bitData2 = substr($bitData,0,8) . ' ' . substr($bitData,8,1) . ' ' . substr($bitData,9,3);
$bitData2 = $bitData2 . ' ' . substr($bitData,12,12) . ' ' . substr($bitData,24,4) . ' ' . substr($bitData,28,8); $bitData2 = $bitData2 . ' ' . substr($bitData,12,12) . ' ' . substr($bitData,24,4) . ' ' . substr($bitData,28,8);
Log3 $iohash, 3, $model . ' converted to bits: ' . $bitData2; Log3 $iohash, 5, $model . ' converted to bits: ' . $bitData2;
my $id = substr($rawData,0,2); my $id = substr($rawData,0,2);
my $bat = int(substr($bitData,8,1)) eq "1" ? "ok" : "low"; my $bat = int(substr($bitData,8,1)) eq "1" ? "ok" : "low";
@ -127,13 +127,13 @@ SD_WS07_Parse($$)
} }
$temp /= 10; $temp /= 10;
Log3 $iohash, 3, "$model decoded protocolid: 7 sensor id=$id, channel=$channel, temp=$temp, hum=$hum, bat=$bat" ; Log3 $iohash, 4, "$model decoded protocolid: 7 sensor id=$id, channel=$channel, temp=$temp, hum=$hum, bat=$bat" ;
my $deviceCode; my $deviceCode;
my $longids = AttrVal($iohash->{NAME},'longids',0); my $longids = AttrVal($iohash->{NAME},'longids',0);
if ( ($longids != 0) && ($longids eq "1" || $longids eq "ALL" || (",$longids," =~ m/,$model,/))) if ( ($longids != 0) && ($longids eq "1" || $longids eq "ALL" || (",$longids," =~ m/,$model,/)))
{ {
$deviceCode=$model._$id.$channel; $deviceCode=$model."_".$id.$channel;
Log3 $iohash,4, "$name using longid: $longids model: $model"; Log3 $iohash,4, "$name using longid: $longids model: $model";
} else { } else {
$deviceCode = $model . "_" . $channel; $deviceCode = $model . "_" . $channel;
@ -153,7 +153,7 @@ SD_WS07_Parse($$)
my $hash = $def; my $hash = $def;
$name = $hash->{NAME}; $name = $hash->{NAME};
Log3 $name, 4, "SD_WS07: $name ($rawData)"; Log3 $name, 5, "SD_WS07: $name ($rawData)";
if (!defined(AttrVal($hash->{NAME},"event-min-interval",undef))) if (!defined(AttrVal($hash->{NAME},"event-min-interval",undef)))
{ {