remove old port entry
This commit is contained in:
parent
f11a158ea6
commit
90e607ca86
@ -40,14 +40,14 @@
|
|||||||
#######
|
#######
|
||||||
#######
|
#######
|
||||||
# URLs zum Abrufen diverser Daten
|
# URLs zum Abrufen diverser Daten
|
||||||
# http://<ip-Powerwall>/api/system_status/soe
|
# https://<ip-Powerwall>/api/system_status/soe
|
||||||
# http://<ip-Powerwall>/api/meters/aggregates
|
# https://<ip-Powerwall>/api/meters/aggregates
|
||||||
# http://<ip-Powerwall>/api/site_info
|
# https://<ip-Powerwall>/api/site_info
|
||||||
# http://<ip-Powerwall>/api/sitemaster
|
# https://<ip-Powerwall>/api/sitemaster
|
||||||
# http://<ip-Powerwall>/api/powerwalls
|
# https://<ip-Powerwall>/api/powerwalls
|
||||||
# http://<ip-Powerwall>/api/networks
|
# https://<ip-Powerwall>/api/networks
|
||||||
# http://<ip-Powerwall>/api/system/networks
|
# https://<ip-Powerwall>/api/system/networks
|
||||||
# http://<ip-Powerwall>/api/operation
|
# https://<ip-Powerwall>/api/operation
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
@ -218,7 +218,6 @@ sub Define($$) {
|
|||||||
my $host = $a[2];
|
my $host = $a[2];
|
||||||
$hash->{HOST} = $host;
|
$hash->{HOST} = $host;
|
||||||
$hash->{INTERVAL} = 300;
|
$hash->{INTERVAL} = 300;
|
||||||
$hash->{PORT} = 1080;
|
|
||||||
$hash->{VERSION} = version->parse($VERSION)->normal;
|
$hash->{VERSION} = version->parse($VERSION)->normal;
|
||||||
$hash->{NOTIFYDEV} = "global,$name";
|
$hash->{NOTIFYDEV} = "global,$name";
|
||||||
$hash->{actionQueue} = [];
|
$hash->{actionQueue} = [];
|
||||||
@ -226,7 +225,7 @@ sub Define($$) {
|
|||||||
CommandAttr( undef, $name . ' room Tesla' )
|
CommandAttr( undef, $name . ' room Tesla' )
|
||||||
if ( AttrVal( $name, 'room', 'none' ) eq 'none' );
|
if ( AttrVal( $name, 'room', 'none' ) eq 'none' );
|
||||||
Log3 $name, 3,
|
Log3 $name, 3,
|
||||||
"TeslaPowerwall2AC ($name) - defined TeslaPowerwall2AC Device with Host $host, Port $hash->{PORT} and Interval $hash->{INTERVAL}";
|
"TeslaPowerwall2AC ($name) - defined TeslaPowerwall2AC Device with Host $host and Interval $hash->{INTERVAL}";
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -445,7 +444,7 @@ sub Write($) {
|
|||||||
|
|
||||||
HttpUtils_NonblockingGet(
|
HttpUtils_NonblockingGet(
|
||||||
{
|
{
|
||||||
url => 'http://' . $uri,
|
url => 'https://' . $uri,
|
||||||
timeout => 5,
|
timeout => 5,
|
||||||
method => $method,
|
method => $method,
|
||||||
data => $data,
|
data => $data,
|
||||||
@ -1035,13 +1034,12 @@ sub ReadingsProcessing_Meters_Solar($$) {
|
|||||||
sub CreateUri($$) {
|
sub CreateUri($$) {
|
||||||
my ( $hash, $path ) = @_;
|
my ( $hash, $path ) = @_;
|
||||||
my $host = $hash->{HOST};
|
my $host = $hash->{HOST};
|
||||||
my $port = $hash->{PORT};
|
|
||||||
my $method = 'GET';
|
my $method = 'GET';
|
||||||
my $uri;
|
my $uri;
|
||||||
my $header;
|
my $header;
|
||||||
my $data;
|
my $data;
|
||||||
|
|
||||||
$uri = $host . ':' . $port . '/api/' . $paths{$path};
|
$uri = $host . ':' . '/api/' . $paths{$path};
|
||||||
|
|
||||||
if ( $path eq 'sitemasterrun' ) {
|
if ( $path eq 'sitemasterrun' ) {
|
||||||
$header = 'Authorization: Bearer' . $hash->{TOKEN};
|
$header = 'Authorization: Bearer' . $hash->{TOKEN};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user