Version 2.0.0 Beta
This commit is contained in:
@@ -65,6 +65,12 @@
|
||||
"name": "WW_Temp",
|
||||
"caption": "Variable mit der Aktuellen Warmwassertemperatur",
|
||||
"test": true
|
||||
},
|
||||
{
|
||||
"type": "NumberSpinner",
|
||||
"name": "Interval",
|
||||
"caption": "Intervall Neuberechnung der Werte Erst für spätere Versionen, aktuell auf 5 lassen!",
|
||||
"suffix": "Sekunden"
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ class WP_Steuerung extends IPSModule
|
||||
$this->RegisterPropertyBoolean("Schwellwert_Anwenden", false);
|
||||
$this->RegisterPropertyInteger("Schwellwert", 0);
|
||||
$this->RegisterPropertyInteger("WW_Temp", 1);
|
||||
$this->RegisterPropertyInteger("Interval", 5); // Recheninterval
|
||||
|
||||
// WP-Spezifische Variabeln
|
||||
$this->RegisterVariableBoolean("Sperrzeit", "Sperrzeit", "", false);
|
||||
@@ -32,10 +33,11 @@ class WP_Steuerung extends IPSModule
|
||||
$this->RegisterVariableInteger("PV_Prio", "PV_Prio");
|
||||
$this->RegisterVariableBoolean("Idle", "Idle", "", 0);
|
||||
$this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0);
|
||||
$this->RegisterVariableFloat("Bezogene_Energie", "Bezogene_Energie", "", 0);
|
||||
$this->RegisterVariableFloat("Bezogene_Energie", "Bezogene_Energie", "", 0);
|
||||
$this->RegisterVariableString("PowerSteps", "PowerSteps");
|
||||
$this->RegisterVariableInteger("Power", "Power");
|
||||
$this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving");
|
||||
$this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0);
|
||||
|
||||
// Hilfsvariabeln für Idle zustand
|
||||
$this->RegisterPropertyInteger("IdleCounterMax", 2);
|
||||
@@ -45,13 +47,15 @@ class WP_Steuerung extends IPSModule
|
||||
// Initialisiere Idle
|
||||
$this->SetValue("Idle", true);
|
||||
|
||||
$this->RegisterTimer("Timer_Do_UserCalc",5000,"IPS_RequestAction(" .$this->InstanceID .', "Do_UserCalc", "");');
|
||||
$this->RegisterTimer("Timer_Do_UserCalc_WP",$this->ReadPropertyInteger("Interval")*1000,"IPS_RequestAction(" .$this->InstanceID .', "Do_UserCalc", "");');
|
||||
|
||||
}
|
||||
|
||||
public function ApplyChanges()
|
||||
{
|
||||
parent::ApplyChanges();
|
||||
$this->SetTimerInterval("Timer_Do_UserCalc_WP",$this->ReadPropertyInteger("Interval")*1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +86,7 @@ class WP_Steuerung extends IPSModule
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Methode zum Setzen des aktuellen Stromverbrauchs
|
||||
public function SetAktuelle_Leistung(float $power)
|
||||
{
|
||||
@@ -259,6 +264,8 @@ class WP_Steuerung extends IPSModule
|
||||
$newCount = $this->GetValue("WP_Laufzeit_Zahler");
|
||||
$this->SetValue("WP_Laufzeit_Zahler", $newCount + 1);
|
||||
}
|
||||
|
||||
$this->SetValue("Bezogene_Energie", ($this->GetValue("Bezogene_Energie") + ($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))));
|
||||
}
|
||||
|
||||
// Methode zum Abrufen der aktuellen Daten
|
||||
|
||||
Reference in New Issue
Block a user