mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
HMCCUCHN: Fixed multiple datapoints query
git-svn-id: https://svn.fhem.de/fhem/trunk@10528 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f1eadc5aa7
commit
c1f8cedcfb
@ -80,6 +80,8 @@ sub HMCCUCHN_Define ($@)
|
|||||||
my $devtype = shift @a;
|
my $devtype = shift @a;
|
||||||
my $devspec = shift @a;
|
my $devspec = shift @a;
|
||||||
|
|
||||||
|
return "Invalid or unknown CCU channel name or address" if (! HMCCU_IsValidDevice ($devspec));
|
||||||
|
|
||||||
if ($devspec =~ /^(.+)\.([A-Z]{3,3}[0-9]{7,7}:[0-9]+)$/) {
|
if ($devspec =~ /^(.+)\.([A-Z]{3,3}[0-9]{7,7}:[0-9]+)$/) {
|
||||||
# CCU Channel address with interface
|
# CCU Channel address with interface
|
||||||
$hash->{ccuif} = $1;
|
$hash->{ccuif} = $1;
|
||||||
@ -116,6 +118,7 @@ sub HMCCUCHN_Define ($@)
|
|||||||
AssignIoPort ($hash);
|
AssignIoPort ($hash);
|
||||||
|
|
||||||
readingsSingleUpdate ($hash, "state", "Initialized", 1);
|
readingsSingleUpdate ($hash, "state", "Initialized", 1);
|
||||||
|
$hash->{ccudevstate} = 'Active';
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -328,7 +331,8 @@ sub HMCCUCHN_SetError ($$)
|
|||||||
my %errlist = (
|
my %errlist = (
|
||||||
-1 => 'Channel name or address invalid',
|
-1 => 'Channel name or address invalid',
|
||||||
-2 => 'Execution of CCU script failed',
|
-2 => 'Execution of CCU script failed',
|
||||||
-3 => 'Cannot detect IO device'
|
-3 => 'Cannot detect IO device',
|
||||||
|
-4 => 'Device deleted in CCU'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (exists ($errlist{$text})) {
|
if (exists ($errlist{$text})) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user