Water Guru Integration

Water Guru (similar to pHin) is a WiFi based pool sensor that measures water temp, chlorine and pH levels, etc., but I’ve found very little on the web related to integrating the device into a hub such as Google Home, Amazon, SmartThings, or Home Assistant. Great for people with pools, but smart pool integration seems like a relatively small niche here.

So my question is, how do I go about getting data into Home Assistant without an integration? If I can get access to Water Guru’s API is there a generic integration that can use cURL? What are my options?

3 Likes

Restful sensors would be one way.

Just checking, did you reach out to their support and ask about an API?

I will be opening my pool in a few weeks and would love to have a monitoring system this year.

Thank you.

I’ve reached out a few times to no avail. Was told Facebook is the best way to reach them but they’ve only replied to say the API isn’t publicly available, and have yet to answer if it ever will be.

That said, I did actually find a partial alternative. The Pool Math app has an integration for Home Assistant that updates every 15 minutes. You have to manually enter test result numbers, so automation is non-existent which defeats the purpose of what you and I both wanted to do, but it at least displays a good amount of information from the app.

Whole tab is under construction still but the pool info is on the left. Going to add a “Log Date” to it as well (which I just thought of as I type this):

Thank you Zach. Do you still plan to buy the Water Guru and then just manually transfer the readings into this app?

I actually already have it and I’m pretty happy with it so far. Doesn’t provide a lot of information, but the basics are still pretty helpful and tell you when you need to do a more thorough test.

Any update on this as I also would like to see it play nice with HA.?

Nothing yet. Keep your expectations low. They don’t seem anxious to help or respond to my questions or posts on even their own FB page.

Hi there, if you are looking for a smart pool monitor that integrates with Home Assistant already, check out PoolSense at www.proautomation.co

We have had some great reviews from the Home Assistant community.

1 Like

These things aren’t exactly cheap. I’ll keep my hopes up for a WaterGuru integration given I’ve already paid for this one.

And given that not only was that your first post in our community, but that it appears to be geared towards trying to make a sale rather than add to the community, I don’t exactly know that it’s appropriate.

Understood, apologies. I am new to this community. We are a South African start up and have seen quite a lot of traffic from the Home Assistant community and would to provide support or add to the community where we can. Again, I apologise for my previous post.

1 Like

Thanks for your input! I would be delighted for any info on Home Assistant or SmartThings integration.

This might be a starting point: https://github.com/bdwilson/waterguru-api - someone used it to build a hubitat integration. Far from perfect but it does provide a good amount of information on API usage

There is a homebridge add-on for Waterguru. jkoehl/homebridge-waterguru (github.com)

image

I ended up using the docker container from here: https://github.com/bdwilson/waterguru-api

