diff --git a/fhem/contrib/DS_Starter/49_SSCam.pm b/fhem/contrib/DS_Starter/49_SSCam.pm index d7dfad130..de4f7744b 100644 --- a/fhem/contrib/DS_Starter/49_SSCam.pm +++ b/fhem/contrib/DS_Starter/49_SSCam.pm @@ -1,5 +1,5 @@ ######################################################################################################################## -# $Id: 49_SSCam.pm 18538 2019-02-09 07:49:49Z DS_Starter $ +# $Id: 49_SSCam.pm 18744 2019-02-26 17:15:07Z DS_Starter $ ######################################################################################################################### # 49_SSCam.pm # @@ -47,7 +47,12 @@ use Encode; # Versions History intern our %SSCam_vNotesIntern = ( - "8.10.0" => "12.02.2019 send recordings integrated by telegram, a lot of internal changes for send telegrams ", + "8.11.2" => "28.02.2019 bugfix no snapinfos when snap was done by SVS itself, Forum: https://forum.fhem.de/index.php/topic,45671.msg914685.html#msg914685", + "8.11.1" => "28.02.2019 commandref revised, minor fixes ", + "8.11.0" => "25.02.2019 changed compatibility check, compatibility to SVS version 8.2.3, Popup possible for \"generic\"-Streamdevices, ". + "support for \"genericStrmHtmlTag\" in streaming devices ", + "8.10.1" => "19.02.2019 fix warning when starting fhem, and Forum:#97706", + "8.10.0" => "15.02.2019 send recordings integrated by telegram, a lot of internal changes for send telegrams ", "8.9.2" => "05.02.2019 sub SSCam_sendTelegram changed ", "8.9.1" => "05.02.2019 sub SSCam_snaplimsize changed ", "8.9.0" => "05.02.2019 new streaming device type \"lastsnap\" ", @@ -130,7 +135,9 @@ our %SSCam_vNotesIntern = ( # Versions History extern our %SSCam_vNotesExtern = ( - "8.10.0" => "12.02.2019 Possibility of send recordings by telegram is integrated as well as sending snapshots ", + "8.11.0" => "25.02.2019 compatibility set to SVS version 8.2.3, Popup possible for streaming devices of type \"generic\", ". + "support for \"genericStrmHtmlTag\" in streaming devices ", + "8.10.0" => "15.02.2019 Possibility of send recordings by telegram is integrated as well as sending snapshots ", "8.9.0" => "05.02.2019 A new streaming device type \"lastsnap\" was implemented. You can create such device with \"set ... createStreamDev lastsnap\". ". "This streaming device shows the newest snapshot which was taken. ", "8.8.0" => "01.02.2019 Snapshots can now be sent by telegramBot ", @@ -239,7 +246,7 @@ our %SSCam_vNotesExtern = ( ); # getestete SVS-Version -my $compstat = "8.2"; +my $compstat = "8.2.3"; # Aufbau Errorcode-Hashes (siehe Surveillance Station Web API) my %SSCam_errauthlist = ( @@ -333,7 +340,7 @@ use vars qw($FW_wname); # Web instance sub FW_pH(@); # add href use vars qw(%SSCam_vHintsExt_en); use vars qw(%SSCam_vHintsExt_de); - +sub SSCam_TBotSendIt($$$$$$$;$$$); ################################################################ sub SSCam_Initialize($) { @@ -592,7 +599,7 @@ sub SSCam_Attr($$$$) { $hash->{HELPER}{GETSNAPGALLERY} = 1; $slim = AttrVal($name,"snapGalleryNumber",$SSCam_slim); # Anzahl der abzurufenden Snaps $ssize = $do; - RemoveInternalTimer("SSCam_getsnapinfo"); + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.7, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); } } @@ -617,7 +624,7 @@ sub SSCam_Attr($$$$) { $slim = AttrVal($name,"snapGalleryNumber",$SSCam_slim); # Anzahl der abzurufenden Snaps my $sg = AttrVal($name,"snapGallerySize","Icon"); # Auflösung Image $ssize = ($sg eq "Icon")?1:2; - RemoveInternalTimer("SSCam_getsnapinfo"); + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.7, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); } } @@ -638,7 +645,7 @@ sub SSCam_Attr($$$$) { $hash->{HELPER}{GETSNAPGALLERY} = 1; my $sg = AttrVal($name,"snapGallerySize","Icon"); # Auflösung Image $ssize = ($sg eq "Icon")?1:2; - RemoveInternalTimer("SSCam_getsnapinfo"); + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.7, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); } @@ -1534,9 +1541,9 @@ sub SSCam_Get($@) { } } elsif ($opt eq "snapinfo" && SSCam_IsModelCam($hash)) { - # Schnappschußgalerie abrufen (snapGalleryBoost) oder nur Info des letzten Snaps + # Schnappschußgalerie abrufen oder nur Info des letzten Snaps if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";} - my ($slim,$ssize) = SSCam_snaplimsize($hash); + my ($slim,$ssize) = SSCam_snaplimsize($hash,1); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} gesetzt ! SSCam_getsnapinfo("$name:$slim:$ssize"); } elsif ($opt eq "snapfileinfo" && SSCam_IsModelCam($hash)) { @@ -1719,7 +1726,11 @@ sub SSCam_FWsummaryFn ($$$$) { $ret .= ""; if($wltype eq "image") { - $ret .= "
"; + if(SSCam_myVersion($hash) == 823 && ReadingsVal($name, "CamVideoType", "") !~ /MJPEG/) { + $ret .= "
Because SVS Version 8.2.3 is running the video format has to be set to MJPEG in SVS !

