p0l0 / hagruenbeck_cloud

Home Assistant integration for Grünbeck Cloud based Water softeners
MIT License
42 stars 1 forks source link
custom-component gruenbeck hacs-integration home-assistant homeassistant python

Grünbeck Cloud Homeassistant Component

Gruenbeck

hacs_badge GitHub release Build Pipeline License

Project maintenance BuyMeCoffee

Custom Component to integrate Grünbeck Cloud based Water softeners into Home Assistant.

This integration will set up the following entities.

Platform Description
sensor.<device_name>_current_flow_rate Sensor showing current flow rate in m³
sensor.<device_name>_last_service Sensor showing when last service was
sensor.<device_name>_next_regeneration Sensor showing when next regeneration will be
sensor.<device_name>_next_service Sensor showing how many days left until next service
sensor.<device_name>_raw_water Sensor showing configured raw water value
sensor.<device_name>_regeneration_counter Sensor showing current regeneration counter
sensor.<device_name>_remaining_capacity Sensor showing remaining salt capacity in %
sensor.<device_name>_remaining_capacity_m3 Sensor showing remaining salt capacity in m³
sensor.<device_name>_salt_consumption Sensor showing current salt consumption in kg

The daily_usage attribute contains the salt usage of the last 3 days
sensor.<device_name>_salt_range Sensor showing how many days left until salt is empty (SD18 does not support it, and returns 999)
sensor.<device_name>_soft_water_quantity Sensor showing current soft water quantity in liters

The daily_usage attribute contains the soft water usage of the last 3 days
sensor.<device_name>_startup Sensor showing start-up date
binary_sensor.<device_name>_has_error Binary sensor showing if we have an error or not

The errors attribute contains error history
select.<device_name>_operation_mode Select sensor to change the operation mode

(*) Entity names are using translation, that means they will have a different name if you are not using english.

This integration provides following services.

Service Description Fields
change_settings Changes the setting for the water softener. parameter: The name of the parameter, check pygruenbeck_cloud for available parameter.
value: New value to be set
get_device_salt_measurements Returns a list with the salt measurement for each day, since startup None
get_device_water_measurements Returns a list with the water measurement for each day, since startup None
regenerate Starts a manual regeneration None

Installation

HACS (Recommended)

This is currently not an official HACS integration and repository needs to be added to HACS.

Assuming you have already installed and configured HACS, follow these steps:

  1. Navigate to the HACS integrations page
  2. Choose Integrations under HACS
  3. Click on the three small dots in the upper right corner and select Custom repositories and add this URL:
    https://github.com/p0l0/hagruenbeck_cloud/
  4. Click the '+' button on the bottom of the page
  5. Search for "Grünbeck Cloud", choose it, and click install in HACS
  6. Ready! Now continue with the configuration.

Configuration

Through the interface

  1. Navigate to Settings > Devices & Services and then click Add Integration
  2. Search for Grünbeck Cloud
  3. Enter your credentials for the Grünbeck Cloud

Energy/Water Dashboard

To get the real water consumption (at least for most people in Germany), you need to create a template sensor with following calculation (you need to change the sensors with your entity names):

template:
  - sensor:
      - name: "Total Water Usage"
        unit_of_measurement: L
        icon: mdi:water-pump
        state_class: total_increasing
        device_class: water
        state: >
          {%- set soft_water = states('sensor.<device_name>_soft_water') | float(0) -%}
          {%- set raw_water = states('sensor.<device_name>_raw_water') | float(0) -%}
          {%- set soft_water_quantity = states('sensor.<device_name>_soft_water_quantity') | float(0) -%}
          {%- if (is_number(soft_water_quantity) and (soft_water_quantity > 1)) and (is_number(raw_water) and (raw_water > 1)) and (is_number(soft_water) and (soft_water > 1)) -%}
            {%- set water_usage = ((soft_water*soft_water_quantity)/(raw_water-soft_water)+soft_water_quantity) | round(4) | float(unavailable) -%}
            {%- if is_number(water_usage) -%}
              {{water_usage}}
            {%- endif -%}
          {%- endif -%}

The sensor sensor.<device_name>_soft_water_quantity is not being pushed regularly via WebSocket, and to avoid overloading the Grünbeck Cloud API, this sensor will only be updated every 360 seconds.

If you get an error about missing statistics, it's because the entity needs to collect some data, it will be gone after a while.

REMEMBER: Entity names are using translation, that means they will have a different name if you are not using english.

LED Ring

If you have a Grünbeck model with LED Ring, the communication between integration and Grünbeck cloud is considered as "operation by user". You should change the configuration of the ring, to only be active in case of failure, to avoid permanent light on.

Known Issues

If you change the operation mode and nothing changes, check if the App shows the message "The mode of operation will be changed after next regeneration" when you try to change the operation mode there. I currently was not able to find out how to identify this state.

Water hardness unit is currently hardcoded to be shown in HA as °dH, but it's only a suffix nothing is being recalculated if you have a different unit in your installation.

Legal notice

This is a personal project and isn't in any way affiliated with, sponsored or endorsed by Grünbeck.

All product names, trademarks and registered trademarks in (the images in) this repository, are property of their respective owners. All images in this repository are used by the project for identification purposes only.