fix(v4): retry transient confirmed device reads
This commit is contained in:
@@ -47,10 +47,10 @@ trait ManagerNetzfahrplanV4EmpfangTrait
|
||||
/** Appended dynamically; existing form.json and parallel portal GUI stay untouched. */
|
||||
private function netzfahrplanV4EmpfangFormular(): array
|
||||
{
|
||||
return ['type' => 'ExpansionPanel', 'caption' => 'V4 Planempfang / Sollwert-Vorschau', 'items' => [
|
||||
['type' => 'Label', 'caption' => 'NUR BEOBACHTEN. Kein Lade-/Entladebefehl. Der alte intelligente Netzfahrplan muss AUS bleiben.'],
|
||||
return ['type' => 'ExpansionPanel', 'caption' => 'V4 Planempfang / Prognosemanager', 'items' => [
|
||||
['type' => 'Label', 'caption' => 'Der alte intelligente Netzfahrplan muss AUS bleiben. Die separate Laufzeitvariable unter dem Manager schaltet den zeitlich begrenzten Testbetrieb ein oder aus.'],
|
||||
['type' => 'CheckBox', 'name' => 'NetzfahrplanV4EmpfangAktiv', 'caption' => 'V4 Schattenplan empfangen und Sollwert anzeigen (keine Steuerung)'],
|
||||
['type' => 'Label', 'caption' => 'Diagnose und Sollwerte stehen in den beiden V4-Vorschauvariablen unterhalb des Managers.'],
|
||||
['type' => 'Label', 'caption' => 'Schalter: V4 Prognosemanager aktiv (Testbetrieb). Ausschalten beendet V4 und fordert sofort 0 W an. Maximale Laufzeit ab dem ersten Einschalten: 48 Stunden.'],
|
||||
['type' => 'Button', 'caption' => 'Plan jetzt pruefen (Abruf begrenzt auf 1/min)',
|
||||
'onClick' => "IPS_RequestAction(\$id, 'NetzfahrplanV4Empfangen', true);"],
|
||||
]];
|
||||
@@ -172,6 +172,10 @@ trait ManagerNetzfahrplanV4EmpfangTrait
|
||||
if (is_string($configured) && !in_array(trim($configured),['','{}'],true)) {
|
||||
if (count($topology)!==1) throw new RuntimeException('feedback_multi_asset_adapter_required');
|
||||
$f=json_decode(ENELIX_GetV4BatterieRueckmeldung($controller),true,32,JSON_THROW_ON_ERROR);
|
||||
if (($f['status']??null)==='unavailable') {
|
||||
$reason=is_string($f['reason']??null)?$f['reason']:'unknown';
|
||||
throw new RuntimeException('feedback_unavailable:'.substr($reason,0,180));
|
||||
}
|
||||
if (($f['installationId']??null)!==$this->ReadAttributeString('LizenzInstallationID')
|
||||
|| ($f['assetId']??null)!==$asset['ID'] || ($f['managerId']??null)!==$this->InstanceID
|
||||
|| ($f['batteryInstanceId']??null)!==$controller || !is_numeric($f['batteryW']??null)
|
||||
|
||||
Reference in New Issue
Block a user