"; + } else { + $ret .= "
"; + } $ret .= "$imgstop "; $ret .= $imgblank; if($hash->{HELPER}{RUNVIEW} =~ /live_fw/) { @@ -1866,9 +1877,9 @@ sub SSCam_initonboot ($) { SSCam_getptzlistpreset($hash); SSCam_getptzlistpatrol($hash); - # Schnappschußgalerie abrufen (snapGalleryBoost) oder nur Info des letzten Snaps - my ($slim,$ssize) = SSCam_snaplimsize($hash); - RemoveInternalTimer("SSCam_getsnapinfo"); + # Schnappschußgalerie abrufen oder nur Info des letzten Snaps + my ($slim,$ssize) = SSCam_snaplimsize($hash,1); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.9, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); } SSCam_versionCheck($hash); # Einstieg in regelmäßigen Check Kompatibilität @@ -1899,7 +1910,7 @@ sub SSCam_versionCheck($) { if($cs eq "false") { Log3($name, 2, "$name - WARNING - The current/simulated SVS-version ".ReadingsVal($name, "SVSversion", ""). " may be incompatible with SSCam version $hash->{VERSION}. ". - "For further information execute \"get versionNotes 4\"."); + "For further information execute \"get $name versionNotes 4\"."); } InternalTimer(gettimeofday()+$rc, "SSCam_versionCheck", $hash, 0); @@ -1907,6 +1918,22 @@ InternalTimer(gettimeofday()+$rc, "SSCam_versionCheck", $hash, 0); return; } +############################################################################### +# Liefert die bereinigte SVS-Version dreistellig xxx +############################################################################### +sub SSCam_myVersion($) { + my ($hash) = @_; + my $name = $hash->{NAME}; + my $actvs = ""; + + my @vl = split (/-/,ReadingsVal($name, "SVSversion", ""),2); + if(@vl) { + $actvs = $vl[0]; + $actvs =~ s/\.//g; + } +return $actvs; +} + ###################################################################################### # Username / Paßwort speichern # $cre = "svs" -> Credentials für SVS und Cams @@ -3219,8 +3246,8 @@ sub SSCam_getcaminfoall ($$) { InternalTimer(gettimeofday()+1.4, "SSCam_getstreamformat", $hash, 0); # Schnappschußgalerie abrufen (snapGalleryBoost) oder nur Info des letzten Snaps - my ($slim,$ssize) = SSCam_snaplimsize($hash); - RemoveInternalTimer("SSCam_getsnapinfo"); + my ($slim,$ssize) = SSCam_snaplimsize($hash,1); # Force-Bit, es wird $hash->{HELPER}{GETSNAPGALLERY} erzwungen ! + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+1.5, "SSCam_getsnapinfo", "$name:$slim:$ssize", 0); RemoveInternalTimer($hash, "SSCam_getptzlistpreset"); @@ -3267,6 +3294,10 @@ return; ########################################################################### # Infos zu Snaps abfragen (z.B. weil nicht über SSCam ausgelöst) +# +# $slim = Anzahl der abzurufenden Snapinfos (snaps) +# $ssize = Snapgröße +# $tac = Transaktionscode (für gemeinsamen Versand) ########################################################################### sub SSCam_getsnapinfo ($) { my ($str) = @_; @@ -3277,7 +3308,7 @@ sub SSCam_getsnapinfo ($) { $tac = (defined $tac)?$tac:5000; my $ta = $hash->{HELPER}{TRANSACTION}; - RemoveInternalTimer("SSCam_getsnapinfo"); + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); return if(IsDisabled($name)); if ($hash->{HELPER}{ACTIVE} eq "off" || ((defined $ta) && $ta == $tac)) { @@ -4430,9 +4461,11 @@ sub SSCam_camop ($) { my $keyword = $hash->{HELPER}{KEYWORD}; my $snapid = ReadingsVal("$name", "LastSnapId", " "); if($OpMode eq "getsnapinfo" && $snapid =~/\d+/) { + # getsnapinfo UND Reading LastSnapId gesetzt Log3($name,4, "$name - Call getsnapinfo with params: Image numbers => $limit, Image size => $imgsize, Id => $snapid"); $url = "$proto://$serveraddr:$serverport/webapi/$apitakesnappath?api=\"$apitakesnap\"&method=\"List\"&version=\"$apitakesnapmaxver\"&idList=\"$snapid\"&imgSize=\"$imgsize\"&limit=\"$limit\"&_sid=\"$sid\""; } else { + # snapgallery oder kein Reading LastSnapId gesetzt Log3($name,4, "$name - Call getsnapinfo with params: Image numbers => $limit, Image size => $imgsize, Keyword => $keyword"); $url = "$proto://$serveraddr:$serverport/webapi/$apitakesnappath?api=\"$apitakesnap\"&method=\"List\"&version=\"$apitakesnapmaxver\"&keyword=\"$keyword\"&imgSize=\"$imgsize\"&limit=\"$limit\"&_sid=\"$sid\""; } @@ -5188,7 +5221,7 @@ sub SSCam_camop_parse ($) { SSCam_delActiveToken($hash); } - RemoveInternalTimer("SSCam_getsnapinfo"); + RemoveInternalTimer($hash, "SSCam_getsnapinfo"); InternalTimer(gettimeofday()+0.6, "SSCam_getsnapinfo", "$name:$slim:$ssize:$tac", 0); return; @@ -5308,6 +5341,7 @@ sub SSCam_camop_parse ($) { $hash->{HELPER}{TOTALCNT} = $data->{data}{total}; # total Anzahl Schnappschüsse while ($data->{'data'}{'data'}[$i]) { + next if(!$data->{'data'}{'data'}[$i]{'camName'}); # Forum:#97706 if($data->{'data'}{'data'}[$i]{'camName'} ne $camname) { $i += 1; next; @@ -5619,7 +5653,7 @@ sub SSCam_camop_parse ($) { } # Kompatibilitätscheck - my $avsc = $major.$minor; + my $avsc = $major.$minor.(($small=~/\d/)?$small:0); my $avcomp = $hash->{COMPATIBILITY}; $avcomp =~ s/\.//g; @@ -6586,9 +6620,12 @@ return $bool; ############################################################################### # Ermittlung Anzahl und Größe der abzurufenden Schnappschußdaten +# +# $force = wenn auf jeden Fall der/die letzten Snaps von der SVS +# abgerufen werden sollen unabhängig ob LastSnapId vorhanden ist ############################################################################### -sub SSCam_snaplimsize ($) { - my ($hash)= @_; +sub SSCam_snaplimsize ($;$) { + my ($hash,$force) = @_; my $name = $hash->{NAME}; my ($slim,$ssize); @@ -6621,6 +6658,8 @@ sub SSCam_snaplimsize ($) { Log3($name, 4, "$name - Streaming devs of type \"lastsnap\": @strmdevs"); } + $hash->{HELPER}{GETSNAPGALLERY} = 1 if($force); # Bugfix 04.03.2019 Forum:https://forum.fhem.de/index.php/topic,45671.msg914685.html#msg914685 + return ($slim,$ssize); } @@ -6738,12 +6777,14 @@ sub SSCam_ptzpanel($;$$) { my $ptz_ret; my $row; - my @vl = split (/\.|-/,ReadingsVal($name, "SVSversion", "")); - if(@vl) { - my $actvs = $vl[0]; - $actvs .= $vl[1]; - return "" if($actvs <= 71); - } + #my @vl = split (/\.|-/,ReadingsVal($name, "SVSversion", "")); + #if(@vl) { + # my $actvs = $vl[0]; + # $actvs .= $vl[1]; + # return "" if($actvs <= 71); + #} + + return if(SSCam_myVersion($hash) <= 71); $ptz_ret = "
"; $ptz_ret.= ''; @@ -7037,19 +7078,23 @@ sub SSCam_StreamDev($$$) { return $ret; } - if ($fmt =~ /mjpeg/) { - if($apivideostmsmaxver) { # keine API "SYNO.SurveillanceStation.VideoStream" mehr ab API v2.8 - $link = "$proto://$serveraddr:$serverport/webapi/$apivideostmspath?api=$apivideostms&version=$apivideostmsmaxver&method=Stream&cameraId=$camid&format=mjpeg&_sid=$sid"; - } elsif ($hash->{HELPER}{STMKEYMJPEGHTTP}) { - $link = $hash->{HELPER}{STMKEYMJPEGHTTP}; + if ($fmt =~ /mjpeg/) { + if(SSCam_myVersion($hash) == 823 && ReadingsVal($camname, "CamVideoType", "") !~ /MJPEG/) { + $ret .= ""; + $ret .= ""; $ret .= ''; $ret .= ''; $ret .= '

