Solicitud: que las reglas ponderen la predicción de un modelo por su confianza (consignas feed-forward)
Traducido del English por IA ·
Estudiante, primera publicación, quizá demasiado ambicioso.Para mi tesis estoy trabajando con un pequeño horno de tratamiento térmico en nuestro laboratorio. Una Raspberry Pi junto a él ejecuta un modelo que predice la temperatura de la siguiente carga a partir de su masa y su temperatura inicial, y la Pi también envía la temperatura del horno a Hermetry. El modelo devuelve una predicción y una confianza entre 0 y 1.La idea es feed-forward: cuando llega una carga fría y pesada, subir un poco el offset de consigna por adelantado, pero solo tanto como el modelo esté seguro. Con baja confianza, no hacer nada y dejar que el PID se encargue.Revisé la tarjeta de Reglas y las reglas de alarma y no encontré forma de expresar «cambiar el offset por predicción × confianza». Así que, solicitud de funcionalidad: una acción de regla que escale un valor por otro valor (la confianza). ¿O ya existe una forma de hacerlo?
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?
Traducido del English por IA ·
+1, lo querría también para la calefacción de mi invernadero con una previsión meteorológica.
+1, would like this for my greenhouse heater with a weather forecast too.
Traducido del English por IA ·
Visión del jefe de planta: me preocuparía dejar que una regla en la nube modifique la consigna de un horno. ¿Qué pasa si internet se cae a mitad de proceso?
Plant manager view: I’d be nervous letting a cloud rule move a furnace setpoint. What happens if the internet drops halfway?
Traducido del English por IA ·
Puede hacerlo hoy mismo con un flujo; hice algo similar para una caldera con una previsión de carga.Haga que la Pi envíe la salida del modelo como telemetría del dispositivo del horno: {"pred_load_c": 41.0, "pred_conf": 0.83}. En el flujo raíz del dispositivo (o en una raíz de perfil para el perfil del horno), después de Save telemetry, añada un bloque Script que calcule el offset y un bloque Send command que lo envíe. El bloque Script:
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;
Luego, Send command con un comando del catálogo como furnace.set_ff_offset y los parámetros msg.payload. El comando va al dispositivo del mensaje, que es la Pi del horno.Mantenga el límite (15 °C aquí) y deje que la Pi rechace cualquier valor fuera de sus propios límites. En cuanto a la preocupación de kstewart: el PID se queda en la Pi o en el controlador; la nube solo sugiere un offset, y la Pi debe devolverlo a 0 tras unos minutos sin uno nuevo.Tenga en cuenta su plan: cada bloque Script de un flujo desplegado cuenta para su límite de bloques Script, y un despliegue con un script le pide que escriba el nombre del flujo.
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.
Traducido del English por IA ·
Lo hice funcionar en el horno del laboratorio con el script de clark.c y una caducidad de 10 minutos en el lado de la Pi. Mi primer despliegue no se activó porque había colocado los bloques antes de «Guardar telemetría» en la rama equivocada; los moví después. Dejo la solicitud abierta por si algún día aparece una versión sin código, pero el flujo cumple su función para mi tesis.
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.
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

