mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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
This commit is contained in:
parent
cc85fa5181
commit
adae43b9fc
@ -1173,7 +1173,7 @@ sub FB_CALLMONITOR_readRemotePhonebookViaTelnet($;$)
|
|||||||
my $fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword);
|
my $fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword);
|
||||||
|
|
||||||
delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD}));
|
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 <your password>'" unless(defined($fb_pw));
|
||||||
|
|
||||||
my $telnet = Net::Telnet->new(Timeout => 10, Errmode => 'return');
|
my $telnet = Net::Telnet->new(Timeout => 10, Errmode => 'return');
|
||||||
|
|
||||||
@ -1270,7 +1270,8 @@ sub FB_CALLMONITOR_identifyPhoneBooksViaTR064($;$)
|
|||||||
unless(defined($fb_pw))
|
unless(defined($fb_pw))
|
||||||
{
|
{
|
||||||
$hash->{helper}{PWD_NEEDED} = 1;
|
$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 <your password>'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3 $name, 4, "FB_CALLMONITOR ($name) - identifying available phonebooks";
|
Log3 $name, 4, "FB_CALLMONITOR ($name) - identifying available phonebooks";
|
||||||
@ -1544,7 +1545,7 @@ sub FB_CALLMONITOR_identifyPhoneBooksViaWeb($;$)
|
|||||||
$fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword);
|
$fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword);
|
||||||
delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD}));
|
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 <your password>'" unless(defined($fb_pw));
|
||||||
|
|
||||||
$fb_sid = FB_doCheckPW($fb_ip, $fb_user, $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);
|
$fb_pw = FB_CALLMONITOR_readPassword($hash, $testPassword);
|
||||||
delete($hash->{helper}{READ_PWD}) if(exists($hash->{helper}{READ_PWD}));
|
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 <your password>'" unless(defined($fb_pw));
|
||||||
|
|
||||||
$fb_sid = FB_doCheckPW($fb_ip, $fb_user, $fb_pw);
|
$fb_sid = FB_doCheckPW($fb_ip, $fb_user, $fb_pw);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user