DAB E.Sybox pump sensors via DAB DConnect

Hello my friend, thank you for your willing to help. In the end I have manged to make it work. Everything is showing in my home assistant server like a charm. Thank you all for your time spent to share your work.

1 Like

Hello Coldness00.

Could you share the tuto with me too? Have tha same Esybox3mini as lefgrter.

1 Like

You follow same procedure however in the code do as follow:
in dab_dconnect_get

#!bash
data_usr='[email protected]'
data_pwd='password=whatyouwanttheretobe'
login_htm=$(curl -j -c data/dab_cookie1.txt -k -s -L 'https://dconnect.dabpumps.com/')
login_url=$(echo "$login_htm" | grep -E -o 'action=(.*) method=' | sed -e 's/^.*action="//g' -e 's/" method=$//g' -e 's/&/\&/g')

login_res=$(curl -b data/dab_cookie1.txt -c data/dab_cookie1.txt -k -s -L $login_url -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode $data_usr --data-urlencode $data_pwd)
data_inst=$(curl -b data/dab_cookie1.txt -c data/dab_cookie1.txt -k -s -L 'https://dconnect.dabpumps.com/api/v1/gui/installation/list?lang=en')
data_box2=$(curl -b data/dab_cookie1.txt -c data/dab_cookie1.txt -k -s -L 'https://dconnect.dabpumps.com/dumstate/AAAAA-BBBBB-QQQQQ-EEEEE-GGGGG-DDCFF-DDDDD')

echo "$data_inst" | jq 'walk(if type=="string" and test("^{.*}$") then .|fromjson else . end)' > /config/data/dab_dconnect_installations.json
echo "$data_box2" | jq 'walk(if type=="string" and test("^{.*}$") then .|fromjson else . end)' > /config/data/dab_dconnect_box2.json

then in templates.yaml

  ###
  ### Cold Water and pump
  ###
  - sensor:
    - name: "Cold Water meter total"
      unique_id: "cold_water_meter_total"
      device_class: water
      icon: mdi:water
      state_class: total_increasing
      unit_of_measurement: 'm³'
      state: >-
        {{ state_attr('sensor.dab_dconnect_box2', 'status').FCt_Total_Delivered_Flow_mc | float / 1000.0 }}
      attributes:
        updates: "{{ state_attr('sensor.dab_dconnect_box2', 'statusts') }}"

  - sensor:
    - name: "Cold Water flow"
      unique_id: "cold_water_flow" 
      device_class: water
      icon: mdi:water-pump
      state_class: measurement
      unit_of_measurement: 'l/min'
      state: >-
        {{ state_attr('sensor.dab_dconnect_box2', 'status').VF_FlowLiter | float(0) / 10.0 }}
      attributes:
        updates: "{{ state_attr('sensor.dab_dconnect_box2', 'statusts') }}"

  - sensor:
    - name: "Cold Water pressure"
      unique_id: "cold_water_pressure"
      device_class: water
      icon: mdi:gauge
      state_class: measurement
      unit_of_measurement: 'bar'
      state: >-
        {{ state_attr('sensor.dab_dconnect_box2', 'status').VP_PressureBar | float(0) / 10.0 }}
      attributes:
        updates: "{{ state_attr('sensor.dab_dconnect_box2', 'statusts') }}"

  - sensor:
    - name: "Cold Water pressure target"
      unique_id: "cold_water_pressure target"
      device_class: water
      icon: mdi:gauge-full
      state_class: measurement
      unit_of_measurement: 'bar'
      state: >-
        {{ state_attr('sensor.dab_dconnect_box2', 'status').SP_SetpointPressureBar | float(0) / 10.0 }}
      attributes:
        updates: "{{ state_attr('sensor.dab_dconnect_box2', 'statusts') }}"

  - sensor:
    - name: "Cold Water temperature"
      unique_id: "cold_water_temperature"
      device_class: water
      icon: mdi:thermometer-water
      state_class: measurement
      unit_of_measurement: '°C'
      state: >-
        {{ state_attr('sensor.dab_dconnect_box2', 'status').TE_HeatsinkTemperatureC | float(0) / 10.0 }}
      attributes:
        updates: "{{ state_attr('sensor.dab_dconnect_box2', 'statusts') }}"

