mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
don't log further error messages if device is still not reachable - part 2 of 2
git-svn-id: https://svn.fhem.de/fhem/trunk@2451 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b79d8940f2
commit
1b612f3aec
@ -462,17 +462,18 @@ YAMAHA_AVR_Define($$)
|
|||||||
|
|
||||||
#############################
|
#############################
|
||||||
sub
|
sub
|
||||||
YAMAHA_AVR_SendCommand($$$)
|
YAMAHA_AVR_SendCommand($$@)
|
||||||
{
|
{
|
||||||
my($hash, $address, $command) = @_;
|
my ($hash, $address, $command, $loglevel) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $response;
|
my $response;
|
||||||
|
|
||||||
|
$loglevel = GetLogLevel($hash->{NAME}, 3) unless(defined($loglevel));
|
||||||
|
|
||||||
Log GetLogLevel($name, 5), "YAMAHA_AVR: execute on $name: $command";
|
Log GetLogLevel($name, 5), "YAMAHA_AVR: execute on $name: $command";
|
||||||
|
|
||||||
# In case any URL changes must be made, this part is separated in this function".
|
# In case any URL changes must be made, this part is separated in this function".
|
||||||
$response = GetFileFromURL("http://".$address."/YamahaRemoteControl/ctrl", 10, "<?xml version=\"1.0\" encoding=\"utf-8\"?>".$command);
|
$response = CustomGetFileFromURL(0, "http://".$address."/YamahaRemoteControl/ctrl", 10, "<?xml version=\"1.0\" encoding=\"utf-8\"?>".$command, 1, ($hash->{helper}{AVAILABLE} ? $loglevel : 5));
|
||||||
|
|
||||||
unless(defined($response))
|
unless(defined($response))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user