Because SVS Version 8.2.3 is running the video format has to be set to MJPEG in SVS !

"; + } else { + if($apivideostmsmaxver) { + $link = "$proto://$serveraddr:$serverport/webapi/$apivideostmspath?api=$apivideostms&version=$apivideostmsmaxver&method=Stream&cameraId=$camid&format=mjpeg&_sid=$sid"; + } elsif ($hash->{HELPER}{STMKEYMJPEGHTTP}) { + $link = $hash->{HELPER}{STMKEYMJPEGHTTP}; + } + if($apiaudiostmmaxver) { + $audiolink = "$proto://$serveraddr:$serverport/webapi/$apiaudiostmpath?api=$apiaudiostm&version=$apiaudiostmmaxver&method=Stream&cameraId=$camid&_sid=$sid"; + } + $ret .= "
')\">
"; + $streamHash->{HELPER}{STREAM} = ""; # Stream für "get popupStream" speichern + $streamHash->{HELPER}{STREAMACTIVE} = 1 if($link); # Statusbit wenn ein Stream aktiviert ist } - if($apiaudiostmmaxver) { # keine API "SYNO.SurveillanceStation.AudioStream" mehr ab API v2.8 - $audiolink = "$proto://$serveraddr:$serverport/webapi/$apiaudiostmpath?api=$apiaudiostm&version=$apiaudiostmmaxver&method=Stream&cameraId=$camid&_sid=$sid"; - } - $ret .= "
')\">
"; - $streamHash->{HELPER}{STREAM} = ""; # Stream für "get popupStream" speichern - $streamHash->{HELPER}{STREAMACTIVE} = 1 if($link); # Statusbit wenn ein Stream aktiviert ist - + if(ReadingsVal($camname, "Record", "Stop") eq "Stop") { # Aufnahmebutton endlos Start $ret .= "$imgrecendless "; @@ -7091,26 +7136,31 @@ sub SSCam_StreamDev($$$) { } } elsif ($fmt =~ /generic/) { - my $htag = AttrVal($camname,"genericStrmHtmlTag",""); + my $htag = AttrVal($strmdev,"genericStrmHtmlTag",AttrVal($camname,"genericStrmHtmlTag","")); + if( $htag =~ m/^\s*(.*)\s*$/s ) { $htag = $1; $htag =~ s/\$NAME/$camname/g; $htag =~ s/\$HTMLATTR/$ha/g; + $htag =~ s/\$PWS/$pws/g; } if(!$htag) { - $ret .= "

