2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 23:09:26 +00:00

autoReadReg update

git-svn-id: https://svn.fhem.de/fhem/trunk@2920 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-03-15 19:16:02 +00:00
parent 36cede4cf5
commit ad8a618f6c
2 changed files with 15 additions and 11 deletions

View File

@ -89,7 +89,8 @@ sub CUL_HM_Initialize($) {
"serialNr firmware ".
"rawToReadable unit ".#"KFM-Sensor" only
"peerIDs repPeers ".
"actCycle actStatus autoReadReg:1_restart,0_off,2_pon-restart ".
"actCycle actStatus ".
"autoReadReg:1_restart,0_off,2_pon-restart,3_onChange ".
"expert:0_off,1_on,2_full ".
"hmClass:obsolete devInfo:obsolete ". #unused
@ -879,10 +880,10 @@ sub CUL_HM_Parse($$) {##############################
$state .= ($st eq "swi")?"toggle":"Short";#swi only support toggle
$trigType = "Short";
}
$shash->{helper}{addVal} = $buttonField; #store to handle changes
push @entities,CUL_HM_UpdtReadBulk($chnHash,"state:".$state.$target
,"trigger:".$trigType."_".$bno
,1);
$shash->{helper}{addVal} = $buttonField; #store to handle changesFread
push @entities,CUL_HM_UpdtReadBulk($chnHash,1,
,"state:".$state.$target
,"trigger:".$trigType."_".$bno);
push @event,"battery:". (($buttonField&0x80)?"low":"ok");
push @event,"state:$btnName $state$target";
}
@ -1480,7 +1481,7 @@ sub CUL_HM_parseCommon(@){#####################################################
my ($chn) = ($1) if($p =~ m/^..(..)/);
if ($chn eq "00"){
CUL_HM_queueAutoRead(CUL_HM_hash2Name($shash))
if (2 == substr(AttrVal($shash->{NAME},"autoReadReg",0),0,1));
if (1 < substr(AttrVal($shash->{NAME},"autoReadReg",0),0,1));
return "powerOn" ;# check dst eq "000000" as well?
}
}
@ -2913,6 +2914,8 @@ sub CUL_HM_pushConfig($$$$$$$$) {#generate messages to cnfig data to register
substr($content,$l,$ml));
}
CUL_HM_PushCmdStack($hash,"++A001".$src.$dst.$chn."06");
CUL_HM_queueAutoRead(CUL_HM_hash2Name($hash))
if (2 < substr(CUL_HM_Get($hash,$hash->{NAME},"param","autoReadReg"),0,1));
}
sub CUL_HM_Resend($) {#resend a message if there is no answer
my $hash = shift;
@ -4531,8 +4534,9 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
attr KFM100 unit Liter
</li>
<li><a name="autoReadReg">autoReadReg</a><br>
set to '1' will execute a getConfig for the device automatically after each reboot of FHEM. <br>
set to '2' like '1' plus execute after power_on.<br>
'1' will execute a getConfig for the device automatically after each reboot of FHEM. <br>
'2' like '1' plus execute after power_on.<br>
'3' includes '2' plus updates on writes to the device<br>
Execution will be delayed in order to prevent congestion at startup. Therefore the update
of the readings and the display will be delayed depending on the sice of the database.<br>
Recommendations and constrains upon usage:<br>

View File

@ -212,9 +212,9 @@ my %culHmRegDefShLg = (# register that are available for short AND long button p
DriveMode =>{a=> 31.0,s=>1.0,l=>3,min=>0 ,max=>3 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"" ,lit=>{direct=>0,viaUpperEnd=>1,viaLowerEnd=>2,viaNextEnd=>3}},
#dimmer mainly
OnDly =>{a=> 6.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"on delay "},
OnTime =>{a=> 7.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"on time"},
OnTime =>{a=> 7.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"on time, 111600 = infinite"},
OffDly =>{a=> 8.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"off delay"},
OffTime =>{a=> 9.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"off time"},
OffTime =>{a=> 9.0,s=>1.0,l=>3,min=>0 ,max=>111600 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"off time, 111600 = infinite"},
ActionTypeDim =>{a=> 10.0,s=>0.4,l=>3,min=>0 ,max=>8 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"" ,lit=>{off=>0,jmpToTarget=>1,toggleToCnt=>2,toggleToCntInv=>3,upDim=>4,downDim=>5,toggelDim=>6,toggelDimToCnt=>7,toggelDimToCntInv=>8}},
OffDlyBlink =>{a=> 14.5,s=>0.1,l=>3,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"" ,lit=>{off=>0,on=>1}},
@ -441,7 +441,7 @@ my %culHmRegDefine = (
msgScPosB =>{a=> 32.4,s=>0.2,l=>1,min=>0 ,max=>2 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Message for position B",lit=>{noMsg=>0,closed=>1,open=>2}},
eventDlyTime =>{a=> 33 ,s=>1 ,l=>1,min=>0 ,max=>7620 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>1,t=>"event delay time"},
ledOnTime =>{a=> 34 ,s=>1 ,l=>1,min=>0 ,max=>1.275 ,c=>'factor' ,f=>200 ,u=>'s' ,d=>0,t=>"LED ontime"},
eventFilterTime =>{a=> 35 ,s=>1 ,l=>1,min=>0 ,max=>7620 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"evetn filter time"},
eventFilterTime =>{a=> 35 ,s=>1 ,l=>1,min=>0 ,max=>7620 ,c=>'fltCvT' ,f=>'' ,u=>'s' ,d=>0,t=>"event filter time"},
# weather units
stormUpThresh =>{a=> 6 ,s=>1 ,l=>1,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"Storm upper threshold"},