mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
49_SSCam: further optimize memory usage when send recordings by email and/or telegram
git-svn-id: https://svn.fhem.de/fhem/trunk@20353 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6035ad6081
commit
9aa74606f3
@ -1,5 +1,7 @@
|
|||||||
# 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.
|
||||||
|
- change: 49_SSCam: further optimize memory usage when send recordings by
|
||||||
|
email and/or telegram
|
||||||
- feature: 70_ZoneMinder: added support for ZoneMinder 1.32
|
- feature: 70_ZoneMinder: added support for ZoneMinder 1.32
|
||||||
- feature: 72_FB_CALLLIST: new set command to remove a specific item from list
|
- feature: 72_FB_CALLLIST: new set command to remove a specific item from list
|
||||||
- change: 49_SSCam: optimize memory usage when send images and recordings by
|
- change: 49_SSCam: optimize memory usage when send images and recordings by
|
||||||
|
@ -48,6 +48,7 @@ eval "use FHEM::Meta;1" or my $modMetaAbsent = 1;
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %SSCam_vNotesIntern = (
|
our %SSCam_vNotesIntern = (
|
||||||
|
"8.19.4" => "11.10.2019 further optimize memory usage when send recordings by email and/or telegram ",
|
||||||
"8.19.3" => "09.10.2019 optimize memory usage when send images and recordings by email and/or telegram ",
|
"8.19.3" => "09.10.2019 optimize memory usage when send images and recordings by email and/or telegram ",
|
||||||
"8.19.2" => "06.10.2019 delete key/value pairs in SSCam_extractForTelegram and SSCam_sendEmailblocking, ".
|
"8.19.2" => "06.10.2019 delete key/value pairs in SSCam_extractForTelegram and SSCam_sendEmailblocking, ".
|
||||||
"change datacontainer of SNAPHASH(OLD) from %defs to %data ",
|
"change datacontainer of SNAPHASH(OLD) from %defs to %data ",
|
||||||
@ -937,12 +938,10 @@ sub SSCam_Set($@) {
|
|||||||
$hash->{HELPER}{TELERECMSG} = $teletxt;
|
$hash->{HELPER}{TELERECMSG} = $teletxt;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_camstartrec($hash);
|
SSCam_camstartrec("$name!_!$emtxt!_!$teletxt");
|
||||||
|
|
||||||
} elsif ($opt eq "off" && SSCam_IsModelCam($hash)) {
|
} elsif ($opt eq "off" && SSCam_IsModelCam($hash)) {
|
||||||
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
||||||
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?delete $hash->{HELPER}{SMTPRECMSG}:"";
|
|
||||||
my $teletxt = $hash->{HELPER}{TELERECMSG}?delete $hash->{HELPER}{TELERECMSG}:"";
|
|
||||||
|
|
||||||
my $spec = join(" ",@a);
|
my $spec = join(" ",@a);
|
||||||
if($spec =~ /STRM:/) {
|
if($spec =~ /STRM:/) {
|
||||||
@ -950,7 +949,7 @@ sub SSCam_Set($@) {
|
|||||||
$hash->{HELPER}{INFORM} = $1;
|
$hash->{HELPER}{INFORM} = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_camstoprec("$name!_!$emtxt!_!$teletxt");
|
SSCam_camstoprec($hash);
|
||||||
|
|
||||||
} elsif ($opt eq "snap" && SSCam_IsModelCam($hash)) {
|
} elsif ($opt eq "snap" && SSCam_IsModelCam($hash)) {
|
||||||
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
||||||
@ -2062,8 +2061,7 @@ sub SSCam_initonboot ($) {
|
|||||||
# check ob alle Recordings = "Stop" nach Reboot -> sonst stoppen
|
# check ob alle Recordings = "Stop" nach Reboot -> sonst stoppen
|
||||||
if (ReadingsVal($hash->{NAME}, "Record", "Stop") eq "Start") {
|
if (ReadingsVal($hash->{NAME}, "Record", "Stop") eq "Start") {
|
||||||
Log3($name, 2, "$name - Recording of $hash->{CAMNAME} seems to be still active after FHEM restart - try to stop it now");
|
Log3($name, 2, "$name - Recording of $hash->{CAMNAME} seems to be still active after FHEM restart - try to stop it now");
|
||||||
my ($emtxt,$teletxt) = ("","");
|
SSCam_camstoprec($hash);
|
||||||
SSCam_camstoprec("$name!_!$emtxt!_!$teletxt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Konfiguration der Synology Surveillance Station abrufen
|
# Konfiguration der Synology Surveillance Station abrufen
|
||||||
@ -2329,9 +2327,10 @@ return undef;
|
|||||||
# Kamera Aufnahme starten
|
# Kamera Aufnahme starten
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub SSCam_camstartrec ($) {
|
sub SSCam_camstartrec ($) {
|
||||||
my ($hash) = @_;
|
my ($str) = @_;
|
||||||
|
my ($name,$emtxt,$teletxt) = split("!_!",$str);
|
||||||
|
my $hash = $defs{$name};
|
||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
my $name = $hash->{NAME};
|
|
||||||
my $errorcode;
|
my $errorcode;
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
@ -2369,11 +2368,18 @@ sub SSCam_camstartrec ($) {
|
|||||||
$hash->{OPMODE} = "Start";
|
$hash->{OPMODE} = "Start";
|
||||||
$hash->{HELPER}{LOGINRETRIES} = 0;
|
$hash->{HELPER}{LOGINRETRIES} = 0;
|
||||||
|
|
||||||
|
if($emtxt || $teletxt) {
|
||||||
|
$hash->{HELPER}{CANSENDREC} = 1 if($emtxt); # Versand Aufnahme soll per Email erfolgen
|
||||||
|
$hash->{HELPER}{CANTELEREC} = 1 if($teletxt); # Versand Aufnahme soll per TelegramBot erfolgen
|
||||||
|
$hash->{HELPER}{SMTPRECMSG} = $emtxt if($emtxt); # Text für Email-Versand
|
||||||
|
$hash->{HELPER}{TELERECMSG} = $teletxt if($teletxt); # Text für Telegram-Versand
|
||||||
|
}
|
||||||
|
|
||||||
SSCam_setActiveToken($hash);
|
SSCam_setActiveToken($hash);
|
||||||
SSCam_getapisites($hash);
|
SSCam_getapisites($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+0.3, "SSCam_camstartrec", $hash);
|
InternalTimer(gettimeofday()+0.3, "SSCam_camstartrec", "$name!_!$emtxt!_!$teletxt", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2381,10 +2387,9 @@ sub SSCam_camstartrec ($) {
|
|||||||
# Kamera Aufnahme stoppen
|
# Kamera Aufnahme stoppen
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub SSCam_camstoprec ($) {
|
sub SSCam_camstoprec ($) {
|
||||||
my ($str) = @_;
|
my ($hash) = @_;
|
||||||
my ($name,$emtxt,$teletxt) = split("!_!",$str);
|
|
||||||
my $hash = $defs{$name};
|
|
||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
|
my $name = $hash->{NAME};
|
||||||
my $errorcode;
|
my $errorcode;
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
@ -2419,18 +2424,12 @@ sub SSCam_camstoprec ($) {
|
|||||||
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
||||||
$hash->{OPMODE} = "Stop";
|
$hash->{OPMODE} = "Stop";
|
||||||
$hash->{HELPER}{LOGINRETRIES} = 0;
|
$hash->{HELPER}{LOGINRETRIES} = 0;
|
||||||
if($emtxt || $teletxt) {
|
|
||||||
$hash->{HELPER}{CANSENDREC} = 1 if($emtxt); # Versand Aufnahme soll per Email erfolgen
|
|
||||||
$hash->{HELPER}{CANTELEREC} = 1 if($teletxt); # Versand Aufnahme soll per TelegramBot erfolgen
|
|
||||||
$hash->{HELPER}{SMTPRECMSG} = $emtxt if($emtxt); # Text für Email-Versand
|
|
||||||
$hash->{HELPER}{TELERECMSG} = $teletxt if($teletxt); # Text für Telegram-Versand
|
|
||||||
}
|
|
||||||
|
|
||||||
SSCam_setActiveToken($hash);
|
SSCam_setActiveToken($hash);
|
||||||
SSCam_getapisites($hash);
|
SSCam_getapisites($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+0.3, "SSCam_camstoprec", "$name!_!$emtxt!_!$teletxt", 0);
|
InternalTimer(gettimeofday()+0.3, "SSCam_camstoprec", $hash, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5101,7 +5100,7 @@ sub SSCam_camop_parse ($) {
|
|||||||
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?$hash->{HELPER}{SMTPRECMSG}:"";
|
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?$hash->{HELPER}{SMTPRECMSG}:"";
|
||||||
my $teletxt = $hash->{HELPER}{TELERECMSG}?$hash->{HELPER}{TELERECMSG}:"";
|
my $teletxt = $hash->{HELPER}{TELERECMSG}?$hash->{HELPER}{TELERECMSG}:"";
|
||||||
RemoveInternalTimer($hash, "SSCam_camstoprec");
|
RemoveInternalTimer($hash, "SSCam_camstoprec");
|
||||||
InternalTimer(gettimeofday()+$rectime, "SSCam_camstoprec", "$name!_!$emtxt!_!$teletxt");
|
InternalTimer(gettimeofday()+$rectime, "SSCam_camstoprec", $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
||||||
@ -5143,13 +5142,16 @@ sub SSCam_camop_parse ($) {
|
|||||||
$hash->{HELPER}{TRANSACTION} = "fake_recsend"; # fake Transaction Device setzen
|
$hash->{HELPER}{TRANSACTION} = "fake_recsend"; # fake Transaction Device setzen
|
||||||
my $tac = SSCam_openOrgetTrans($hash); # Transaktion vorhandenen Code (fake_recsend)
|
my $tac = SSCam_openOrgetTrans($hash); # Transaktion vorhandenen Code (fake_recsend)
|
||||||
|
|
||||||
|
# Cache initialisieren
|
||||||
|
if($hash->{HELPER}{CANSENDREC}) {
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{recid} = $recid;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{recid} = $recid;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{createdTm} = $createdTm;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{createdTm} = $createdTm;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{fileName} = $fileName;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{fileName} = $fileName;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{imageData} = $myjson;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{imageData} = $myjson;
|
||||||
Log3($name,4, "$name - Recording '$sn' added to send recording hash: ID => $recid, File => $fileName, Created => $createdTm");
|
Log3($name,4, "$name - Recording '$sn' added to send recording hash: ID => $recid, File => $fileName, Created => $createdTm");
|
||||||
|
}
|
||||||
|
|
||||||
# prüfen ob Recording als Email / Telegram versendet werden soll
|
# Recording als Email / Telegram versenden
|
||||||
SSCam_prepareSendData ($hash, $OpMode, $data{SSCam}{$name}{SENDRECS}{$tac});
|
SSCam_prepareSendData ($hash, $OpMode, $data{SSCam}{$name}{SENDRECS}{$tac});
|
||||||
|
|
||||||
SSCam_closeTrans ($hash); # Transaktion beenden
|
SSCam_closeTrans ($hash); # Transaktion beenden
|
||||||
|
@ -48,6 +48,7 @@ eval "use FHEM::Meta;1" or my $modMetaAbsent = 1;
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %SSCam_vNotesIntern = (
|
our %SSCam_vNotesIntern = (
|
||||||
|
"8.19.4" => "11.10.2019 further optimize memory usage when send recordings by email and/or telegram ",
|
||||||
"8.19.3" => "09.10.2019 optimize memory usage when send images and recordings by email and/or telegram ",
|
"8.19.3" => "09.10.2019 optimize memory usage when send images and recordings by email and/or telegram ",
|
||||||
"8.19.2" => "06.10.2019 delete key/value pairs in SSCam_extractForTelegram and SSCam_sendEmailblocking, ".
|
"8.19.2" => "06.10.2019 delete key/value pairs in SSCam_extractForTelegram and SSCam_sendEmailblocking, ".
|
||||||
"change datacontainer of SNAPHASH(OLD) from %defs to %data ",
|
"change datacontainer of SNAPHASH(OLD) from %defs to %data ",
|
||||||
@ -937,12 +938,10 @@ sub SSCam_Set($@) {
|
|||||||
$hash->{HELPER}{TELERECMSG} = $teletxt;
|
$hash->{HELPER}{TELERECMSG} = $teletxt;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_camstartrec($hash);
|
SSCam_camstartrec("$name!_!$emtxt!_!$teletxt");
|
||||||
|
|
||||||
} elsif ($opt eq "off" && SSCam_IsModelCam($hash)) {
|
} elsif ($opt eq "off" && SSCam_IsModelCam($hash)) {
|
||||||
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
||||||
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?delete $hash->{HELPER}{SMTPRECMSG}:"";
|
|
||||||
my $teletxt = $hash->{HELPER}{TELERECMSG}?delete $hash->{HELPER}{TELERECMSG}:"";
|
|
||||||
|
|
||||||
my $spec = join(" ",@a);
|
my $spec = join(" ",@a);
|
||||||
if($spec =~ /STRM:/) {
|
if($spec =~ /STRM:/) {
|
||||||
@ -950,7 +949,7 @@ sub SSCam_Set($@) {
|
|||||||
$hash->{HELPER}{INFORM} = $1;
|
$hash->{HELPER}{INFORM} = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_camstoprec("$name!_!$emtxt!_!$teletxt");
|
SSCam_camstoprec($hash);
|
||||||
|
|
||||||
} elsif ($opt eq "snap" && SSCam_IsModelCam($hash)) {
|
} elsif ($opt eq "snap" && SSCam_IsModelCam($hash)) {
|
||||||
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
|
||||||
@ -2062,8 +2061,7 @@ sub SSCam_initonboot ($) {
|
|||||||
# check ob alle Recordings = "Stop" nach Reboot -> sonst stoppen
|
# check ob alle Recordings = "Stop" nach Reboot -> sonst stoppen
|
||||||
if (ReadingsVal($hash->{NAME}, "Record", "Stop") eq "Start") {
|
if (ReadingsVal($hash->{NAME}, "Record", "Stop") eq "Start") {
|
||||||
Log3($name, 2, "$name - Recording of $hash->{CAMNAME} seems to be still active after FHEM restart - try to stop it now");
|
Log3($name, 2, "$name - Recording of $hash->{CAMNAME} seems to be still active after FHEM restart - try to stop it now");
|
||||||
my ($emtxt,$teletxt) = ("","");
|
SSCam_camstoprec($hash);
|
||||||
SSCam_camstoprec("$name!_!$emtxt!_!$teletxt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Konfiguration der Synology Surveillance Station abrufen
|
# Konfiguration der Synology Surveillance Station abrufen
|
||||||
@ -2329,9 +2327,10 @@ return undef;
|
|||||||
# Kamera Aufnahme starten
|
# Kamera Aufnahme starten
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub SSCam_camstartrec ($) {
|
sub SSCam_camstartrec ($) {
|
||||||
my ($hash) = @_;
|
my ($str) = @_;
|
||||||
|
my ($name,$emtxt,$teletxt) = split("!_!",$str);
|
||||||
|
my $hash = $defs{$name};
|
||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
my $name = $hash->{NAME};
|
|
||||||
my $errorcode;
|
my $errorcode;
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
@ -2369,11 +2368,18 @@ sub SSCam_camstartrec ($) {
|
|||||||
$hash->{OPMODE} = "Start";
|
$hash->{OPMODE} = "Start";
|
||||||
$hash->{HELPER}{LOGINRETRIES} = 0;
|
$hash->{HELPER}{LOGINRETRIES} = 0;
|
||||||
|
|
||||||
|
if($emtxt || $teletxt) {
|
||||||
|
$hash->{HELPER}{CANSENDREC} = 1 if($emtxt); # Versand Aufnahme soll per Email erfolgen
|
||||||
|
$hash->{HELPER}{CANTELEREC} = 1 if($teletxt); # Versand Aufnahme soll per TelegramBot erfolgen
|
||||||
|
$hash->{HELPER}{SMTPRECMSG} = $emtxt if($emtxt); # Text für Email-Versand
|
||||||
|
$hash->{HELPER}{TELERECMSG} = $teletxt if($teletxt); # Text für Telegram-Versand
|
||||||
|
}
|
||||||
|
|
||||||
SSCam_setActiveToken($hash);
|
SSCam_setActiveToken($hash);
|
||||||
SSCam_getapisites($hash);
|
SSCam_getapisites($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+0.3, "SSCam_camstartrec", $hash);
|
InternalTimer(gettimeofday()+0.3, "SSCam_camstartrec", "$name!_!$emtxt!_!$teletxt", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2381,10 +2387,9 @@ sub SSCam_camstartrec ($) {
|
|||||||
# Kamera Aufnahme stoppen
|
# Kamera Aufnahme stoppen
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub SSCam_camstoprec ($) {
|
sub SSCam_camstoprec ($) {
|
||||||
my ($str) = @_;
|
my ($hash) = @_;
|
||||||
my ($name,$emtxt,$teletxt) = split("!_!",$str);
|
|
||||||
my $hash = $defs{$name};
|
|
||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
|
my $name = $hash->{NAME};
|
||||||
my $errorcode;
|
my $errorcode;
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
@ -2419,18 +2424,12 @@ sub SSCam_camstoprec ($) {
|
|||||||
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
||||||
$hash->{OPMODE} = "Stop";
|
$hash->{OPMODE} = "Stop";
|
||||||
$hash->{HELPER}{LOGINRETRIES} = 0;
|
$hash->{HELPER}{LOGINRETRIES} = 0;
|
||||||
if($emtxt || $teletxt) {
|
|
||||||
$hash->{HELPER}{CANSENDREC} = 1 if($emtxt); # Versand Aufnahme soll per Email erfolgen
|
|
||||||
$hash->{HELPER}{CANTELEREC} = 1 if($teletxt); # Versand Aufnahme soll per TelegramBot erfolgen
|
|
||||||
$hash->{HELPER}{SMTPRECMSG} = $emtxt if($emtxt); # Text für Email-Versand
|
|
||||||
$hash->{HELPER}{TELERECMSG} = $teletxt if($teletxt); # Text für Telegram-Versand
|
|
||||||
}
|
|
||||||
|
|
||||||
SSCam_setActiveToken($hash);
|
SSCam_setActiveToken($hash);
|
||||||
SSCam_getapisites($hash);
|
SSCam_getapisites($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+0.3, "SSCam_camstoprec", "$name!_!$emtxt!_!$teletxt", 0);
|
InternalTimer(gettimeofday()+0.3, "SSCam_camstoprec", $hash, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5101,7 +5100,7 @@ sub SSCam_camop_parse ($) {
|
|||||||
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?$hash->{HELPER}{SMTPRECMSG}:"";
|
my $emtxt = $hash->{HELPER}{SMTPRECMSG}?$hash->{HELPER}{SMTPRECMSG}:"";
|
||||||
my $teletxt = $hash->{HELPER}{TELERECMSG}?$hash->{HELPER}{TELERECMSG}:"";
|
my $teletxt = $hash->{HELPER}{TELERECMSG}?$hash->{HELPER}{TELERECMSG}:"";
|
||||||
RemoveInternalTimer($hash, "SSCam_camstoprec");
|
RemoveInternalTimer($hash, "SSCam_camstoprec");
|
||||||
InternalTimer(gettimeofday()+$rectime, "SSCam_camstoprec", "$name!_!$emtxt!_!$teletxt");
|
InternalTimer(gettimeofday()+$rectime, "SSCam_camstoprec", $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
||||||
@ -5143,13 +5142,16 @@ sub SSCam_camop_parse ($) {
|
|||||||
$hash->{HELPER}{TRANSACTION} = "fake_recsend"; # fake Transaction Device setzen
|
$hash->{HELPER}{TRANSACTION} = "fake_recsend"; # fake Transaction Device setzen
|
||||||
my $tac = SSCam_openOrgetTrans($hash); # Transaktion vorhandenen Code (fake_recsend)
|
my $tac = SSCam_openOrgetTrans($hash); # Transaktion vorhandenen Code (fake_recsend)
|
||||||
|
|
||||||
|
# Cache initialisieren
|
||||||
|
if($hash->{HELPER}{CANSENDREC}) {
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{recid} = $recid;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{recid} = $recid;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{createdTm} = $createdTm;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{createdTm} = $createdTm;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{fileName} = $fileName;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{fileName} = $fileName;
|
||||||
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{imageData} = $myjson;
|
$data{SSCam}{$name}{SENDRECS}{$tac}{$sn}{imageData} = $myjson;
|
||||||
Log3($name,4, "$name - Recording '$sn' added to send recording hash: ID => $recid, File => $fileName, Created => $createdTm");
|
Log3($name,4, "$name - Recording '$sn' added to send recording hash: ID => $recid, File => $fileName, Created => $createdTm");
|
||||||
|
}
|
||||||
|
|
||||||
# prüfen ob Recording als Email / Telegram versendet werden soll
|
# Recording als Email / Telegram versenden
|
||||||
SSCam_prepareSendData ($hash, $OpMode, $data{SSCam}{$name}{SENDRECS}{$tac});
|
SSCam_prepareSendData ($hash, $OpMode, $data{SSCam}{$name}{SENDRECS}{$tac});
|
||||||
|
|
||||||
SSCam_closeTrans ($hash); # Transaktion beenden
|
SSCam_closeTrans ($hash); # Transaktion beenden
|
||||||
|
Loading…
x
Reference in New Issue
Block a user