Anfrage: Regeln sollen die Vorhersage eines Modells nach seiner Konfidenz gewichten (Vorsteuerung der Sollwerte)
Von English mit KI übersetzt ·
Student, erster Beitrag, vielleicht zu ehrgeizig.Für meine Abschlussarbeit arbeite ich mit einem kleinen Wärmebehandlungsofen in unserem Labor. Ein Raspberry Pi daneben betreibt ein Modell, das die Temperatur der nächsten Charge aus deren Masse und Starttemperatur vorhersagt, und der Pi meldet außerdem die Ofentemperatur an Hermetry. Das Modell liefert eine Vorhersage und eine Konfidenz zwischen 0 und 1.Die Idee ist eine Vorsteuerung: Wenn eine kalte, schwere Charge kommt, wird der Sollwert-Offset vorab etwas angehoben, aber nur so stark, wie das Modell sicher ist. Bei niedriger Konfidenz passiert nichts, und der PID-Regler übernimmt.Ich habe die Regelkarte und die Alarmregeln durchgesehen und keine Möglichkeit gefunden, „Offset um Vorhersage × Konfidenz ändern“ zu formulieren. Daher meine Funktionsanfrage: eine Regelaktion, die einen Wert mit einem anderen Wert (der Konfidenz) skaliert. Oder gibt es dafür bereits einen Weg?
Student, first post, possibly too ambitious.
For my thesis I’m working with a small heat-treatment furnace in our lab. A Raspberry Pi next to it runs a model that predicts the temperature of the next load from its mass and starting temperature, and the Pi also reports the furnace temperature to Hermetry. The model gives a prediction and a confidence between 0 and 1.
The idea is feed-forward: when a cold heavy load is coming, raise the setpoint offset a bit in advance, but only as much as the model is sure about. With low confidence, do nothing and let the PID handle it.
I looked through the Rules card and alarm rules and couldn’t find a way to say „change the offset by prediction × confidence“. So, feature request: a rule action that scales a value by another value (the confidence). Or is there already a way?
Von English mit KI übersetzt ·
+1, hätte ich auch gern für meine Gewächshausheizung mit einer Wettervorhersage.
+1, would like this for my greenhouse heater with a weather forecast too.
Von English mit KI übersetzt ·
Sicht des Anlagenleiters: Ich wäre nervös, wenn eine Cloud-Regel einen Ofen-Sollwert verändern darf. Was passiert, wenn das Internet mitten im Vorgang ausfällt?
Plant manager view: I’d be nervous letting a cloud rule move a furnace setpoint. What happens if the internet drops halfway?
Von English mit KI übersetzt ·
Das können Sie heute schon mit einem Flow umsetzen; ich habe für einen Kessel mit einer Lastprognose etwas Ähnliches gemacht.Lassen Sie den Pi die Modellausgabe als Telemetrie des Ofengeräts senden: {"pred_load_c": 41.0, "pred_conf": 0.83}. Fügen Sie im Root-Flow des Geräts (oder im Profil-Root für das Ofenprofil) nach Save telemetry einen Script-Block, der den Offset berechnet, und einen Send-command-Block hinzu, der ihn sendet. Der Script-Block:
const p = msg.payload;
if (p.pred_load_c === undefined) return null;
const w = Math.min(Math.max((p.pred_conf - 0.5) / 0.4, 0), 1); // 0 below 0.5, 1 above 0.9
const deficit = 850 - p.pred_load_c; // target minus load temp
msg.payload = { offset_c: Math.round(Math.min(deficit * 0.02 * w, 15) * 10) / 10 };
return msg;
Dann Send command mit einem Katalogbefehl wie furnace.set_ff_offset und den Parametern msg.payload. Der Befehl geht an das Gerät der Nachricht, also den Pi des Ofens.Behalten Sie die Begrenzung (hier 15 °C) bei und lassen Sie den Pi alles ablehnen, was außerhalb seiner eigenen Grenzen liegt. Zu kstewarts Bedenken: Der PID bleibt auf dem Pi oder dem Regler; die Cloud schlägt nur einen Offset vor, und der Pi sollte ihn nach einigen Minuten ohne neuen Wert wieder auf 0 setzen.Achten Sie auf Ihren Tarif: Jeder Script-Block in einem bereitgestellten Flow zählt auf Ihr Limit für Script-Blöcke, und beim Deployment eines Flows mit Script müssen Sie den Namen des Flows eintippen.
You can do it today with a flow, I did something similar for a boiler with a load forecast.
Have the Pi send the model output as telemetry of the furnace device: {"pred_load_c": 41.0, "pred_conf": 0.83}. In the device’s root flow (or a profile root for the furnace profile), after Save telemetry, add a Script block that computes the offset and a Send command block that sends it. The Script block:
const p = msg.payload;
if (p.pred_load_c === undefined) return null;
const w = Math.min(Math.max((p.pred_conf - 0.5) / 0.4, 0), 1); // 0 below 0.5, 1 above 0.9
const deficit = 850 - p.pred_load_c; // target minus load temp
msg.payload = { offset_c: Math.round(Math.min(deficit * 0.02 * w, 15) * 10) / 10 };
return msg;
Then Send command with a catalog command like furnace.set_ff_offset and params msg.payload. The command goes to the message’s device, which is the furnace’s Pi.
Keep the clamp (15 °C here) and let the Pi refuse anything outside its own limits. For kstewart’s worry: the PID stays on the Pi or the controller; the cloud only suggests an offset, and the Pi should drop it back to 0 after a few minutes without a fresh one.
Mind the plan: each Script block in a deployed flow counts toward your Script blocks limit, and a deploy with a script asks you to type the flow’s name.
Von English mit KI übersetzt ·
Auf dem Laborofen mit dem Skript von clark.c und einem Ablauf von 10 Minuten auf der Pi-Seite läuft es jetzt. Mein erster Deploy hat nicht ausgelöst, weil ich die Blöcke auf dem falschen Zweig vor „Telemetrie speichern“ platziert hatte; ich habe sie danach verschoben. Die Anfrage lasse ich offen, falls irgendwann eine No-Code-Version erscheint, aber der Flow erledigt die Aufgabe für meine Abschlussarbeit.
Got it working on the lab furnace with clark.c’s script and a 10-minute expiry on the Pi side. My first deploy didn’t fire because I’d put the blocks before Save telemetry on the wrong branch, moved them after it. Leaving the request open in case a no-code version ever appears, but the flow does the job for my thesis.
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

