mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
FWupdate improve HMUsb, HMInfo checks
git-svn-id: https://svn.fhem.de/fhem/trunk@6391 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6adce4d63b
commit
d58ed5cc88
@ -782,10 +782,6 @@ sub HMLAN_SimpleWrite(@) {#####################################################
|
||||
select(undef, undef, undef, (($dDly > 0.1)?0.1:$dDly))
|
||||
if ($dDly > 0.01);
|
||||
}
|
||||
if ($modules{CUL_HM}{defptr}{$dst}{helper}{io}{newCh}){# force chan msg
|
||||
delete $hDst->{chn};
|
||||
delete $modules{CUL_HM}{defptr}{$dst}{helper}{io}{newCh};
|
||||
}
|
||||
}
|
||||
if ($dst ne $hmId){ #delay send if answer is pending
|
||||
if ( $hDst->{flg} && #HMLAN's ack pending
|
||||
|
@ -4202,6 +4202,10 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
Log3 $name,2,"CUL_HM fwUpdate started for $name";
|
||||
CUL_HM_SndCmd($hash, sprintf("%02X",$modules{CUL_HM}{helper}{updateNbr})
|
||||
."3011$id${dst}CA");
|
||||
|
||||
$hash->{helper}{io}{newChnFwUpdate} = $hash->{helper}{io}{newChn};#temporary hide init message
|
||||
$hash->{helper}{io}{newChn} = "";
|
||||
|
||||
InternalTimer(gettimeofday()+$enterBL,"CUL_HM_FWupdateEnd","fail:notInBootLoader",0);
|
||||
#InternalTimer(gettimeofday()+0.3,"CUL_HM_FWupdateSim",$dst."00000000",0);
|
||||
}
|
||||
@ -5333,6 +5337,10 @@ sub CUL_HM_FWupdateEnd($){#end FW update
|
||||
my $hash = $defs{$modules{CUL_HM}{helper}{updatingName}};
|
||||
CUL_HM_UpdtReadSingle($hash,"fwUpdate",$in,1);
|
||||
CUL_HM_FWupdateSpeed($modules{CUL_HM}{helper}{updatingName},10);
|
||||
$hash->{helper}{io}{newChn} = $hash->{helper}{io}{newChnFwUpdate}
|
||||
if(defined $hash->{helper}{io}{newChnFwUpdate});#restore initMsg
|
||||
delete $hash->{helper}{io}{newChnFwUpdate};
|
||||
|
||||
delete $defs{$modules{CUL_HM}{helper}{updatingName}}->{cmdStack};
|
||||
delete $modules{CUL_HM}{helper}{updating};
|
||||
delete $modules{CUL_HM}{helper}{updatingName};
|
||||
|
@ -373,6 +373,7 @@ sub HMinfo_peerCheck(@) { #####################################################
|
||||
my @peerIDsNoPeer;
|
||||
my @peerIDsTrigUnp;
|
||||
my @peerIDsTrigUnd;
|
||||
my @peeringStrange; # devices likely should not be peered
|
||||
my @peerIDsAES;
|
||||
foreach my $eName (@entities){
|
||||
next if (!$defs{$eName}{helper}{role}{chn});#device has no channels
|
||||
@ -398,36 +399,52 @@ sub HMinfo_peerCheck(@) { #####################################################
|
||||
}
|
||||
else{# work on a valid list:
|
||||
my $id = $defs{$eName}{DEF};
|
||||
my $devId = substr($id,0,6);
|
||||
my ($devId,$chn) = unpack 'A6A2',$id;
|
||||
my $devN = CUL_HM_id2Name($devId);
|
||||
my $st = AttrVal($devN,"subType","");# from Device
|
||||
my $md = AttrVal($devN,"model","");
|
||||
next if ($st eq "repeater");
|
||||
foreach my $pId (split",",$peerIDs){
|
||||
next if ($pId eq "00000000" ||$pId =~m /$devId/);
|
||||
if ($md eq "HM-CC-RT-DN" && $id =~ m/(0[45])$/){ # special RT climate
|
||||
my $c = $1 eq "04"?"05":"04";
|
||||
push @peerIDsNoPeer,$eName." pID:".$pId if ($pId !~ m/$c$/);
|
||||
}
|
||||
my $pDid = substr($pId,0,6);
|
||||
|
||||
my ($pDid,$pChn) = unpack'A6A2',$pId;
|
||||
if (!$modules{CUL_HM}{defptr}{$pId} &&
|
||||
(!$pDid || !$modules{CUL_HM}{defptr}{$pDid})){
|
||||
next if($pDid && CUL_HM_id2IoId($id) eq $pDid);
|
||||
push @peerIDnotDef,$eName." id:".$pId;
|
||||
next;
|
||||
}
|
||||
else{
|
||||
my $pName = CUL_HM_id2Name($pId);
|
||||
$pName =~s/_chn:01//; #chan 01 could be covered by device
|
||||
my $pPlist = AttrVal($pName,"peerIDs","");
|
||||
push @peerIDsNoPeer,$eName." p:".$pName
|
||||
if (!$pPlist || $pPlist !~ m/$id/);
|
||||
my $pDName = CUL_HM_id2Name($pDid);
|
||||
if (AttrVal($pDName,"subType","") eq "virtual"){
|
||||
if (AttrVal($devN,"aesCommReq",0) != 0){
|
||||
push @peerIDsAES,$eName." p:".$pName
|
||||
if (AttrVal($pDName,"model","") ne "CCU-FHEM");
|
||||
my $pName = CUL_HM_id2Name($pId);
|
||||
$pName =~s/_chn:01//; #chan 01 could be covered by device
|
||||
my $pPlist = AttrVal($pName,"peerIDs","");
|
||||
push @peerIDsNoPeer,$eName." p:".$pName
|
||||
if (!$pPlist || $pPlist !~ m/$id/);
|
||||
my $pDName = CUL_HM_id2Name($pDid);
|
||||
my $pMd = AttrVal($pDName,"model","");
|
||||
if (AttrVal($pDName,"subType","") eq "virtual"){
|
||||
if (AttrVal($devN,"aesCommReq",0) != 0){
|
||||
push @peerIDsAES,$eName." p:".$pName
|
||||
if ($pMd ne "CCU-FHEM");
|
||||
}
|
||||
}
|
||||
if ($md eq "HM-CC-RT-DN"){
|
||||
if ($chn =~ m/(0[45])$/){ # special RT climate
|
||||
my $c = $1 eq "04"?"05":"04";
|
||||
push @peerIDsNoPeer,$eName." pID:".$pId if ($pId !~ m/$c$/);
|
||||
if ($pMd !~ m/HM-CC-RT-DN/ ||$pChn !~ m/(0[45])$/ ){
|
||||
push @peeringStrange,$eName." pID: Model $pMd should be HM-CC-RT-DN ClimatTeam Channel";
|
||||
}
|
||||
}
|
||||
elsif($chn eq "02" &&
|
||||
($pChn ne "02" ||$pMd ne "HM-TC-IT-WM-W-EU" )){
|
||||
push @peeringStrange,$eName." pID: Model $pMd should be HM-TC-IT-WM-W-EU Climate Channel";
|
||||
}
|
||||
}
|
||||
elsif ($md eq "HM-TC-IT-WM-W-EU"){
|
||||
if($chn eq "02" &&
|
||||
($pChn ne "02" ||$pMd ne "HM-CC-RT-DN" )){
|
||||
push @peeringStrange,$eName." pID: Model $pMd should be HM-TC-IT-WM-W-EU Climate Channel";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -437,6 +454,7 @@ sub HMinfo_peerCheck(@) { #####################################################
|
||||
$ret .="\n\n peer list incomplete. Use getConfig to read it." ."\n ".(join "\n ",sort @peerIDsFail )if(@peerIDsFail);
|
||||
$ret .="\n\n peer not defined" ."\n ".(join "\n ",sort @peerIDnotDef )if(@peerIDnotDef);
|
||||
$ret .="\n\n peer not verified. Check that peer is set on both sides"."\n ".(join "\n ",sort @peerIDsNoPeer )if(@peerIDsNoPeer);
|
||||
$ret .="\n\n peering strange - likely not suitable" ."\n ".(join "\n ",sort @peeringStrange)if(@peeringStrange);
|
||||
$ret .="\n\n trigger sent to unpeered device" ."\n ".(join "\n ",sort @peerIDsTrigUnp)if(@peerIDsTrigUnp);
|
||||
$ret .="\n\n trigger sent to undefined device" ."\n ".(join "\n ",sort @peerIDsTrigUnd)if(@peerIDsTrigUnd);
|
||||
$ret .="\n\n aesComReq set but virtual peer is not vccu - won't work"."\n ".(join "\n ",sort @peerIDsAES )if(@peerIDsAES);
|
||||
|
@ -431,6 +431,7 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
lowBatLimit =>{a=> 18.0,s=>1.0,l=>0,min=>10 ,max=>12 ,c=>'' ,f=>10 ,u=>'V' ,d=>1,t=>"low batterie limit, step .1V"},
|
||||
lowBatLimitBA =>{a=> 18.0,s=>1.0,l=>0,min=>5 ,max=>15 ,c=>'' ,f=>10 ,u=>'V' ,d=>0,t=>"low batterie limit, step .1V"},
|
||||
lowBatLimitBA2 =>{a=> 18.0,s=>1.0,l=>0,min=>0 ,max=>15 ,c=>'' ,f=>10 ,u=>'V' ,d=>0,t=>"low batterie limit, step .1V"},
|
||||
lowBatLimitBA3 =>{a=> 18.0,s=>1.0,l=>0,min=>0 ,max=>12 ,c=>'' ,f=>10 ,u=>'V' ,d=>0,t=>"low batterie limit, step .1V"},
|
||||
lowBatLimitFS =>{a=> 18.0,s=>1.0,l=>0,min=>2 ,max=>3 ,c=>'' ,f=>10 ,u=>'V' ,d=>0,t=>"low batterie limit, step .1V"},
|
||||
lowBatLimitRT =>{a=> 18.0,s=>1.0,l=>0,min=>2 ,max=>2.5 ,c=>'' ,f=>10 ,u=>'V' ,d=>0,t=>"low batterie limit, step .1V"},
|
||||
batDefectLimit =>{a=> 19.0,s=>1.0,l=>0,min=>0.1,max=>2 ,c=>'' ,f=>100 ,u=>'Ohm' ,d=>1,t=>"batterie defect detection"},
|
||||
@ -745,8 +746,6 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
,lgMultiExec =>1
|
||||
},
|
||||
switch =>{ intKeyVisib =>1,sign =>1
|
||||
,confBtnTime =>1,localResDis =>1
|
||||
,transmitTryMax =>1,powerUpAction =>1,statusInfoMinDly=>1,statusInfoRandom=>1
|
||||
,OnTime =>1,OffTime =>1,OnDly =>1,OffDly =>1
|
||||
,SwJtOn =>1,SwJtOff =>1,SwJtDlyOn =>1,SwJtDlyOff =>1
|
||||
,CtValLo =>1,CtValHi =>1
|
||||
@ -815,7 +814,6 @@ $culHmRegType{pushButton} = $culHmRegType{remote};
|
||||
},
|
||||
|
||||
"HM-CC-VD" =>{ valveOffset =>1,valveErrorPos =>1},
|
||||
"HM-MOD-Re-8" =>{ lowBatLimitBA2 =>1,backlOnMode2 =>1},
|
||||
"HM-CC-TC" =>{ burstRx =>1,backlOnTime =>1,backlOnMode =>1,btnLock =>1},
|
||||
"HM-CC-RT-DN" =>{ btnLock =>1,localResDis =>1,globalBtnLock =>1,modusBtnLock =>1
|
||||
,cyclicInfoMsg =>1,cyclicInfoMsgDis=>1
|
||||
@ -866,8 +864,17 @@ $culHmRegType{pushButton} = $culHmRegType{remote};
|
||||
,lowBatLimit =>1,batDefectLimit =>1
|
||||
, transmitTryMax =>1},
|
||||
"HM-Dis-TD-T" =>{ lowBatLimitFS =>1,ledMode =>1},
|
||||
|
||||
"HM-LC-Sw1-Pl" =>{ confBtnTime =>1,localResDis =>1
|
||||
,transmitTryMax =>1,powerUpAction =>1,statusInfoMinDly=>1,statusInfoRandom=>1
|
||||
},
|
||||
"HM-LC-Sw1PBU-FM" =>{ localResDis =>1
|
||||
,transmitTryMax =>1,powerUpAction =>1,statusInfoMinDly=>1,statusInfoRandom=>1
|
||||
},
|
||||
"HM-LC-SW1-BA-PCB" =>{ lowBatLimitBA =>1,ledMode =>1},
|
||||
"HM-LC-SW4-BA-PCB" =>{ lowBatLimitBA =>1,ledMode =>1,localResDis =>1},
|
||||
"HM-MOD-Re-8" =>{ lowBatLimitBA3 =>1,ledMode =>1},
|
||||
|
||||
"HM-Sys-sRP-Pl" =>{ compMode =>1},
|
||||
"KFM-Display" =>{ CtDlyOn =>1,CtDlyOff =>1
|
||||
,CtOn =>1,CtOff =>1,CtRampOn =>1,CtRampOff =>1
|
||||
@ -892,6 +899,34 @@ $culHmRegType{pushButton} = $culHmRegType{remote};
|
||||
);
|
||||
|
||||
#clones - - - - - - - - - - - - - - -
|
||||
$culHmRegModel{"HM-LC-SW1-PL2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};#rf_s , rf_s_644
|
||||
$culHmRegModel{"HM-LC-SW1-SM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW2-SM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW4-SM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW4-PCB"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW4-WM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW1-FM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"Schueco_263-130"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW2-FM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW1-PB-FM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW2-PB-FM"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW4-DR"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-SW2-DR"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"ROTO_ZEL-STG-RM-FZS"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"ROTO_ZEL-STG-RM-FZS-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw1-Pl-3"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw1-SM-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw4-SM-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw4-PCB-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw4-WM-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw1-FM-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw2-FM-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw4-DR-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
$culHmRegModel{"HM-LC-Sw2-DR-2"} = $culHmRegModel{"HM-LC-Sw1-Pl"};
|
||||
|
||||
$culHmRegModel{"Schueco_263-131"} = $culHmRegModel{"HM-LC-Sw1PBU-FM"};#rf_s_1conf_644
|
||||
|
||||
|
||||
$culHmRegModel{"HM-RC-12-B"} = $culHmRegModel{"HM-RC-12"};
|
||||
$culHmRegModel{"HM-RC-12-SW"} = $culHmRegModel{"HM-RC-12"};
|
||||
$culHmRegModel{"HM-RC-19-B"} = $culHmRegModel{"HM-RC-19"};
|
||||
@ -1262,27 +1297,28 @@ $culHmRegChan{"ROTO_ZEL-STG-RM-FWT03"}= $culHmRegChan{"HM-CC-TC03"};
|
||||
|
||||
##############################---set---########################################
|
||||
%culHmGlobalSets = (# all but virtuals
|
||||
regBulk => "<list>:<peer> <addr1:data1> <addr2:data2> ...",
|
||||
getRegRaw => "[List0|List1|List2|List3|List4|List5|List6] ... [<PeerChannel>]",
|
||||
getConfig => "",
|
||||
regSet => "[prep|exec] <regName> <value> ... [<peerChannel>]",
|
||||
clear => "[readings|register|rssi|msgEvents|all]",
|
||||
regBulk => "<list>:<peer> <addr1:data1> <addr2:data2> ..."
|
||||
,getRegRaw => "[List0|List1|List2|List3|List4|List5|List6] ... [<PeerChannel>]"
|
||||
,getConfig => ""
|
||||
,regSet => "[prep|exec] <regName> <value> ... [<peerChannel>]"
|
||||
,clear => "[readings|register|rssi|msgEvents|all]"
|
||||
,getVersion => ""
|
||||
);
|
||||
%culHmGlobalSetsVrtDev = (# virtuals and devices without subtype
|
||||
raw => "data ...",
|
||||
virtual => "<noButtons>",
|
||||
clear => "[readings|rssi|msgEvents|unknownDev]",
|
||||
raw => "data ..."
|
||||
,virtual => "<noButtons>"
|
||||
,clear => "[readings|rssi|msgEvents|unknownDev]"
|
||||
);
|
||||
%culHmGlobalSetsDevice = (# all devices but virtuals
|
||||
raw => "data ...",
|
||||
reset => "",
|
||||
pair => "",
|
||||
unpair => "",
|
||||
raw => "data ..."
|
||||
,reset => ""
|
||||
,unpair => ""
|
||||
);
|
||||
|
||||
%culHmSubTypeDevSets = (# device of this subtype
|
||||
switch =>{ statusRequest => ""
|
||||
,getSerial => ""
|
||||
,pair => ""
|
||||
,getVersion => ""
|
||||
},
|
||||
# remote =>{ },
|
||||
|
Loading…
x
Reference in New Issue
Block a user