From 66534c4ea0df4b636a0b494c068ec1ad839d1e94 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Thu, 30 Apr 2015 11:08:46 +0000 Subject: [PATCH] 10_ZWave.pm: protection parse patch by Thomas (Forum #36675) git-svn-id: https://svn.fhem.de/fhem/trunk@8500 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_ZWave.pm | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index 7838e2158..3a1f7923d 100755 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -224,21 +224,23 @@ my %zwave_class = ( ALARM => { id => '71', get => { alarm => "04%02x", }, - parse => { "..7105(..)(..)(.*)" => 'ZWave_alarmParse($1,$2,$3)',}, }, + parse => { "..7105(..)(..)(.*)" => 'ZWave_alarmParse($1,$2,$3)'} }, MANUFACTURER_SPECIFIC => { id => '72', get => { model => "04", }, parse => { "087205(....)(....)(....)" => 'ZWave_mfsParse($1,$2,$3,0)', "087205(....)(....)(.{4})" => 'ZWave_mfsParse($1,$2,$3,1)', - "087205(....)(.{4})(.{4})" => '"modelId:$1-$2-$3"', }}, + "087205(....)(.{4})(.{4})" => '"modelId:$1-$2-$3"'} }, POWERLEVEL => { id => '73', }, PROTECTION => { id => '75', set => { protectionOff => "0100", protectionSeq => "0101", - protectionOn => "0102", }, + protectionOn => "0102", + protectionBytes => "01%02x%02x",}, get => { protection => "02", }, parse => { "03750300" => "protection:off", "03750301" => "protection:seq", - "03750302" => "protection:on", }, }, + "03750302" => "protection:on", + "047503(..)(..)" => 'ZWave_protectionParse($1, $2)'} }, LOCK => { id => '76', }, NODE_NAMING => { id => '77', }, FIRMWARE_UPDATE_MD => { id => '7a', }, @@ -1162,6 +1164,17 @@ ZWave_alarmParse($$$) $zwave_alarmEvent{"$t$e"} : "unknown event $e"); } +sub +ZWave_protectionParse($$) +{ + my ($lp, $rp) = @_; + my $lpt = "Local: ". ($lp eq "00" ? "unprotected" : + ($lp eq "01" ? "by sequence" : "No operation possible")); + my $rpt = "RF: ". ($rp eq "00" ? "unprotected" : + ($rp eq "01" ? "No control" : "No response")); + return "protection:$lpt $rpt"; +} + sub ZWave_configParse($$$) { @@ -1659,6 +1672,8 @@ s2Hex($) device is protected
  • protectionSeq
    device can be operated, if a certain sequence is keyed.
  • +
  • protectionBytes LocalProtectionByte RFProtectionByte
    + for commandclass PROTECTION V2 - see devicemanual for supported protectionmodes


  • Class SWITCH_ALL
  • swaIncludeNone