no message
This commit is contained in:
@@ -15,7 +15,7 @@ class MQTTBatterySDL extends IPSModule
|
||||
$this->RegisterPropertyInteger('PowerProductionID', 0);
|
||||
$this->RegisterPropertyInteger('PublishInstanceID', 0);
|
||||
|
||||
$this->RegisterPropertyInteger('TargetSoC', 50);
|
||||
$this->RegisterPropertyFloat('TargetSoC', 50);
|
||||
$this->RegisterPropertyInteger('ChargePower', 2500);
|
||||
$this->RegisterPropertyInteger('DischargePower', 2500);
|
||||
$this->RegisterPropertyInteger('MaxPowerSetpoint', 10000);
|
||||
@@ -134,7 +134,7 @@ class MQTTBatterySDL extends IPSModule
|
||||
|
||||
$soc = GetValue($socID);
|
||||
|
||||
$targetSoC = $this->ReadPropertyInteger('TargetSoC');
|
||||
$targetSoC = $this->ReadPropertyFloat('TargetSoC');
|
||||
|
||||
$chargePower = $this->ReadPropertyInteger('ChargePower');
|
||||
|
||||
@@ -173,12 +173,18 @@ class MQTTBatterySDL extends IPSModule
|
||||
// Ziel erreicht
|
||||
// -------------------------------------------------
|
||||
|
||||
if ((int)$soc == $targetSoC) {
|
||||
$tolerance = 1.0;
|
||||
|
||||
SetValue($reqActionID, 0);
|
||||
if (
|
||||
$soc >= $targetSoC
|
||||
&&
|
||||
$soc <= ($targetSoC + $tolerance)
|
||||
) {
|
||||
|
||||
return;
|
||||
}
|
||||
SetValue($reqActionID, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
// Laden
|
||||
|
||||
Reference in New Issue
Block a user