Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pioreactor-cell-dry-weight

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.

What it does

  • Creates table cdw_readings(experiment, pioreactor_unit, timestamp, cdw_g_per_l)
  • Installs SQLite trigger insert_cdw_reading_from_ui_log on the logs table: when a row is inserted with task = 'cdw_reading' and source = 'UI', the trigger mirrors CAST(message AS REAL) into cdw_readings (upsert by experiment + pioreactor_unit + timestamp).
  • Adds an Overview chart cdw_reading reading from cdw_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.

How to record a CDW reading

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.

Install

pio plugins install /path/to/pioreactor-cell-dry-weight

Add cdw_reading = 1 under [ui.overview.charts] in config.ini to show the chart on the Overview page.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages