Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
/care refreshes itself when dosing changes: a mode change, a resume or a stop sends an event on /care/events #620
Merged 40d 2h ago
An open /care page now re-renders its Dosing card when dosing changes, without a reload. I ran the doser, dosing, care and terminal tests (46 pass) and the type check. The type check reports other errors in files I didn't touch (for example src/ui/zone-notes.js), none in the files I changed.
-
Reviews
ApprovedDoes what #620 asks. Doser.onChange fires on mode change, resume, halt and successful dose. /care/events subscribes to it for the owner only, so a guest stream carries nothing about dosing. The doser emits the event, so a change made from the terminal reaches web viewers too. The test runs an owner stream and a guest stream and fails without the change. /care answers 200 on the preview. I did not run the tests myself or read the screenshots. Two things to do next: (1) in the ping in care-routes.ts, keep the timeout handle and clear it on close, so a pending timer never writes to a closed response. (2) Add a short README line that /care updates live for dosing changes.
-
Checks
shipped merged
-
History
- Care: /care/events sends one event for a dosing mode change, resume, halt or dose (owner only) 1588599
- so101 serve boots with the arm unplugged: /status says "arm: not connected", cameras and the grow box keep serving (#617) 71dc2a8
- Arm server: /grow/dosing (and /grow/light, /grow/pump) answer anyone who reaches the arm's port (#612) 21cb2b4
- Dosing: real peristaltic and top-off pump drivers with ml/s calibration, replacing the fake pumps (#610) fa0051d
- Dosing: pH/EC probes via ADS1115 with guided calibration and monthly reminder (#609) f8a7543
- Dosing: temperature and level sensor drivers (DS18B20, SHT31/BME280, float switches) as Reading sources (#608) d2bae2e
- Grow care: a plant profile (spinach first), reminders from it, a log book, and metrics with target bands; manual now, sensors later (#598) 13887dd
- Grow stills at 1920×1080, cropped to the camera's region and colour-corrected (split from #584) (#603) d2bd69c
- so101 server: hang up after answering 413 at the body cap (#602) f5a7213
- Grow box: a still every 10 min, a scrubbable timelapse, a grow log and a canopy chart (#601) d623239
- Grow light schedule: a switch driver (smart plug, GPIO relay, or uhubctl only when it switches the light alone) with a photoperiod that runs on the Pi (#599) 0ea35e6
- Grow card: "Camera can't see the plants" hint when the camera's region is mostly blown out or black (split from #584) (#597) 315c1ae
- Pump: an interval-cycle schedule on the Switch interface (with #585) (#596) 82337a2
- The workshop: one Pi, several stations (the arm and the grow box), each with cameras and controls; works with the arm unplugged (#592) 37b3b00
- The identity line on /story and /admin/data (#594) 568b0ea
- Grow cameras: a saved camera profile per Pi camera, re-applied at every start, and a Tune panel with the box drawn once and colour correction under grow light (#591) 17c46ef
- Sign out, and every page shows who you are, even when the arm is off (#587) 1873f3c
- Closing the arm locks its owner out: keep sign-in and /admin working while closed, an Open now button on the resting card, and so101 open/close (#579) fba1312
- setup: find LeRobot calibration in its nested folders (calibration/robots/so_follower/*.json) (#577) 6da7fb9
- `so101 setup` finds both arms, asks you to wiggle the leader, reuses existing calibration, then starts teleop (#575) f44d21f
An open /care page now re-renders its Dosing card when dosing changes, without a reload. I ran the doser, dosing, care and terminal tests (46 pass) and the type check. The type check reports other errors in files I didn't touch (for example src/ui/zone-notes.js), none in the files I changed. I did not run the full check.
Doser.onChange(fn)(src/doser.ts) callsfnafter a mode change, a resume, a halt or a successful dose, and returns a function that unsubscribes. A refused dose that changes nothing sends no event.- Care routes (
src/care-routes.ts):/care/eventsnow also listens to the doser, but only for the owner. A guest's stream carries nothing about dosing. - One event per change: a dose also writes a log entry, which already sent its own event. The stream now merges changes that land in the same tick, so a dose sends one event instead of two. This applies to every change on the stream, not just dosing.
- Test (
src/care-dosing.test.ts): an owner stream and a guest stream on the same server. Each of the four changes sends the owner exactly one event. The guest hears only the three log entries, nothing for the mode change, resume or halt.
The "halt" case in the test is a dose attempted on an out-of-range pH reading.
An open
/carepage now re-renders its Dosing card when dosing changes, without a reload. I ran the doser, dosing, care and terminal tests (46 pass) and the type check. The type check reports other errors in files I didn't touch (for examplesrc/ui/zone-notes.js), none in the files I changed. I did not run the full check.Doser.onChange(fn)(src/doser.ts) callsfnafter a mode change, a resume, a halt or a successful dose, and returns a function that unsubscribes. A refused dose that changes nothing sends no event.src/care-routes.ts):/care/eventsnow also listens to the doser, but only for the owner. A guest's stream carries nothing about dosing.src/care-dosing.test.ts): an owner stream and a guest stream on the same server. Each of the four changes sends the owner exactly one event. The guest hears only the three log entries, nothing for the mode change, resume or halt.The "halt" case in the test is a dose attempted on an out-of-range pH reading.
Closes #618