diff --git a/fhem/CHANGED b/fhem/CHANGED index fbdaaf26c..00ed27fd5 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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: 49_IPCAM: fixed imageWithCallback using previous image - change: 49_IPCAM: added 'get imageWithCallback' - change: 49_IPCAM: now unblocking and removed attribute 'loglevel' - change: 76_SMAInverter: change the etoday management diff --git a/fhem/FHEM/49_IPCAM.pm b/fhem/FHEM/49_IPCAM.pm index cbbab5239..b94042cde 100644 --- a/fhem/FHEM/49_IPCAM.pm +++ b/fhem/FHEM/49_IPCAM.pm @@ -369,15 +369,10 @@ Get($@) { } elsif($arg eq "imageWithCallback") { my $callbackCommand = join(" ", @a); - Log3 $name, 5, "IPCAM ($name) - imageWithCallback command: $callbackCommand"; - my $error = AnalyzeCommand(undef, $callbackCommand); - if (defined $error) { - Log3 $name, 0, "IPCAM ($name) - imageWithCallback command invalid: $error"; - return undef; - } + Log3 $name, 0, "IPCAM ($name) - imageWithCallback command: $callbackCommand"; my $camUri = getSnapshot($hash, 1); - Log3 $name, 5, "IPCAM ($name) - imageWithCallback camUri: $camUri"; + Log3 $name, 0, "IPCAM ($name) - imageWithCallback camUri: $camUri"; RequestSnapshotWithCallback($hash, $camUri, $callbackCommand); @@ -568,7 +563,14 @@ sub RequestSnapshot_Callback { my $callbackCommand = $param->{callbackCommand}; if (defined $callbackCommand) { - Log3 $name, 5, "IPCAM ($name) - RequestSnapshotWithCallback executes $callbackCommand"; + Log3 $name, 0, "IPCAM ($name) - RequestSnapshotWithCallback executing $callbackCommand"; + + my $error = AnalyzeCommand(undef, $callbackCommand); + if (defined $error) { + Log3 $name, 0, "IPCAM ($name) - imageWithCallback command invalid: $error"; + return undef; + } + } }