New Integration: Grünbeck softliQ

This would be amazing !

1 Like

Using the new API stuff seems cool, but please consider that

  1. there are people using older SC devices
  2. there are people not wanting to connect to external clouds
    I’m therefore still interested in an integration working like in iobroker, i.e. directly loading the values (read-only) from the (local) IP of the device

Hello,
loading the data directly from the device will currently not work on the SD devices. The SD devices automatically connect to the cloud and load the data there. Only the older SC devices can be accessed directly via IP.

For SD Devices the only thing that can be done is logging into the cloud and read the data from there. For that there are two possible ways:

  • Use the api provided above
  • Fake the oauth mechanism and use the same technique as the grünbeck APP.

I have decided to use the later way, because at the time I have developed that application, there where no public API available.

Best regards

1 Like

There is no need to reinvent the wheel :slight_smile:
Everything is here in Javascript and has to adopt to Homeassistant:

@SLeopold yes, a direct integration for home assistant would really be awesome!

4 Likes

I found a workaround to get my watersoftener into homeassistant:

Installed ioBroker as Addon

configured mqtt client and gruenbeck adapter:
image

selected values which i want to transfer to homeassistant:
image

created the mqtt sensors:
image

and get them as entity:

not nice but it is working :slight_smile: maybe in the future if anyone wants to port this to homeassistant nativ then i will change

4 Likes

gomble, these are good news. Just to clarify, you managed to get it running on an SD (cloudbased) water softening device?

Yes i have softliq sd21

Updated my SoftliQ SD18 yesterday. Still no MQTT

EDIT: SD18 instead of SD21

Did you get an update ?

SD18 manual update with press for 3 seconds. Automatic is enabled but nothing came. Sorry my post originally stated SD21.

which version do you have now ?

Hardware 000000003 Software 0002.0046

Okay my did already an update
hardwareversion:00000004
softwareversion: 0002.0046

Thank you! I finally integrated my SD21 (Software 0002.0028). I hope that this will be possible without the need of ioBroker in the future. But its good for now I guess!

1 Like

Fantastic!
So here is my final solution for a SD water-softener:

  • Install ioBroker as HASS-Addon
  • Enable Gruenbeck-Adapter within ioBroker
  • Enable MQTT-client-Adapter within ioBroker
  • for now I publish the following four values through MQTT (I checked the “retain” checkbox to have the last value always available)
    – Stream/mcountwater1
    – Stream/msaltusage
    – Stream/mmaint
    – hasError
  • Next, I created a script within homeassistant to use the “MQTT Discovery” feature of homeassistant (sorry for the german)
mqtt_gruenbeck:
  sequence:
  - service: mqtt.publish
    data:
      topic: homeassistant/binary_sensor/gruenbeck-fehler/config
      payload: '{"name":"Grünbeck Fehler","device_class":"problem","state_topic":"gruenbeck/0/softliQ/D/BSxxxxxxxx/hasError","payload_off":"false","payload_on":"true","unique_id":"gruenbeck-fehler","device":{"manufacturer":"Grünbeck","model":"softliQ:SD18","name":"Enthärter","identifiers":["BSxxxxxxxx"]}}'
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/gruenbeck-wartung/config
      payload: '{"name":"Grünbeck Wartung","state_topic":"gruenbeck/0/softliQ/D/BSxxxxxxxx/Stream/mmaint","unit_of_measurement":"Tage","unique_id":"gruenbeck-wartung","icon":"mdi:wrench-clock","device":{"manufacturer":"Grünbeck","model":"softliQ:SD18","name":"Enthärter","identifiers":["BSxxxxxxxx"]}}'
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/gruenbeck-salzverbrauch/config
      payload: '{"name":"Grünbeck Salzverbrauch","state_topic":"gruenbeck/0/softliQ/D/BSxxxxxxxx/Stream/msaltusage","unit_of_measurement":"kg","unique_id":"gruenbeck-salzverbrauch","icon":"mdi:shaker-outline","state_class":"total_increasing","device":{"manufacturer":"Grünbeck","model":"softliQ:SD18","name":"Enthärter","identifiers":["BSxxxxxxxx"]}}'
  - service: mqtt.publish
    data:
      topic: homeassistant/sensor/gruenbeck-wasserverbrauch/config
      payload: '{"name":"Grünbeck Wasserverbrauch","state_topic":"gruenbeck/0/softliQ/D/BSxxxxxxxx/Stream/mcountwater1","unit_of_measurement":"l","unique_id":"gruenbeck-wasserverbrauch","icon":"mdi:water-pump","state_class":"total_increasing","device":{"manufacturer":"Grünbeck","model":"softliQ:SD18","name":"Enthärter","identifiers":["BSxxxxxxxx"]}}'
  mode: single
  alias: MQTT-Gruenbeck
  • And an automation, which fires when homeassistant starts
- id: 'gruenbeck'
  alias: Gruenbeck
  description: ''
  trigger:
  - platform: homeassistant
    event: start
  condition: []
  action:
  - service: script.mqtt_gruenbeck
    data: {}
  mode: single
  • Finally, six Utility-Meters to see the daily, weekly and monthly water- and salt-usage
utility_meter:
  salt_day:
    source: sensor.grunbeck_salzverbrauch
    cycle: daily
  salt_week:
    source: sensor.grunbeck_salzverbrauch
    cycle: weekly
  salt_month:
    source: sensor.grunbeck_salzverbrauch
    cycle: monthly
  water_day:
    source: sensor.grunbeck_wasserverbrauch
    cycle: daily
  water_week:
    source: sensor.grunbeck_wasserverbrauch
    cycle: weekly
  water_month:
    source: sensor.grunbeck_wasserverbrauch
    cycle: monthly

With this I have all entities within one device and it just looks neat :smiley:

Once again, thanks for the hint with the ioBroker-Addon and yes, hopefully this will be - sometimes in the future - replaced by a native HASS-Addon

Joerg

4 Likes

Nice, its not the best solution but it is working as i said :+1:t2:

I am confused how to get ioBroker on my HASS os Raspberry Pi 4.
Is ioBroker available in HACs under experimental?
I have another rasbperry 3+ doing nothing that I could use.

I don’t have the skills to make a HA plugins, but at some stage if such a plugin does not materialise I will make a node-red flow with the HA Helper nodes. All the information needed is available in the post for Markis and the main.js posted by gomble above. This is on my list after the get Miele TwinDos liquid levels from the non-public API.

Add this repo in your addon menu:

A instruction is in the github readme

3 Likes

Cheers mate.
Slight problem: MQTT Cleint Version 1.5 from 26th January 2022 complains: iobroker Invalid version of “js-controller”. Installed “3.2.16”, required ">=3.3.22

The changelog says It requires js-controller 3.3.x. but the iobroker from Max’s Repo is 3.2.16
It was an interesting journey SSHing into the docker container to update this. First time for me.

I see my SD18 values in iobroker but the Home Assistant States and Dashboard shows “Unknown”


I am not sure what is wrong here. Everthing is configured in HA and Green in ioBroker.
I think the screenshot is the MQTT Data going to HA. Not sure though.

EDIT: Found the problem: Replaced BSxxxxx 6 times in the mqtt_gruenbeck script from Jörg above.
And for the record MQTT messages to a mqtt broker in ioBroker looks like this:debug (2458) successfully published gruenbeck.0.softliQ.D/BSxxxxx.Stream.mcountwater1: {“topic”:“gruenbeck/0/softliQ/D/BSxxxxxxxx/Stream/mcountwater1”,“message”:“130391”}