Collect and plot fermentation data from an iSpindel hydrometer.

iSpindle Plotter is a self-hosted companion app for the iSpindel — an open-hardware floating hydrometer used by home brewers to track specific gravity through a fermentation. The app runs a small HTTP server on your phone that the iSpindel posts its readings to over your local Wi-Fi network, then stores, charts, and analyses those readings without ever sending your data to a third-party cloud service.
Pairing and configuration:
* Auto-pair flow that joins the iSpindel's configuration access point, sets the phone as the HTTP target (Generic HTTP / selAPI=3), reads the device's existing cubic calibration polynomial off the firmware, and reconnects to your home network — without losing pre-existing fields like the calibration on subsequent saves.
* mDNS-style hostname discovery so the iSpindel can find your phone again after either device's IP changes.
* Pushes the app's own calibration polynomial back to the iSpindel when you re-calibrate.
Calibration:
* Fit cubic / quadratic / linear polynomials from your own sucrose-dilution measurements.
* Imports the iSpindel's pre-installed factory calibration on first pairing.
* Setup guide with a sucrose-step-dilution recipe for 1.000–1.080 SG.
Plotting and analysis:
* Tilt angle, temperature, specific gravity, and battery voltage charts with a 24h / 7d / 30d / All time-window switcher.
* Potential-alcohol secondary axis on the SG chart.
* Robust phase classifier (Lag / Active / Slowing / Conditioning / Stuck / Cold crash) using a modified-Gompertz Levenberg-Marquardt fit (Zwietering et al. 1990), with fallback to an attenuation-prior when the data is too early to constrain the asymptote.
* Predicted final gravity overlaid on the chart with a tapering uncertainty band derived from short-time noise estimation and the calibration polynomial's residual.
* Battery runway estimate: linear discharge fit projecting time-to-cutoff at the current sample rate.
* Trim-before-date-and-time to drop pre-fermentation noise; CSV export via the system file picker.
Privacy:
* No analytics, no telemetry, no third-party network connections.
* Data is held only on your phone and only sent to your iSpindel's local IP for configuration writes.
* The app's HTTP server listens on the phone's local network address only.
Hardware: built and tested with an MTB iSpindel PCB 4.0; should work with any iSpindel firmware that supports the Generic HTTP target.
WhatsNew:
Detects the yeast-settling stage at the end of a ferment.
Once fermentation finishes, the yeast flocculates and drops out of suspension. Because the iSpindle floats in the clearing upper layer, the gravity reads a small step down — a couple of points — at steady temperature, before any cold crash. The graph now labels this as a Clarifying stage, shades it on the chart, and treats the clarified gravity as the final gravity: suspended yeast inflates a reading, so the settled value is closer to th