Commit Graph
23 Commits
Author SHA1 Message Date
jensandClaude Sonnet 5 698c019581 refactor: make ATemperatureSensor's temp observable directly on the sensor
TempSensorSim/TempSensor_max31865's temperature() now stores its
reading on self.temp, so ATemperatureSensor's inherited AttributeChange
(previously never triggered by anything) actually fires. TempSensorTask
no longer keeps its own shadow copy of the reading - it registers its
websocket-push callback on self.sensor directly and just drives the
read each tick; server/brewpi.py's TC-feeding registration moved from
sensor_task to sensor for the same reason.

Priming read happens before registering the callback (not after) since
all tasks are built synchronously at module level, before the asyncio
event loop starts - registering first would fire on_temp_changed's
asyncio.create_task() with no running loop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GpePKZiEZWbGo9HrfuML6U
2026-07-02 22:03:50 +02:00
jensandClaude Sonnet 4.6 ac8de9da55 Add sensor variance config and smooth heat-rate estimate
[Sensor] - replace TempSensorSim's hardcoded k_noise with configurable
temp_offset/variance, accept **kwargs on Max31865 too so both sensors
share a constructor signature usable from TempSensorFactory.create()
[Temp Controller] - low-pass filter the backward-difference heat-rate
estimate (alpha=0.1) in both temp_controller.py and
temp_controller_smith.py instead of using the raw, noisy derivative
[Pot] - drop kn from demo_pot.py's params, matching the unused-field
removal already made to pot.py itself

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 15:47:24 +02:00
jens fd99c548e1 - improved tempsensor exception 2021-10-19 11:50:27 +02:00
jens 04d93e0f98 - improved tempsensor exception 2021-10-19 11:48:34 +02:00
jens 3a5278c6b5 - improved tempsensor exception 2021-10-19 11:43:47 +02:00
jens a267e4004e - improved tempsensor exception 2021-10-19 11:42:52 +02:00
jens e07f9b4802 - preinitialize digits 2021-10-19 11:36:09 +02:00
jens 6e7f8c2c59 - removed AtemperatureSensor::process
- task is AttributeChange
- hareden against Tempsensor exceptions
2021-10-19 11:29:11 +02:00
jens f7745f9814 - reactored 2021-10-02 11:05:07 +01:00
jens a05e460f73 - refactored 2021-10-02 11:01:12 +01:00
jens bf019733b2 - added abstarct PID APid
- added PidFactory
- use variable args for factory
2021-10-02 11:10:43 +02:00
jens 289ef47bb6 - changed gitignore
- make tempSensor Max31865 more robust against reading failures
- removed temp offset
2021-08-10 15:02:57 +01:00
jens ced04f184b Reduce debug log 2020-12-17 17:26:30 +00:00
jens 834268c85e Improved Max31865 2020-12-15 11:11:25 +00:00
jens ad6ff61eba - added temp offset as argument 2020-12-14 20:18:17 +01:00
jens 7cac444424 Improved temp offset 2020-12-14 18:58:17 +00:00
jens 1ad33b488f - refactored temperature correction 2020-12-14 17:36:15 +01:00
jens 77dbca72ba - print out digits 2020-12-14 17:23:06 +01:00
jens 73b567363b - set temp offset to -1°C 2020-12-14 16:02:17 +01:00
jens 6b727e3ea4 Fixed Max31865 2020-12-14 08:42:27 +00:00
jens e2e6e24dcc - init base class 2020-12-14 09:39:54 +01:00
jens 6e1fb9702c Fixed import 2020-12-13 19:30:26 +01:00
jens a74e1b573b - added max31865 2020-12-13 19:18:50 +01:00