From 616cf113f24c8ec158fe1650be4e54e22bb6d937 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Tue, 23 Jun 2026 19:11:50 +0200 Subject: [PATCH] Mirror raw sensor temp through when the controller isn't configured yet is_configured() (Smith's model plant params, only ever set once a Sud loads) gates TcTask's call to tc.process() - the only place theta_ist/ heatrate_ist/heatrate_soll get updated and broadcast. Right after server start, before any Sud has ever loaded, that left them frozen at their __init__ defaults forever, so the GUI's Ist Temp/Rate and Soll Rate displays never showed anything on connect. Mirror the raw sensor reading through instead, with rates at 0 since there's no controller output yet. --- tasks/tempctrl.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tasks/tempctrl.py b/tasks/tempctrl.py index 0ac0354..21d50b1 100644 --- a/tasks/tempctrl.py +++ b/tasks/tempctrl.py @@ -78,5 +78,19 @@ class TcTask(ATask): # would otherwise raise. if self.tc.is_configured(): self.tc.process() + else: + # Smith's model plant params only ever arrive from a Sud's + # doc (see brewpi.py), so right after server start - before + # any Sud has ever loaded - is_configured() stays False and + # process() never runs. Without this, theta_ist/ + # heatrate_ist/heatrate_soll (and thus the 'Ist'/'Soll' + # messages below) would stay frozen at their __init__ + # defaults forever, leaving the GUI's Ist Temp/Rate and + # Soll Rate displays blank on connect. Mirror the raw + # sensor reading straight through instead - there's no + # controller output yet to report a real rate for. + self.tc.theta_ist = self.tc.get_theta_ist_set() + self.tc.heatrate_ist = 0.0 + self.tc.heatrate_soll = 0.0 await asyncio.sleep(self.interval)