From 3237c8954fd584b9dd1d2070ddc67c599b0c3809 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sun, 29 Jan 2017 15:46:31 +0000 Subject: [PATCH] FB_CALLMONITOR: new set command "reopen" (Forum: #41195) git-svn-id: https://svn.fhem.de/fhem/trunk@13270 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 5 +++-- fhem/FHEM/72_FB_CALLMONITOR.pm | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 07a45d568..d8b1ff928 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. -# Do not ins - feature: 66_ECMD: new attribute autoReopen - +# Do not insert empty lines here, update check depends on it. + - feature: FB_CALLMONITOR: new set command "reopen" + - feature: 66_ECMD: new attribute autoReopen - update: 74_AMAD: Version 2.6.8 new feature sendSMS - feature: 66_ECMD: new attribute autoReopen - bugfix: 98_DOIFtools.pm: fixed bug from last change diff --git a/fhem/FHEM/72_FB_CALLMONITOR.pm b/fhem/FHEM/72_FB_CALLMONITOR.pm index cad561882..21eef5c8e 100755 --- a/fhem/FHEM/72_FB_CALLMONITOR.pm +++ b/fhem/FHEM/72_FB_CALLMONITOR.pm @@ -253,6 +253,7 @@ FB_CALLMONITOR_Set($@) push @sets, "rereadCache" if(defined(AttrVal($name, "reverse-search-cache-file" , undef))); push @sets, "rereadTextfile" if(defined(AttrVal($name, "reverse-search-text-file" , undef))); push @sets, "password" if($hash->{helper}{PWD_NEEDED}); + push @sets, "reopen" if($hash->{FD}); $usage = "Unknown argument ".$a[1].", choose one of ".join(" ", @sets) if(scalar @sets > 0); @@ -277,6 +278,12 @@ FB_CALLMONITOR_Set($@) Log3 $name, 2, "FB_CALLMONITOR ($name) - SOMEONE UNWANTED TRIED TO SET A NEW FRITZBOX PASSWORD!!!"; return "I didn't ask for a password, so go away!!!" } + elsif($a[1] eq "reopen") + { + DevIo_CloseDev($hash); + DevIo_OpenDev($hash, 0, undef, \&FB_CALLMONITOR_DevIoCallback); + return undef; + } else { return $usage; @@ -1850,6 +1857,7 @@ sub FB_CALLMONITOR_encrypt($$) Set