From f8f31bac50ed31539ad1cca34bb8905984b8120e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Mon, 17 Mar 2025 08:26:56 +0100 Subject: [PATCH] Gesamtenergiemenge wird nun aufintegriert --- Batterie/module.php | 3 ++- Boiler_2_Stufig_Mit_Fueler/module.php | 2 +- Ladestation_Universal/module.php | 2 ++ Verbraucher_1_Stufig/module.php | 2 ++ WP_Steuerung/module.php | 3 +++ library.json | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index 0003224..0704aa1 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -175,7 +175,8 @@ public function RequestAction($Ident, $Value) // Setze die neue aktuelle Leistung $this->SetValue("Aktuelle_Leistung", $power); - + $this->SetValue("Bezogene_Energie", $this->GetValue("Bezogene_Energie")+($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))); + // IdleCounter verarbeiten $this->ProcessIdleCounter(); } diff --git a/Boiler_2_Stufig_Mit_Fueler/module.php b/Boiler_2_Stufig_Mit_Fueler/module.php index 271f63f..0fbc7cc 100644 --- a/Boiler_2_Stufig_Mit_Fueler/module.php +++ b/Boiler_2_Stufig_Mit_Fueler/module.php @@ -161,7 +161,7 @@ class Boiler_2_Stufig_Mit_Fueler extends IPSModule // Setze die neue Aktuelle_Leistung $this->SetValue("Aktuelle_Leistung", $power); - + $this->SetValue("Bezogene_Energie", $this->GetValue("Bezogene_Energie")+($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))); // IdleCounter verarbeiten $this->ProcessIdleCounter(); } diff --git a/Ladestation_Universal/module.php b/Ladestation_Universal/module.php index 27e130a..54f4b4e 100644 --- a/Ladestation_Universal/module.php +++ b/Ladestation_Universal/module.php @@ -91,6 +91,8 @@ class Ladestation_Universal extends IPSModule $internalPower = GetValue($this->GetIDForIdent("Aktuelle_Leistung")); // Aktuelle Leistungsvorgabe setzen SetValue($this->GetIDForIdent("Aktuelle_Leistung"), $power); + $this->SetValue("Bezogene_Energie", $this->GetValue("Bezogene_Energie")+($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))); + if ($power != $internalPower) { // Setze die interne Leistungsvorgabe diff --git a/Verbraucher_1_Stufig/module.php b/Verbraucher_1_Stufig/module.php index 9f61795..6365b72 100644 --- a/Verbraucher_1_Stufig/module.php +++ b/Verbraucher_1_Stufig/module.php @@ -120,6 +120,8 @@ class Verbraucher_1_Stufig extends IPSModule $this->SetTimerOn(); } $this->SetValue("Aktuelle_Leistung", $power); + $this->SetValue("Bezogene_Energie", $this->GetValue("Bezogene_Energie")+($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))); + $boilerLeistung = $this->ReadPropertyInteger("BoilerLeistung"); $schaltkontaktID = $this->ReadPropertyInteger("Schaltkontakt1"); diff --git a/WP_Steuerung/module.php b/WP_Steuerung/module.php index 3430842..32f447c 100644 --- a/WP_Steuerung/module.php +++ b/WP_Steuerung/module.php @@ -262,6 +262,9 @@ 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 diff --git a/library.json b/library.json index 0cc2817..905ebbb 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.187", + "version": "1.188", "build": 0, "date": 0 } \ No newline at end of file