mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
HMCCUDEV: CCU access modes State and Value
git-svn-id: https://svn.fhem.de/fhem/trunk@10503 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
014b4c8ea1
commit
5aab69ddd0
@ -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)
|
||||||
#
|
#
|
||||||
@ -64,7 +64,7 @@ sub HMCCUDEV_Initialize ($)
|
|||||||
$hash->{GetFn} = "HMCCUDEV_Get";
|
$hash->{GetFn} = "HMCCUDEV_Get";
|
||||||
$hash->{AttrFn} = "HMCCUDEV_Attr";
|
$hash->{AttrFn} = "HMCCUDEV_Attr";
|
||||||
|
|
||||||
$hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address ccureadings:0,1 ccustate statevals substitute statechannel statedatapoint stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes;
|
$hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address ccureadings:0,1 ccustate ccuget:State,Value statevals substitute statechannel statedatapoint stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -346,13 +346,23 @@ sub HMCCUDEV_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 HMCCUDEV_SetError ($hash, "Usage: get $name update [{'State'|'Value'}]");
|
||||||
|
}
|
||||||
|
$rc = HMCCU_GetUpdate ($hash, $hash->{ccuaddr}, $ccuget);
|
||||||
return HMCCUDEV_SetError ($hash, $rc) if ($rc < 0);
|
return HMCCUDEV_SetError ($hash, $rc) if ($rc < 0);
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
elsif ($opt eq 'deviceinfo') {
|
elsif ($opt eq 'deviceinfo') {
|
||||||
$result = HMCCU_GetDeviceInfo ($hash, $hash->{ccuaddr});
|
my $ccuget = shift @a;
|
||||||
|
$ccuget = 'Attr' if (!defined ($ccuget));
|
||||||
|
if ($ccuget !~ /^(Attr|State|Value)$/) {
|
||||||
|
return HMCCUDEV_SetError ($hash, "Usage: get $name deviceinfo [{'State'|'Value'}]");
|
||||||
|
}
|
||||||
|
$result = HMCCU_GetDeviceInfo ($hash, $hash->{ccuaddr}, $ccuget);
|
||||||
return HMCCUDEV_SetError ($hash, -2) if ($result eq '');
|
return HMCCUDEV_SetError ($hash, -2) if ($result eq '');
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -501,9 +511,11 @@ sub HMCCUDEV_SetError ($$)
|
|||||||
<br/>
|
<br/>
|
||||||
Get description of configuration parameters for CCU device.
|
Get description of configuration parameters for CCU device.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>get <name> update
|
<li>get <name> update [{'State'|'Value'}]<br/>
|
||||||
<br/>
|
|
||||||
Update datapoints / readings of device.
|
Update datapoints / readings of device.
|
||||||
|
</li><br/>
|
||||||
|
<li>get <name> deviceinfo [{'State'|'Value'}]<br/>
|
||||||
|
Display all channels and datapoints of device.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
@ -512,9 +524,12 @@ sub HMCCUDEV_SetError ($$)
|
|||||||
<b>Attributes</b><br/>
|
<b>Attributes</b><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<ul>
|
<ul>
|
||||||
<li>ccureadings <0 | 1>
|
<li>ccuget <State | <u>Value</u>><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>ccureadings <0 | <u>1</u>><br/>
|
||||||
|
If set to 1 values read from CCU will be stored as readings. Default is 1.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li>ccureadingfilter <datapoint-expr>
|
<li>ccureadingfilter <datapoint-expr>
|
||||||
<br/>
|
<br/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user