diff --git a/Ladestation_Universal/module.php b/Ladestation_Universal/module.php index 581904f..c849448 100644 --- a/Ladestation_Universal/module.php +++ b/Ladestation_Universal/module.php @@ -158,13 +158,13 @@ class Ladestation_Universal extends IPSModule $ch = curl_init(); // Setze die URL - if(ReadPropertyInteger("Ladestation")==2){ + if($this->ReadPropertyInteger("Ladestation")==2){ curl_setopt( $ch, CURLOPT_URL, "http://" . $this->ReadPropertyString("IP_Adresse") . "/api/status" ); - }elseif(ReadPropertyInteger("Ladestation")==1){ + }elseif($this->ReadPropertyInteger("Ladestation")==1){ curl_setopt( $ch, CURLOPT_URL, @@ -247,9 +247,9 @@ class Ladestation_Universal extends IPSModule public function sendPowerToStation($value) { - if(ReadPropertyInteger("Ladestation")==2){ + if($this->ReadPropertyInteger("Ladestation")==2){ $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="; } // Base URL @@ -264,9 +264,9 @@ class Ladestation_Universal extends IPSModule // If value is 0, make a single request if ($value == 0) { - if(ReadPropertyInteger("Ladestation")==2){ + if($this->ReadPropertyInteger("Ladestation")==2){ $url = $baseUrl . "frc=1"; - }elseif(ReadPropertyInteger("Ladestation")==1){ + }elseif($this->ReadPropertyInteger("Ladestation")==1){ $url = $baseUrl . "alw=0"; } @@ -280,9 +280,9 @@ class Ladestation_Universal extends IPSModule // For value between 1 and 32, make two requests elseif ($value >= 1 && $value <= 32) { // First request - if(ReadPropertyInteger("Ladestation")==2){ + if($this->ReadPropertyInteger("Ladestation")==2){ $url = $baseUrl . "frc=2"; - }elseif(ReadPropertyInteger("Ladestation")==1){ + }elseif($this->ReadPropertyInteger("Ladestation")==1){ $url = $baseUrl . "alw=1"; } @@ -299,9 +299,9 @@ class Ladestation_Universal extends IPSModule // Second request - if(ReadPropertyInteger("Ladestation")==2){ + if($this->ReadPropertyInteger("Ladestation")==2){ $url2 = $baseUrl . "amp=$value"; - }elseif(ReadPropertyInteger("Ladestation")==1){ + }elseif($this->ReadPropertyInteger("Ladestation")==1){ $url2 = $baseUrl . "amx=$value"; } diff --git a/library.json b/library.json index a8f6234..9eb7817 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.192", + "version": "0.193", "build": 0, "date": 0 } \ No newline at end of file