mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
49_SSCam: "uninitialized value in pattern ..." on fhem start
git-svn-id: https://svn.fhem.de/fhem/trunk@14815 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8967240f2e
commit
001c0c9b69
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 49_SSCam: "uninitialized value in pattern ..." at fhem start
|
||||||
- feature: 49_SSCam: V2.4.0, new commands "snapinfo" and
|
- feature: 49_SSCam: V2.4.0, new commands "snapinfo" and
|
||||||
"runView lastsnap_fw", minor fixes
|
"runView lastsnap_fw", minor fixes
|
||||||
- feature: 93_DbLog: V2.22.0, new attribute "addStateEvent"
|
- feature: 93_DbLog: V2.22.0, new attribute "addStateEvent"
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#########################################################################################################################
|
#########################################################################################################################
|
||||||
# Versions History:
|
# Versions History:
|
||||||
#
|
#
|
||||||
|
# 2.4.1 29.07.2017 fix behavior of state when starting lastsnap_fw, fix "uninitialized value in pattern match (m//)
|
||||||
|
# at ./FHEM/49_SSCam.pm line 2895"
|
||||||
# 2.4.0 28.07.2017 new set command runView lastsnap_fw, commandref revised, minor fixes
|
# 2.4.0 28.07.2017 new set command runView lastsnap_fw, commandref revised, minor fixes
|
||||||
# 2.3.2 28.07.2017 code change of getcaminfo (params of Interaltimer)
|
# 2.3.2 28.07.2017 code change of getcaminfo (params of Interaltimer)
|
||||||
# 2.3.1 28.07.2017 code review creating log entries when pollnologging is set/unset
|
# 2.3.1 28.07.2017 code review creating log entries when pollnologging is set/unset
|
||||||
@ -176,7 +178,7 @@ use Time::HiRes;
|
|||||||
use HttpUtils;
|
use HttpUtils;
|
||||||
# no if $] >= 5.017011, warnings => 'experimental';
|
# no if $] >= 5.017011, warnings => 'experimental';
|
||||||
|
|
||||||
my $SSCamVersion = "2.4.0";
|
my $SSCamVersion = "2.4.1";
|
||||||
|
|
||||||
# Aufbau Errorcode-Hashes (siehe Surveillance Station Web API)
|
# Aufbau Errorcode-Hashes (siehe Surveillance Station Web API)
|
||||||
my %SSCam_errauthlist = (
|
my %SSCam_errauthlist = (
|
||||||
@ -1286,15 +1288,13 @@ sub stopliveview ($) {
|
|||||||
|
|
||||||
# Reading LiveStreamUrl löschen
|
# Reading LiveStreamUrl löschen
|
||||||
delete($defs{$name}{READINGS}{LiveStreamUrl}) if ($defs{$name}{READINGS}{LiveStreamUrl});
|
delete($defs{$name}{READINGS}{LiveStreamUrl}) if ($defs{$name}{READINGS}{LiveStreamUrl});
|
||||||
# kurzer state-switch -> Browser aktualisieren
|
# Longpoll refresh
|
||||||
readingsSingleUpdate($hash,"state","stopview",1);
|
readingsSingleUpdate($hash,"state","stopview",1);
|
||||||
|
|
||||||
# vorhandenen Aufnahmestatus wieder herstellen
|
# Aufnahmestatus im state abbilden
|
||||||
if (ReadingsVal("$name", "Record", "") eq "Start") {
|
my $st;
|
||||||
readingsSingleUpdate( $hash,"state", "on", 1);
|
(ReadingsVal("$name", "Record", "") eq "Start")?$st="on":$st="off";
|
||||||
} else {
|
readingsSingleUpdate($hash,"state", $st, 1);
|
||||||
readingsSingleUpdate($hash,"state", "off", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$hash->{HELPER}{ACTIVE} = "off";
|
$hash->{HELPER}{ACTIVE} = "off";
|
||||||
if ($attr{$name}{debugactivetoken}) {
|
if ($attr{$name}{debugactivetoken}) {
|
||||||
@ -2632,11 +2632,10 @@ sub sscam_camop ($) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ReadingsVal("$name", "Record", "") eq "Start") {
|
# Aufnahmestatus in state abbilden mit Longpoll refresh
|
||||||
readingsSingleUpdate( $hash,"state", "on", 1);
|
my $st;
|
||||||
} else {
|
(ReadingsVal("$name", "Record", "") eq "Start")?$st="on":$st="off";
|
||||||
readingsSingleUpdate($hash,"state", "off", 1);
|
readingsSingleUpdate($hash,"state", $st, 1);
|
||||||
}
|
|
||||||
|
|
||||||
$hash->{HELPER}{ACTIVE} = "off";
|
$hash->{HELPER}{ACTIVE} = "off";
|
||||||
if ($attr{$name}{debugactivetoken}) {
|
if ($attr{$name}{debugactivetoken}) {
|
||||||
@ -2881,14 +2880,6 @@ sub sscam_camop_parse ($) {
|
|||||||
Log3($name,5, "$name - Snap '$key': ID => $allsnaps{$key}{snapid}, File => $allsnaps{$key}{fileName}, Created => $allsnaps{$key}{createdTm}");
|
Log3($name,5, "$name - Snap '$key': ID => $allsnaps{$key}{snapid}, File => $allsnaps{$key}{fileName}, Created => $allsnaps{$key}{createdTm}");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Schnapschuss soll als liveView angezeigt werden (mindestens 1 Bild vorhanden)
|
|
||||||
if ($hash->{HELPER}{RUNVIEW} =~ /snap/ && exists($allsnaps{0}{imageData})) {
|
|
||||||
delete $hash->{HELPER}{RUNVIEW};
|
|
||||||
$hash->{HELPER}{LINK} = $allsnaps{0}{imageData};
|
|
||||||
# Browserrefresh
|
|
||||||
DoTrigger($name,"startview");
|
|
||||||
}
|
|
||||||
|
|
||||||
my $lsid = exists($allsnaps{0}{snapid})?$allsnaps{0}{snapid}:"n.a.";
|
my $lsid = exists($allsnaps{0}{snapid})?$allsnaps{0}{snapid}:"n.a.";
|
||||||
my $lfname = exists($allsnaps{0}{fileName})?$allsnaps{0}{fileName}:"n.a.";
|
my $lfname = exists($allsnaps{0}{fileName})?$allsnaps{0}{fileName}:"n.a.";
|
||||||
my $lstime = exists($allsnaps{0}{createdTm})?$allsnaps{0}{createdTm}:"n.a.";
|
my $lstime = exists($allsnaps{0}{createdTm})?$allsnaps{0}{createdTm}:"n.a.";
|
||||||
@ -2901,9 +2892,23 @@ sub sscam_camop_parse ($) {
|
|||||||
readingsBulkUpdate($hash,"LastSnapTime", $lstime);
|
readingsBulkUpdate($hash,"LastSnapTime", $lstime);
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
|
|
||||||
|
# Schnapschuss soll als liveView angezeigt werden (mindestens 1 Bild vorhanden)
|
||||||
|
if (exists($hash->{HELPER}{RUNVIEW}) && $hash->{HELPER}{RUNVIEW} =~ /snap/ && exists($allsnaps{0}{imageData})) {
|
||||||
|
delete $hash->{HELPER}{RUNVIEW};
|
||||||
|
# Aufnahmestatus in state abbilden
|
||||||
|
my $st;
|
||||||
|
(ReadingsVal("$name", "Record", "") eq "Start")?$st="on":$st="off";
|
||||||
|
readingsSingleUpdate($hash,"state", $st, 1);
|
||||||
|
|
||||||
|
$hash->{HELPER}{LINK} = $allsnaps{0}{imageData};
|
||||||
|
# Longpoll refresh
|
||||||
|
DoTrigger($name,"startview");
|
||||||
|
}
|
||||||
|
|
||||||
# Logausgabe
|
# Logausgabe
|
||||||
Log3($name, $verbose, "$name - Snapinfos of Camera $camname have been retrieved successfully");
|
Log3($name, $verbose, "$name - Snapinfos of Camera $camname have been retrieved successfully");
|
||||||
|
|
||||||
|
|
||||||
} elsif ($OpMode eq "getsnapfilename") {
|
} elsif ($OpMode eq "getsnapfilename") {
|
||||||
# den Filenamen eines Schnapschusses ermitteln
|
# den Filenamen eines Schnapschusses ermitteln
|
||||||
$snapid = ReadingsVal("$name", "LastSnapId", " ");
|
$snapid = ReadingsVal("$name", "LastSnapId", " ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user