Leader-only Pioreactor plugin that adds a cdw_readings SQL table and a trigger so that manual log entries are mirrored into it as time-series data.
- Creates table
cdw_readings(experiment, pioreactor_unit, timestamp, cdw_g_per_l) - Installs SQLite trigger
insert_cdw_reading_from_ui_logon thelogstable: when a row is inserted withtask = 'cdw_reading'andsource = 'UI', the trigger mirrorsCAST(message AS REAL)intocdw_readings(upsert byexperiment + pioreactor_unit + timestamp). - Adds an Overview chart
cdw_readingreading fromcdw_readings.cdw_g_per_l.
No background job, no MQTT subscription, no hardware. Same pattern as the
in-DB insert_od_reading_from_ui_log trigger.
POST to the leader's logs API with task=cdw_reading and source=UI:
curl -s -X POST \
http://localhost:4999/api/units/tars/experiments/$EXPERIMENT/logs \
-H 'Content-Type: application/json' \
-d '{
"message": "1.23",
"source": "UI",
"source_": "ui",
"level": "INFO",
"task": "cdw_reading",
"timestamp": "2026-05-29T12:00:00.000Z"
}'The trigger handles the rest.
pio plugins install /path/to/pioreactor-cell-dry-weightAdd cdw_reading = 1 under [ui.overview.charts] in config.ini to show the
chart on the Overview page.