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
-
-
- Define
-
-
- define <name> KOSTALPIKO <ip-address> <user> <password>
-
-
- The module reads the current values from web page of a Kostal Piko inverter.
- It can also be used, to capture the values of global radiation, UV-index and sunshine duration
- from a special web-site (proplanta) regardless of the existence of the inverter.
-
-
- Parameters:
+
+
+
+ KOSTALPIKO
+
+
+
Define
+
+
+
+
define <name> KOSTALPIKO <ip-address> <user> <password>
+
+ The module reads the current values from web page of a Kostal Piko inverter.
+ It can also be used, to capture the values of global radiation, UV-index and sunshine duration
+ from a special web-site (proplanta) regardless of the existence of the inverter.
+
+
Parameters:
+
+
+ - <ip-address> - the ip address of the inverter
+
+ - <user> - the login-user for the inverter's web page
+
+ - <password> - the login-password for the inverter's web page
+
+
+
Example:
+
+
+ define Kostal KOSTALPIKO 192.168.2.4 pvserver pvwr
+
+
+
Set-Commands
+
+
+
+
set <name> captureGlobalRadiation
+
+
+ The values for global radiation, UV-index and sunshine duration are immediately polled.
+
+
+
set <name> captureKostalData
+
+
+ All values of the inverter are immediately polled.
+
+
Attributes
+
+
- - <ip-address> - the ip address of the inverter
- - <user> - the login-user for the inverter's web page
- - <password> - the login-password for the inverter's web page
-
-
-
-
Example:
+
- readingFnAttributes
+
+
- BAEnable - if 1, data from ../BA.fhtml site is captured
+
+
- GR.Interval - poll interval for global radiation in seconds
+
+
- GR.Link - regionalised link the to the proplanta web page (global radiation, UV-index and sunshine
+ duration)
+ (see Wiki for further information)
+
+
- delay - poll interval for the values of the inverter in seconds
+
+
-
+ delayCounter - delay counter for poll of invert's values beside AC.Power;
+ needed for fast acquisition scenarios to limit the log-output.
+
+
+
- disable - if disable=1, the poll of inverter's values is disabled,
ut not the the poll of proplanta-values
+
+
+
Generated Readings/Events
+
+
- define Kostal KOSTALPIKO 192.168.2.4 pvserver pvwr
+ - AC.Power - the current power, captured only if the internal delayCounter = 0
+
+ - AC.Power.Fast - the current power, on each poll cycle; used for fast acquisition scenarios
+
+ - Daily.Energie - the current procduced energie of the day
+
+ - Daily.Energie.Last - the value of daily energy at 23:00 clock
+
+ - Global.Radiation - the value of global radiation (proplanta);useful for determing the expected energy amount of the day
+
+ - ModeNum - the current processing state of the inverter (1=off 2=idle 3=active)
+
+ - Mode - the german term for the current ModeNum
+
+ - Total.Energy - the total produced energie
+
+ - generator.1.current - the electrical current at string 1
+
+ - generator.2.current - the electrical current at string 2
+
+ - generator.3.current - the electrical current at string 3
+
+ - generator.1.voltage - the voltage at string 1
+
+ - generator.2.voltage - the voltage at string 2
+
+ - generator.3.voltage - the voltage at string 3
+
+ - output.1.voltage - the voltage at output 1
+
+ - output.2.voltage - the voltage at output 2
+
+ - output.3.voltage - the voltage at output 3
+
+ - output.1.power - the power at output 1
+
+ - output.2.power - the power at output 2
+
+ - output.3.power - the power at output 3
+
+ - sensor.1 - the voltage at analog input 1
+
+ - sensor.2 - the voltage at analog input 2
+
+ - sensor.3 - the voltage at analog input 3
+
+ - sensor.4 - the voltage at analog input 4
+
+ - UV.Index - the UV Index (proplanta)
+
+ - sunshine.duration - the sunshine duration (proplanta)
+
+
Additional Readings/Events, if BAEnable=1
+
+
+
+ - Battery.CycleCount - count of charge cycles
+
+ - Battery.StateOfCharge - State of charge for the battery in percent
+
+ - Battery.Voltage - the voltage of the battery
+
+ - Battery.ChargeCurrent - the charge current of the battery
+
+ - Battery.Temperature - the temperature of the battery
+
+ - Power.Solar - the sum of the power produced by the solarinverter
+
+ - Power.Battery - the power drawn from the battery
+
+ - Power.Net - the power drawn from the main
+
+ - Power.Phase1 - the power used on phase L1
+
+ - Power.Phase2 - the power used on phase L2
+
+ - Power.Phase3 - the power used on phase L3
+
+
+
Additional information
+
+
+
-
-
-
-
-
Set-Commands
-
-
-
- set <name> captureGlobalRadiation
-
-
- The values for global radiation, UV-index and sunshine duration are immediately polled.
-
-
-
- set <name> captureKostalData
-
-
- All values of the inverter are immediately polled.
-
-
-
-
-
Attributes
-
- - readingFnAttributes
-
- - BAEnable - if 1, data from ../BA.fhtml site is captured
- - GR.Interval - poll interval for global radiation in seconds
- - GR.Link - regionalised link the to the proplanta web page (global radiation, UV-index and sunshine duration)
- (see Wiki for further information)
-
- - delay - poll interval for the values of the inverter in seconds
- - delayCounter - delay counter for poll of invert's values beside AC.Power;
- needed for fast acquisition scenarios to limit the log-output.
- - disable - if disable=1, the poll of inverter's values is disabled,
- but not the the poll of proplanta-values
-
-
-
-
-
Generated Readings/Events
-
- - AC.Power - the current power, captured only if the internal delayCounter = 0
- - AC.Power.Fast - the current power, on each poll cycle; used for fast acquisition scenarios
- - Daily.Energie - the current procduced energie of the day
- - Daily.Energie.Last - the value of daily energy at 23:00 clock
- - Global.Radiation - the value of global radiation (proplanta);useful for determing the expected energy amount of the day
- - ModeNum - the current processing state of the inverter (1=off 2=idle 3=active)
- - Mode - the german term for the current ModeNum
- - Total.Energy - the total produced energie
-
- - generator.1.current - the electrical current at string 1
- - generator.2.current - the electrical current at string 2
- - generator.3.current - the electrical current at string 3
- - generator.1.voltage - the voltage at string 1
- - generator.2.voltage - the voltage at string 2
- - generator.3.voltage - the voltage at string 3
-
- - output.1.voltage - the voltage at output 1
- - output.2.voltage - the voltage at output 2
- - output.3.voltage - the voltage at output 3
- - output.1.power - the power at output 1
- - output.2.power - the power at output 2
- - output.3.power - the power at output 3
+
- - sensor.1 - the voltage at analog input 1
- - sensor.2 - the voltage at analog input 2
- - sensor.3 - the voltage at analog input 3
- - sensor.4 - the voltage at analog input 4
-
- - UV.Index - the UV Index (proplanta)
- - sunshine.duration - the sunshine duration (proplanta)
-
-
-
Additional Readings/Events, if BAEnable=1
-
- - Battery.CycleCount - count of charge cycles
- - Battery.StateOfCharge - State of charge for the battery in percent
- - Battery.Voltage - the voltage of the battery
- - Battery.ChargeCurrent - the charge current of the battery
- - Battery.Temperature - the temperature of the battery
- - Power.Solar - the sum of the power produced by the solarinverter
- - Power.Battery - the power drawn from the battery
- - Power.Net - the power drawn from the main
- - Power.Phase1 - the power used on phase L1
- - Power.Phase2 - the power used on phase L2
- - Power.Phase3 - the power used on phase L3
-
-
-
-
-
-
- Additional information
-
-
-
=end html
=cut