mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 13:26:02 +00:00
10_CUL_HM:battery for WD100 bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk@14508 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f277a188f9
commit
8da8453b48
@ -1088,6 +1088,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
$mh{dst}));
|
$mh{dst}));
|
||||||
if(!$mh{devH} && $mh{mTp} eq "00") { # generate device
|
if(!$mh{devH} && $mh{mTp} eq "00") { # generate device
|
||||||
my $sname = "HM_$mh{src}";
|
my $sname = "HM_$mh{src}";
|
||||||
|
Log 1,"General ###111### CUL_HM Unknown device $sname is now defined";
|
||||||
Log3 undef, 2, "CUL_HM Unknown device $sname is now defined";
|
Log3 undef, 2, "CUL_HM Unknown device $sname is now defined";
|
||||||
DoTrigger("global","UNDEFINED $sname CUL_HM $mh{src}");
|
DoTrigger("global","UNDEFINED $sname CUL_HM $mh{src}");
|
||||||
$mh{devH} = CUL_HM_id2Hash($mh{src}); #sourcehash - changed to channel entity
|
$mh{devH} = CUL_HM_id2Hash($mh{src}); #sourcehash - changed to channel entity
|
||||||
@ -1463,7 +1464,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
push @evtEt,[$mh{cHash},1,"storm:$txt"];
|
push @evtEt,[$mh{cHash},1,"storm:$txt"];
|
||||||
push @evtEt,[$mh{devH} ,1,"trig_$mh{chnHx}:$mh{dstN}"];
|
push @evtEt,[$mh{devH} ,1,"trig_$mh{chnHx}:$mh{dstN}"];
|
||||||
my $err = $chn & 0x80;
|
my $err = $chn & 0x80;
|
||||||
push @evtEt,[$mh{devH},1,"battery:". ($err?"low" :"ok" )] if {$mh{md} eq "HM-WDS100-C6-O-2"}; #has no battery
|
push @evtEt,[$mh{devH},1,"battery:". ($err?"low" :"ok" )] if ($mh{md} eq "HM-WDS100-C6-O-2"); #has no battery
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
push @evtEt,[$mh{shash},1,"unknown:$mh{p}"];
|
push @evtEt,[$mh{shash},1,"unknown:$mh{p}"];
|
||||||
@ -3125,10 +3126,13 @@ sub CUL_HM_parseCommon(@){#####################################################
|
|||||||
}
|
}
|
||||||
|
|
||||||
elsif($mhp->{mTp} eq "00"){######################################
|
elsif($mhp->{mTp} eq "00"){######################################
|
||||||
|
Log 1,"General ############parseme";
|
||||||
if ($devHlpr->{supp_Pair_Rep}){# repeated # Change noansi, don`t let the user press pair button forever if first pair try failed
|
if ($devHlpr->{supp_Pair_Rep}){# repeated # Change noansi, don`t let the user press pair button forever if first pair try failed
|
||||||
$devHlpr->{supp_Pair_Rep} = 0; # noansi: reset flag, suppress only once not to lockup if device answer is not received
|
$devHlpr->{supp_Pair_Rep} = 0; # noansi: reset flag, suppress only once not to lockup if device answer is not received
|
||||||
|
Log 1,"General ############parseme no more";
|
||||||
return "done"; # suppress handling of a repeated pair request
|
return "done"; # suppress handling of a repeated pair request
|
||||||
}
|
}
|
||||||
|
Log 1,"General ############parseme 2";
|
||||||
$devHlpr->{supp_Pair_Rep} = 1; # noansi: suppress next handling of a repeated pair request (if nothing else arrives in between from device)
|
$devHlpr->{supp_Pair_Rep} = 1; # noansi: suppress next handling of a repeated pair request (if nothing else arrives in between from device)
|
||||||
|
|
||||||
my $paired = 0; #internal flag
|
my $paired = 0; #internal flag
|
||||||
@ -3139,6 +3143,7 @@ sub CUL_HM_parseCommon(@){#####################################################
|
|||||||
my $ioOwn = InternalVal($ioN,"owner_CCU","");
|
my $ioOwn = InternalVal($ioN,"owner_CCU","");
|
||||||
my $hmPair = InternalVal($ioN,"hmPair" ,InternalVal($ioOwn,"hmPair" ,0 ));
|
my $hmPair = InternalVal($ioN,"hmPair" ,InternalVal($ioOwn,"hmPair" ,0 ));
|
||||||
my $hmPser = InternalVal($ioN,"hmPairSerial",InternalVal($ioOwn,"hmPairSerial",""));
|
my $hmPser = InternalVal($ioN,"hmPairSerial",InternalVal($ioOwn,"hmPairSerial",""));
|
||||||
|
Log 1,"General ############parseme 3 :$ioOwn:$hmPair:$hmPser";
|
||||||
if ( $hmPair ){# pairing is active
|
if ( $hmPair ){# pairing is active
|
||||||
if (!$hmPser || $hmPser eq ReadingsVal($mhp->{devN},"D-serialNr","")){
|
if (!$hmPser || $hmPser eq ReadingsVal($mhp->{devN},"D-serialNr","")){
|
||||||
|
|
||||||
@ -3149,6 +3154,10 @@ sub CUL_HM_parseCommon(@){#####################################################
|
|||||||
."$attr{$mhp->{devN}}{subType}, "
|
."$attr{$mhp->{devN}}{subType}, "
|
||||||
."model $attr{$mhp->{devN}}{model} "
|
."model $attr{$mhp->{devN}}{model} "
|
||||||
."serialNr ".ReadingsVal($mhp->{devN},"D-serialNr","");
|
."serialNr ".ReadingsVal($mhp->{devN},"D-serialNr","");
|
||||||
|
Log 1,"General######CUL_HM pair: $mhp->{devN} "
|
||||||
|
."$attr{$mhp->{devN}}{subType}, "
|
||||||
|
."model $attr{$mhp->{devN}}{model} "
|
||||||
|
."serialNr ".ReadingsVal($mhp->{devN},"D-serialNr","");
|
||||||
CUL_HM_RemoveHMPair("hmPairForSec:$ioOwn");# just in case...
|
CUL_HM_RemoveHMPair("hmPairForSec:$ioOwn");# just in case...
|
||||||
delete $ioHash->{hmPair};
|
delete $ioHash->{hmPair};
|
||||||
delete $ioHash->{hmPairSerial};
|
delete $ioHash->{hmPairSerial};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user