Overview
LoopString stores all sensor data in canonical source units — raw values sent by your Pi that are never altered in transit or at rest. Unit conversion happens only at the display boundary, inside your browser. This means changing your unit preferences never rewrites historical data, never affects what your Pi publishes, and never changes how alert thresholds are stored internally.
Your unit preferences are saved to Firestore at users/{uid}/prefs/units and apply immediately across every part of the dashboard once saved.
Accessing Unit Preferences
Unit preferences are in Settings (top navigation) under the Unit Preferences section. Each measurement category has a dropdown. Select your preferred unit for each category, then click Save Preferences.
The page shows a brief "Saved successfully" confirmation. If saving fails (for example, due to a network interruption), an error message appears and your selection reverts to the last successfully saved value.
Measurement Categories
LoopString supports five measurement categories. Each category has a canonical source unit — the unit your Pi always publishes in — and one or more display units you can switch to.
Temperature
Source unit: degrees Celsius (°C)
Display options:
- °C (Celsius) — the default
- °F (Fahrenheit)
- K (Kelvin)
Applies to any sensor whose key contains the word temp or temperature (case-insensitive). This includes grow-room air temperature, fermentation vessel temperature, and HVAC return air sensors.
Pressure
Source unit: hectopascals (hPa)
Display options:
- hPa (hectopascal) — the default
- inHg (inches of mercury)
- psi (pounds per square inch)
Applies to any sensor whose key contains pressure or baro. This covers barometric pressure sensors such as the BME280.
Volume
Source unit: litres (L)
Display options:
- L (litres) — the default
- gal (gallons)
Applies to any sensor whose key contains volume. Used with tank level sensors and reservoir measurements.
Flow Rate
Source unit: litres per minute (L/min)
Display options:
- L/min (litres per minute) — the default
- GPM (gallons per minute)
Applies to any sensor whose key contains flow. Used with irrigation, dosing pump, and water circulation sensors.
Gravity
Source unit: specific gravity (SG)
Display options:
- SG (specific gravity) — the default
- °P (Plato)
- °Bx (Brix)
Applies to any sensor whose key contains gravity. Used with the iSpindel hydrometer and other density/fermentation sensors. The Plato and Brix conversions use the standard brewing polynomial (Plato = -616.868 + 1111.14·SG - 630.272·SG² + 135.997·SG³).
Where Conversions Apply
Once your preferences are saved, converted values appear throughout the dashboard.
Sensor cards — Each SensorStat card on your dashboard shows the value and unit label in your preferred unit. Sparkline trend lines also reflect converted values.
Alert thresholds — When you set or edit an alert threshold via the inline threshold editor on a sensor card or the Alert Config page, the threshold input accepts and displays values in your preferred unit. The threshold is converted back to the source unit before being written to Firestore, so the stored threshold always stays in canonical units.
PID setpoints — The setpoint input on PID-controlled sensors displays and accepts values in your preferred unit. The value is converted to source units before being written to RTDB and relayed to the Pi's PID controller.
Analytics charts — The multi-signal chart on the Analytics page converts all signal values to your preferred units before rendering. The y-axis label reflects the selected unit.
Visual Dashboard — The runtime rendering layer of the Visual Dashboard applies the same conversion pipeline, so custom screen layouts reflect your preferences automatically.
Configurator numeric inputs — Setpoint fields and numeric parameters in the Configurator that carry a x-measurementType annotation are displayed in your preferred unit. The Configurator converts back to source units before saving to the draft.
Defaults
If you have never saved unit preferences, LoopString uses these defaults:
- Temperature: °C
- Pressure: hPa
- Volume: L
- Flow Rate: L/min
- Gravity: SG
These match the canonical source units, so no conversion is applied until you change a preference.
Troubleshooting
Values look wrong after changing units
Unit detection is based on the sensor key name published by Node-RED. If a sensor key does not contain a recognised keyword (temp, pressure, flow, volume, or gravity), the conversion system cannot determine the category and leaves the value unchanged with its original unit label. Check the sensor key assigned in the Configurator and ensure it follows the naming convention for your sensor type.
Preferences revert after saving
If the save fails (for example, due to a brief connectivity drop), the UI restores your previously saved preferences and shows a "Failed to save" message. Check your network connection and try again. If the problem persists, verify that you are still signed in — preferences are stored per user account and require an active authenticated session.