@gomble thanks for the great write-up how to get the Grünbeck SoftliQ SDx data into Home Assistant.
EDIT 11/10/2022:
I adapted the below config to be used with water statistics in energy dashboard. If you used the config before
a) add device_class: water
to the sensors gruenbeck_weichwassermenge
and grunbeck_gesamtwassermenge
b) change the unit of measurement from l
to L
for the same sensors as in a). It should look like this:
unit_of_measurement: "L"
device_class: water
c) After a reload of the template configuration, make sure to change the unit under “Developer tools” → “Statistics” from l
to L
for both sensors and the affected counters. This might be only possible, after you got new sensor values. So be patient and look for the error sign in the developers statistics tab.
START HOW TO
Inspired from the iOBroker forum, I rebuilt one main view of the Grünbeck (Android) app in Home Assistant (all text is generated from the data from the water softener):
(Sorry for the German in the screenshot and the following yaml code)
To get to this screen:
1.) Follow the instructions on how to get the SoftliQ SDx data into Home Assistant from the posts above: New Integration: Grünbeck softliQ - #29 by gomble
2.) I used the following MQTT sensors in configuration.yaml:
# Grünbeck water softener via iOBroker and MQTT
# EDIT 8th June 2022: changed to MQTT platform
# EDIT 10th November 2022: made compatible with water in energy dashboard
mqtt:
# Sensors
sensor:
- name: Grünbeck Weichwassermenge
unique_id: gruenbeck_weichwassermenge
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mcountwater1"
unit_of_measurement: "L"
device_class: water
state_class: total_increasing
- name: Grünbeck Regenerations Zähler
unique_id: gruenbeck_regenerations_zaehler
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mcountreg"
state_class: total_increasing
- name: Grünbeck aktueller Durchfluss
unique_id: gruenbeck_aktueller_durchfluss
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mflow1"
unit_of_measurement: "m³/h"
state_class: measurement
- name: Grünbeck Restkapazität m³
unique_id: gruenbeck_restkapazitaet_m3
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mrescapa1"
value_template: '{{value | round(1) }}'
unit_of_measurement: "m³"
- name: Grünbeck Restkapazität %
unique_id: gruenbeck_restkapazitaet_percent
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mresidcap1"
unit_of_measurement: "%"
- name: Grünbeck Salz Reichweite
unique_id: gruenbeck_salz_reichweite
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/msaltrange"
unit_of_measurement: "Tage"
- name: Grünbeck Salz Verbrauch
unique_id: gruenbeck_salz_verbrauch
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/msaltusage"
value_template: '{{ value|round(4)|float(0) }}'
unit_of_measurement: "kg"
state_class: total_increasing
- name: Grünbeck nächste Regeneration
unique_id: gruenbeck_naechste_regeneration
state_topic: "gruenbeck/0/softliQ/D/BSxxx/nextRegeneration"
value_template: '{{ as_timestamp(value)|timestamp_local(default) }}'
device_class: timestamp
- name: Grünbeck Rohwasser Härte
unique_id: gruenbeck_rohwasser_haerte
state_topic: "gruenbeck/0/softliQ/D/BSxxx/rawWater"
unit_of_measurement: "°dH"
- name: Grünbeck Weichwasser Härte
unique_id: gruenbeck_weichwasser_haerte
state_topic: "gruenbeck/0/softliQ/D/BSxxx/softWater"
unit_of_measurement: "°dH"
- name: Grünbeck Modus
unique_id: gruenbeck_modus
state_topic: "gruenbeck/0/softliQ/D/BSxxx/mode"
value_template: >-
{% if value == '1' %}
{% set modus = 'Eco' %}
{% endif %}
{% if value == '2' %}
{% set modus = 'Comfort' %}
{% endif %}
{% if value == '3' %}
{% set modus = 'Power' %}
{% endif %}
{{ modus }}
- name: Grünbeck letzter Neustart
unique_id: gruenbeck_letzter_neustart
state_topic: "gruenbeck/0/softliQ/D/BSxxx/startup"
- name: Grünbeck Wartung in
unique_id: gruenbeck_wartung_in
state_topic: "gruenbeck/0/softliQ/D/BSxxx/Stream/mmaint"
unit_of_measurement: "Tagen"
- name: Grünbeck Fehler
unique_id: gruenbeck_fehler
state_topic: "gruenbeck/0/softliQ/D/BSxxx/errors"
value_template: '{{ value_json.0.message }}'
# Binary Sensor
binary_sensor:
- name: Grünbeck Anlagen Status
unique_id: gruenbeck_anlagen_status
payload_on: 'true'
payload_off: 'false'
state_topic: "gruenbeck/0/softliQ/D/BSxxx/hasError"
device_class: problem
Exchange all “BSxxx” with your ID you see in iOBroker MQTT settings. Ensure to enable all needed MQTT messages in iOBroker and also select “retain”.
3.) Create the following 6 Utility Meter (Link to Integrations: Add integration – My Home Assistant)
a) for soft water consumption the entity “sensor.grunbeck_weichwassermenge” is the input sensor.
- grunbeck_weichwassermenge_tag (meter reset cycle: daily)
- grunbeck_weichwassermenge_monat (meter reset cycle: monthly)
- grunbeck_weichwassermenge_jahr (meter reset cycle: yearly)
b) for salt consumption the entity “sensor.grunbeck_salz_verbrauch” is the input sensor.
- grunbeck_salz_verbrauch_tag (meter reset cycle: daily)
- grunbeck_salz_verbrauch_monat (meter reset cycle: monthly)
- grunbeck_salz_verbrauch_jahr (meter reset cycle: yearly)
4.) Upload the picture from the end of this post to www/picture/Gruenbeck.png
5.) Create a “pictures-elements” card in the Home Assistant dashboard:
type: picture-elements
theme: Google Light Theme
elements:
- type: conditional
conditions:
- entity: binary_sensor.grunbeck_anlagen_status
state: 'off'
elements:
- type: state-label
entity: binary_sensor.grunbeck_anlagen_status
prefix: 'Anlagenstatus: '
style:
top: 3%
left: 80%
color: green
- type: conditional
conditions:
- entity: binary_sensor.grunbeck_anlagen_status
state: 'on'
elements:
- type: state-label
entity: binary_sensor.grunbeck_anlagen_status
prefix: 'Anlagenstatus: '
style:
top: 2%
left: 80%
color: red
- type: conditional
conditions:
- entity: binary_sensor.grunbeck_anlagen_status
state: 'on'
elements:
- type: state-label
entity: sensor.grunbeck_fehler
style:
top: 5%
left: 80%
color: red
- type: state-label
entity: sensor.grunbeck_rohwasser_harte
style:
top: 9%
left: 13%
color: white
- type: state-label
entity: sensor.grunbeck_weichwasser_harte
style:
top: 9%
left: 73%
color: white
- type: state-label
entity: sensor.grunbeck_modus
style:
top: 22.5%
left: 38%
color: grey
prefix: 'Modus: '
- type: state-label
entity: sensor.grunbeck_weichwassermenge_tag
style:
top: 23.5%
left: 78%
prefix: 'heute: '
- type: state-label
entity: sensor.grunbeck_weichwassermenge_monat
style:
top: 29.5%
left: 78%
prefix: 'Monat: '
- type: state-label
entity: sensor.grunbeck_weichwassermenge_jahr
style:
top: 32.5%
left: 78%
prefix: 'Jahr: '
- type: state-label
entity: sensor.grunbeck_restkapazitat_m3
style:
top: 43.5%
left: 70%
- type: state-label
entity: sensor.grunbeck_restkapazitat
style:
top: 43.5%
left: 85%
- type: state-label
entity: sensor.grunbeck_nachste_regeneration
style:
top: 59%
left: 78%
- type: state-label
entity: sensor.grunbeck_salz_verbrauch_tag
style:
top: 72%
left: 78%
prefix: 'heute: '
- type: state-label
entity: sensor.grunbeck_salz_verbrauch_monat
style:
top: 78%
left: 78%
prefix: 'Monat: '
- type: state-label
entity: sensor.grunbeck_salz_verbrauch_jahr
style:
top: 81%
left: 78%
prefix: 'Jahr: '
- type: state-label
entity: sensor.grunbeck_wartung_in
style:
top: 98%
left: 20%
color: grey
prefix: 'Wartung in: '
- type: state-label
entity: sensor.grunbeck_salz_reichweite
style:
top: 92.2%
left: 78%
image: /local/picture/Gruenbeck.png
optional) If you would like to calculate the total water consumption (soft water + blend water) without the cleaning water, you can use this sensor in configuration.yaml. I do not use this information in the picture but in my statistics:
template:
- sensor:
- name: "Grünbeck Gesamtwassermenge"
unique_id: grunbeck_gesamtwassermenge
unit_of_measurement: "L"
state_class: total_increasing
device_class: water
state: >-
{% set wwh = states("sensor.grunbeck_weichwasser_harte")|float(0) %}
{% set rwh = states("sensor.grunbeck_rohwasser_harte")|float(0) %}
{% set wwm = states("sensor.grunbeck_weichwassermenge")|float(0) %}
{% if (is_number(wwh) and (wwh > 1)) and (is_number(rwh) and (rwh > 1)) and (is_number(wwm) and (wwm > 1)) %}
{% set gwn = ((wwh*wwm)/(rwh-wwh)+wwm)|round(4) |float(unavailable) %}
{% endif %}
{% if is_number(gwn) %}
{{ gwn }}
{% endif %}
Empty picture for the background of the “picture-elements” card: