Capturing Chemical Readings Offline for Batch Entry
Reading Queue is the capture companion to Pump Room. It is a single-file, offline form that records chemical readings taken where there is no signal, holds them in a local queue, and then copies them out — one row at a time, or the whole pending block at once — for entry into DigiQuatics once back in range. It can also export the queue as CSV [1].
The problem
Readings are taken in the pump room and on the deck, which is exactly where the connection drops. The logging system lives on the network. The gap between the two is usually bridged with a paper note or a phone photo, which then has to be transcribed later from memory of which reading came from which body of water at what time. Reading Queue closes that gap: the reading is captured in structured form at the moment it is taken, validated on the spot, and stored on the device until it can be entered.
How it works
The capture form takes a body of water, a time, free chlorine, pH, temperature, flow, and initials. The time defaults to now but stays editable, so a reading can be backfilled. As values are typed, the free-chlorine and pH fields border red on the same thresholds Pump Room enforces — below the body's minimum, over 10 ppm free chlorine, or pH outside 7.2–8.0 — so an out-of-code reading is visible before it is even queued.
Each queued reading shows a status dot — green for clean, red with a VIOLATION flag for a breach — plus per-row actions:
- Copy (⧉) formats that single reading as a text line.
- Mark entered (✓) dims the row without deleting it, so there is a record of what has already been keyed in.
- Delete (✕) removes it.
Copy all pending batches every row not yet marked entered into one block. A copied line looks like:
Competition Pool — 07/08 2:14 PM — FC 2.4 / pH 7.6 / 80°F / 240 GPM / MK ⚠ FC below 2 ppm min
The CSV export
The export writes a fixed ten-column schema:
date,time,pool,free_cl_ppm,ph,temp_f,flow_gpm,initials,violation,entered
The file is generated entirely in the browser — a Blob passed to URL.createObjectURL() and clicked as a download, with no server round-trip. It is prefixed with a UTF-8 byte-order mark so that Excel opens it with the correct encoding, and fields containing commas, quotes, or newlines are quote-escaped. The CSV is the backup: the queue lives only in this browser, under its own localStorage key (readingqueue.v1, separate from Pump Room's), so exporting is how a record leaves the device.
Editing the config
The bodies of water and their code minimums are the POOLS array at the top of the <script> block; the shared limits are the constants beside it:
const MAX_FC = 10, PH_LO = 7.2, PH_HI = 8.0;
The captured fields themselves are the FIELDS array, so adding or removing a measured value is a one-line change there. Keep the pool list identical to Pump Room's if the two tools are meant to agree.
Limitations
- The queue is stored per-device and per-browser. It does not sync between the deck tablet and the office computer — the CSV or a copy-paste is the transfer mechanism, by design.
- Validation flags a breach; it does not stop it. A red-flagged reading means the water needs correcting first — the tool exists to log it, not to make an out-of-code reading acceptable because it was recorded.
- Clearing all readings is guarded by a confirmation prompt, but there is no undo. Export before a bulk clear if the record matters.
References
- Reading Queue
- Pump Room Chemistry Calculator — the dosing companion that shares the same pool list and thresholds.