diff --git a/Bat_EV_SDL _V2/module.php b/Bat_EV_SDL _V2/module.php index e62109f..cfe16d3 100644 --- a/Bat_EV_SDL _V2/module.php +++ b/Bat_EV_SDL _V2/module.php @@ -68,6 +68,19 @@ class Bat_EV_SDL_V2 extends IPSModule public function Update() { + + + // Reentranzschutz – verhindert parallele Update()-Läufe + $semKey = 'BatEVSDL_Update_' . $this->InstanceID; + + if (!IPS_SemaphoreEnter($semKey, 5000)) { + // Überspringen, wenn bereits ein Lauf aktiv ist + $this->SendDebug("Update", "SKIP (Semaphore locked)", 0); + return; + } + + + try { if (!GetValue($this->GetIDForIdent("State"))) {