diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 32a894b..24db2f4 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -431,7 +431,7 @@ class Ladestation_v2 extends IPSModule CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ - "Authorization: Bearer ".$this->GetValue("Token_Intern")."", + "Authorization: Bearer ".$this->GetBuffer("Token_Intern")."", "content-type: application/*+json" ], ]); @@ -712,7 +712,7 @@ class Ladestation_v2 extends IPSModule CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"amps\":". $value .",\"minutes\":0}", CURLOPT_HTTPHEADER => [ - "Authorization: Bearer ".$this->GetValue("Token_Intern")."", + "Authorization: Bearer ".$this->GetBuffer("Token_Intern")."", "content-type: application/*+json" ], ]); @@ -775,7 +775,7 @@ class Ladestation_v2 extends IPSModule CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"amps\":". $value .",\"minutes\":0}", CURLOPT_HTTPHEADER => [ - "Authorization: Bearer ".$this->GetValue("Token_Intern")."", + "Authorization: Bearer ".$this->GetBuffer("Token_Intern")."", "content-type: application/*+json" ], ]); @@ -841,7 +841,7 @@ class Ladestation_v2 extends IPSModule // cURL-Handle schließen curl_close($ch); - $this->SetValue("Token_Intern", json_decode($response['accessToken'])); + $this->SetBuffer("Token_Intern", json_decode($response)['accessToken']); }