HMInfo:introduce vervCUL_HM attribut

git-svn-id: https://svn.fhem.de/fhem/trunk@22665 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2020-08-24 15:48:53 +00:00
parent c9f3e70580
commit 74ba631a0b

View File

@@ -65,6 +65,7 @@ sub HMinfo_Initialize($$) {####################################################
."hmManualOper:0_auto,1_manual " ."hmManualOper:0_auto,1_manual "
."configDir configFilename configTempFile " ."configDir configFilename configTempFile "
."hmDefaults " ."hmDefaults "
."verbCULHM:multiple,allSet,allGet,none "
.$readingFnAttributes; .$readingFnAttributes;
$hash->{NOTIFYDEV} = "global"; $hash->{NOTIFYDEV} = "global";
} }
@@ -105,6 +106,13 @@ sub HMinfo_Attr(@) {###########################################################
my @hashL; my @hashL;
my $hash = $defs{$name}; my $hash = $defs{$name};
my @attOptLst = ();# get option list for this attribut
if ($cmd eq "set"){
my $attOpts = $modules{HMinfo}{AttrList};
$attOpts =~ s/.*$attrName:?(.*?) .*/$1/;
@attOptLst = grep !/multiple/,split(",",$attOpts);
}
if ($attrName eq "autoUpdate"){# 00:00 hh:mm if ($attrName eq "autoUpdate"){# 00:00 hh:mm
delete $hash->{helper}{autoUpdate}; delete $hash->{helper}{autoUpdate};
return if ($cmd eq "del"); return if ($cmd eq "del");
@@ -207,6 +215,20 @@ sub HMinfo_Attr(@) {###########################################################
delete $modules{CUL_HM}{AttrListDef}; delete $modules{CUL_HM}{AttrListDef};
} }
} }
elsif($attrName eq "verbCULHM"){
delete $modules{CUL_HM}{helper}{verbose};
$modules{CUL_HM}{helper}{verbose}{none} = 1; # init hash
if ($cmd eq "set"){
my @optSets = ();
foreach my $optIn (split(",",$attrVal)){
next if(0 == grep/^$optIn$/,@attOptLst);
$modules{CUL_HM}{helper}{verbose}{$optIn} = 1;
push @optSets,$optIn;
}
$attr{$name}{$attrName} = join(",",@optSets);
return "set $attrName to $attr{$name}{$attrName}" if ($attr{$name}{$attrName} ne $attrVal);
}
}
elsif($attrName eq "autoLoadArchive"){ elsif($attrName eq "autoLoadArchive"){
} }
return; return;
@@ -3568,6 +3590,11 @@ sub HMinfo_noDup(@) {#return list with no duplicates###########################
example:<br> example:<br>
attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br> attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br>
</li> </li>
<li><a name="#HMinfoverbCULHM">verbCULHM</a>
set verbose logging for a special action for any CUL_HM entity.<br>
allSet: all set commands to be executed.<br>
allGet: all get requests to be executed.<br>
</li>
<li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a> <li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a>
if set the register config will be loaded after reboot automatically. See <a ref="#HMinfoloadConfig">loadConfig</a> for details<br> if set the register config will be loaded after reboot automatically. See <a ref="#HMinfoloadConfig">loadConfig</a> for details<br>
</li> </li>
@@ -4027,6 +4054,11 @@ sub HMinfo_noDup(@) {#return list with no duplicates###########################
Beispiel:<br> Beispiel:<br>
attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br> attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br>
</li> </li>
<li><a name="#HMinfoverbCULHM">verbCULHM</a>
set verbose logging fuer ausgewaehlte aktionen von allen CUL_HM entities.<br>
allSet: alle set Kommandos fertig zur Ausführung.<br>
allGet: alle get Anfragen fertig zur Ausführung.<br>
</li>
<li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a> <li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a>
das Register Archive sowie Templates werden nach reboot automatischgeladen. das Register Archive sowie Templates werden nach reboot automatischgeladen.
Siehe <a ref="#HMinfoloadConfig">loadConfig</a> fuer details<br> Siehe <a ref="#HMinfoloadConfig">loadConfig</a> fuer details<br>