2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

73_DoorBird: Error 404 handling for history images corrected

git-svn-id: https://svn.fhem.de/fhem/trunk@19361 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2019-05-10 11:30:08 +00:00
parent 0585971b6d
commit 948d236f01

View File

@ -2300,6 +2300,15 @@ sub DoorBird_History_Request_Parse($) {
$ImageData = "Error 204: The user has no permission to download the event history.";
$ImageTimeStamp =" ";
}
### If http response code is 404 = No picture available to download the event history
elsif ($param->{code} == 404) {
### Create Log entry
Log3 $name, 5, $name. " : DoorBird_History_Request - Error 404 : No picture available to download event history. Check settings in DoorBird APP.";
### Create Error message
$ImageData = "Error 404: No picture available to download in the event history.";
$ImageTimeStamp =" ";
}
### If http response code is none of one above
else {
### Create Log entry
@ -2307,8 +2316,9 @@ sub DoorBird_History_Request_Parse($) {
### Create Error message
$ImageData = "Error : " . $param->{code};
$ImageTimeStamp =" ";
}
### Create the URL Index which is identical every 2nd: 1 1 2 2 3 3 4 4 5 5 6 6
my $UrlIndex=int(int($hash->{helper}{HistoryDownloadCount})/int(2))+1;