mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
66_ECMD, 67_ECMDDevice: minor fixes to account for undefined attributes, one fix for commandref
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12877 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1c41099f68
commit
7360e8e9a3
@ -642,7 +642,7 @@ ECMD_Write($$$)
|
|||||||
$answer= ECMD_SimpleExpect($hash, $msg, $expect);
|
$answer= ECMD_SimpleExpect($hash, $msg, $expect);
|
||||||
$answer= "" unless(defined($answer));
|
$answer= "" unless(defined($answer));
|
||||||
ECMD_Log $hash, 5, "received answer " . dq($answer);
|
ECMD_Log $hash, 5, "received answer " . dq($answer);
|
||||||
$answer.= $responseSeparator if($#ecmds>0);
|
$answer.= $responseSeparator if(defined($responseSeparator) && ($#ecmds>0));
|
||||||
$ret.= $answer;
|
$ret.= $answer;
|
||||||
} else {
|
} else {
|
||||||
ECMD_SimpleWrite($hash, $msg);
|
ECMD_SimpleWrite($hash, $msg);
|
||||||
@ -795,7 +795,7 @@ ECMD_Write($$$)
|
|||||||
A single command from FHEM to the device might need to be broken down into several requests.
|
A single command from FHEM to the device might need to be broken down into several requests.
|
||||||
A command string is split at all
|
A command string is split at all
|
||||||
occurrences of the request separator. The request separator itself is removed from the command string and thus is
|
occurrences of the request separator. The request separator itself is removed from the command string and thus is
|
||||||
not part of the request. The default is to have no response separator. Use a request separator that does not occur in the actual request.
|
not part of the request. The default is to have no request separator. Use a request separator that does not occur in the actual request.
|
||||||
</li>
|
</li>
|
||||||
<li>responseSeparator <separator><br>
|
<li>responseSeparator <separator><br>
|
||||||
In order to identify the single responses from the device for each part of the command broken down by request separators, a response separator can be appended to the response to each single request.
|
In order to identify the single responses from the device for each part of the command broken down by request separators, a response separator can be appended to the response to each single request.
|
||||||
|
@ -160,9 +160,9 @@ ECMDDevice_PostProc($$$%)
|
|||||||
if($postproc) {
|
if($postproc) {
|
||||||
my $command= ECMDDevice_ReplaceSpecials($postproc, %specials);
|
my $command= ECMDDevice_ReplaceSpecials($postproc, %specials);
|
||||||
$_= $value;
|
$_= $value;
|
||||||
Log3 $hash, 5, "Postprocessing \"" . escapeLogLine($value) . "\" with perl command $command.";
|
Log3 $hash, 5, "Postprocessing \"" . dq($value) . "\" with perl command $command.";
|
||||||
$value= AnalyzePerlCommand(undef, $command);
|
$value= AnalyzePerlCommand(undef, $command);
|
||||||
Log3 $hash, 5, "Postprocessed value is \"" . escapeLogLine($value) . "\".";
|
Log3 $hash, 5, "Postprocessed value is \"" . dq($value) . "\".";
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
@ -174,9 +174,9 @@ ECMDDevice_EvalCommand($$$)
|
|||||||
|
|
||||||
if($command) {
|
if($command) {
|
||||||
$_= $value;
|
$_= $value;
|
||||||
Log3 $hash, 5, "Postprocessing \"" . escapeLogLine($value) . "\" with perl command $command.";
|
Log3 $hash, 5, "Postprocessing \"" . dq($value) . "\" with perl command $command.";
|
||||||
$value= AnalyzePerlCommand(undef, $command);
|
$value= AnalyzePerlCommand(undef, $command);
|
||||||
Log3 $hash, 5, "Postprocessed value is \"" . escapeLogLine($value) . "\".";
|
Log3 $hash, 5, "Postprocessed value is \"" . dq($value) . "\".";
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user