70_DENON_AVR: serial connection issues

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@23343 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
delmar 2020-12-13 16:30:22 +00:00
parent e81ca09f7e
commit 62f3154753
2 changed files with 15 additions and 16 deletions

View File

@ -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

View File

@ -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);
@ -1166,15 +1160,19 @@ 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");
}
}