Energiemanager optimiert, Easee-Ladestation eingefügt.

This commit is contained in:
2025-08-07 08:45:19 +02:00
parent 6ffada6d29
commit aa150f58be
18 changed files with 1347 additions and 232 deletions

View File

@@ -12,10 +12,9 @@ class Ansteuerung_Askoheat extends IPSModule
$this->RegisterPropertyBoolean("Boilertemperatur_glätten", false);
$this->RegisterPropertyInteger("Boilervolumen", 300);
$this->RegisterPropertyString("Zeitplan", "");
$this->RegisterPropertyInteger("BoilerLeistung", 3500); // Standardwert für Volllast
$this->RegisterPropertyInteger("BoilerLeistung", 4400); // Standardwert für Volllast
$this->RegisterPropertyInteger("Interval", 5); // Recheninterval
$this->RegisterPropertyInteger("Variable_Leistung", 0); // Recheninterval
$this->RegisterPropertyInteger("Variable_Temperatur", 0); // Recheninterval
$this->RegisterPropertyInteger("Variable_Temperatur_Ist", 0); // Recheninterval
// Variabeln für Kommunkation mit Manager
@@ -132,7 +131,15 @@ class Ansteuerung_Askoheat extends IPSModule
// Methode zum Setzen des aktuellen Stromverbrauchs
public function SetAktuelle_Leistung(int $power)
{
RequestAction($this->ReadPropertyInteger("Variable_Leistung"), $power);
if($power>0){
RequestAction($this->ReadPropertyInteger("Variable_Leistung"), round($power / round(($this->ReadPropertyInteger("BoilerLeistung")/7))));
}else{
RequestAction($this->ReadPropertyInteger("Variable_Leistung"), 0);
}
// Prüfe auf Änderung der Power im Vergleich zur letzten Einstellung
$lastPower = GetValue($this->GetIDForIdent("Aktuelle_Leistung"));
@@ -156,7 +163,7 @@ class Ansteuerung_Askoheat extends IPSModule
public function Calc_Seven_Steps(int $power)
{
$steps = [];
$increment = $power / 7;
$increment = round($power / 7);
for ($i = 0; $i <= 7; $i++) {
$steps[] = $i * $increment;