Hi everyone ![]()
I wanted to share 2 PRs that I just opened, related to a concrete case: integrating my iopool Eco probe (swimming pool water quality monitoring) into Gladys via MQTT.
I’ve sent the probe data to Node-RED, which publishes to the MQTT broker. This allows me to create a virtual MQTT device in Gladys with the following features: temperature, pH, ORP (disinfection capacity), mode, recommended filtration duration, and date of last measurement.
The problem: for pH and ORP, no sensor category matched. I had to use « Unknown » for pH and « Air Quality Index » for ORP (because airquality-sensor was the closest match). Not ideal.
I therefore made 2 PRs (stack):
PR 1 — Water Quality Sensor Categories
Added 2 generic categories, reusable by any integration (MQTT, Z2M, Matter, custom services):
ph-sensor— Water pH, range 0–14, new dimensionless unitphorp-sensor— Oxidation-Reduction Potential (Redox / « Disinfection Capacity »), inmillivolt(existing unit)
Covers swimming pool probes (iopool, Ondilo, BWT), aquariums, rainwater measurement stations, etc.
Naming convention: standard scientific terms (no disinfection-capacity-sensor). But the FR label keeps « ORP / Disinfection Capacity » to remain accessible to the general public.
Why No Automatic Coloring on the « Device » Widget?
Legitimate question: air quality (CO2, PM2.5, VOC…) displays an automatically colored badge in the Device widget based on the value. Why not do the same for pH and ORP?
Because it only works for measurements with universal thresholds. CO2 at 1200 ppm is bad everywhere, regardless of context — it’s a global health standard.
pH and ORP, on the other hand, are absolute scales whose « correct » range depends entirely on the use case:
| Use Case | Ideal pH | Ideal ORP |
|---|---|---|
| Swimming Pool | 7.0 – 7.4 | 650 – 750 mV |
| Freshwater Aquarium | 6.5 – 7.5 | 250 – 400 mV |
| Reef Aquarium | 8.1 – 8.4 | 350 – 450 mV |
| Drinking Water | 6.5 – 8.5 | — |
| Hydroponics | 5.5 – 6.5 | — |
If we hardcoded swimming pool thresholds in the Device widget, an aquarium user would see their value in red even though their water is perfect. Misleading.
There’s also a technical detail: air quality coloring is monotonic (« the lower, the better »). pH is a range: bad at the low and high ends, good in the middle. The existing logic simply doesn’t apply.
That’s why threshold-based coloring is handled by PR2 (configurable gauge): each user defines their own thresholds based on their use case. Neutral, correct for everyone, and reusable far beyond water quality (battery, tank level, etc.).
PR 2 — Configurable Gauge with Colored Thresholds
Reuses the threshold + color logic already present in the « Room Temperature » and « Room Humidity » widgets, but in a generic way on the Gauge widget:
- Checkbox « Configure custom thresholds » in the editor
- Double slider to define the 2 thresholds (the slider bounds come from the
min/maxof the feature, so consistent with pH 0-12, ORP 500-1100, battery 0-100, etc.) - 3 color selectors (low zone / in range / high zone) with the chart widget palette
- Legend under the gauge with the 3 colors and the bounds formatted with the unit
- No custom thresholds → the original ApexCharts gradient is preserved (zero regression)
Why These Design Choices
- Separate categories rather than an umbrella category
water-quality-sensorwith multiple types: aligned with the existing pattern (co2-sensor,pm25-sensor,voc-sensor, etc. — 1 category = 1 physical measurement) - Configurable gauge rather than a dedicated swimming pool widget: generic = useful for many more use cases (electric vehicle battery, soil humidity, dB, tank level, etc.)
- No hardcoded smart coloring by category (e.g., « pH between 7.0-7.4 = green »): left to the user’s choice via the editor, to remain neutral on industry conventions (swimming pool ≠aquarium ≠spa)
Feedback welcome
— especially on:
- The naming of the categories (
ph-sensor/orp-sensorvs alternatives?) - The FR wording for ORP — is « Disinfection Capacity » clear enough for those who don’t know water chemistry?
- Are there other use cases (aquarium, rainwater, hydroponics…) that would benefit from these categories or require others (TDS, conductivity, salinity)?
- The configurable gauge — do you see other widgets that would deserve the same threshold/color treatment?
Thanks for reading ![]()

