diff --git a/CHANGED b/CHANGED
index 53609b6bd..a225a990d 100644
--- a/CHANGED
+++ b/CHANGED
@@ -1,5 +1,6 @@
# 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: 70_ZoneMinder: added attribute 'apiTimeout'
- changed: 93_DbLog: minor change of Log entry
- changed: 70_Pushover: attribute 'storage' was renamed to 'storagePath'
and is now visible in FHEMWEB
diff --git a/FHEM/70_ZoneMinder.pm b/FHEM/70_ZoneMinder.pm
index 56d861004..4ddd159cd 100755
--- a/FHEM/70_ZoneMinder.pm
+++ b/FHEM/70_ZoneMinder.pm
@@ -53,7 +53,7 @@ sub ZoneMinder_Initialize {
$hash->{WriteFn} = "ZoneMinder_Write";
$hash->{ReadyFn} = "ZoneMinder_Ready";
- $hash->{AttrList} = "usePublicUrlForZmWeb:0,1 loginInterval publicAddress webConsoleContext " . $readingFnAttributes;
+ $hash->{AttrList} = "apiTimeout usePublicUrlForZmWeb:0,1 loginInterval publicAddress webConsoleContext " . $readingFnAttributes;
$hash->{MatchList} = { "1:ZM_Monitor" => "^.*" };
Log3 '', 3, "ZoneMinder - Initialize done ...";
@@ -163,11 +163,13 @@ sub ZoneMinder_API_Login {
my $usePublicUrlForZmWeb = AttrVal($name, 'usePublicUrlForZmWeb', 0);
my $zmWebUrl = ZoneMinder_getZmWebUrl($hash, $usePublicUrlForZmWeb);
my $loginUrl = "$zmWebUrl/index.php?username=$username&password=$password&action=login&view=console";
+ my $apiTimeout = AttrVal($name, 'apiTimeout', 5);
Log3 $name, 4, "ZoneMinder ($name) - loginUrl: $loginUrl";
my $apiParam = {
url => $loginUrl,
method => "POST",
+ timeout => $apiTimeout,
callback => \&ZoneMinder_API_Login_Callback,
hash => $hash
};
@@ -750,6 +752,7 @@ sub ZoneMinder_Ready {
Attributes
apiTimeout <seconds>
publicAddress <address>
https://my.own.domain:2344
webConsoleContext <path>
/zm
. This is used for building the URL to the ZoneMinder web console.usePublicUrlForZmWeb