Set attribute \"genericStrmHtmlTag\" in device $camname


Set attribute \"genericStrmHtmlTag\" in device $camname or in device $strmdev

'; $ret .= '
'; return $ret; } - $ret .= ""; $ret .= "$htag"; if($htag) { - $streamHash->{HELPER}{STREAM} = "$htag"; # Stream für "set popupStream" speichern + # Popup-Tag um den Popup-Teil bereinigen + my $ptag = $htag; + $ptag =~ m/^(\s+)?(?<)(\s+)?(?.*)(\s+)?(?onClick=.*)(\s+)?(?>)(\s+)?$/s; + $ptag = $+{heart}?$+{b}.$+{heart}.$+{e}:$ptag; + $streamHash->{HELPER}{STREAM} = "$ptag"; # Stream für "set popupStream" speichern $streamHash->{HELPER}{STREAM} =~ s/["']//g; $streamHash->{HELPER}{STREAM} =~ s/\s+/ /g; $streamHash->{HELPER}{STREAMACTIVE} = 1; # Statusbit wenn ein Stream aktiviert ist @@ -7187,11 +7237,15 @@ sub SSCam_StreamDev($$$) { if($link && $wltype =~ /image|iframe|video|base64img|embed|hls/) { if($wltype =~ /image/) { - $ret .= "')\">
" if($link); - $streamHash->{HELPER}{STREAM} = ""; # Stream für "set popupStream" speichern - $streamHash->{HELPER}{STREAMACTIVE} = 1 if($link); # Statusbit wenn ein Stream aktiviert ist + if(SSCam_myVersion($hash) == 823 && ReadingsVal($camname, "CamVideoType", "") !~ /MJPEG/) { + $ret .= "
Because SVS Version 8.2.3 is running the video format has to be set to MJPEG in SVS !

