diff --git a/fhem/contrib/DS_Starter/49_SSCam.pm b/fhem/contrib/DS_Starter/49_SSCam.pm index 442ece0ac..6b85b7990 100644 --- a/fhem/contrib/DS_Starter/49_SSCam.pm +++ b/fhem/contrib/DS_Starter/49_SSCam.pm @@ -47,7 +47,7 @@ use Encode; # Versions History intern our %SSCam_vNotesIntern = ( - "8.11.3" => "04.03.2019 avoid possible JSON errors ", + "8.11.3" => "04.03.2019 avoid possible JSON errors, fix fhem is hanging Forum: https://forum.fhem.de/index.php/topic,45671.msg915546.html#msg915546 ", "8.11.2" => "04.03.2019 bugfix no snapinfos when snap was done by SVS itself, Forum: https://forum.fhem.de/index.php/topic,45671.msg914685.html#msg914685", "8.11.1" => "28.02.2019 commandref revised, minor fixes ", "8.11.0" => "25.02.2019 changed compatibility check, compatibility to SVS version 8.2.3, Popup possible for \"generic\"-Streamdevices, ". @@ -1879,7 +1879,7 @@ sub SSCam_initonboot ($) { SSCam_getptzlistpatrol($hash); # Schnappschußgalerie abrufen oder nur Info des letzten Snaps - my ($slim,$ssize) = SSCam_snaplimsize($hash); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! + my ($slim,$ssize) = SSCam_snaplimsize($hash,1); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.9, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); } @@ -3247,7 +3247,7 @@ sub SSCam_getcaminfoall ($$) { InternalTimer(gettimeofday()+1.4, "SSCam_getstreamformat", $hash, 0); # Schnappschußgalerie abrufen (snapGalleryBoost) oder nur Info des letzten Snaps - my ($slim,$ssize) = SSCam_snaplimsize($hash); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! + my ($slim,$ssize) = SSCam_snaplimsize($hash,1); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+1.5, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); @@ -5238,6 +5238,10 @@ sub SSCam_camop_parse ($) { my ($k,$l) = (0,0); if(exists($data->{data}{data}[0]{createdTm})) { while ($data->{'data'}{'data'}[$k]) { + if(!$data->{'data'}{'data'}[$k]{'camName'}) { # Forum:#97706 + $k += 1; + next; + } if($data->{'data'}{'data'}[$k]{'camName'} ne $camname) { $k += 1; next; @@ -5294,6 +5298,10 @@ sub SSCam_camop_parse ($) { my %sendsnaps = (); # Schnappschuss Hash zum Versand wird leer erstellt while ($data->{'data'}{'data'}[$i]) { + if(!$data->{'data'}{'data'}[$i]{'camName'}) { # Forum:#97706 + $i += 1; + next; + } if($data->{'data'}{'data'}[$i]{'camName'} ne $camname) { $i += 1; next; @@ -5342,7 +5350,10 @@ sub SSCam_camop_parse ($) { $hash->{HELPER}{TOTALCNT} = $data->{data}{total}; # total Anzahl Schnappschüsse while ($data->{'data'}{'data'}[$i]) { - next if(!$data->{'data'}{'data'}[$i]{'camName'}); # Forum:#97706 + if(!$data->{'data'}{'data'}[$i]{'camName'}) { # Forum:#97706 + $i += 1; + next; + } if($data->{'data'}{'data'}[$i]{'camName'} ne $camname) { $i += 1; next;