2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

00_ZWCUL.pm: minor additions

git-svn-id: https://svn.fhem.de/fhem/trunk@10239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-12-23 16:59:41 +00:00
parent e01b54f6b9
commit a5530bfc41
2 changed files with 14 additions and 10 deletions

View File

@ -3,13 +3,12 @@
package main;
# TODO
# inclusion
# exclusion
# security
# battery devices
# inclusion/exclusion
# routing
# neighborUpdate
# get
# wakeupNoMore
# neighborUpdate: 010404010c0001 010604000c0040 010700 0105
# explorer frames
# security
use strict;
use warnings;
@ -79,6 +78,7 @@ ZWCUL_Define($$)
$hash->{homeIdSet} = $a[3];
$hash->{nodeIdHex} = $a[4];
$hash->{initString} = ($hash->{homeIdSet} =~ m/^0*$/ ? "zm":"zr");
$hash->{monitor} = 1 if($hash->{homeIdSet} eq "00000000");
$hash->{Clients} = ":ZWave:STACKABLE_CC:";
my %matchList = ( "1:ZWave" => ".*",
@ -225,8 +225,8 @@ ZWCUL_Write($$$)
return;
}
# No wakeupNoMoreInformation in monitor mode
return if($p eq "8408" && $hash->{homeId} eq "00000000");
# Do not send wakeupNoMoreInformation in monitor mode
return if($p eq "8408" && $hash->{monitor});
$th->{sentIdx} = ($th->{sentIdx}++ % 16);
$msg = sprintf("%s%s41%02x%02x%s%s",
@ -302,10 +302,11 @@ ZWCUL_Parse($$$$)
}
my ($hF,$hf, $rf,$hc,$hops,$ri,$u1) = (hex($F),hex($f),"",0,"","","");
my ($hF,$hf, $rf,$hc,$hp,$hops,$ri,$u1) = (hex($F),hex($f),"",0,0,"","","");
# ITU G.9959, 8-4, 8-11
if($hF&0x80) { # routing
$hc = hex(substr($P,2,1));
$hp = hex(substr($P,3,1));
$ri = "R:".substr($P, 0, ($hc+2)*2)." ";
$rf = substr($P, 0, 2);
$hops = substr($P, 4, $hc*2);
@ -327,12 +328,14 @@ ZWCUL_Parse($$$$)
(($hF & 0x10)==0x10 ? " speedModified":"").
(($hF & 0x20)==0x20 ? " lowPower":"").
(($hF & 0x40)==0x40 ? " ackReq":"").
(($hF & 0x80)==0x80 ? " routed, rf:$rf hopCount:$hc, hops:$hops":"").
(($hF & 0x80)==0x80 ?
" routed, rf:$rf hopCnt:$hc hopPos:$hp hops:$hops":"").
((($hf>>1)&3)==0 ? " " :
(($hf>>1)&3)==1 ? " shortBeam" :
(($hf>>1)&3)==2 ? " longBeam" :" unknownBeam");
}
return if($hc && !$hash->{monitor} && $hc == $hp);
return if(AttrVal($me, "noDispatch", 0));

View File

@ -26,6 +26,7 @@ use vars qw(%zwave_id2class);
my %zwave_class = (
NO_OPERATION => { id => '00' },
NEIGHBOR_UPDATE => { id => '01' }, # reported by ZWCUL
BASIC => { id => '20',
set => { basicValue => "01%02x",
basicSet => "01%02x" }, # Alias, Forum #38200