diff --git a/Ladestation/module.php b/Ladestation/module.php index e1a78ff..a841429 100644 --- a/Ladestation/module.php +++ b/Ladestation/module.php @@ -93,18 +93,22 @@ $this->RegisterVariableString("Token_Intern", "Internes Token Easee"); $stationType = $this->ReadPropertyInteger("Ladestation"); if (!$this->UsesEaseeGateway($stationType)) { + $this->SetStatus(102); return; } $this->SetTimerInterval("Timer_Refresh_Token", 0); if ($this->GetConfiguredEaseeGatewayID() <= 0) { + $this->SetStatus(102); return; } try { $this->SubscribeToEaseeGateway(); $this->GetEaseeStateFromGateway(); + $this->SetStatus(102); } catch (Throwable $exception) { + $this->SetStatus(102); return; } } diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 391c377..f39ba37 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -122,6 +122,7 @@ $this->RegisterVariableString("Token_Intern", "Internes Token Easee"); $stationType = $this->ReadPropertyInteger("Ladestation"); if (!$this->UsesEaseeGateway($stationType)) { + $this->SetStatus(102); return; } @@ -136,11 +137,14 @@ $this->RegisterVariableString("Token_Intern", "Internes Token Easee"); } if (!$this->IsEaseeGatewayInstance($parentID)) { + $this->SetStatus(102); return; } $this->SubscribeToEaseeGateway(); $this->GetEaseeStateFromGateway(); + $this->SetStatus(102); } catch (Throwable $exception) { + $this->SetStatus(102); return; } }