mirror of
https://github.com/lynchaos/ashvale-station.git
synced 2026-09-12 12:47:49 +00:00
Readout scene, environment regime tracking, and a Kalman cadence bug in recompute
recompute replayed the Kalman over stored rows at their own spacing while q stays tuned for the live 2 s cadence. Q scales with dt^3, so at the 30 s persist interval the process noise was 3375x too large and the filter tracked noise instead of smoothing: it wrote indoor temperature rates of +/-20 C/h into the history. This is the exact trap DESIGN.md section 2 documents for simulate.py, which does scale q, and I walked into it anyway. Now rescaled per step, because tiering means the stored cadence is not constant. Mean |rate| on the real board dropped to 2.73 C/h; what remains above 10 is the filter's warm-up transient in the first four samples, which is honest. Readout scene puts the actual numbers between the animations: temperature, humidity, sea-level pressure and the signed three hour forecast, each in its channel colour, scrolling. Text is drawn whole-pixel on purpose. Everything else here is sub-pixel and that is what makes it look good, but splitting a 3 px glyph across two columns halves its peak and smears it illegible. Crisp beats smooth when the thing has to be read. site.environment and site.enclosure record where the sensor lives and what has changed around it, with POST /api/environment to change them at runtime. This is not cosmetic: closing a door changes how strongly the sensor couples to outside, which is a regime change in the process the heads are fitting, and at lambda 0.9985 they carry about 55 hours of memory. Left alone they keep predicting the old room for two days. Page-Hinkley would notice eventually but needs matured forecasts to do it, which at the long horizons is the same two days. So the endpoint marks a discontinuity and queues a retrain.
This commit is contained in:
+16
-1
@@ -41,7 +41,22 @@ class SiteConfig:
|
||||
longitude: float = 0.1218
|
||||
altitude_m: float = 15.0 # for sea-level pressure reduction
|
||||
timezone: str = "Europe/London"
|
||||
indoors: bool = True # honest flag, changes how forecasts are worded
|
||||
indoors: bool = True
|
||||
# Where the sensor actually lives, and what has changed around it.
|
||||
#
|
||||
# This matters more than it looks. Indoors, temperature and humidity are
|
||||
# governed by the building, not the sky: the diurnal swing is damped and
|
||||
# lagged, and the solar features the model is given correlate weakly with
|
||||
# what the thermometer does. Pressure is the exception, which is why the
|
||||
# precipitation model runs on tendency rather than indoor humidity.
|
||||
#
|
||||
# "enclosure" is the part worth changing at runtime. Closing a door or
|
||||
# opening a window is a step change in how strongly the sensor is coupled to
|
||||
# outside, and the learners carry roughly 55 hours of memory, so they will
|
||||
# keep predicting the old regime for two days unless told. POST
|
||||
# /api/environment marks the moment and asks for a retrain.
|
||||
environment: str = "indoor" # indoor | sheltered | outdoor
|
||||
enclosure: str = "closed" # closed | ventilated | open # honest flag, changes how forecasts are worded
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user