From 79be9948c86ea106972a8768f5c52037c0a6e11e Mon Sep 17 00:00:00 2001 From: Ellert <> Date: Sun, 23 Apr 2017 18:24:17 +0000 Subject: [PATCH] 98_DOIFtools.pm: more precise regexp for INITIALIZED event because there is more than one initialisation event now (Forum 70882) git-svn-id: https://svn.fhem.de/fhem/trunk@14089 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/98_DOIFtools.pm | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 3a4438f35..9449000cf 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # 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. + - update: 98_DOIFtools: more precise regexp for INITIALIZED event because + there is more than one initialisation event now - feature: 82_LGTV_WebOS: Version 0.6.0, pingPresence, Bugfixes - bugfix: 02_FTUISRV: fix replacesetMagic to use hash - fhem.pl warning - bugfix: 10_pilight_ctrl: fix GS-iwds07 diff --git a/fhem/FHEM/98_DOIFtools.pm b/fhem/FHEM/98_DOIFtools.pm index 39b22c6f1..ba4a1c410 100644 --- a/fhem/FHEM/98_DOIFtools.pm +++ b/fhem/FHEM/98_DOIFtools.pm @@ -595,13 +595,13 @@ sub DOIFtools_Notify($$) { CommandTrigger(undef,"$hash->{TYPE}Log $trig"); } # DOIFtools DEF addition - if ($sn eq "global" and $event =~ "MODIFIED|INITIALIZED|DEFINED|DELETED|RENAMED|UNDEFINED") { - my @doifList = devspec2array("TYPE=DOIF"); + if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED|^DEFINED|^DELETED|^RENAMED|^UNDEFINED") { + my @doifList = devspec2array("TYPE=DOIF"); $hash->{DEF} = "associated DOIF: ".join(" ",sort @doifList); readingsSingleUpdate($hash,"DOIF_version",fhem("version 98_DOIF.pm noheader",1),0); } # get DOIF version, FHEM revision and default values - if ($sn eq "global" and $event =~ "INITIALIZED|MODIFIED $pn") { + if ($sn eq "global" and $event =~ "^INITIALIZED\$|^MODIFIED $pn") { readingsBeginUpdate($hash); readingsBulkUpdate($hash,"DOIF_version",fhem("version 98_DOIF.pm noheader",1)); readingsBulkUpdate($hash,"FHEM_revision",fhem("version revision noheader",1)); @@ -629,7 +629,7 @@ sub DOIFtools_Notify($$) { CommandSave(undef,undef); } # Event monitor in DOIF - if ($modules{DOIF}{LOADED} and !defined $modules{DOIF}->{FW_detailFn} and $sn eq "global" and $event =~ "INITIALIZED" and AttrVal($pn,"DOIFtoolsEventMonitorInDOIF","")) { + if ($modules{DOIF}{LOADED} and !defined $modules{DOIF}->{FW_detailFn} and $sn eq "global" and $event =~ "^INITIALIZED\$" and AttrVal($pn,"DOIFtoolsEventMonitorInDOIF","")) { $modules{DOIF}->{FW_detailFn} = "DOIFtools_eM" if (!defined $modules{DOIF}->{FW_detailFn}); readingsSingleUpdate($hash,".DOIFdO",$modules{DOIF}->{FW_deviceOverview},0); $modules{DOIF}->{FW_deviceOverview} = 1;