From adae43b9fcf9abcf19ed970b92f3f144400c9b32 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sun, 13 Aug 2017 19:34:34 +0000 Subject: [PATCH] FB_CALLMONITOR: more precise error message in case of missing FB password while reading phonebook (Forum: #75283) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14895 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/72_FB_CALLMONITOR.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FHEM/72_FB_CALLMONITOR.pm b/FHEM/72_FB_CALLMONITOR.pm index 2e2beab37..bb06de638 100755 --- a/FHEM/72_FB_CALLMONITOR.pm +++ b/FHEM/72_FB_CALLMONITOR.pm @@ -1173,7 +1173,7 @@ sub FB_CALLMONITOR_readRemotePhonebookViaTelnet($;$) my $fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword); delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD})); - return "no password available to access FritzBox" unless(defined($fb_pw)); + return "no password available to access FritzBox. Please set your FRITZ!Box password via 'set ".$hash->{NAME}." password '" unless(defined($fb_pw)); my $telnet = Net::Telnet->new(Timeout => 10, Errmode => 'return'); @@ -1270,7 +1270,8 @@ sub FB_CALLMONITOR_identifyPhoneBooksViaTR064($;$) unless(defined($fb_pw)) { $hash->{helper}{PWD_NEEDED} = 1; - return "no password available to access FritzBox"; + return "no password available to access FritzBox. Please set your FRITZ!Box password via 'set ".$hash->{NAME}." password '"; + } Log3 $name, 4, "FB_CALLMONITOR ($name) - identifying available phonebooks"; @@ -1544,7 +1545,7 @@ sub FB_CALLMONITOR_identifyPhoneBooksViaWeb($;$) $fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword); delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD})); - return "no password available to access FritzBox" unless(defined($fb_pw)); + return "no password available to access FritzBox. Please set your FRITZ!Box password via 'set ".$hash->{NAME}." password '" unless(defined($fb_pw)); $fb_sid = FB_doCheckPW($fb_ip, $fb_user, $fb_pw); @@ -1617,7 +1618,7 @@ sub FB_CALLMONITOR_readRemotePhonebookViaWeb($$;$) $fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword); delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD})); - return "no password available to access FritzBox" unless(defined($fb_pw)); + return "no password available to access FritzBox. Please set your FRITZ!Box password via 'set ".$hash->{NAME}." password '" unless(defined($fb_pw)); $fb_sid = FB_doCheckPW($fb_ip, $fb_user, $fb_pw);