2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

23_KOSTALPIKO.pm : feature: Support of https

git-svn-id: https://svn.fhem.de/fhem/trunk@15368 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
John 2017-10-31 19:00:55 +00:00
parent 0fb1ff4660
commit 8aceebbd97

View File

@ -39,8 +39,8 @@
# 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)
# 2016-02-25 john V2.08 : support of Piko 7 with only 2 strings instead of 3 (thanks to erwin)
# 2016-02-25 john V2.09 : substitution of term given/when with if/then
# 2017-19-26 john V2.10 : support of https
####################################################################################################
# --------------------------------------------
@ -292,7 +292,7 @@ use vars qw($readingFnAttributes);
use vars qw(%defs);
my $MODUL = "KOSTALPIKO";
my $KOSTAL_VERSION = "2.08";
my $KOSTAL_VERSION = "2.10";
########################################
sub KOSTALPIKO_Log($$$)
@ -373,29 +373,23 @@ sub KOSTALPIKO_Set($@)
return $usage if ( @a < 2 );
my $cmd = lc( $a[1] );
given ($cmd)
{
when ("?")
if ( $cmd eq "?" )
{
return $usage;
}
when ("capturekostaldata")
} elsif ( $cmd eq "capturekostaldata" )
{
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " para:" . $hash->{helper}{TimerStatus};
KOSTALPIKO_StatusStart($hash);
}
when ("captureglobalradiation")
} elsif ( $cmd eq "captureglobalradiation" )
{
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
KOSTALPIKO_GrStart($hash);
}
when ("test")
} elsif ( $cmd eq "test" )
{
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
KOSTALPIKO_GrStart($hash);
}
when ("sleeper")
} elsif ( $cmd eq "sleeper" )
{
return "Set sleeper needs a <value> parameter"
if ( @a != 3 );
@ -406,12 +400,10 @@ sub KOSTALPIKO_Set($@)
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " value:" . $a[2];
$hash->{helper}{Sleeper} = $a[2];
}
default
} else
{
return $usage;
}
}
return;
}
#############################################
@ -890,7 +882,7 @@ sub KOSTALPIKO_GrHtmlAcquire($)
my $agent = LWP::UserAgent->new(
env_proxy => 1,
keep_alive => 1,
protocols_allowed => ['http'],
protocols_allowed => ['http','https'],
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]"
);
@ -1077,6 +1069,7 @@ sub KOSTALPIKO_GrTimer($)
1;
=pod
=item summary Module for Kostal Piko Inverter
=begin html