BWT - Best Water Tech­nology - Support

  1. I have used the following detail in configuration.yaml to relocate rest configuration into a dedicated file
    configuration.yaml:
rest: !include rest.yaml

Otherwise you could directly insert the yaml part I have published into the configuration.yaml file:
configuration.yaml:

rest:
  - resource: http://<ip-address>:8080/api/GetCurrentData
    authentication: basic
  ...

Note: You have to add two spaces in front of each line

  1. #: "2.0209" is a comment in my configuration. You do not need to adapt anything here.

I asked the german support to update my device to latest firmware. Please consider do the same, because they have changed several names of the provided values in between.

Don’t forget to enable the API. Then you are able to test the connectivity first by using curl on Windows CMD prompt:

curl -u user:<local_password> http://<local_ip-address>:8080/api/GetCurrentData

The <local_password> was initially send to you while registering the device.

Compare the provided values and add the rest config into Home Assistant configuration.yaml or rest.yaml, reboot … and check if the values are present using the developer tools menu (2-3 min later) …

This solution works without any cloud API. If I understand the support of BWT correctly, this will remain in the future firmware independent what the cloud API will provide. Currently the local API is only read-only!

How to interpret the values:
Interestingly I believe that nearly all values shows the troughput at 0dH! Due to the fact that the water is mixed with the unthreated water at the end again (to get the desired dH level), the total throughput is higher then these values.
There is one additional figure, which seems to show this: “BlendedWaterSinceSetup_l” in FW 209
Hope that helps

1 Like

Thanks! The api is working so far. I created (paste & edit) a rest.yaml with your details. Unfortunately, this yaml stuff is not mine…
This is what my configuration.yaml looks like. The rest.yaml is in the same folder.

Checking the yaml code delivers this cryptic (at least to me) message:

I checked the output via curl. json attribute names are the same.

Edit: Found the problem. I had to remove this line inside the rest.yaml

Great to hear!

Now you could check all available fields, provided by the API: Use the output of the curl command to investigate, which additional value is relevant to you. Do you also see “BlendedWaterSinceSetup_l”?

Update: Maybe you are interested in additional values provided the API too:
Check:

curl -u user:<local_password> http://<local_ip-address>:8080/api/GetDailyData
curl -u user:<local_password> http://<local_ip-address>:8080/api/GetMonthlyData
curl -u user:<local_password> http://<local_ip-address>:8080/api/GetYearlyData

Sascha

1 Like

Hi Sascha,
basically, my aim was to add the water consumption to the energy dashboard. So I added another sensor for daily water consumption. I choose the WaterTreatedCurrentDay_l for that. Surprisingly I get a strange output:
Screenshot 2023-08-12 113941

Any ideas on that!

Thanks!
Holger

Screenshot 2023-08-12 194639
:+1:

On the other issue I took the CurrentFlowrate_l_h sensor and made a riemann sum integration, will see if this works.

It seems as if the way with sensor.bwt_water_treated_current_day is not working. I guess the problem is, that on resetting the values at 0.00 am, the sensor shows the value from last day, which is then set to zero. Therefore, the consumption from last day is shown as negative value?!

Screenshot 2023-08-13 114201

Has anybody got the water consumption in the energy dashboard working?

You might need to store the last value just before resetting into another sensor (probably an input helper) and create an utility meter with it to feed into energy dashboard

That’s a thing I was thinking of too. I already created utility meter

furthermore I changed the sensor state class from total to total_increasing

Honestly, this is trial and error :wink:
I’ll give a feedback tomorrow…
The next problem would be that I can’t add the created helper to the energy dashboard cause it does not appear there?!

Please share yaml :slight_smile:

wtih pleasure, if you could tell me, where to find the yaml for the utility helper. :slightly_smiling_face:

Edit: Maybe this?

1 Like

You are right, it is moved into UI now, no more yaml required, this will work thanks

Any idea why I can‘t add this sensor in the energy dashboard?

For notice: You are able to adjust the statistics using the developer tools → statistics menu. Click on the icon of the used sensor ( → Adjust a statistic) and adapt the individual value (you have to check the graph first to find the timestamp)…

In other words: I do not use Riemann, utility or other stuff in that case … Its only the total value which is required.

1 Like

Ok, this makes things a lot easier. :grin:
I’ll give that a try, thanks!

BTW: The way with setting the state_class to total_increasing seems to deliver valid measurements too, at least for today. This works for using the sensor water_treated_current_day as well as the utility meter. I understand that this may interfere with the overal statistic. So this might be the wrong way.

Did you use the value BlendedWaterSinceSetup_l to create this sensor?

Hi Holger,
yes
I have added the sensor in the same way like the others!
But you can ignore this sensor and delete the lovelace statistic card entity.

Attached the added rest.yaml part with two additional sensors (one for showing value in L and one for m³):

rest.yaml (added parts - shortened):

...
  sensor:
    - name: "BWT Aqua Perla"
      json_attributes:
      - "BlendedWaterSinceSetup_l"     # <<<< this needs to be entered
...
# the follwoing needs to be entered:
    - name: "bwt_water_blended_total_l"
      unique_id: bwt_water_blended_total_l
      unit_of_measurement: "L"
      value_template: "{{ ( value_json['BlendedWaterSinceSetup_l'] | float(default=1)) }}"
      icon: "mdi:water-pump"
      device_class: water
      state_class: total
    - name: "bwt_water_blended_total_m3"
      unique_id: bwt_water_blended_total_m3
      unit_of_measurement: "m³"
      value_template: "{{ (( value_json['BlendedWaterSinceSetup_l'] | float(default=1)) / 1000 ) | round(3) }}"
      icon: "mdi:water-pump"
      device_class: water
      state_class: total

Hope that helps
Sascha

1 Like

given that this sensor is coming in ton rather than m3, i believe there is a huge precision issue, right?

Hi @anon63427907
the source output of the command provides a figure in liter.
Example output taken from my BWT using curl:

"BlendedWaterSinceSetup_l" : 97681,

So I assume that this value shows the grand total of output water of the device in liter. Converted to m³ I have devided it by 1000.
My HA sensors show:
sensor.bwt_water_blended_total_l: 97681.0
sensor.bwt_water_blended_total_m3: 97.681

I do not see any ‘ton’ reference.

1 Like

Hi Sascha,
Having almost the same config. Only

that part is missing in mine. Surprisingly it’s working anyways :slightly_smiling_face: