mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
clear register, protocol enhancement
git-svn-id: https://svn.fhem.de/fhem/trunk@3953 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f858f0ed68
commit
c083035e7f
@ -839,6 +839,7 @@ sub CUL_HM_Parse($$) {##############################
|
||||
$err = ($err >> 5) & 0x7 ;
|
||||
$bat =(($bat ) & 0x1f)/10+1.5;
|
||||
$vp = ($vp ) & 0x7f ;
|
||||
my $uk0 = ($ctrlMode ) & 0x3f ;#unknown
|
||||
$ctrlMode = ($ctrlMode >> 6) & 0x3 ;
|
||||
$actTemp = sprintf("%2.1f",$actTemp);
|
||||
|
||||
@ -855,6 +856,8 @@ sub CUL_HM_Parse($$) {##############################
|
||||
push @event, "desired-temp:$setTemp";
|
||||
push @event, "ValvePosition:$vp %";
|
||||
push @event, "mode:$ctlTbl{$ctrlMode}";
|
||||
push @event, "unknown0:$uk0";
|
||||
push @event, "unknown1:".$2 if ($p =~ m/^0A(.10)(.*)/);
|
||||
push @event, "state:T: $actTemp desired: $setTemp valve: $vp %";
|
||||
push @entities,CUL_HM_UpdtReadBulk($dHash,1
|
||||
,"battery:".($err&0x80?"low":"ok")
|
||||
@ -2228,8 +2231,20 @@ sub CUL_HM_Set($@) {
|
||||
}
|
||||
elsif($cmd eq "clear") { ####################################################
|
||||
my (undef,undef,$sect) = @a;
|
||||
if ($sect eq "readings"){
|
||||
delete $hash->{READINGS};
|
||||
if ($sect eq "readings"){
|
||||
my @cH = ($hash);
|
||||
push @cH,$defs{$hash->{$_}} foreach(grep /^channel/,keys %{$hash});
|
||||
|
||||
delete $_->{READINGS}foreach (@cH);
|
||||
}
|
||||
elsif($sect eq "register"){
|
||||
my @cH = ($hash);
|
||||
push @cH,$defs{$hash->{$_}} foreach(grep /^channel/,keys %{$hash});
|
||||
|
||||
foreach my $h(@cH){
|
||||
delete $h->{READINGS}{$_}
|
||||
foreach (grep /^(\.?)(R-|RegL)/,keys %{$h->{READINGS}});
|
||||
}
|
||||
}
|
||||
elsif($sect eq "msgEvents"){
|
||||
CUL_HM_respPendRm($hash);
|
||||
@ -3084,10 +3099,10 @@ sub CUL_HM_Set($@) {
|
||||
if($rxType & 0x03){#all/burst
|
||||
CUL_HM_ProcessCmdStack($devHash);
|
||||
}
|
||||
elsif(($rxType & 0x80) && #burstConditional - have a try
|
||||
$devHash->{cmdStack} &&
|
||||
!$hash->{helper}{respWait}{cmd} &&
|
||||
!$hash->{helper}{respWait}{Pending}
|
||||
elsif(($rxType & 0x80) && #burstConditional - have a try
|
||||
$devHash->{cmdStack} &&
|
||||
!$devHash->{helper}{respWait}{cmd} &&
|
||||
!$devHash->{helper}{respWait}{Pending}
|
||||
){
|
||||
CUL_HM_SndCmd($devHash,"++B412$id$dst");
|
||||
}
|
||||
@ -3503,9 +3518,10 @@ sub CUL_HM_respPendTout($) {
|
||||
my $pendCmd = $hash->{helper}{respWait}{Pending};# secure before remove
|
||||
|
||||
my $pendRsndCnt = $hash->{helper}{respWait}{PendingRsend};
|
||||
$pendRsndCnt = 1 if (!$pendRsndCnt); #already one send done
|
||||
if ($pendRsndCnt < 5 && # some retries
|
||||
(CUL_HM_getRxType($hash) & 0x03) != 0){# to slow for wakeup and config
|
||||
$pendRsndCnt = 1 if (!$pendRsndCnt); #already one send done
|
||||
if ($pendRsndCnt < 5 && # some retries
|
||||
((CUL_HM_getRxType($hash) & 0x03) != 0 || # to slow for wakeup/config
|
||||
($hash->{protCondBurst}&&$hash->{protCondBurst} eq "on" ))){
|
||||
my $name = $hash->{NAME};
|
||||
Log GetLogLevel($name,4),"CUL_HM_Resend: ".$name. " nr ".$pendRsndCnt;
|
||||
$hash->{helper}{respWait}{PendingRsend} = $pendRsndCnt + 1;
|
||||
@ -4745,10 +4761,11 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
|
||||
|
||||
Universal commands (available to most hm devices):
|
||||
<ul>
|
||||
<li><B>clear <[readings|msgEvents]></B><a name="CUL_HMclear"></a><br>
|
||||
<li><B>clear <[readings|register|msgEvents]></B><a name="CUL_HMclear"></a><br>
|
||||
A set of variables can be removed.<br>
|
||||
<ul>
|
||||
readings: all readings will be deleted. Any new reading will be added usual. May be used to eliminate old data<br>
|
||||
register: all captured register-readings in FHEM will be removed. This has NO impact to the values in the device.<br>
|
||||
msgEvents: all message event counter will be removed. Also commandstack will be cleared. <br>
|
||||
rssi: collected rssi values will be cleared. <br>
|
||||
</ul>
|
||||
|
@ -559,7 +559,7 @@ my %culHmRegDefine = (
|
||||
daylightSaveTime=>{a=> 14 ,s=>0.1,l=>7,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"set daylight saving time",lit=>{off=>0,on=>1}},
|
||||
regAdaptive =>{a=> 14.1,s=>0.2,l=>7,min=>0 ,max=>2 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"adaptive regulation: offDef, offdetrmine, on",lit=>{off=>0,offDeter=>1,on=>2}},
|
||||
showInfo =>{a=> 14.3,s=>0.2,l=>7,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"show date or time" ,lit=>{time=>0,date=>1}},
|
||||
noMinMan4Manu =>{a=> 14.6,s=>0.1,l=>7,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"min/max is irrelevant for manual mode" ,lit=>{off=>0,on=>1}},
|
||||
noMinMax4Manu =>{a=> 14.6,s=>0.1,l=>7,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"min/max is irrelevant for manual mode" ,lit=>{off=>0,on=>1}},
|
||||
showWeekday =>{a=> 14.7,s=>0.1,l=>7,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"show weekday" ,lit=>{off=>0,on=>1}},
|
||||
|
||||
modePrioManu =>{a=> 18.3,s=>0.3,l=>7,min=>0 ,max=>5 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"allow tempChange for manual by...",lit=>{RT_SC=>0,all=>1,RT_CCU=>3,CCU=>4,self=>5}},
|
||||
@ -832,7 +832,7 @@ my %culHmRegChan = (# if channelspecific then enter them here
|
||||
decalcWeekday =>1,decalcTime =>1,
|
||||
boostPos =>1,boostPeriod =>1,boostAftWinOpen =>1,
|
||||
daylightSaveTime=>1,regAdaptive =>1,
|
||||
showInfo =>1,noMinMan4Manu =>1,showWeekday =>1,
|
||||
showInfo =>1,noMinMax4Manu =>1,showWeekday =>1,
|
||||
valveOffset =>1,valveMaxPos =>1,valveErrPos =>1,
|
||||
modePrioManu =>1,modePrioParty =>1,
|
||||
reguIntI =>1,reguIntP =>1,reguIntPstart =>1,
|
||||
@ -869,7 +869,7 @@ my %culHmGlobalSets = (# all but virtuals
|
||||
getRegRaw => "[List0|List1|List2|List3|List4|List5|List6] ... [<PeerChannel>]",
|
||||
getConfig => "",
|
||||
regSet => "<regName> <value> ... [<peerChannel>]",
|
||||
clear => "[readings|msgEvents]",
|
||||
clear => "[readings|register|rssi|msgEvents]",
|
||||
);
|
||||
my %culHmGlobalSetsVrtDev = (# virtuals and devices without subtype
|
||||
raw => "data ...",
|
||||
|
Loading…
x
Reference in New Issue
Block a user