mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
HMCCUDEV: Fixed multiple datapoints query
git-svn-id: https://svn.fhem.de/fhem/trunk@10527 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
86b64c66b3
commit
f1eadc5aa7
@ -84,6 +84,8 @@ sub HMCCUDEV_Define ($@)
|
|||||||
my $devtype = shift @a;
|
my $devtype = shift @a;
|
||||||
my $devspec = shift @a;
|
my $devspec = shift @a;
|
||||||
|
|
||||||
|
return "Invalid or unknown CCU device name or address" if (! HMCCU_IsValidDevice ($devspec));
|
||||||
|
|
||||||
if ($devspec =~ /^(.+)\.([A-Z]{3,3}[0-9]{7,7})$/) {
|
if ($devspec =~ /^(.+)\.([A-Z]{3,3}[0-9]{7,7})$/) {
|
||||||
# CCU Device address with interface
|
# CCU Device address with interface
|
||||||
$hash->{ccuif} = $1;
|
$hash->{ccuif} = $1;
|
||||||
@ -134,6 +136,7 @@ sub HMCCUDEV_Define ($@)
|
|||||||
AssignIoPort ($hash);
|
AssignIoPort ($hash);
|
||||||
|
|
||||||
readingsSingleUpdate ($hash, "state", "Initialized", 1);
|
readingsSingleUpdate ($hash, "state", "Initialized", 1);
|
||||||
|
$hash->{ccudevstate} = 'Active';
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -407,7 +410,8 @@ sub HMCCUDEV_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