Rename config templates: .templ → -sim.json.tpl, config_real.json → -real.json.tpl
Consistent naming: config-sim.json.tpl and config-real.json.tpl. Update README and TODO references accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SH2D4LRuCnhLSzoYerAfJX
This commit is contained in:
@@ -101,11 +101,12 @@ sude/ Mash schedules ("Sud" = brew/wort), each a
|
||||
per-step stirrer timing, and optional pause
|
||||
for user confirmation.
|
||||
|
||||
config.json.templ Configuration template - the "sim" component
|
||||
names (stirrer/plant) already default to
|
||||
simulation; point Stirrer/Heater at real
|
||||
serial ports and plant_name at a real
|
||||
backend to switch to hardware.
|
||||
config-sim.json.tpl Configuration template for simulation - all
|
||||
component names default to "sim"; no hardware
|
||||
needed.
|
||||
config-real.json.tpl Configuration template for real hardware -
|
||||
real plant/heater/stirrer backends with the
|
||||
correct serial ports pre-filled.
|
||||
|
||||
web/ Browser client - static HTML/CSS/JS (no build
|
||||
step, no dependencies), speaking the exact
|
||||
@@ -217,13 +218,11 @@ pip install -r client/requirements.txt
|
||||
|
||||
## Running
|
||||
|
||||
1. Copy `config.json.templ` to `config.json` next to `brewpi.py` - it
|
||||
already runs entirely in simulation (no hardware needed) as-is; switch
|
||||
`stirrer_name`/`plant_name`'s `"sim"` value(s) to a real backend, and
|
||||
set the corresponding serial port, to use real hardware. `plant_name`
|
||||
alone picks the heater/pot/sensor trio together (see `PlantFactory`) -
|
||||
`"sim"` gets `HeaterSim`/`Pot`/`TempSensorSim`, anything else gets
|
||||
`HeaterHendi`/`PotReal`/`TempSensor_max31865`.
|
||||
1. Copy `config-sim.json.tpl` (simulation, no hardware needed) or
|
||||
`config-real.json.tpl` (real hardware) to `config.json` next to
|
||||
`brewpi.py`. `plant_name` picks the heater/pot/sensor trio together
|
||||
(see `PlantFactory`) - `"sim"` gets `HeaterSim`/`Pot`/`TempSensorSim`,
|
||||
anything else gets `HeaterHendi`/`PotReal`/`TempSensor_max31865`.
|
||||
2. Start the server:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -58,7 +58,7 @@ git history for `temp_controller.py`/`temp_controller_smith.py`).
|
||||
schema/dataclass validation layer at config-load would surface
|
||||
errors immediately instead of mid-`__init__` — and would have caught
|
||||
the dead `TempCtrl.Kalman` / `Model.kn` / `Plant.kn` keys that used
|
||||
to sit unused in `config.json.templ`/`.sim` (since deleted), and the
|
||||
to sit unused in `config-sim.json.tpl`/`.sim` (since deleted), and the
|
||||
`Model.gain`/`Plant.gain` keys that did the same in `config.json.sim`
|
||||
before that file was removed entirely — `Pot` dropped `gain`
|
||||
entirely, see `components/plant/TODO.md`.
|
||||
|
||||
@@ -24,7 +24,7 @@ the current `delay`-line rewrite of `Pot`.
|
||||
wired from `brewpi.py`'s `TempSensorFactory.create(..., temp_offset=
|
||||
-0.15, variance=0.01)`), not in the plant model. The stale
|
||||
`Model.kn`/`Plant.kn` keys this item flagged have since been deleted
|
||||
from `config.json.templ`/`config.json.sim` too.
|
||||
from `config-sim.json.tpl`/`config.json.sim` too.
|
||||
|
||||
- [x] **`theta_amb` is hardcoded, not configured.** Fixed: added a
|
||||
top-level `ambient_temperature` key to `config.json`(`.templ`/`.sim`);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"ambient_temperature": 20,
|
||||
"Controller" : {
|
||||
"stirrer_name": "pololu1376",
|
||||
"plant_name": "real",
|
||||
"pid_type": "Smith"
|
||||
},
|
||||
"TempCtrl": {
|
||||
"Hold": {
|
||||
"kp": 0.4,
|
||||
"ki": 0.0,
|
||||
"kd": 0.0,
|
||||
"kt": 0.0
|
||||
},
|
||||
"Heat": {
|
||||
"kp": 0.08,
|
||||
"ki": 0.02,
|
||||
"kd": 0.0,
|
||||
"kt": 1.5
|
||||
},
|
||||
"Cool": {
|
||||
"kp": 0.08,
|
||||
"ki": 0.02,
|
||||
"kd": 0.0,
|
||||
"kt": 1.5
|
||||
},
|
||||
"Thresholds": {
|
||||
"HoldHeat": 1.0,
|
||||
"HoldCool": 1.0,
|
||||
"HeatHold": 1.0,
|
||||
"HeatCool": 1.0,
|
||||
"CoolHold": 1.0,
|
||||
"CoolHeat": 1.0
|
||||
}
|
||||
},
|
||||
"Heater": {
|
||||
"port": "/dev/ttyUSB0",
|
||||
"speed": "115200"
|
||||
},
|
||||
"Stirrer": {
|
||||
"port": "/dev/ttyACM0",
|
||||
"speed": "115200"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user