Hallo @Mabbi
ich habe hier mal mitgelesen und einen ähnlichen Aufbau, allerdings mit 2 Hyper und habe das mit Java-Script gelöst.
Die Akkus werden bei mir über die angeschlossenen PV-Panels und externer PV geladen. Ich steuere beide Hyper zusammen. Hier mal ein Auszug wie ich die Leistung ermittle. Bin aber in der Cloud.
const hyper1 = {
name: 'Hyper1',
inputLimitDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.control.setInputLimit',
outputLimitDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.control.setOutputLimit',
inputDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.gridInputPower',
outputDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.outputHomePower',
acModeDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.control.acMode',
pvLeistungDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.solarInputPower',
chargePowerDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.outputPackPower',
socDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.electricLevel',
setsocDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.control.dischargeLimit',
ladenGesamtDP: 'zendure-solarflow.0.xxxxxx.yyyyyyyy.calculations.outputPackEnergyTodaykWh',
};
const hyper2 = {
name: 'Hyper2',
inputLimitDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.control.setInputLimit',
outputLimitDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.control.setOutputLimit',
inputDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.gridInputPower',
outputDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.outputHomePower',
acModeDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.control.acMode',
pvLeistungDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.solarInputPower',
chargePowerDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.outputPackPower',
socDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.electricLevel',
setsocDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.control.dischargeLimit',
ladenGesamtDP: 'zendure-solarflow.0.xxxxxx.zzzzzzzz.calculations.outputPackEnergyTodaykWh',
};
const evuLeistungDP = 'mqtt.0.openWB.evu.W';
const aktuelleEinspeisung = Number(getStateVal(evuLeistungDP, 0));
const hyper1Leistung = Number(getStateVal(hyper1.inputDP, 0)) - Number(getStateVal(hyper1.outputDP, 0));
const hyper2Leistung = Number(getStateVal(hyper2.inputDP, 0)) - Number(getStateVal(hyper2.outputDP, 0));
const leistungAusAkkus = aktuelleEinspeisung - hyper1Leistung - hyper2Leistung; // wie im Original
// PV-Überschuss-Erkennung: negative leistungAusAkkus = Überschuss? (behalte dein Vorzeichenmodell)
if (leistungAusAkkus < -ladenStartSchwelle && speicherMinSOC < zielSOC) {
ladenErlaubt = true;
visLog('☀️ PV-Überschuss → Laden erlaubt', 'ok');
}
Kann gerne mal das gesamte Script posten, ist aber sehr an meine Bedingungen angepasst.