mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +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:$
|
# $Id:$
|
||||||
#
|
#
|
||||||
# Version 2.4
|
# Version 2.5
|
||||||
#
|
#
|
||||||
# (c) 2015 zap (zap01 <at> t-online <dot> de)
|
# (c) 2015 zap (zap01 <at> t-online <dot> de)
|
||||||
#
|
#
|
||||||
@ -61,7 +61,7 @@ sub HMCCUCHN_Initialize ($)
|
|||||||
$hash->{GetFn} = "HMCCUCHN_Get";
|
$hash->{GetFn} = "HMCCUCHN_Get";
|
||||||
$hash->{AttrFn} = "HMCCUCHN_Attr";
|
$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;
|
return $ccureadings ? undef : $result;
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'update') {
|
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 HMCCUCHN_SetError ($hash, $rc) if ($rc < 0);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -422,8 +427,7 @@ sub HMCCUCHN_SetError ($$)
|
|||||||
<br/>
|
<br/>
|
||||||
Get description of configuration parameters of CCU channel.
|
Get description of configuration parameters of CCU channel.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>get <name> update
|
<li>get <name> update [{'State'|'Value'}]<br/>
|
||||||
<br/>
|
|
||||||
Update all datapoints / readings of channel.
|
Update all datapoints / readings of channel.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -433,31 +437,29 @@ sub HMCCUCHN_SetError ($$)
|
|||||||
<b>Attributes</b><br/>
|
<b>Attributes</b><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<ul>
|
<ul>
|
||||||
<li>ccureadings <0 | 1>
|
<li>ccuget <State | Value><br/>
|
||||||
<br/>
|
Set read access method for CCU channel datapoints. Method 'State' is slower than 'Value' because
|
||||||
If set to 1 values read from CCU will be stored as readings.
|
each request is sent to the device. With method 'Value' only CCU is queried. Default is 'Value'.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>ccureadingfilter <datapoint-expr>
|
<li>ccureadings <0 | 1><br/>
|
||||||
<br/>
|
If set to 1 values read from CCU will be stored as readings. Default is 1.
|
||||||
Only datapoints matching specified expression are stored as
|
|
||||||
readings.
|
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>statedatapoint <datapoint>
|
<li>ccureadingfilter <datapoint-expr><br/>
|
||||||
<br/>
|
Only datapoints matching specified expression are stored as readings.
|
||||||
Set datapoint for devstate commands.
|
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>statevals <text>:<text>[,...]
|
<li>statedatapoint <datapoint><br/>
|
||||||
<br/>
|
Set datapoint for devstate commands.
|
||||||
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><br/>
|
||||||
<li>substitude <subst-rule>[;...]
|
<li>statevals <text>:<text>[,...]<br/>
|
||||||
<br/>
|
Define substitution for set commands values. The parameters <text>
|
||||||
Define substitions for reading values. Substitutions for parfile values must
|
are available as set commands. Example:<br/>
|
||||||
be specified in parfiles. Syntax of subst-rule is<br/><br/>
|
<code>attr my_switch statevals on:true,off:false</code><br/>
|
||||||
[datapoint!]<regexp1>:<text1>[,...]
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user