mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
FRITZBOX: TR064 boxUser
git-svn-id: https://svn.fhem.de/fhem/trunk@8958 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4f807a93f4
commit
fbdfb0e346
@ -42,6 +42,7 @@ my $missingModulTelnet;
|
||||
my $missingModulWeb;
|
||||
my $missingModulTR064;
|
||||
our $FRITZBOX_TR064pwd;
|
||||
our $FRITZBOX_TR064user;
|
||||
|
||||
eval "use Net::Telnet;1" or $missingModulTelnet .= "Net::Telnet ";
|
||||
eval "use URI::Escape;1" or $missingModul .= "URI::Escape ";
|
||||
@ -570,7 +571,7 @@ sub FRITZBOX_Readout_Start($)
|
||||
|
||||
}
|
||||
|
||||
if($interval != 0) {
|
||||
if( $interval != 0 ) {
|
||||
RemoveInternalTimer($hash->{helper}{TimerReadout});
|
||||
InternalTimer(gettimeofday()+$interval, "FRITZBOX_Readout_Start", $hash->{helper}{TimerReadout}, 1);
|
||||
return undef if( AttrVal($name, "disable", 0 ) == 1 );
|
||||
@ -585,8 +586,9 @@ sub FRITZBOX_Readout_Start($)
|
||||
delete( $hash->{helper}{READOUT_RUNNING_PID} );
|
||||
}
|
||||
|
||||
FRITZBOX_Log $hash, 4, "Fork process $runFn";
|
||||
$hash->{helper}{READOUT_RUNNING_PID} = BlockingCall($runFn, $name,
|
||||
"FRITZBOX_Readout_Done", $interval-2,
|
||||
"FRITZBOX_Readout_Done", 55,
|
||||
"FRITZBOX_Readout_Aborted", $hash)
|
||||
unless exists( $hash->{helper}{READOUT_RUNNING_PID} );
|
||||
|
||||
@ -1706,6 +1708,7 @@ sub FRITZBOX_Set_Cmd_Start($)
|
||||
}
|
||||
|
||||
# Starting new command
|
||||
FRITZBOX_Log $hash, 4, "Fork process $cmdFunction";
|
||||
$hash->{helper}{CMD_RUNNING_PID} = BlockingCall($cmdFunction, $handover,
|
||||
"FRITZBOX_Set_Cmd_Done", $timeout,
|
||||
"FRITZBOX_Set_Cmd_Aborted", $hash);
|
||||
@ -3765,8 +3768,9 @@ sub FRITZBOX_TR064_Cmd($$$)
|
||||
return undef;
|
||||
}
|
||||
|
||||
# Set Password for TR064 access
|
||||
# Set Password und User for TR064 access
|
||||
$FRITZBOX_TR064pwd = FRITZBOX_readPassword($hash);
|
||||
$FRITZBOX_TR064user = AttrVal( $name, "boxUser", "dslf-config" );
|
||||
|
||||
my $host = AttrVal( $name, "fritzBoxIP", "fritz.box" );
|
||||
|
||||
@ -3978,7 +3982,7 @@ sub FRITZBOX_TR064_Init ($)
|
||||
}
|
||||
|
||||
# dieser Code authentifiziert an der Box
|
||||
sub SOAP::Transport::HTTP::Client::get_basic_credentials {return "dslf-config" => $FRITZBOX_TR064pwd;}
|
||||
sub SOAP::Transport::HTTP::Client::get_basic_credentials {return $FRITZBOX_TR064user => $FRITZBOX_TR064pwd;}
|
||||
|
||||
return $port;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user