diff --git a/fhem/FHEM/66_ECMD.pm b/fhem/FHEM/66_ECMD.pm index 4e2d9f3d3..b842ee76b 100644 --- a/fhem/FHEM/66_ECMD.pm +++ b/fhem/FHEM/66_ECMD.pm @@ -642,7 +642,7 @@ ECMD_Write($$$) $answer= ECMD_SimpleExpect($hash, $msg, $expect); $answer= "" unless(defined($answer)); ECMD_Log $hash, 5, "received answer " . dq($answer); - $answer.= $responseSeparator if($#ecmds>0); + $answer.= $responseSeparator if(defined($responseSeparator) && ($#ecmds>0)); $ret.= $answer; } else { 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 command string is split at all 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.
  • responseSeparator <separator>
    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. diff --git a/fhem/FHEM/67_ECMDDevice.pm b/fhem/FHEM/67_ECMDDevice.pm index 4aa7f745f..852cb175c 100644 --- a/fhem/FHEM/67_ECMDDevice.pm +++ b/fhem/FHEM/67_ECMDDevice.pm @@ -160,9 +160,9 @@ ECMDDevice_PostProc($$$%) if($postproc) { my $command= ECMDDevice_ReplaceSpecials($postproc, %specials); $_= $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); - Log3 $hash, 5, "Postprocessed value is \"" . escapeLogLine($value) . "\"."; + Log3 $hash, 5, "Postprocessed value is \"" . dq($value) . "\"."; } return $value; } @@ -174,9 +174,9 @@ ECMDDevice_EvalCommand($$$) if($command) { $_= $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); - Log3 $hash, 5, "Postprocessed value is \"" . escapeLogLine($value) . "\"."; + Log3 $hash, 5, "Postprocessed value is \"" . dq($value) . "\"."; } return $value; }