mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
70_DENON_AVR: serial connection issues
git-svn-id: https://svn.fhem.de/fhem/trunk@23343 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
039f0507dd
commit
991a33c2ca
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 70_DENON_AVR: serial connection issues
|
||||
- feature: 77_SMAEM: attr serialNumber may contain multiple serial numbers
|
||||
- feature: 57_SSCal: handle multiline code in description field if automatic
|
||||
creation of at-devices is used
|
||||
|
@ -1151,14 +1151,8 @@ DENON_AVR_Define($$)
|
||||
}
|
||||
|
||||
|
||||
# connect using serial connection (old blocking style)
|
||||
if ($hash->{DeviceName} =~ /^([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}) (.+@.+)/)
|
||||
{
|
||||
my $ret = DevIo_OpenDev($hash, 0, "DENON_AVR_DoInit");
|
||||
return $ret;
|
||||
}
|
||||
# connect using TCP connection (non-blocking style)
|
||||
else
|
||||
if ($hash->{DeviceName} =~ /^([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})/)
|
||||
{
|
||||
$hash->{IP} = $a[2];
|
||||
use XML::Simple qw(:strict);
|
||||
@ -1167,14 +1161,18 @@ DENON_AVR_Define($$)
|
||||
$hash->{DeviceName} = $hash->{DeviceName} . ":23"
|
||||
if ( $hash->{DeviceName} !~ m/^(.+):([0-9]+)$/ );
|
||||
|
||||
DevIo_OpenDev(
|
||||
$hash, 0,
|
||||
"DENON_AVR_DoInit",
|
||||
sub() {
|
||||
my ( $hash, $err ) = @_;
|
||||
Log3 $name, 4, "DENON_AVR $name: $err." if ($err);
|
||||
}
|
||||
);
|
||||
my $ret = DevIo_OpenDev($hash, 0, "DENON_AVR_DoInit",
|
||||
sub() {
|
||||
my ( $hash, $err ) = @_;
|
||||
Log3 $name, 4, "DENON_AVR $name: $err." if ($err);
|
||||
});
|
||||
|
||||
return $ret;
|
||||
}
|
||||
# connect using serial connection (old blocking style)
|
||||
else
|
||||
{
|
||||
DevIo_OpenDev($hash, 0, "DENON_AVR_DoInit");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user