"; + } else { + $ret .= "')\">
" if($link); + $streamHash->{HELPER}{STREAM} = ""; # Stream für "set popupStream" speichern + $streamHash->{HELPER}{STREAMACTIVE} = 1 if($link); # Statusbit wenn ein Stream aktiviert ist + } $ret .= "$imgstop "; - $ret .= $imgblank; + $ret .= $imgblank; if($hash->{HELPER}{RUNVIEW} =~ /live_fw/) { if(ReadingsVal($camname, "Record", "Stop") eq "Stop") { # Aufnahmebutton endlos Start @@ -8773,6 +8827,8 @@ return ($str); # Hint Hash EN ############################################################################################# %SSCam_vHintsExt_en = ( + "8" => "Link to official Surveillance Forum in Synology communiy". + "

", "7" => "Setup Email Shipping
". "====================


". "Snapshots can be sent by Email alltogether after creation. For this purpose the module contains
". @@ -8813,7 +8869,7 @@ return ($str); "Surveillance Station online help ". "

", "4" => "The message Meldung \"WARNING - The current/simulated SVS-version ... may be incompatible with SSCam version...\" means that ". - "the used SSCam version was currently not tested with the installed version of Synology Surveillance Station (Reading \"SVSversion\"). ". + "the used SSCam version was currently not tested or (partially) incompatible with the installed version of Synology Surveillance Station (Reading \"SVSversion\"). ". "The compatible SVS-Version is printed out in the Internal COMPATIBILITY.\n". "Actions: At first please update your SSCam version. If the message does appear furthermore, please inform the SSCam Maintainer. ". "To ignore this message temporary, you may reduce the verbose level of your SSCam device. ". @@ -8831,6 +8887,8 @@ return ($str); # Hint Hash DE ############################################################################################# %SSCam_vHintsExt_de = ( + "8" => "Link zur offiziellen Surveillance Forum Seite innerhalb der Synology Communiy". + "

", "7" => "Einstellung Email-Versand
". "=========================


". "Schnappschüsse können nach der Erstellung per Email gemeinsam versendet werden. Dazu enthält das Modul einen
". @@ -8874,7 +8932,7 @@ return ($str); "

", "4" => "Die Meldung \"WARNING - The current/simulated SVS-version ... may be incompatible with SSCam version...\" ist ein Hinweis darauf, dass ". "die eingesetzte SSCam Version noch nicht mit der verwendeten Version von Synology Surveillance Station (Reading \"SVSversion\") getestet ". - "wurde. Die kompatible SVS-Version ist im Internal COMPATIBILITY ersichtlich.\n". + "wurde oder (teilweise) mit dieser Version nicht kompatibel ist. Die kompatible SVS-Version ist im Internal COMPATIBILITY ersichtlich.\n". "Maßnahmen: Bitte SSCam zunächst updaten. Sollte die Meldung weiterhin auftreten, bitte den SSCam Maintainer informieren. Zur ". "vorübergehenden Ignorierung kann der verbose Level des SSCam-Devices entsprechend reduziert werden. ". "

