Skip to content

Repository files navigation

Poollab Integration for Home Assistant

A custom Home Assistant integration for Poollab/LabCom Cloud API, allowing you to monitor your pool water quality parameters directly in Home Assistant.

Features

  • 🏊 Multiple Pools Support - Monitor all your pools/devices with a single integration
  • πŸ–οΈ Monitor pH levels
  • πŸ’§ Track chlorine levels (free, total, combined, unbound, and CYA-bound)
  • 🟀 Monitor bromine residual
  • 🫧 Monitor active oxygen (MPS) residual
  • 🌑️ Monitor water temperature
  • βš—οΈ Alkalinity tracking
  • πŸ›‘οΈ Stabilizer (CYA) monitoring in chlorine mode
  • πŸ§‚ Salt level monitoring
  • πŸ”„ Per-device Backend Update Mode: Cloud polling or Manual refresh (12h safety sync)
  • ⏱️ Manual refresh (12h safety sync) includes a 12-hour safety refresh while Home Assistant is running
  • πŸ”˜ Native refresh button entity in Manual refresh (12h safety sync) mode (works in dashboards and automations)
  • βœ… Data validation β€” out-of-range values are discarded automatically

Chemistry Guides

Installation

Via HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Go to Integrations
  3. Click the three-dot menu β†’ "Custom repositories"
  4. Add https://github.com/stefanh12/poollab with category "Integration"
  5. Search for "Poollab" and install
  6. Restart Home Assistant

Manual Installation

  1. Download the latest release
  2. Copy the poollab folder to custom_components/ in your Home Assistant config directory
  3. Restart Home Assistant

Configuration

Setup Steps

  1. Ensure that you have synced at least one measurement from your device to Labcom cloud If you do not have any readings the setup will fail
  2. Go to Settings β†’ Devices & Services β†’ Integrations
  3. Click "Create Integration" and search for "Poollab"
  4. Get your personal API token:
  5. Paste your personal token into the Home Assistant config
  6. The integration will automatically discover all your devices/pools
  7. For each discovered device, choose:
    • Sanitation method (Chlorine or Bromine + Active Oxygen)
    • Backend Update Mode
      • Cloud polling: regular backend updates (default, every 5 minutes)
      • Manual refresh (12h safety sync): adds a refresh button and still performs a safety refresh every 12 hours
  8. Configuration complete!

⚠️ Important: Each account has a unique personal token. Never share it!

Multiple Pools/Devices

If your LabCom account has multiple pools or devices:

  • Automatic Discovery: The integration automatically discovers ALL your pools when you add it
  • One Integration Entry: You only need to enter your token once per account
  • Separate Device Entries: Each pool appears as a separate device in Home Assistant
  • Named Devices: Sensors are named with your pool name (e.g., "Backyard Pool pH", "Front Pool Temperature")
  • Manage Separately: You can enable/disable sensors per pool in Home Assistant settings

Supported Sensors

The integration creates the following sensors for each pool/device:

During setup, each device is assigned a sanitation method:

  • Chlorine: exposes chlorine sensors, Stabilizer (CYA), and chlorine chemistry calculations
  • Bromine + Active Oxygen: exposes bromine and active oxygen sensors instead of chlorine-family sensors and CYA

Each device also gets a Backend Update Mode:

  • Cloud polling: backend is polled automatically every 5 minutes
  • Manual refresh (12h safety sync): use a button entity to fetch data on demand, with an automatic safety refresh every 12 hours while Home Assistant is running

Water Quality Measurements

Sensor Description Unit Valid Range
pH Current pool pH pH 0 – 14
Chlorine General chlorine level (legacy) ppm 0 – 10
Free Chlorine Active chlorine available for sanitization ppm 0 – 10
Total Chlorine Free + combined chlorine ppm 0 – 10
Combined Chlorine Chloramines β€” calculated (Total βˆ’ Free) ppm 0 – 5
Unbound Chlorine Free chlorine from ActiveChlorine model β€” calculated ppm 0 – 5
Chlorine Bound to CYA Chlorine sequestered by stabilizer β€” calculated ppm 0 – 5
Temperature Pool water temperature Β°C 0 – 50
Alkalinity Total alkalinity ppm 0 – 300
Stabilizer (CYA) Cyanuric acid level (chlorine mode only) ppm 0 – 200
Salt Level Salt concentration ppm 0 – 3600
Bromine Bromine concentration (bromine + active oxygen mode only) mg/l Brβ‚‚ 0 – 9
Active Oxygen Active Oxygen concentration (bromine + active oxygen mode only) mg/l Oβ‚‚ 0 – 20

Diagnostic Sensors

Sensor Description
Measurement Count Total number of measurements stored for the device
Invalid Measurement Count Total number of overrange/invalid measurements stored for the device
Last Measurement Timestamp of the most recent measurement

Button Entity (Manual Update Mode)

When a device is configured with Manual refresh (12h safety sync), the integration creates:

  • Refresh Data button (one per device)

