this vergessen...
This commit is contained in:
@@ -158,13 +158,13 @@ class Ladestation_Universal extends IPSModule
|
|||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
||||||
// Setze die URL
|
// Setze die URL
|
||||||
if(ReadPropertyInteger("Ladestation")==2){
|
if($this->ReadPropertyInteger("Ladestation")==2){
|
||||||
curl_setopt(
|
curl_setopt(
|
||||||
$ch,
|
$ch,
|
||||||
CURLOPT_URL,
|
CURLOPT_URL,
|
||||||
"http://" . $this->ReadPropertyString("IP_Adresse") . "/api/status"
|
"http://" . $this->ReadPropertyString("IP_Adresse") . "/api/status"
|
||||||
);
|
);
|
||||||
}elseif(ReadPropertyInteger("Ladestation")==1){
|
}elseif($this->ReadPropertyInteger("Ladestation")==1){
|
||||||
curl_setopt(
|
curl_setopt(
|
||||||
$ch,
|
$ch,
|
||||||
CURLOPT_URL,
|
CURLOPT_URL,
|
||||||
@@ -247,9 +247,9 @@ class Ladestation_Universal extends IPSModule
|
|||||||
public function sendPowerToStation($value)
|
public function sendPowerToStation($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(ReadPropertyInteger("Ladestation")==2){
|
if($this->ReadPropertyInteger("Ladestation")==2){
|
||||||
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/api/set?";
|
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/api/set?";
|
||||||
}elseif(ReadPropertyInteger("Ladestation")==1){
|
}elseif($this->ReadPropertyInteger("Ladestation")==1){
|
||||||
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload=";
|
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload=";
|
||||||
}
|
}
|
||||||
// Base URL
|
// Base URL
|
||||||
@@ -264,9 +264,9 @@ class Ladestation_Universal extends IPSModule
|
|||||||
|
|
||||||
// If value is 0, make a single request
|
// If value is 0, make a single request
|
||||||
if ($value == 0) {
|
if ($value == 0) {
|
||||||
if(ReadPropertyInteger("Ladestation")==2){
|
if($this->ReadPropertyInteger("Ladestation")==2){
|
||||||
$url = $baseUrl . "frc=1";
|
$url = $baseUrl . "frc=1";
|
||||||
}elseif(ReadPropertyInteger("Ladestation")==1){
|
}elseif($this->ReadPropertyInteger("Ladestation")==1){
|
||||||
$url = $baseUrl . "alw=0";
|
$url = $baseUrl . "alw=0";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -280,9 +280,9 @@ class Ladestation_Universal extends IPSModule
|
|||||||
// For value between 1 and 32, make two requests
|
// For value between 1 and 32, make two requests
|
||||||
elseif ($value >= 1 && $value <= 32) {
|
elseif ($value >= 1 && $value <= 32) {
|
||||||
// First request
|
// First request
|
||||||
if(ReadPropertyInteger("Ladestation")==2){
|
if($this->ReadPropertyInteger("Ladestation")==2){
|
||||||
$url = $baseUrl . "frc=2";
|
$url = $baseUrl . "frc=2";
|
||||||
}elseif(ReadPropertyInteger("Ladestation")==1){
|
}elseif($this->ReadPropertyInteger("Ladestation")==1){
|
||||||
$url = $baseUrl . "alw=1";
|
$url = $baseUrl . "alw=1";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -299,9 +299,9 @@ class Ladestation_Universal extends IPSModule
|
|||||||
// Second request
|
// Second request
|
||||||
|
|
||||||
|
|
||||||
if(ReadPropertyInteger("Ladestation")==2){
|
if($this->ReadPropertyInteger("Ladestation")==2){
|
||||||
$url2 = $baseUrl . "amp=$value";
|
$url2 = $baseUrl . "amp=$value";
|
||||||
}elseif(ReadPropertyInteger("Ladestation")==1){
|
}elseif($this->ReadPropertyInteger("Ladestation")==1){
|
||||||
$url2 = $baseUrl . "amx=$value";
|
$url2 = $baseUrl . "amx=$value";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "0.192",
|
"version": "0.193",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user