", @@ -8903,7 +8961,7 @@ return ($str); At present the following functions are available:

      -
    • Start a recording and send it optionally by Email
    • +
    • Start a recording and send it optionally by Email and/or Telegram
    • Stop a recording by command or automatically after an adjustable period
    • Trigger of snapshots and optionally send them alltogether by Email/TelegramBot using the integrated Email client
    • Trigger snapshots of all defined cams and optionally send them alltogether by Email using the integrated Email client
    • @@ -9214,9 +9272,15 @@ return ($str);
       attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
                                        <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
      -                               </video> 
      +                               </video>
      +
      +attr <name> genericStrmHtmlTag <img $HTMLATTR 
      +                                 src="http://192.168.2.10:32774"
      +                                 onClick="FW_okDialog('<img src=http://192.168.2.10:32774 $PWS>')"
      +                               >                                 
             
      - The variables $HTMLATTR, $NAME are placeholder and absorb the attribute "htmlattr" (if set) respectively the SSCam-Devicename. + The variables $HTMLATTR, $NAME and $PWS are placeholders and absorb the attribute "htmlattr" (if set), the SSCam-Devicename + respectively the value of attribute "popupWindowSize" in streamin-device, which specify the windowsize of a popup window.


    @@ -9496,7 +9560,7 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>

      -
    • set <name> on [<rectime>] [recEmailTxt:"subject => <subject text>, body => <message text>"]     (valid for CAM)

    • +
    • set <name> on [<rectime>] [recEmailTxt:"subject => <subject text>, body => <message text>"] [recTelegramTxt:"tbot => <TelegramBot device>, peers => [<peer1 peer2 ...>], subject => [<subject text>]"]     (valid for CAM)

    • A recording will be started. The default recording time is 15 seconds. It can be individually changed by the attribute "rectime". @@ -9535,6 +9599,13 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> (the tag syntax is identical to the "recEmailTxt" attribute)

      + The shipping of the last recording by Telegram can be activated permanently by setting attribute + "recTelegramTxt". Of course, the TelegramBot device which is + used, must be defined and fully functional before.
      + If you want temporary overwrite the message text as set with attribute "recTelegramTxt", you can optionally specify the + "recTelegramTxt:"-tag as shown above. If the attribute "recTelegramTxt" is not set, the shipping by Telegram is + activated one-time. (the tag-syntax is equivalent to the "recTelegramTxt" attribute)

      + Examples:

      set <name> on [rectime]
      # starts a recording, stops automatically after [rectime]
      @@ -9542,6 +9613,8 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> # starts a permanent record which must be stopped with the "off"-command.
      set <name> on recEmailTxt:"subject => New recording for $CAM created, body => The last recording of $CAM is atteched."
      # starts a recording and send it after completion by Email.
      + set <name> on recTelegramTxt:"tbot => teleBot, peers => @xxxx , subject => Movement alarm by $CAM. The snapshot $FILE was created at $CTIME"
      + # starts a recording and send it after completion by Telegram.


    @@ -9666,6 +9739,10 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> The video format of the camera has to be set to H.264 in the Synology Surveillance Station and not every camera type is a proper device for HLS-Streaming. At the time only the Mac Safari Browser and modern mobile iOS/Android-Devices are able to playback HLS-Streams. +

    + + Note for MJPEG:
    + The MJPEG stream is SVS internal transcoded from other codec and is usally only about 1 fps.


@@ -10125,13 +10202,19 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta (see also "set <name> createStreamDev generic")

    - Example: + Examples:
     attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
                                      <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
                                    </video> 
    +                               
    +attr <name> genericStrmHtmlTag <img $HTMLATTR 
    +                                 src="http://192.168.2.10:32774"
    +                                 onClick="FW_okDialog('<img src=http://192.168.2.10:32774 $PWS>')"
    +                               >  
           
    - The variables $HTMLATTR, $NAME are placeholder and absorb the attribute "htmlattr" (if set) respectively the SSCam-Devicename. + The variables $HTMLATTR, $NAME and $PWS are placeholders and absorb the attribute "htmlattr" (if set), the SSCam-Devicename + respectively the value of attribute "popupWindowSize" in streaming-device, which specify the windowsize of a popup window.


