mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
e01b54f6b9
commit
a5530bfc41
@ -3,13 +3,12 @@
|
|||||||
package main;
|
package main;
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# inclusion
|
# battery devices
|
||||||
# exclusion
|
# inclusion/exclusion
|
||||||
|
# routing
|
||||||
|
# neighborUpdate: 010404010c0001 010604000c0040 010700 0105
|
||||||
|
# explorer frames
|
||||||
# security
|
# security
|
||||||
# routing
|
|
||||||
# neighborUpdate
|
|
||||||
# get
|
|
||||||
# wakeupNoMore
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -79,6 +78,7 @@ ZWCUL_Define($$)
|
|||||||
$hash->{homeIdSet} = $a[3];
|
$hash->{homeIdSet} = $a[3];
|
||||||
$hash->{nodeIdHex} = $a[4];
|
$hash->{nodeIdHex} = $a[4];
|
||||||
$hash->{initString} = ($hash->{homeIdSet} =~ m/^0*$/ ? "zm":"zr");
|
$hash->{initString} = ($hash->{homeIdSet} =~ m/^0*$/ ? "zm":"zr");
|
||||||
|
$hash->{monitor} = 1 if($hash->{homeIdSet} eq "00000000");
|
||||||
|
|
||||||
$hash->{Clients} = ":ZWave:STACKABLE_CC:";
|
$hash->{Clients} = ":ZWave:STACKABLE_CC:";
|
||||||
my %matchList = ( "1:ZWave" => ".*",
|
my %matchList = ( "1:ZWave" => ".*",
|
||||||
@ -225,8 +225,8 @@ ZWCUL_Write($$$)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# No wakeupNoMoreInformation in monitor mode
|
# Do not send wakeupNoMoreInformation in monitor mode
|
||||||
return if($p eq "8408" && $hash->{homeId} eq "00000000");
|
return if($p eq "8408" && $hash->{monitor});
|
||||||
|
|
||||||
$th->{sentIdx} = ($th->{sentIdx}++ % 16);
|
$th->{sentIdx} = ($th->{sentIdx}++ % 16);
|
||||||
$msg = sprintf("%s%s41%02x%02x%s%s",
|
$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
|
# ITU G.9959, 8-4, 8-11
|
||||||
if($hF&0x80) { # routing
|
if($hF&0x80) { # routing
|
||||||
$hc = hex(substr($P,2,1));
|
$hc = hex(substr($P,2,1));
|
||||||
|
$hp = hex(substr($P,3,1));
|
||||||
$ri = "R:".substr($P, 0, ($hc+2)*2)." ";
|
$ri = "R:".substr($P, 0, ($hc+2)*2)." ";
|
||||||
$rf = substr($P, 0, 2);
|
$rf = substr($P, 0, 2);
|
||||||
$hops = substr($P, 4, $hc*2);
|
$hops = substr($P, 4, $hc*2);
|
||||||
@ -327,12 +328,14 @@ ZWCUL_Parse($$$$)
|
|||||||
(($hF & 0x10)==0x10 ? " speedModified":"").
|
(($hF & 0x10)==0x10 ? " speedModified":"").
|
||||||
(($hF & 0x20)==0x20 ? " lowPower":"").
|
(($hF & 0x20)==0x20 ? " lowPower":"").
|
||||||
(($hF & 0x40)==0x40 ? " ackReq":"").
|
(($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)==0 ? " " :
|
||||||
(($hf>>1)&3)==1 ? " shortBeam" :
|
(($hf>>1)&3)==1 ? " shortBeam" :
|
||||||
(($hf>>1)&3)==2 ? " longBeam" :" unknownBeam");
|
(($hf>>1)&3)==2 ? " longBeam" :" unknownBeam");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return if($hc && !$hash->{monitor} && $hc == $hp);
|
||||||
return if(AttrVal($me, "noDispatch", 0));
|
return if(AttrVal($me, "noDispatch", 0));
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ use vars qw(%zwave_id2class);
|
|||||||
|
|
||||||
my %zwave_class = (
|
my %zwave_class = (
|
||||||
NO_OPERATION => { id => '00' },
|
NO_OPERATION => { id => '00' },
|
||||||
|
NEIGHBOR_UPDATE => { id => '01' }, # reported by ZWCUL
|
||||||
BASIC => { id => '20',
|
BASIC => { id => '20',
|
||||||
set => { basicValue => "01%02x",
|
set => { basicValue => "01%02x",
|
||||||
basicSet => "01%02x" }, # Alias, Forum #38200
|
basicSet => "01%02x" }, # Alias, Forum #38200
|
||||||
|
Loading…
x
Reference in New Issue
Block a user