then in command_line.yaml

###
### DAB DConnect
###
- sensor:
    name: "DAB DConnect Installations"
    unique_id: "dab_dconnect_installations"
    scan_interval: 10
    command: "cat /config/data/dab_dconnect_installations.json"
    value_template: "{{ value_json.stats.start }}"
    json_attributes:
      - res
      - stats
      - data

- sensor:
    name: "DAB DConnect Box2"
    unique_id: "dab_dconnect_box2"
    scan_interval: 5
    command: "cat /config/data/dab_dconnect_box2.json"
    value_template: "{{ value_json.lastreceived }}"
    json_attributes:
      - res
      - result
      - status_validity
      - statusts
      - lastreceived
      - refresh
      - servertime
      - status

in shell_command.yaml

dab_dconnect_get: bash /config/shell/dab_dconnect_get.sh

utility_meter.yaml

###
### Cold Water
###
cold_water_meter_daily:
  name: "Cold Water meter daily"
  unique_id: cold_water_meter_daily
  source: sensor.cold_water_meter_total
  cycle: daily
  periodically_resetting: false

cold_water_meter_monthly:
  name: "Cold Water meter monthly"
  unique_id: cold_water_meter_monthly
  source: sensor.cold_water_meter_total
  cycle: monthly
  periodically_resetting: false

cold_water_meter_yearly:
  name: "Cold Water meter yearly"
  unique_id: cold_water_meter_yearly
  source: sensor.cold_water_meter_total
  cycle: yearly
  periodically_resetting: false

Furthermore, think to remove form recorder the reccording of installation as it can be a big file for a db
in configuration.yaml you can do (I don’t grab any data from this file so you could even not download if you want by removing the line in dab_dconnect_get):

recorder:
  exclude: #Exclude entities
    domains:
      - automation
    entities:
      - sensor.dab_dconnect_installations

As for the automation, i used a dymanique update depending on the power (if running) to get the fresh data

- id: '1700385045144'
  alias: DAB DConnect Get Data
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /5
  - platform: numeric_state
    entity_id:
    - sensor.sp_surpresseur_power
    above: 5
  condition: []
  action:
  - repeat:
      sequence:
      - service: shell_command.dab_dconnect_get
        data: {}
        response_variable: dab_dconnect_get_response
      - delay:
          hours: 0
          minutes: 0
          seconds: 3
          milliseconds: 0
      while:
      - condition: numeric_state
        entity_id: sensor.sp_surpresseur_power
        above: 5
  - service: shell_command.dab_dconnect_get
    data: {}
    response_variable: dab_dconnect_get_response
  mode: single

I hope this does help you. Good Luck :slight_smile:

1 Like

@Coldness00
I am working on a proper custom integration for DAB Pumps and am very interested in the data returned from the DConnect website fior a ESybox.mini.

Would you mind sharing the json file(s) returned from the website, i.e.

  • /config/data/dab_installations.json
  • /config/data/dab_dconnect_box2.json
    You can send them directly to my email address ‘info at anko dot co dot nz’.
    Anonymize the file contents if you want to.

If I know what to expect for that pump I can immediately add support for it in the custom integration.

Hey,

I just did. Sorry for the late reply.

@Coldness00 @Djavdet @lefgrter
I’ve got a first version of a proper HA integration for DAB Pumps (via DConnect) available for testing. Shows all available properties as individual sensors (read-only, no changing of settings of the pump).

Am awaiting for it to be added to the HACS integrations. Meanwhile you can add it manually:

Option 1, via HACS as custom repository

  • Open the HACS page in HA
  • Click on the three dots on the top right and select ‘Custom repositories’
  • Add “https://github.com/ankohanse/hass-dab-pumps” (with the quotes!) and set category to ‘integration’. Press ‘Add’
  • Continue with the steps shared by options 1 and 2

