From 8f5cf3b89e46be724d8edd7cb19d4d1ee0ad6954 Mon Sep 17 00:00:00 2001 From: delmar <> Date: Wed, 24 Jun 2020 13:13:36 +0000 Subject: [PATCH] 70_ZoneMinder: fix afterInitialized (thx GeberNehmer) git-svn-id: https://svn.fhem.de/fhem/trunk@22251 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/70_ZoneMinder.pm | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 53effb66e..c75426911 100644 --- a/fhem/CHANGED +++ b/fhem/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. + - bugfix: 70_ZoneMinder: fix afterInitialized (thx GeberNehmer) - bugfix: 73_AutoShuttersControl: change shading reading message - feature: 76_SMAPortal: upgrade to V3. This version is not compatible to prior V2. Attributes and Readings are changed. diff --git a/fhem/FHEM/70_ZoneMinder.pm b/fhem/FHEM/70_ZoneMinder.pm index 982b09395..3fac34976 100755 --- a/fhem/FHEM/70_ZoneMinder.pm +++ b/fhem/FHEM/70_ZoneMinder.pm @@ -99,7 +99,12 @@ sub ZoneMinder_Define { my $triggerPortState = $hash->{STATE}; ZoneMinder_updateState( $hash, $triggerPortState, 'n/a' ); - ZoneMinder_afterInitialized($hash); + if (!$init_done) { + InternalTimer(gettimeofday()+5, "ZoneMinder_afterInitialized", $hash, 0); + } + else { + ZoneMinder_afterInitialized($hash); + } return undef; }