This provides the information as json and I could use a rest sensor to get the data. (Note: Salt level is not measured by waterguru, I get that from Pentair. Not sure my sensors work for everyone since they hard code the ID’s

# Waterguru
  - platform: rest
    name: waterguru_raw
    unique_id: '*****'
    scan_interval: 21600
    resource: http://myserver.ha:53255/api/wg
    json_attributes_path: "$.waterBodies[0]"
    json_attributes:
      - waterTemp
      - status
      - pods
      - measurements
      - latestMeasureTime
      - latestMeasureTimeHuman
    value_template: '{{ value_json.status }}'

  - platform: template
    sensors:
      waterguru_water_temperature:
        friendly_name: Waterguru Water Temperature
        unique_id: '******'
        unit_of_measurement: C
        value_template: >-
          {{"%.1f"|format((state_attr('sensor.waterguru_raw','waterTemp')|float -32)*5/9)}}
        attribute_templates:
          temp_fahrenheit: >-
            {{state_attr('sensor.waterguru_raw','waterTemp')}}

      waterguru_ph:
        friendly_name: Waterguru PH Level
        unique_id: '******'
        value_template: >-
          {{(state_attr('sensor.waterguru_raw','measurements')[1].floatValue)}}
        attribute_templates:
          status: >-
            {{(state_attr('sensor.waterguru_raw','measurements')[1].status)}}
          measure_time: >-
              {{(state_attr('sensor.waterguru_raw','measurements')[1].measureTime)}}     
          measure_time_human: >-
              {{(state_attr('sensor.waterguru_raw','measurements')[1].measureTimeHuman)}}
          advice: >-
            {%if 'alerts' in (state_attr('sensor.waterguru_raw','measurements')[1])%}
              {{(state_attr('sensor.waterguru_raw','measurements')[1].alerts[0].advice.action.summary)}}
            {%else%}
              all clear
            {%endif%}

      waterguru_cl:
        friendly_name: Waterguru Free Chlorine Level
        unique_id: '*****'
        value_template: >-
          {{(state_attr('sensor.waterguru_raw','measurements')[0].floatValue)}}
        attribute_templates:
          status: >-
            {{(state_attr('sensor.waterguru_raw','measurements')[0].status)}}
          measure_time: >-
            {{(state_attr('sensor.waterguru_raw','measurements')[0].measureTime)}}     
          measure_time_human: >-
            {{(state_attr('sensor.waterguru_raw','measurements')[0].measureTimeHuman)}}
          advice: >-
            {%if 'alerts' in (state_attr('sensor.waterguru_raw','measurements')[0])%}
              {{(state_attr('sensor.waterguru_raw','measurements')[0].alerts[0].advice.action.summary)}}
            {%else%}
              all clear
            {%endif%}

      waterguru_cassette:
        friendly_name: Waterguru Cassette Status
        unique_id: '*******'
        value_template: >-
          {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[0].pctLeft)}}
        attribute_templates:
          status: >-
            {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[0].status)}}
          measurements_left: >-
            {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[0].amountLeft)}}

      waterguru_battery:
        friendly_name: Waterguru Battery
        unique_id: '*******'
        unit_of_measurement: "%"
        device_class: battery
        value_template: >-
          {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[1].pctLeft)}}
        attribute_templates:
          status: >-
            {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[1].status)}}
          measurements_left: >-
            {{(state_attr('sensor.waterguru_raw','pods')[0].refillables[1].amountLeft)}}   ```
1 Like

Can you share your LoveLace card code?

PrayerfulDrop

Gauges:

cards:
  - entity: sensor.waterguru_ph
    max: 9
    min: 6
    severity:
      green: 7.5
      yellow: 0
      red: 8
    type: gauge
    name: Pool PH
    needle: true
  - entity: sensor.waterguru_cl
    max: 10
    min: 0
    severity:
      green: 2
      yellow: 0
      red: 6
    type: gauge
    name: Free Chlorine
    needle: true
  - entity: sensor.waterguru_water_temperature
    max: 50
    min: 0
    type: gauge
    name: Pool
    needle: false
    severity:
      green: 0
      yellow: 0
      red: 0
type: horizontal-stack

Mushroom Row:

type: horizontal-stack
cards:
  - type: custom:mushroom-template-card
    primary: '{{states(''sensor.waterguru_ph'')}}'
    secondary: pH
    icon: mdi:ph
    icon_color: '{{(state_attr(''sensor.waterguru_ph'',''status'')|lower)}}'
    card_mod:
      style: |
        ha-card {
          --card-primary-font-size: 18px;
          --card-secondary-font-size: 12px;
          --icon-size: 1.7em;
        }
        :host {
          --mush-icon-symbol-size: 1.2em;
        }     
  - type: custom:mushroom-template-card
    primary: '{{states(''sensor.waterguru_cl'')}}'
    secondary: Chlorine
    icon: mdi:beaker
    icon_color: '{{(state_attr(''sensor.waterguru_cl'',''status'')|lower)}}'
    card_mod:
      style: |
        ha-card {
          --card-primary-font-size: 18px;
          --card-secondary-font-size: 12px;
          --icon-size: 1.7em;
        }
        :host {
          --mush-icon-symbol-size: 1.2em;
        } 
  - type: custom:mushroom-template-card
    primary: '{{states(''sensor.pool_scg_salt'')}} ppm'
    secondary: Salt
    icon: mdi:shaker
    icon_color: |-
      {%set saltlvl = states('sensor.pool_scg_salt')|int%}
      {%if saltlvl < 3001%}
      yellow
      {%elif saltlvl > 3000 and saltlvl <4001%}
      green
      {%elif saltlvl > 4000%}
      red
      {%endif%}
    card_mod:
      style: |
        ha-card {
          --card-primary-font-size: 18px;
          --card-secondary-font-size: 12px;
          --icon-size: 1.7em;
        }
        :host {
          --mush-icon-symbol-size: 1.2em;
        } 

Message Card

type: custom:mushroom-template-card
primary: 'Last Measured: {{(state_attr(''sensor.waterguru_ph'',''measure_time_human''))}}'
secondary: >-
  {{(as_timestamp(strptime(state_attr('sensor.waterguru_ph','measure_time')[:19],'%Y-%m-%dT%H:%M:%S'))|float
  -14400)|timestamp_custom('%m-%d-%Y %H:%M', local=True)}}

  {%if state_attr('sensor.waterguru_ph','advice') != 'all clear'%}PH:
  {{state_attr('sensor.waterguru_ph','advice')}}{%endif%}

  {%if state_attr('sensor.waterguru_cl','advice') != 'all clear'%}Chlorine:
  {{state_attr('sensor.waterguru_cl','advice')}}{%endif%}

  Battery: {{states('sensor.waterguru_battery')}}%

  Cassette: {{states('sensor.waterguru_cassette')}}% -
  {{state_attr('sensor.waterguru_cassette','measurements_left')}} Measurements
icon: mdi:pool
badge_icon: >-
  {%if 'alerts' in (state_attr('sensor.waterguru_raw','measurements')[0]) or
  'alerts' in (state_attr('sensor.waterguru_raw','measurements')[1])%} mdi:alert
  {%else%}

  {%endif%}
badge_color: red
multiline_secondary: true
icon_color: |2-
    {%if 'alerts' in (state_attr('sensor.waterguru_raw','measurements')[0]) or
    'alerts' in (state_attr('sensor.waterguru_raw','measurements')[1])%}
    yellow
    {%else%}
     green
    {%endif%}
card_mod:
  style: |
    ha-card {
      --card-primary-font-size: 14px;
      --card-secondary-font-size: 15px;
      --icon-size: 2em;
    }
    :host {
      --mush-icon-symbol-size: 1.7em;
    } 

2 Likes

Thank you!!!

I am struggling with learning even the simplest things about Home Assistant, but surprisingly I’ve gotten pretty far. Can someone help me out and just tell me which of the yaml files the (4) code snippets above go in, in order to replicate the work that @sarahmva did?

Also, I know I need to change the IP address/url to match my waterguru.api docker location. But I’m also stumped on the "unique_id: '******" . I assume I need to modify that as well?

Thanks

The configuration for the sensors is in your configuration.yaml (the part starting with # Waterguru). Once added, use the Developer Tools to check your configuration, then reload the template entities and the rest entities.

The other three code snippets will be on one of your Lovelace cards. You can simply add a manual card and copy/paste the code. For the card-mod to work, you will need to install card mod via HACS. I also use the mushroom cards, available through HACS.

Yes, you need to create unique ID’s. Online UUID Generator Tool This is a website that can create UUID’s.