Pressing this button triggers an immediate backend fetch for that device.

Manual Refresh and Automations

Manual refresh (12h safety sync) is designed for users who measure infrequently (for example once or twice per week):

  • Data can be refreshed on demand with the button entity
  • A 12-hour fallback refresh still runs so data does not stay stale indefinitely
  • The button can be triggered from automations using button.press

Automation Example: Trigger Manual Refresh Daily

alias: "Pool: Daily Manual Refresh"
trigger:
   - platform: time
      at: "08:00:00"
action:
   - service: button.press
      target:
         entity_id: button.backyard_pool_refresh_data

Automation Example: Refresh Before Checking Water Quality

alias: "Pool: Refresh Before Chemistry Check"
trigger:
   - platform: state
      entity_id: input_boolean.run_pool_check
      to: "on"
action:
   - service: button.press
      target:
         entity_id: button.backyard_pool_refresh_data
   - delay: "00:00:05"
   - service: notify.mobile_app
      data:
         title: "Pool Data Refreshed"
         message: "Latest Poollab backend values have been fetched."

Service

The integration also provides a service that refreshes all configured devices in the entry:

  • poollab.refresh_data

Sanitizer Comparison (Quick Reference)

Sanitizer Sensor Integration Behavior Typical Practical Target* Documented Valid Range
Chlorine sensor.pool_name_free_chlorine (plus total/combined/unbound/bound variants) Mix of direct values + calculated metrics (combined/unbound/bound) Free chlorine: 1-3 ppm; Combined chlorine: < 0.5 ppm 0-10 ppm (free/total), 0-5 ppm (combined), 0-10 ppm (unbound/bound)
Bromine sensor.pool_name_bromine Direct LabCom measurement (PL Bromine) Often 2-5 ppm 0-13.5 ppm
Active Oxygen sensor.pool_name_active_oxygen Direct LabCom measurement with multiple aliases (MPS and localized names) Often 4-8 ppm 0-30 ppm

* Practical targets depend on product instructions, local regulations, pool/spa type, and water conditions.

Chlorine Chemistry

The integration provides detailed chlorine measurements in chlorine mode:

  • Free Chlorine (Active Chlorine): The chlorine available for sanitization. Ideal range: 1–3 ppm.
  • Total Chlorine: All chlorine in the pool (free + combined).
  • Combined Chlorine: Automatically calculated as (Total βˆ’ Free). Represents chloramines and water quality. Should be < 0.5 ppm.
  • Unbound Chlorine / Bound to CYA: Calculated by the LabCom ActiveChlorine API using your pH, temperature, chlorine, and CYA readings. Requires at least pH and free chlorine measurements to be available.

Bromine Chemistry

  • Bromine: Direct bromine residual measurement from LabCom (PL Bromine). No local formula is applied by the integration.
  • Useful when your pool or spa uses bromine tablets/systems instead of chlorine.

See BROMINE_CHEMISTRY.md for detailed bromine guidance and automation ideas.

Active Oxygen Chemistry

  • Active Oxygen: Direct residual measurement from LabCom. The integration supports multiple field name variants used by LabCom exports, including PL Active Oxygen, PL Active Oxygen (MPS), PL Active Oxygen MPS, PL MPS, and German labels.
  • Useful when your system uses MPS/active oxygen sanitizing products.

See ACTIVE_OXYGEN_CHEMISTRY.md for interpretation guidance and automation examples.

For chlorine-specific deep guidance, see CHLORINE_CHEMISTRY.md.

Data Validation

The integration validates all measurement values from the API against the physical ranges listed in the table above. Values outside these ranges (e.g. a pH reading of βˆ’1 or 99) are treated as invalid and the sensor reports unavailable instead, with a warning logged. The same validation applies to inputs used for the ActiveChlorine calculation β€” if any required input is out of range, the calculation is skipped for that update cycle.

API Requirements

This integration requires:

  • Valid Labcom API token
  • At least one Poollab device registered in your account
  • Internet connectivity for API communication

Troubleshooting

Integration won't authenticate

No devices found

  • Log in to your Labcom account
  • Verify you have a Poollab device registered
  • Ensure the device is associated with your account

Sensors showing "unavailable"

  • Check network connectivity
  • Verify API token is still valid
  • Check Home Assistant logs for error messages
  • If a specific sensor is unavailable, verify the measurement is synced to the Poollab backend
  • A value that is out of the valid range listed above will also cause the sensor to report unavailable (a warning will appear in the logs)

Manual Refresh (12h Safety Sync) appears stale

  • In Manual refresh (12h safety sync) mode, updates happen when you press the refresh button or trigger button.press
  • A safety refresh still runs every 12 hours while Home Assistant is running
  • If you need fresher values, run refresh from a dashboard button or automation

Support

For issues, feature requests, or questions, please visit: https://github.com/stefanh12/poollab/issues

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Home Assistant custom component for Poollab 1.0 and 2.0

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages