mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-24 02:59:22 +00:00
HMCCUDEV: Added variable set commands, readony devices, client initiated updates
git-svn-id: https://svn.fhem.de/fhem/trunk@9366 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
33961ac323
commit
8a9a9208d3
@ -10,13 +10,14 @@
|
|||||||
#
|
#
|
||||||
################################################################
|
################################################################
|
||||||
#
|
#
|
||||||
# define <name> HMCCUDEV <hmccu> <ccudev> [ { readonly | <statevals> } ]
|
# define <name> HMCCUDEV <hmccu> <ccudev> [ readonly ]
|
||||||
#
|
#
|
||||||
# set <name> datapoint <channel>.<datapoint> <value>
|
# set <name> datapoint <channel>.<datapoint> <value>
|
||||||
# set <name> devstate <value>
|
# set <name> devstate <value>
|
||||||
# set <name> <stateval_cmds>
|
# set <name> <stateval_cmds>
|
||||||
#
|
#
|
||||||
# get <name> datapoint <channel>.<datapoint>
|
# get <name> datapoint <channel>.<datapoint>
|
||||||
|
# get <name> update
|
||||||
#
|
#
|
||||||
# attr <name> ccureadings { 0 | 1 }
|
# attr <name> ccureadings { 0 | 1 }
|
||||||
# attr <name> statechannel <channel>
|
# attr <name> statechannel <channel>
|
||||||
@ -129,6 +130,9 @@ sub HMCCUDEV_Set ($@)
|
|||||||
if (!defined ($hash->{IODev})) {
|
if (!defined ($hash->{IODev})) {
|
||||||
return HMCCUDEV_SetError ($hash, "No IO device defined");
|
return HMCCUDEV_SetError ($hash, "No IO device defined");
|
||||||
}
|
}
|
||||||
|
if ($hash->{statevals} eq 'readonly') {
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
my $statechannel = AttrVal ($name, "statechannel", '');
|
my $statechannel = AttrVal ($name, "statechannel", '');
|
||||||
my $stateval = AttrVal ($name, "stateval", '');
|
my $stateval = AttrVal ($name, "stateval", '');
|
||||||
@ -232,8 +236,15 @@ sub HMCCUDEV_Get ($@)
|
|||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
elsif ($opt eq 'update') {
|
||||||
|
foreach my $r (keys %{$hash->{READINGS}}) {
|
||||||
|
if ($r =~ /^$ccudev:[0-9]\..+/) {
|
||||||
|
HMCCU_Get ($hmccu_hash, $hmccu_name, 'datapoint', $r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return "HMCCUDEV: Unknown argument $opt, choose one of datapoint";
|
return "HMCCUDEV: Unknown argument $opt, choose one of datapoint update:noArg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +324,10 @@ sub HMCCUDEV_SetError ($$)
|
|||||||
<br/>
|
<br/>
|
||||||
Get state of a CCU device datapoint.
|
Get state of a CCU device datapoint.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
|
<li>get <<i>Name</i>> update
|
||||||
|
<br/>
|
||||||
|
Update current readings matching CCU device name.
|
||||||
|
</li><br/>
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user