Custom integration : Davey Lifeguard

Custom Integration for Home Assistant: Davey Lifeguard!

Hey Home Assistant Community!

I’m thrilled to announce my first custom integration for Home Assistant: Davey Lifeguard!

For those of you who own a Davey Lifeguard connected pool management system, this integration aims to bring your pool data and controls directly into your Home Assistant dashboard. As an independent developer and a Davey Lifeguard user myself, my goal is to centralize pool management within our favorite home automation platform.

What does this integration offer?

This initial version provides the following key features:

:mag: Real-time Sensor Monitoring:

Keep an eye on crucial pool parameters:

  • Water pH
  • ORP (Oxidation-Reduction Potential)
  • Water Temperature
  • Salinity
  • Chlorine Production Rate
  • VSD Pump Speed

:white_check_mark: Equipment Status and Diagnostics:

Get insights into the health of your system:

  • Connection status of all probes
  • Overall device status
  • Detection of common errors (flow, ORP, pH, salt)

:hammer_and_wrench: Equipment Control:

Take charge of essential functions directly from Home Assistant:

  • Activate/deactivate operating modes (manual, boost)
  • Set your desired pH level
  • Set your desired ORP level
  • Adjust the speed of your VSD pump

Technical Details:

  • This integration utilizes Home Assistant’s DataUpdateCoordinator for efficient data fetching.
  • Communication is established with the Davey cloud API (unfortunately, local access doesn’t seem to be an option at this time).
  • Authentication uses tokens and refresh tokens, managed securely within config_entry.
  • API requests are grouped and optimized using asyncio.gather.
  • The integration includes translations for English and French, with dynamic naming based on your chosen language.
  • Entities are organized logically as sensors, binary sensors, switches, and select entities.
  • It’s a UI-first integration, meaning no manual YAML configuration is required!
  • Requires Home Assistant version 2023.x or later.

Target Audience:

This integration is primarily for:

  • Home Assistant users who own a Davey Lifeguard system.
  • Anyone looking to integrate their pool management into their smart home setup.
  • Developers who might be interested in contributing to expand its capabilities.

Project Status:

This is the first functional version and is currently under development. It has been successfully tested on my own Davey Lifeguard system.

Installation:

There are two ways to install this integration: via HACS (recommended) or manually.

Installation via HACS (Home Assistant Community Store):

If you have HACS installed, you can easily add this integration as a custom repository and install it:

  1. Ensure HACS is installed. If you don’t have HACS, follow the installation guide here: https://hacs.xyz/docs/use/.

  2. Add this repository as a custom repository in HACS:

    • In Home Assistant, navigate to “HACS” in the sidebar.
    • Click on “Integrations”.
    • Click the three dots (...) in the top right corner and select “Custom repositories”.
    • In the “Add custom repository” dialog:
      • Repository: https://github.com/ForWarZz/davey_lifeguard_ha
      • Category: Integration
      • Click “Add”.
  3. Install the “Davey Lifeguard” integration:

    • After adding the repository, close the “Custom repositories” dialog.
    • Click the “+” button in the bottom right corner of the HACS Integrations page (“Explore & add repositories”).
    • Search for “Davey Lifeguard” and click on it.
    • Click the “Download” button.
  4. Restart your Home Assistant server.

  5. Configure the integration:

    • After the restart, go to “Settings” > “Devices & Services”.
    • Click the “+ Add Integration” button in the bottom right corner.
    • Search for “Davey Lifeguard” and click on it.
    • Follow the on-screen instructions to enter your Davey Lifeguard account credentials (likely the email and password used for the Davey mobile app).

Manual Installation (Alternative):

  1. Access your Home Assistant configuration directory. This is the directory where your configuration.yaml file is located.

  2. Create a new directory named custom_components within your configuration directory if it doesn’t already exist.

  3. Inside the custom_components directory, create another new directory named davey_lifeguard.

  4. Download the files for this integration from the repository and place them inside the custom_components/davey_lifeguard/ directory. The file structure should look like this:

    <your_config_directory>/
    └── custom_components/
        └── davey_lifeguard/
            ├── __init__.py
            ├── config_flow.py
            ├── sensor.py
            ├── switch.py
            └── ... (other integration files)
    
  5. Restart your Home Assistant server.

  6. Configure the integration: Follow the same steps as in the HACS installation (step 5).

Contributing:

As this is my first integration, I welcome any contributions! Here are some areas where help would be greatly appreciated:

  • Code optimization
  • Developing an advanced configuration UI
  • Adding support for more sensors or entities
  • Providing additional translations

Important Notes:

Please be aware that this is an initial release by a first-time integrator. Improvements are definitely needed, and bugs are likely present. Your patience and feedback during this early stage are highly valued. Also, please note that not all planned features are implemented yet, and development will continue based on feedback and my own progress.

Thank you for your interest, and I look forward to hearing your thoughts and feedback! Let’s make pool management in Home Assistant even better!


5 Likes

Thank you very much, I’ve been waiting for it for a long time.
Install ok, but davey servers are down, impossible to test at the moment
:angry:

Works great for me. Will be testing over the next days. Shoutout to you for developing it :clap::clap::clap:

1 Like

Mhmm, curious.
Is it working in the Davey phone app ?

No problem on my side.

Thanks for the engagement.

Thanks to you !

If you have any issues or suggestions, don’t hesitate !

It works! But I have an unstable Wi-Fi connection despite a powerline repeater less than 1 meter away.
I have to restart the Lifeguard to get back online!
FYI, what is the firmware version on your device? (Mine is 04.00.04)

Ping device on HA :

Nice to hear that it’s working correctly.
I have the same version as you.

Sorry for the wifi connection…
Normally, even if you device is offline, data will be shown, but you will be able to see that latest pushed data.

Thanks for the engagement.

Thanks :slight_smile: its working great! pls give us some contact where we can make donation for your work. Thanks!

You can now make donations to support me, the project, and potential future projects.

Please feel free to share your experience with the integration.

Thank you all very much.

"Buy Me A Coffee"