Option 2, manually copy all files:

Then, for both options 1 and 2:

  • Restart HA
  • Browse to Settings → integrations and choose ‘Add Integration’
  • Search for ‘DAB Pumps’, likely to be at bottom of list
  • Follow the steps of the configuration UI

Note that the DAB Pumps DConnect Website/App is not happy with multiple simultaneous logins from the same account. See my comments about this in the readme in https://github.com/ankohanse/hass-dab-pumps

2 Likes

Thanks for this! I just added my Mini3 via this integration and it seems to be working.

I had added it the pump to D Connect a few months back when I moved in and my free trial has since expired but I notice that with this integration its still able to pull data from the pump. I’m guessing an active paid subscription is not required then? Is this likely to cause issues with DAB?

I have just added the esybox intergration and it is really good, and installed without an issue. Thanks @ankoh .

This is great! Worked right away with my E.syBox Mini. I also don’t have a subscription, I didn’t even realized it required one as I don’t see it in the normal iPhone App.

Thanks for this @ankoh

I’m having trouble making sense of the water usage and power usage sensors from the esybox mini 3 integration.water use seems 100 time more than actual?
Has anyone had success working them out?

My custom integration for DAB Pumps is getting stable enough and has been tested with various devices (ESybox, ESybox.mini, ESybox.diver, DConnect Box2). The custom integration is now the preferred solution over the scripts I initially published under this community topic.

See the description in ankohanse/hass-dab-pumps: Home Assistant Custom Integration for DAB Pumps via the DConnect service (github.com) on how to install the custom integration for DAB Pumps.

Will we be able to turn power shower boost and sleep mode on/off eventually?

Yes, I hope so.
Changable entity values for Power Shower and Sleep Mode is the next thing on my list to look into for this custom integration so hope to be able to have a solution for it in March.

1 Like

I rebooted the rpi4, probably after some updates, and the DAB integration no longer works.

I installed core update 2024.2.5 and the DAB integration is working again.

Installed update dab v2024.3.2 and now the data isn’t updating.

Edit, All Good I had to clear the app cache.

It would be great to understand the wireless comms from the Esybox to theDConnect.

I did some research a few months back but hit a few roadblocks due to lack of equipment.

1 Like

@ankoh Thank you so much for this integration. Unfortunately I cannot get past the GUI configuration. I get the following error:
Screenshot 2024-03-07 at 18.28.41

I’ve installed via HACS and don’t see any errors. I created a second user as per the documentation and I can login to dconnect with both users via a browser and see the detail for my EasyBoxMini3. I logged out on the App and browser in case it’s a concurrency issue but no luck. I also tried both logins for both users. Any ideas? Thanks

Hi Nico,

Sorry to hear the integration is not doing what it is supposed to do on your system.
Could you please have a look if there is any error or warning in the log relating to the DAB Pumps integration:

  • In the main Home Assistent menu, choose Settings → System → Logs

Thank you @ankoh I see the following in the log when I run the config to add my credentials after adding the integration:

2024-03-08 08:46:50.545 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 197, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 405, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 502, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/config_flow.py", line 101, in async_step_user
await self.async_try_connection()
File "/config/custom_components/dabpumps/config_flow.py", line 69, in async_try_connection
coordinator = DabPumpsCoordinatorFactory.create_temp(self._username, self._password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/coordinator.py", line 109, in create_temp
api = DabPumpsApiFactory.create(hass, username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/api.py", line 62, in create
api = DabPumpsApi(hass, username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/api.py", line 87, in __init__
self._hass.async_create_task(self._history_store.async_remove())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'async_create_task'

Let me know if you prefer that I open issue on Issues · ankohanse/hass-dab-pumps · GitHub.

Below my current HA versions which are all on the latest version available:

  • Core 2024.3.0
  • Supervisor 2024.02.1
  • Operating System 12.0
  • Frontend 20240306.0