mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-12 16:46:35 +00:00
HMCCUCHN: CCU access modes State and Value
git-svn-id: https://svn.fhem.de/fhem/trunk@10504 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5aab69ddd0
commit
b38225a9e7
@ -4,7 +4,7 @@
|
||||
#
|
||||
# $Id:$
|
||||
#
|
||||
# Version 2.4
|
||||
# Version 2.5
|
||||
#
|
||||
# (c) 2015 zap (zap01 <at> t-online <dot> de)
|
||||
#
|
||||
@ -61,7 +61,7 @@ sub HMCCUCHN_Initialize ($)
|
||||
$hash->{GetFn} = "HMCCUCHN_Get";
|
||||
$hash->{AttrFn} = "HMCCUCHN_Attr";
|
||||
|
||||
$hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address,datapoint ccureadings:0,1 ccustate statedatapoint statevals substitute stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes;
|
||||
$hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address,datapoint ccureadings:0,1 ccustate ccuget:State,Value statedatapoint statevals substitute stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes;
|
||||
}
|
||||
|
||||
#####################################
|
||||
@ -288,7 +288,12 @@ sub HMCCUCHN_Get ($@)
|
||||
return $ccureadings ? undef : $result;
|
||||
}
|
||||
elsif ($opt eq 'update') {
|
||||
$rc = HMCCU_GetUpdate ($hash, $hash->{ccuaddr});
|
||||
my $ccuget = shift @a;
|
||||
$ccuget = 'Attr' if (!defined ($ccuget));
|
||||
if ($ccuget !~ /^(Attr|State|Value)$/) {
|
||||
return HMCCUCHN_SetError ($hash, "Usage: get $name update [{'State'|'Value'}]");
|
||||
}
|
||||
$rc = HMCCU_GetUpdate ($hash, $hash->{ccuaddr}, $ccuget);
|
||||
return HMCCUCHN_SetError ($hash, $rc) if ($rc < 0);
|
||||
return undef;
|
||||
}
|
||||
@ -422,8 +427,7 @@ sub HMCCUCHN_SetError ($$)
|
||||
<br/>
|
||||
Get description of configuration parameters of CCU channel.
|
||||
</li><br/>
|
||||
<li>get <name> update
|
||||
<br/>
|
||||
<li>get <name> update [{'State'|'Value'}]<br/>
|
||||
Update all datapoints / readings of channel.
|
||||
</li>
|
||||
</ul>
|
||||
@ -433,31 +437,29 @@ sub HMCCUCHN_SetError ($$)
|
||||
<b>Attributes</b><br/>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>ccureadings <0 | 1>
|
||||
<br/>
|
||||
If set to 1 values read from CCU will be stored as readings.
|
||||
<li>ccuget <State | Value><br/>
|
||||
Set read access method for CCU channel datapoints. Method 'State' is slower than 'Value' because
|
||||
each request is sent to the device. With method 'Value' only CCU is queried. Default is 'Value'.
|
||||
</li><br/>
|
||||
<li>ccureadingfilter <datapoint-expr>
|
||||
<br/>
|
||||
Only datapoints matching specified expression are stored as
|
||||
readings.
|
||||
<li>ccureadings <0 | 1><br/>
|
||||
If set to 1 values read from CCU will be stored as readings. Default is 1.
|
||||
</li><br/>
|
||||
<li>statedatapoint <datapoint>
|
||||
<br/>
|
||||
Set datapoint for devstate commands.
|
||||
<li>ccureadingfilter <datapoint-expr><br/>
|
||||
Only datapoints matching specified expression are stored as readings.
|
||||
</li><br/>
|
||||
<li>statevals <text>:<text>[,...]
|
||||
<br/>
|
||||
Define substitution for set commands values. The parameters <text>
|
||||
are available as set commands. Example:<br/>
|
||||
<code>attr my_switch statevals on:true,off:false</code><br/>
|
||||
<code>set my_switch on</code>
|
||||
<li>statedatapoint <datapoint><br/>
|
||||
Set datapoint for devstate commands.
|
||||
</li><br/>
|
||||
<li>substitude <subst-rule>[;...]
|
||||
<br/>
|
||||
Define substitions for reading values. Substitutions for parfile values must
|
||||
be specified in parfiles. Syntax of subst-rule is<br/><br/>
|
||||
[datapoint!]<regexp1>:<text1>[,...]
|
||||
<li>statevals <text>:<text>[,...]<br/>
|
||||
Define substitution for set commands values. The parameters <text>
|
||||
are available as set commands. Example:<br/>
|
||||
<code>attr my_switch statevals on:true,off:false</code><br/>
|
||||
<code>set my_switch on</code>
|
||||
</li><br/>
|
||||
<li>substitude <subst-rule>[;...]<br/>
|
||||
Define substitions for reading values. Substitutions for parfile values must
|
||||
be specified in parfiles. Syntax of subst-rule is<br/><br/>
|
||||
[datapoint!]<regexp1>:<text1>[,...]
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user