no message
This commit is contained in:
@@ -247,7 +247,7 @@ class HauptManager extends IPSModule
|
|||||||
$allSteps[] = [
|
$allSteps[] = [
|
||||||
"user" => $user["InstanceID"],
|
"user" => $user["InstanceID"],
|
||||||
"Writeback" => $user["Writeback"],
|
"Writeback" => $user["Writeback"],
|
||||||
"step" => $step,
|
"step" => $step
|
||||||
//"Leistung_Delta" => $user["Leistung_Delta"]
|
//"Leistung_Delta" => $user["Leistung_Delta"]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -394,7 +394,7 @@ class HauptManager extends IPSModule
|
|||||||
IPS_LogMessage("Manager", $userInstanceID);
|
IPS_LogMessage("Manager", $userInstanceID);
|
||||||
IPS_LogMessage("Manager", $minimalleitsung);
|
IPS_LogMessage("Manager", $minimalleitsung);
|
||||||
IPS_LogMessage("Manager", $remainingPower);
|
IPS_LogMessage("Manager", $remainingPower);
|
||||||
IPS_LogMessage("Manager", $leistung);
|
IPS_LogMessage("Manager", print_r($leistung));
|
||||||
// Jedem user den höheren der beiden werte aus minimalwert oder vergebenem zuteilen
|
// Jedem user den höheren der beiden werte aus minimalwert oder vergebenem zuteilen
|
||||||
$leistung = max($leistung, $minimalleitsung)*-1;
|
$leistung = max($leistung, $minimalleitsung)*-1;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class Ladestation_Universal extends IPSModule
|
|||||||
$this->RegisterVariableInteger("Power", "Power");
|
$this->RegisterVariableInteger("Power", "Power");
|
||||||
$this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving");
|
$this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving");
|
||||||
$this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0);
|
$this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0);
|
||||||
|
$this->RegisterVariableInteger("Power_Count", "Power_Count", "", 0);
|
||||||
|
|
||||||
// Hilfsvariabeln für Idle zustand
|
// Hilfsvariabeln für Idle zustand
|
||||||
$this->RegisterPropertyInteger("IdleCounterMax", 2);
|
$this->RegisterPropertyInteger("IdleCounterMax", 2);
|
||||||
@@ -180,6 +181,8 @@ class Ladestation_Universal extends IPSModule
|
|||||||
$maxLeistung = $this->ReadPropertyInteger("MaxLeistung");
|
$maxLeistung = $this->ReadPropertyInteger("MaxLeistung");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
||||||
// Setze die URL
|
// Setze die URL
|
||||||
@@ -236,8 +239,6 @@ class Ladestation_Universal extends IPSModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Überprüfe, ob die Antwort nicht leer ist
|
// Überprüfe, ob die Antwort nicht leer ist
|
||||||
if ($response) {
|
if ($response) {
|
||||||
// Dekodiere die JSON-Antwort
|
// Dekodiere die JSON-Antwort
|
||||||
@@ -307,15 +308,8 @@ class Ladestation_Universal extends IPSModule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($this->ReadPropertyInteger("Ladestation")==4){
|
if($this->ReadPropertyInteger("Ladestation")==4){
|
||||||
// Überprüfe, ob das JSON-Dekodieren erfolgreich war und der Schlüssel "car" existiert
|
|
||||||
|
|
||||||
/* SetValue(
|
|
||||||
$this->GetIDForIdent("Ladeleistung_Effektiv"),
|
|
||||||
$this->GetValue("Ladeleistung")
|
|
||||||
); */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Nichts zu tun hier...
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -326,6 +320,23 @@ class Ladestation_Universal extends IPSModule
|
|||||||
// Peak-Wert speichern
|
// Peak-Wert speichern
|
||||||
$this->SetValue("Peak", $Peak);
|
$this->SetValue("Peak", $Peak);
|
||||||
|
|
||||||
|
|
||||||
|
if($this->GetValue("Aktuelle_Leistung")<(0.8*$this->GetValue("Power")) && $this->GetValue("Power")>0){
|
||||||
|
|
||||||
|
$this->SetValue("Power_Count", $this->GetValue("Power_Count")+1);
|
||||||
|
|
||||||
|
}elseif($this->GetValue("Power_Count")<=4) {
|
||||||
|
|
||||||
|
$this->SetValue("Power_Count", 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($this->GetValue("Power_Count"))>4{
|
||||||
|
$maxLeistung = 1.05 * $this->GetValue("Aktuelle_Leistung");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Array für die Powersteps initialisieren
|
// Array für die Powersteps initialisieren
|
||||||
$powerSteps = [0];
|
$powerSteps = [0];
|
||||||
|
|
||||||
@@ -347,12 +358,17 @@ class Ladestation_Universal extends IPSModule
|
|||||||
} elseif ($solarladen && $Peak) {
|
} elseif ($solarladen && $Peak) {
|
||||||
$powerSteps = [0];
|
$powerSteps = [0];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
$powerSteps += $this->getRangeLimits(
|
$powerSteps += $this->getRangeLimits(
|
||||||
$minLeistung,
|
$minLeistung,
|
||||||
$maxLeistung,
|
$maxLeistung,
|
||||||
GetValue($this->GetIDForIdent("Lademodus"))
|
GetValue($this->GetIDForIdent("Lademodus"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$this->SetValue("Power_Count", 0);
|
||||||
}
|
}
|
||||||
// PowerSteps in der RegisterVariable speichern
|
// PowerSteps in der RegisterVariable speichern
|
||||||
SetValue($this->GetIDForIdent("PowerSteps"), json_encode($powerSteps));
|
SetValue($this->GetIDForIdent("PowerSteps"), json_encode($powerSteps));
|
||||||
|
|||||||
Reference in New Issue
Block a user