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
This commit is contained in:
@@ -51,6 +51,12 @@
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3>Heater</h3>
|
||||
<div class="device-status-row">
|
||||
<span id="heater-status" class="status-disconnected">Disconnected</span>
|
||||
<span id="heater-firmware" class="device-firmware"></span>
|
||||
<button id="btn-heater-connect">Connect</button>
|
||||
<button id="btn-heater-disconnect" disabled>Disconnect</button>
|
||||
</div>
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" id="closed-loop" checked> Closed-loop
|
||||
</label>
|
||||
@@ -63,6 +69,12 @@
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3>Stirrer</h3>
|
||||
<div class="device-status-row">
|
||||
<span id="stirrer-status" class="status-disconnected">Disconnected</span>
|
||||
<span id="stirrer-firmware" class="device-firmware"></span>
|
||||
<button id="btn-stirrer-connect">Connect</button>
|
||||
<button id="btn-stirrer-disconnect" disabled>Disconnect</button>
|
||||
</div>
|
||||
<label>Speed [%]
|
||||
<div class="slider-row">
|
||||
<input type="range" id="stirrer-speed" min="0" max="100" step="1">
|
||||
|
||||
Reference in New Issue
Block a user