diff --git a/fhem/FHEM/23_KOSTALPIKO.pm b/fhem/FHEM/23_KOSTALPIKO.pm index ff6bd44ee..3ba538a7e 100644 --- a/fhem/FHEM/23_KOSTALPIKO.pm +++ b/fhem/FHEM/23_KOSTALPIKO.pm @@ -1,4 +1,4 @@ -# $Id: 23_KOSTALPIKO.pm 7127 2014-12-07 18:00:00Z john $ +# $Id: 23_KOSTALPIKO.pm 7726 2015-01-25 18:00:00Z john $ #################################################################################################### # # 23_KOSTALPIKO.pm @@ -36,6 +36,8 @@ # adjusting KOSTALPIKO_Log # Inital Checkin to FHEM ; docu revised # 2014-09-08 john V2.05 : support of battery option; developed by jannik_78 +# 2014-12-22 john V2.06 : checked HTML +# 2015-01-25 john V2.07 : adjusted argument agent for http-request of proplanta (thanks to framller) #################################################################################################### @@ -288,7 +290,7 @@ use vars qw($readingFnAttributes); use vars qw(%defs); my $MODUL = "KOSTALPIKO"; -my $KOSTAL_VERSION = "2.05"; +my $KOSTAL_VERSION = "2.07"; ######################################## sub KOSTALPIKO_Log($$$) @@ -858,10 +860,18 @@ sub KOSTALPIKO_GrHtmlAcquire($) return "" if ( !defined($URL) ); return "" if ( $URL eq "" ); - my $err_log = ""; - my $agent = LWP::UserAgent->new( env_proxy => 1, keep_alive => 1, timeout => 3 ); - my $header = HTTP::Request->new( GET => $URL ); - my $request = HTTP::Request->new( 'GET', $URL, $header ); + my $err_log = ""; + # my $agent = LWP::UserAgent->new( env_proxy => 1, keep_alive => 1, timeout => 3 ); + my $agent = LWP::UserAgent->new( + env_proxy => 1, + keep_alive => 1, + protocols_allowed => ['http'], + timeout => 10, + agent => "Mozilla/5.0 (Windows NT 5.1) [de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4]" + ); + + my $header = HTTP::Request->new( GET => $URL ); + my $request = HTTP::Request->new( 'GET', $URL, $header ); my $response = $agent->request($request); $err_log = "Can't get $URL -- " . $response->status_line unless $response->is_success; @@ -1044,134 +1054,169 @@ sub KOSTALPIKO_GrTimer($) =pod =begin html - -

KOSTALPIKO

- -
- - - Set-Commands - - - - Attributes

- -

- - - Generated Readings/Events

- - -
Additional Readings/Events, if BAEnable=1

- - - -

- - Additional information

- - - =end html =cut