no message

This commit is contained in:
2026-05-26 15:31:01 +02:00
parent 7a3d864a81
commit c4fc0e37ea
+12 -6
View File
@@ -15,7 +15,7 @@ class MQTTBatterySDL extends IPSModule
$this->RegisterPropertyInteger('PowerProductionID', 0); $this->RegisterPropertyInteger('PowerProductionID', 0);
$this->RegisterPropertyInteger('PublishInstanceID', 0); $this->RegisterPropertyInteger('PublishInstanceID', 0);
$this->RegisterPropertyInteger('TargetSoC', 50); $this->RegisterPropertyFloat('TargetSoC', 50);
$this->RegisterPropertyInteger('ChargePower', 2500); $this->RegisterPropertyInteger('ChargePower', 2500);
$this->RegisterPropertyInteger('DischargePower', 2500); $this->RegisterPropertyInteger('DischargePower', 2500);
$this->RegisterPropertyInteger('MaxPowerSetpoint', 10000); $this->RegisterPropertyInteger('MaxPowerSetpoint', 10000);
@@ -134,7 +134,7 @@ class MQTTBatterySDL extends IPSModule
$soc = GetValue($socID); $soc = GetValue($socID);
$targetSoC = $this->ReadPropertyInteger('TargetSoC'); $targetSoC = $this->ReadPropertyFloat('TargetSoC');
$chargePower = $this->ReadPropertyInteger('ChargePower'); $chargePower = $this->ReadPropertyInteger('ChargePower');
@@ -173,12 +173,18 @@ class MQTTBatterySDL extends IPSModule
// Ziel erreicht // Ziel erreicht
// ------------------------------------------------- // -------------------------------------------------
if ((int)$soc == $targetSoC) { $tolerance = 1.0;
SetValue($reqActionID, 0); if (
$soc >= $targetSoC
&&
$soc <= ($targetSoC + $tolerance)
) {
return; SetValue($reqActionID, 0);
}
return;
}
// ------------------------------------------------- // -------------------------------------------------
// Laden // Laden