2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

49_SSCAM: default recordtime 15 s is used if attribute "rectime"

is set to "0"

git-svn-id: https://svn.fhem.de/fhem/trunk@11045 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2016-03-12 09:32:17 +00:00
parent 0982664045
commit fb4d34cfe4
2 changed files with 12 additions and 4 deletions

View File

@ -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.
- bugfix: 49_SSCAM: default recordtime 15 s is used if attribute "rectime"
is set to "0"
- bugfix: YAMAHA_AVR: fix not working navigateListMenu under certain - bugfix: YAMAHA_AVR: fix not working navigateListMenu under certain
circumstances circumstances
- feature 73_GasCalculator: Last Day/Month/Year/Meter - readings implemented - feature 73_GasCalculator: Last Day/Month/Year/Meter - readings implemented

View File

@ -27,6 +27,7 @@
########################################################################################################## ##########################################################################################################
# Versions History: # Versions History:
# #
# 1.20.1 12.03.2016 bugfix: default recordtime 15 s is used if attribute "rectime" is set to "0"
# 1.20 09.03.2016 command "extevent" added # 1.20 09.03.2016 command "extevent" added
# 1.19.3 07.03.2016 bugfix "uninitialized value $lastrecstarttime", # 1.19.3 07.03.2016 bugfix "uninitialized value $lastrecstarttime",
# "uninitialized value $lastrecstoptime", # "uninitialized value $lastrecstoptime",
@ -117,7 +118,6 @@ use HttpUtils;
sub SSCam_Initialize($) { sub SSCam_Initialize($) {
# die Namen der Funktionen, die das Modul implementiert und die fhem.pl aufrufen soll
my ($hash) = @_; my ($hash) = @_;
$hash->{DefFn} = "SSCam_Define"; $hash->{DefFn} = "SSCam_Define";
$hash->{UndefFn} = "SSCam_Undef"; $hash->{UndefFn} = "SSCam_Undef";
@ -2602,14 +2602,20 @@ sub camret_nonbl ($) {
my $motdetsc; my $motdetsc;
# Die Aufnahmezeit setzen # Die Aufnahmezeit setzen
# wird "set <name> on-for-timer [rectime]" verwendet -> dann [rectime] nutzen, # wird "set <name> on [rectime]" verwendet -> dann [rectime] nutzen,
# sonst Attribut "rectime" wenn es gesetzt ist, falls nicht -> "RECTIME_DEF" # sonst Attribut "rectime" wenn es gesetzt ist, falls nicht -> "RECTIME_DEF"
if (defined($hash->{HELPER}{RECTIME_TEMP})) { if (defined($hash->{HELPER}{RECTIME_TEMP})) {
$rectime = delete $hash->{HELPER}{RECTIME_TEMP}; $rectime = delete $hash->{HELPER}{RECTIME_TEMP};
} }
else else
{ {
$rectime = $attr{$name}{rectime} ? $attr{$name}{rectime} : $hash->{HELPER}{RECTIME_DEF}; if (AttrVal($name, "rectime", undef) == 0) {
$rectime = 0;
}
else
{
$rectime = AttrVal($name, "rectime", undef) ? AttrVal($name, "rectime", undef) : $hash->{HELPER}{RECTIME_DEF};
}
} }
if ($err ne "") # wenn ein Fehler bei der HTTP Abfrage aufgetreten ist if ($err ne "") # wenn ein Fehler bei der HTTP Abfrage aufgetreten ist
@ -2665,7 +2671,7 @@ sub camret_nonbl ($) {
$logstr = "Time for Recording is set to: $rectime"; $logstr = "Time for Recording is set to: $rectime";
&printlog($hash,$logstr,"4"); &printlog($hash,$logstr,"4");
if ($rectime != "0") { if ($rectime != 0) {
# Stop der Aufnahme nach Ablauf $rectime, wenn rectime = 0 -> endlose Aufnahme # Stop der Aufnahme nach Ablauf $rectime, wenn rectime = 0 -> endlose Aufnahme
InternalTimer(gettimeofday()+$rectime, "camstoprec", $hash, 0); InternalTimer(gettimeofday()+$rectime, "camstoprec", $hash, 0);
} }