Commit Graph
10 Commits
Author SHA1 Message Date
jensandClaude Sonnet 5 f20e617d81 feat: add connect/disconnect status for real heater/stirrer hardware
Heater and Stirrer can be real serial hardware (hendi, Pololu1376), but
there was no connection concept at all - the constructors opened the
port and crashed the whole server if the device was missing, with no
way to see connection status or firmware version and no way to
reconnect without a restart.

Adds an observable Connectable mixin (components/connectable.py) shared
by AHeater/AStirrer; real devices defer opening the serial port to an
explicit connect(), auto-connect on server startup, and surface
Connected/FirmwareVersion/Simulated plus manual Connect/Disconnect over
the web GUI. Heating/stirring and Sud Start are all gated on connection
state, and a disconnect mid-brew force-stops the run via the same path
as a manual Stop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaPLuRPpyjWcwhMvCvpHCL
2026-07-03 19:18:59 +02:00
jensandClaude Sonnet 4.6 5751d26873 server: graceful Ctrl-C shutdown; HendiCtrl closes connection cleanly
On KeyboardInterrupt, brewpi.py cancels all asyncio tasks (letting
HeaterTask's `with device.open()` finally block run), then calls
heater.close() as belt-and-suspenders before closing the event loop.

On shutdown HeaterHendi.activate(False) now sets the switch to 0 instead
of disabling remote control, so the Hendi stays in remote mode at 0 W
rather than dropping back to its local panel state.  HendiCtrl.close()
does the same (setSwitch(0)) then closes the serial port.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 18:26:54 +02:00
jens 9b997b8348 - generalized heaters 2021-10-18 14:32:56 +02:00
jens a20de855ac - set heater power to zero at startup 2020-12-19 16:47:01 +01:00
jens 4e508c86c5 - redefine activate method
- for task introduced open() conext method
2020-12-18 15:58:02 +01:00
jens fa93a3911e - refactored 2020-12-16 17:10:46 +01:00
jens 4a87f361dd - added aHeater isActivated() 2020-11-29 14:45:21 +01:00
jens d9c587476f - added Temp controller
- use AttributeChange for Processing objects
2020-11-29 14:35:44 +01:00
jens d16b6b272a - use Valuechanged mechanism 2020-11-29 12:37:18 +01:00
jens 636070fd61 initial import 2020-11-24 18:34:47 +01:00