mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
10_CUL_HM:add attr readOnly
git-svn-id: https://svn.fhem.de/fhem/trunk@14527 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
819a5e3877
commit
e1f746a0de
@ -40,6 +40,22 @@ my $culHmBits =\%HMConfig::culHmBits;
|
|||||||
my $culHmCmdFlags =\@HMConfig::culHmCmdFlags;
|
my $culHmCmdFlags =\@HMConfig::culHmCmdFlags;
|
||||||
my $K_actDetID ="000000";
|
my $K_actDetID ="000000";
|
||||||
|
|
||||||
|
my %activeCmds = ( "valvePos" => 1,"up" => 1,"unlock" => 1,"toggleDir" => 1
|
||||||
|
,"toggle" => 1
|
||||||
|
,"tempListWed" => 1,"tempListTue" => 1,"tempListThu" => 1,"tempListSun" => 1
|
||||||
|
,"tempListSat" => 1,"tempListMon" => 1,"tempListFri" => 1
|
||||||
|
,"stop" => 1,"setRepeat" => 1
|
||||||
|
,"reset" => 1,"regSet" => 1,"regBulk" => 1
|
||||||
|
,"press" => 1,"postEvent" => 1,"playTone" => 1
|
||||||
|
,"peerIODev" => 1,"peerChan" => 1,"peerBulk" => 1
|
||||||
|
,"pctSlat" => 1,"pctLvlSlat" => 1,"pct" => 1,"pair" => 1
|
||||||
|
,"open" => 1,"on" => 1,"old" => 1,"off" => 1
|
||||||
|
,"lock" => 1,"level" => 1,"led" => 1
|
||||||
|
,"keydef" => 1,"fwUpdate" => 1,"down" => 1
|
||||||
|
,"controlParty" => 1,"controlManu" => 1
|
||||||
|
,"color" => 1,"colProgram" => 1,"brightCol" => 1,"brightAuto" => 1
|
||||||
|
,"on-till" => 1,"on-for-timer" => 1,"desired-temp" => 1
|
||||||
|
);
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
sub CUL_HM_Initialize($);
|
sub CUL_HM_Initialize($);
|
||||||
@ -167,6 +183,7 @@ sub CUL_HM_Initialize($) {
|
|||||||
."rawToReadable unit "#"KFM-Sensor" only
|
."rawToReadable unit "#"KFM-Sensor" only
|
||||||
."expert:0_defReg,1_allReg,2_defReg+raw,3_allReg+raw,4_off,8_templ+default,12_templOnly,251_anything "
|
."expert:0_defReg,1_allReg,2_defReg+raw,3_allReg+raw,4_off,8_templ+default,12_templOnly,251_anything "
|
||||||
."param "
|
."param "
|
||||||
|
."readOnly:0,1 "
|
||||||
."actAutoTry:0_off,1_on "
|
."actAutoTry:0_off,1_on "
|
||||||
."aesCommReq:1,0 " # IO will request AES if
|
."aesCommReq:1,0 " # IO will request AES if
|
||||||
;
|
;
|
||||||
@ -627,6 +644,11 @@ sub CUL_HM_Attr(@) {#################################
|
|||||||
$attr{$name}{$attrName} = $attrVal;
|
$attr{$name}{$attrName} = $attrVal;
|
||||||
CUL_HM_chgExpLvl($_) foreach ((map{CUL_HM_id2Hash($_)} CUL_HM_getAssChnIds($name)),$defs{$name});
|
CUL_HM_chgExpLvl($_) foreach ((map{CUL_HM_id2Hash($_)} CUL_HM_getAssChnIds($name)),$defs{$name});
|
||||||
}
|
}
|
||||||
|
elsif($attrName eq "readOnly"){#[0,1]
|
||||||
|
if ($cmd eq "set"){
|
||||||
|
return "$attrName: $attrVal not allowed. Should be one of 0,1" if (int($attrVal) > 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($attrName eq "actCycle"){#"000:00" or 'off'
|
elsif($attrName eq "actCycle"){#"000:00" or 'off'
|
||||||
if ($cmd eq "set"){
|
if ($cmd eq "set"){
|
||||||
if (CUL_HM_name2Id($name) eq $K_actDetID){
|
if (CUL_HM_name2Id($name) eq $K_actDetID){
|
||||||
@ -4156,7 +4178,9 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
|||||||
$modules{CUL_HM}{defptr}{$dst."01"}:$hash;
|
$modules{CUL_HM}{defptr}{$dst."01"}:$hash;
|
||||||
my $devHash = CUL_HM_getDeviceHash($hash);
|
my $devHash = CUL_HM_getDeviceHash($hash);
|
||||||
my $state = "set_".join(" ", @a[1..(int(@a)-1)]);
|
my $state = "set_".join(" ", @a[1..(int(@a)-1)]);
|
||||||
|
return "device on readonly. $cmd disabled"
|
||||||
|
if($activeCmds{$cmd} && CUL_HM_getAttrInt($name,"readOnly") );
|
||||||
|
|
||||||
if ($cmd eq "raw") { #####################################################
|
if ($cmd eq "raw") { #####################################################
|
||||||
return "Usage: set $a[0] $cmd data [data ...]" if(@a < 3);
|
return "Usage: set $a[0] $cmd data [data ...]" if(@a < 3);
|
||||||
$state = "";
|
$state = "";
|
||||||
@ -10496,6 +10520,9 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
|
|||||||
extert takes benefit of the implementation.
|
extert takes benefit of the implementation.
|
||||||
Nevertheless - by definition - showInternalValues overrules expert.
|
Nevertheless - by definition - showInternalValues overrules expert.
|
||||||
</li>
|
</li>
|
||||||
|
<li><a name="#CUL_HMreadOnly">readOnly</a><br>
|
||||||
|
restircts commands to read od observ only.
|
||||||
|
</li>
|
||||||
<li><a name="#CUL_HMIOgrp">IOgrp</a><br>
|
<li><a name="#CUL_HMIOgrp">IOgrp</a><br>
|
||||||
can be given to devices and shall point to a virtual CCU. As a consequence the
|
can be given to devices and shall point to a virtual CCU. As a consequence the
|
||||||
CCU will take care of the assignment to the best suitable IO. It is necessary that a
|
CCU will take care of the assignment to the best suitable IO. It is necessary that a
|
||||||
@ -11843,6 +11870,9 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
|
|||||||
"expert" macht sich diese Implementierung zu Nutze.
|
"expert" macht sich diese Implementierung zu Nutze.
|
||||||
Gleichwohl setzt "showInternalValues" - bei Definition - 'expert' außer Kraft .
|
Gleichwohl setzt "showInternalValues" - bei Definition - 'expert' außer Kraft .
|
||||||
</li>
|
</li>
|
||||||
|
<li><a name="#CUL_HMreadOnly">readOnly</a><br>
|
||||||
|
beschränkt kommandos auf Lesen und Beobachten.
|
||||||
|
</li>
|
||||||
<li><a name="#CUL_HMIOgrp">IOgrp</a><br>
|
<li><a name="#CUL_HMIOgrp">IOgrp</a><br>
|
||||||
kann an Devices vergeben werden udn zeigt auf eine virtuelle ccu. Danach wird die ccu
|
kann an Devices vergeben werden udn zeigt auf eine virtuelle ccu. Danach wird die ccu
|
||||||
beim Senden das passende IO für das Device auswählen. Es ist notwendig, dass die virtuelle ccu
|
beim Senden das passende IO für das Device auswählen. Es ist notwendig, dass die virtuelle ccu
|
||||||
@ -12190,4 +12220,3 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
|
|||||||
=end html_DE
|
=end html_DE
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user