mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +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:
parent
0fb1ff4660
commit
8aceebbd97
@ -39,8 +39,8 @@
|
|||||||
# 2014-12-22 john V2.06 : checked HTML
|
# 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)
|
# 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.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);
|
use vars qw(%defs);
|
||||||
my $MODUL = "KOSTALPIKO";
|
my $MODUL = "KOSTALPIKO";
|
||||||
my $KOSTAL_VERSION = "2.08";
|
my $KOSTAL_VERSION = "2.10";
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
sub KOSTALPIKO_Log($$$)
|
sub KOSTALPIKO_Log($$$)
|
||||||
@ -373,29 +373,23 @@ sub KOSTALPIKO_Set($@)
|
|||||||
return $usage if ( @a < 2 );
|
return $usage if ( @a < 2 );
|
||||||
|
|
||||||
my $cmd = lc( $a[1] );
|
my $cmd = lc( $a[1] );
|
||||||
given ($cmd)
|
|
||||||
{
|
if ( $cmd eq "?" )
|
||||||
when ("?")
|
|
||||||
{
|
{
|
||||||
return $usage;
|
return $usage;
|
||||||
}
|
} elsif ( $cmd eq "capturekostaldata" )
|
||||||
when ("capturekostaldata")
|
|
||||||
{
|
{
|
||||||
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " para:" . $hash->{helper}{TimerStatus};
|
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " para:" . $hash->{helper}{TimerStatus};
|
||||||
KOSTALPIKO_StatusStart($hash);
|
KOSTALPIKO_StatusStart($hash);
|
||||||
}
|
} elsif ( $cmd eq "captureglobalradiation" )
|
||||||
when ("captureglobalradiation")
|
|
||||||
{
|
{
|
||||||
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
|
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
|
||||||
KOSTALPIKO_GrStart($hash);
|
KOSTALPIKO_GrStart($hash);
|
||||||
}
|
} elsif ( $cmd eq "test" )
|
||||||
when ("test")
|
|
||||||
{
|
{
|
||||||
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
|
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1];
|
||||||
KOSTALPIKO_GrStart($hash);
|
KOSTALPIKO_GrStart($hash);
|
||||||
}
|
} elsif ( $cmd eq "sleeper" )
|
||||||
|
|
||||||
when ("sleeper")
|
|
||||||
{
|
{
|
||||||
return "Set sleeper needs a <value> parameter"
|
return "Set sleeper needs a <value> parameter"
|
||||||
if ( @a != 3 );
|
if ( @a != 3 );
|
||||||
@ -406,12 +400,10 @@ sub KOSTALPIKO_Set($@)
|
|||||||
|
|
||||||
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " value:" . $a[2];
|
KOSTALPIKO_Log $hash, 3, "set command: " . $a[1] . " value:" . $a[2];
|
||||||
$hash->{helper}{Sleeper} = $a[2];
|
$hash->{helper}{Sleeper} = $a[2];
|
||||||
}
|
} else
|
||||||
default
|
|
||||||
{
|
{
|
||||||
return $usage;
|
return $usage;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#############################################
|
#############################################
|
||||||
@ -890,7 +882,7 @@ sub KOSTALPIKO_GrHtmlAcquire($)
|
|||||||
my $agent = LWP::UserAgent->new(
|
my $agent = LWP::UserAgent->new(
|
||||||
env_proxy => 1,
|
env_proxy => 1,
|
||||||
keep_alive => 1,
|
keep_alive => 1,
|
||||||
protocols_allowed => ['http'],
|
protocols_allowed => ['http','https'],
|
||||||
timeout => 10,
|
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]"
|
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;
|
1;
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item summary Module for Kostal Piko Inverter
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user