@@ -10294,6 +10377,38 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
+ +
  • snapTelegramTxt tbot => <TelegramBot device>, peers => [<peer1 peer2 ...>], subject => [<subject text>]
    + Activates the permanent shipping of recordings by TelegramBot after their creation.
    + The attribute has to be definied in the form as described. With key "tbot" the TelegramBot device is specified, which is + used for shipping the data. Of course, the TelegramBot device + must be available and has to be running well.
    + The setting of "peers" and "subject" is optional, but the keys must (empty) specified. + If "peer" is empty, teh default peer of the TelegramBot is used.
    + You can use the placeholder in "subject".

    + +
      + + + + + + + +
      $CAM - Device alias respectively the name of the camera in SVS if the device alias isn't set
      $DATE - current date
      $TIME - current time
      $FILE - Name of recording file
      $CTIME - recording creation time
      +
    +
    + +
      + Examples:
      + recTelegramTxt tbot => teleBot, peers => , subject => Motion alarm ($FILE)
      + recTelegramTxt tbot => teleBot, peers => @nabuko @foo @bar, subject =>
      + recTelegramTxt tbot => teleBot, peers => , subject =>
      + recTelegramTxt tbot => teleBot, peers => , subject => Motion alarm from $CAM. At $CTIME the recording $FILE was created. Now it is $TIME.
      +
    +
    +

  • +
  • rectime
    determines the recordtime when a recording starts. If rectime = 0 an endless recording will be started. If @@ -10596,7 +10711,7 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> Zur Zeit werden folgende Funktionen unterstützt:

        -
      • Start einer Aufnahme und optionaler Versand per Email
      • +
      • Start einer Aufnahme und optionaler Versand per Email und/oder Telegram
      • Stop einer Aufnahme per Befehl bzw. automatisch nach Ablauf einer einstellbaren Dauer
      • Auslösen von Schnappschnüssen und optional gemeinsamer Email/TelegramBot-Versand mittels integrierten Email-Client
      • Auslösen von Schnappschnüssen aller definierten Kameras und optionaler gemeinsamer Email-Versand mittels integrierten Email-Client
      • @@ -10907,13 +11022,19 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> spezifizieren den wiederzugebenden Content.

          - Beispiel: + Beispiele:
           attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
                                            <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
          -                               </video> 
          +                               </video>
          +
          +attr <name> genericStrmHtmlTag <img $HTMLATTR 
          +                                 src="http://192.168.2.10:32774"
          +                                 onClick="FW_okDialog('<img src=http://192.168.2.10:32774 $PWS >')"
          +                               >                              
                 
          - Die Variablen $HTMLATTR, $NAME sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr" bzw. den SSCam-Devicenamen. + Die Variablen $HTMLATTR, $NAME und $PWS sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr", den SSCam- + Devicenamen bzw. das Attribut "popupWindowSize" im Streaming-Device, welches die Größe eines Popup-Windows festlegt.


        @@ -11195,7 +11316,7 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>

          -
        • set <name> on [<rectime>] [recEmailTxt:"subject => <Betreff-Text>, body => <Mitteilung-Text>"]     (gilt für CAM)

        • +
        • set <name> on [<rectime>] [recEmailTxt:"subject => <Betreff-Text>, body => <Mitteilung-Text>"] [recTelegramTxt:"tbot => <TelegramBot-Device>, peers => [<peer1 peer2 ...>], subject => [<Betreff-Text>]"]     (gilt für CAM)

        • Startet eine Aufnahme. Die Standardaufnahmedauer beträgt 15 Sekunden. Sie kann mit dem Attribut "rectime" individuell festgelegt werden. @@ -11234,7 +11355,14 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> Beendigung aktiviert werden. Sollte das Attribut "recEmailTxt" bereits gesetzt sein, wird der Text des "recEmailTxt:"-Tags anstatt des Attribut-Textes verwendet.

          - Beispiele :

          + Ein Telegram-Versand der letzten Aufnahme kann durch Setzen des Attributs "recTelegramTxt" permanent aktiviert + werden. Das zu verwendende TelegramBot-Device muss natürlich + funktionstüchtig eingerichtet sein.
          + Der Text im Attribut "recTelegramTxt" kann durch die Spezifikation des optionalen "recTelegramTxt:"-Tags, wie oben + gezeigt, temporär überschrieben bzw. geändert werden. Sollte das Attribut "recTelegramTxt" nicht gesetzt sein, wird durch Angabe dieses Tags + der Telegram-Versand einmalig aktiviert. (die Tag-Syntax entspricht dem "recTelegramTxt"-Attribut)

          + + Beispiele :
          set <name> on [rectime]
          # startet die Aufnahme der Kamera <name>, automatischer Stop der Aufnahme nach Ablauf der Zeit [rectime] (default 15s oder wie im Attribut "rectime" angegeben)
          @@ -11242,6 +11370,8 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> # startet eine Daueraufnahme die mit "off" gestoppt werden muss.
          set <name> on recEmailTxt:"subject => Neue Aufnahme $CAM, body => Die aktuelle Aufnahme von $CAM ist angehängt."
          # startet eine Aufnahme und versendet sie nach Beendigung per Email.
          + set <name> on recTelegramTxt:"tbot => teleBot, peers => @xxxx , subject => Bewegungsalarm bei $CAM. Es wurde $CTIME die Aufnahme $FILE erstellt"
          + # startet eine Aufnahme und versendet sie nach Beendigung per Telegram.


        @@ -11370,6 +11500,10 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> Die Kamera muss in der SVS auf das Videoformat H.264 eingestellt sein und nicht jeder Kameratyp ist gleichermassen für HLS-Streaming geeignet. Momentan kann HLS nur durch den Mac Safari Browser sowie auf mobilen iOS/Android-Geräten wiedergegeben werden. +

        + + Hinweis zu MJPEG:
        + Der MJPEG Stream wird innerhalb der SVS aus anderen Codecs (H.264) transkodiert und beträgt normalerweise ca. 1 Fps.


      @@ -11869,13 +12003,19 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta (siehe "set <name> createStreamDev generic")

        - Beispiel: + Beispiele:
         attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
                                          <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
        -                               </video> 
        +                               </video>
        +                               
        +attr <name> genericStrmHtmlTag <img $HTMLATTR 
        +                                 src="http://192.168.2.10:32774"
        +                                 onClick="FW_okDialog('<img src=http://192.168.2.10:32774 $PWS >')"
        +                               >                              
               
        - Die Variablen $HTMLATTR, $NAME sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr" bzw. den SSCam-Devicenamen. + Die Variablen $HTMLATTR, $NAME und $PWS sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr", den SSCam- + Devicenamen bzw. das Attribut "popupWindowSize" im Streaming-Device, welches die Größe eines Popup-Windows festlegt.


      @@ -12044,6 +12184,38 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
      + +
    • recTelegramTxt tbot => <TelegramBot-Device>, peers => [<peer1 peer2 ...>], subject => [<Betreff-Text>]
      + Aktiviert den permanenten Versand von Aufnahmen nach deren Erstellung per TelegramBot.
      + Das Attribut muß in der angegebenen Form definiert werden. Im Schlüssel "tbot" ist das TelegramBot-Device anzugeben, welches für + den Versand der Daten verwendet werden soll. Das TelegramBot-Device muss natürlich + vorhanden und funktionstüchtig sein.
      + Die Angabe von "peers" und "subject" ist optional, jedoch muß der Schlüssel (leer) angegeben werden. + Wurde "peer" leer gelassen, wird der Default-Peer des TelegramBot verwendet.
      + Es können die Platzhalter im subject verwendet werden.

      + +
        + + + + + + + +
        $CAM - Device-Alias bzw. den Namen der Kamera in der SVS ersetzt falls der Device-Alias nicht vorhanden ist
        $DATE - aktuelles Datum
        $TIME - aktuelle Zeit
        $FILE - Filename
        $CTIME - Erstellungszeit der Aufnahme
        +
      +
      + +
        + Beispiele:
        + recTelegramTxt tbot => teleBot, peers => , subject => Bewegungsalarm ($FILE)
        + recTelegramTxt tbot => teleBot, peers => @nabuko @foo @bar, subject =>
        + recTelegramTxt tbot => teleBot, peers => , subject =>
        + recTelegramTxt tbot => teleBot, peers => , subject => Bewegungsalarm bei $CAM. Es wurde $CTIME die Aufnahme $FILE erstellt. Jetzt ist es $TIME.
        +
      +
      +

    • +
    • rectime
      festgelegte Aufnahmezeit wenn eine Aufnahme gestartet wird. Mit rectime = 0 wird eine