From 60ff65f1c6119a19ed6e09d11a0af7909c6e5d81 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 1 Oct 2017 07:54:45 +0000 Subject: [PATCH] 49_SSCam: V3.1.0, move extevent from CAM- to SVS-model, Reading PollState enhanced, minor fixes git-svn-id: https://svn.fhem.de/fhem/trunk@15157 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/49_SSCam.pm | 46 +++++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index e48ca3f1a..7bf3eeb69 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # 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. + - feature: 49_SSCam: V3.1.0, move extevent from CAM- to SVS-model, Reading + PollState enhanced, minor fixes - change: 93_DBLog: V2.22.8, avoid multiple entries of Device:Reading-combinations in Dopdown-list when creating SVG diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index f016ad7c1..afc870194 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -27,6 +27,7 @@ ######################################################################################################################### # Versions History: # +# 3.1.0 26.09.2017 move extevent from CAM to SVS model, Reading PollState enhanced for CAM-Model, minor fixes # 3.0.0 23.09.2017 Internal MODEL SVS or CAM -> distinguish/support Cams and SVS in different devices # new comand get storedCredentials, commandref revised # 2.9.0 20.09.2017 new function get homeModeState, minor fixes at simu_SVSversion, commandref revised @@ -199,7 +200,7 @@ use Time::HiRes; use HttpUtils; # no if $] >= 5.017011, warnings => 'experimental'; -my $SSCamVersion = "3.0.0"; +my $SSCamVersion = "3.1.0"; # Aufbau Errorcode-Hashes (siehe Surveillance Station Web API) my %SSCam_errauthlist = ( @@ -548,7 +549,6 @@ sub SSCam_Set { "disable ". "runView:live_fw,live_link,live_open,lastrec_fw,lastrec_open,lastsnap_fw ". "stopView:noArg ". - "extevent:1,2,3,4,5,6,7,8,9,10 ". ((ReadingsVal("$name", "CapPTZPan", "false") ne "false") ? "runPatrol:".ReadingsVal("$name", "Patrols", "")." " : ""). ((ReadingsVal("$name", "CapPTZPan", "false") ne "false") ? "goPreset:".ReadingsVal("$name", "Presets", "")." " : ""). ((ReadingsVal("$name", "CapPTZAbs", "false")) ? "goAbsPTZ"." " : ""). @@ -557,6 +557,7 @@ sub SSCam_Set { # setlist für SVS Devices $setlist = "Unknown argument $opt, choose one of ". "credentials ". + "extevent:1,2,3,4,5,6,7,8,9,10 ". ($hash->{HELPER}{APIHMMAXVER}?"homeMode:on,off ": ""); } @@ -784,7 +785,7 @@ sub SSCam_Set { } runliveview($hash); - } elsif ($opt eq "extevent" && IsModelCam($hash)) { + } elsif ($opt eq "extevent" && !IsModelCam($hash)) { if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";} $hash->{HELPER}{EVENTID} = $prop; @@ -855,7 +856,7 @@ sub SSCam_Get { # Credentials abrufen my ($success, $username, $password) = getcredentials($hash,0); unless ($success) {return "Credentials couldn't be retrieved successfully - see logfile"}; - return "Stored Credentials for - Username: $username, Password: $password"; + return "Stored Credentials for $name - Username: $username, Password: $password"; } elsif ($opt eq "snapGallery" && IsModelCam($hash)) { if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";} @@ -1784,7 +1785,8 @@ sub getcaminfoall { $now = FmtTime(gettimeofday()); $new = FmtTime(gettimeofday()+$attr{$name}{pollcaminfoall}); - readingsSingleUpdate($hash,"state","polling - next time: $new",1) if(!IsModelCam($hash)); # state für SVS-Device setzen + readingsSingleUpdate($hash,"state","polling",1) if(!IsModelCam($hash)); # state für SVS-Device setzen + readingsSingleUpdate($hash,"PollState","Active - next time: $new",1); if (!$attr{$name}{pollnologging}) { Log3($name, 3, "$name - Polling now: $now , next Polling: $new"); @@ -4469,7 +4471,7 @@ sub experror {

SSCam