2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

10_ZWave.pm: fixing alarm reports (Forum #35178)

git-svn-id: https://svn.fhem.de/fhem/trunk@8243 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-03-19 09:08:42 +00:00
parent 1cba62fb38
commit b7b07c5a61

View File

@ -1078,15 +1078,18 @@ ZWave_alarmParse($$$)
{ {
my ($t,$l,$r) = @_; my ($t,$l,$r) = @_;
if(!$r || $r !~ m/......(..)/ || !$zwave_alarmType{$t}) { # Version 1 if(!$r || $r !~ m/......(..)(.*)/ || !$zwave_alarmType{$t}) { # V1 or unknown
return "alarm_type_$t:level $l"; return "alarm_type_$t:level $l";
} }
my ($e, $v4, $s) = ($1, $2, "alarm:$zwave_alarmType{$t}: ");
my $e = $1; if($l eq "00") {
return "alarm:$zwave_alarmType{$t}: ". $s .= "Event cleared: ";
($e eq "00" ? "Previous Events cleared" : $e = $1 if($v4 && $v4 =~ m/..(..)../);
($zwave_alarmEvent{"$t$e"} ? $zwave_alarmEvent{"$t$e"} : }
"unknown Event $e"));
return $s . ($zwave_alarmEvent{"$t$e"} ?
$zwave_alarmEvent{"$t$e"} : "unknown event $e");
} }
sub sub
@ -1821,7 +1824,9 @@ s2Hex($)
<ul> <ul>
<br><br><b>Class ALARM</b> <br><br><b>Class ALARM</b>
<li>alarm_type_X:level Y</li> <li>Devices with class version 1 support: alarm_type_X:level Y</li>
<li>For higher class versions more detailed events with 100+ different
strings in the form alarm:<string> are generated.</li>
<br><br><b>Class ASSOCIATION</b> <br><br><b>Class ASSOCIATION</b>
<li>assocGroup_X:Max Y Nodes A,B,...</li> <li>assocGroup_X:Max Y Nodes A,B,...</li>
@ -1876,7 +1881,7 @@ s2Hex($)
<li>protection:[on|off|seq]</li> <li>protection:[on|off|seq]</li>
<br><br><b>Class SENSOR_ALARM</b> <br><br><b>Class SENSOR_ALARM</b>
<li>alarm_type_X:level Y node $nodeID seconds $seconds</li> <li>alarm_type_X:level Y node $nodeID seconds $seconds</li>
<br><br><b>Class SENSOR_BINARY</b> <br><br><b>Class SENSOR_BINARY</b>
<li>state:open</li> <li>state:open</li>