diff --git a/fhem/FHEM/73_DoorBird.pm b/fhem/FHEM/73_DoorBird.pm index 3e0f86dc0..03c1f93b1 100644 --- a/fhem/FHEM/73_DoorBird.pm +++ b/fhem/FHEM/73_DoorBird.pm @@ -2965,11 +2965,19 @@ sub DoorBird_LastEvent_Image($$$) { } } - ### If the attribute VideoDurationDoorbell has been set and therefore an video shall be recorded - if ($hash->{helper}{VideoDurationDoorbell} > 0){ + ### If the attribute VideoDuration has been set and therefore an video shall be recorded + if (($event =~ m/doorbell/ ) && ($hash->{helper}{VideoDurationDoorbell} > 0)){ ### Call sub for Videorecording DoorBird_Video_Request($hash, $hash->{helper}{VideoDurationDoorbell}, $VideoEvent, $httpHeader); } + elsif (($event =~ m/motion/ ) && ($hash->{helper}{VideoDurationMotion} > 0)){ + ### Call sub for Videorecording + DoorBird_Video_Request($hash, $hash->{helper}{VideoDurationMotion}, $VideoEvent, $httpHeader); + } + elsif (($event =~ m/keypad/ ) && ($hash->{helper}{VideoDurationKeypad} > 0)){ + ### Call sub for Videorecording + DoorBird_Video_Request($hash, $hash->{helper}{VideoDurationKeypad}, $VideoEvent, $httpHeader); + } return; } ####END####### Define Subfunction for LAST EVENT IMAGE REQUEST #################################################END#####