From dcbd2c6ad150d53f68d48110b3c833bc51ba22d9 Mon Sep 17 00:00:00 2001 From: nasseeder1 <> Date: Sun, 6 Mar 2016 20:25:50 +0000 Subject: [PATCH] 49_SSCAM: Reading "CamLastRec" added which contains Path/name of last recording git-svn-id: https://svn.fhem.de/fhem/trunk@11018 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/49_SSCam.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index 4efd3c203..0d3cc49ba 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -3036,15 +3036,19 @@ sub camret_nonbl ($) { { my $eventnum = $data->{'data'}{'total'}; my $lastrecord = $data->{'data'}{'events'}[0]{name}; - my $lastrectime = $data->{'data'}{'events'}[0]{startTime}; - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($lastrectime); - $lastrectime = sprintf "%02d.%02d.%04d / %02d:%02d:%02d" , $mday , $mon+=1 ,$year+=1900 , $hour , $min , $sec ; + my $lastrecstarttime = $data->{'data'}{'events'}[0]{startTime}; + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($lastrecstarttime); + $lastrecstarttime = sprintf "%02d.%02d.%04d / %02d:%02d:%02d" , $mday , $mon+=1 ,$year+=1900 , $hour , $min , $sec ; + + my $lastrecstoptime = $data->{'data'}{'events'}[0]{stopTime}; + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($lastrecstoptime); + $lastrecstoptime = sprintf "%02d:%02d:%02d" , $hour , $min , $sec ; # Setreading readingsBeginUpdate($hash); readingsBulkUpdate($hash,"CamEventNum",$eventnum); readingsBulkUpdate($hash,"CamLastRec",$lastrecord); - readingsBulkUpdate($hash,"CamLastRecTime",$lastrectime); + readingsBulkUpdate($hash,"CamLastRecTime",$lastrecstarttime." - ". $lastrecstoptime); readingsBulkUpdate($hash,"Errorcode","none"); readingsBulkUpdate($hash,"Error","none"); readingsEndUpdate($hash, 1); @@ -4081,7 +4085,7 @@ return;
  • CamExposureMode
  • - current exposure mode (Day, Night, Auto, Schedule, Unknown)
  • CamIP
  • - IP-Address of Camera
  • CamLastRec
  • - Path / name of the last recording -
  • CamLastRecTime
  • - date / time of the last recording +
  • CamLastRecTime
  • - date / starttime / endtime of the last recording
  • CamLiveMode
  • - Source of Live-View (DS, Camera)
  • CamModel
  • - Model of camera
  • CamMotDetSc
  • - state of motion detection source (disabled, by camera, by SVS) @@ -4662,7 +4666,7 @@ return;
  • CamExposureMode
  • - aktueller Belichtungsmodus (Day, Night, Auto, Schedule, Unknown)
  • CamIP
  • - IP-Adresse der Kamera
  • CamLastRec
  • - Pfad / Name der letzten Aufnahme -
  • CamLastRecTime
  • - Datum / Startzeit der letzten Aufnahme +
  • CamLastRecTime
  • - Datum / Startzeit - Stopzeit der letzten Aufnahme
  • CamLiveMode
  • - Quelle für Live-Ansicht (DS, Camera)
  • CamModel
  • - Kameramodell
  • CamMotDetSc
  • - Status der Bewegungserkennung (disabled, durch Kamera, durch SVS)