Making BWT AQA Smart Life S decalcification system a bit smarter

2022-01-19 ยท 640 words ยท 4 minute read

I run a BWT AQA Life S decalcification system because where I live we have enormous amounts of calcium in our tap water. In the past I had multiple occasions where the system malfunctioned and spilled water in my basement where it is located. The system is not smart by any means, it just starts to beep when ever attention is needed. Unfortunately this beep is not really audible in the living area of the house. Thats also the case when I need to top up the regenartion salt which is the most common “error”.

As the device itself does not have an interface I could use to get information out of, I make use of the fact that the display changes color depending on the state. It blue in normal operation, green-ish yellow in regeneration mode and red in error mode.

BWT AQA Life S
Image from Selfio.de

Thats enough information for me, conection to the control electronics itself is unecessary in my opinion.

I bought an Adafruit RGB Color Sensor with IR filter and White LED which uses the AMS TCS34725 Color Sensor as its main part.

Adafruit TCS34725 board
Image from AliExpress

That is connected to an MH-ET LIVE MiniKit ESP32 which is my favourite ESP32 dev board because of its small form factor and low price.

MH-ET LIVE MiniKit ESP32 board
Image from AliExpress

Wiring ๐Ÿ”—

The wiring is pretty straight forward

wiring
  1. 3.3V <-> 3V3
  2. GND <-> GND
  3. IO21 <-> SDA
  4. IO22 <-> SCL

I added a bridge wire from GND to LED on the TCS34725 board to deactivate the build in LED as I don’t need it.

Code ๐Ÿ”—

I initially ran a self written REST implementation but decided to go for ESPhome because it integrates nicely with Home-Assistant and handles the Wifi stuff like captive portal, reconnect etc. perfectly.

 1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 
---
 esphome:
   name: bwt 
   platform: ESP32
   board: mhetesp32minikit
 
 # WiFi connection
 wifi:
   ssid: !secret wifi_ssid
   password: !secret wifi_password
   ap:
     ssid: BWT-Hotspot
     password: hotspotpw
 
 captive_portal:
 
 # Enable logging
 logger:
 
 # Enable Home Assistant API
 api:
 
 # Enable over-the-air updates
 ota:
 
 # Enable Web server
 web_server:
   port: 80
 
 i2c:
   sda: 21
   scl: 22
   scan: true
   id: i2cbus
 
 sensor:
   - platform: tcs34725
     red_channel:
       id: bwt_red
       name: "BWT Red"
     green_channel:
       id: bwt_green
       name: "BWT Green"
     blue_channel:
       id: bwt_blue
       name: "BWT Blue"
     clear_channel:
       id: bwt_clear
       name: "BWT Clear"
     illuminance:
       id: bwt_illuminance
       name: "BWT Illuminance"
     color_temperature:
       id: bwt_color_temperature
       name: "BWT Color Temperature"
     gain: 60x
     glass_attenuation_factor: 5.0
     integration_time: 614ms
     update_interval: 10s
 
   - platform: wifi_signal
     name: "WiFi Signal Sensor"
     update_interval: 60s
 
 text_sensor:
   - platform: wifi_info
     ip_address:
       name: IP Address
     ssid:
       name: Connected SSID
     bssid:
       name: Connected BSSID
     mac_address:
       name: Mac Wifi Address
     # scan_results:
     #   name: Latest Scan Results
 
   - platform: version
     name: "ESPHome Version"
 
   - platform: template
     name: "BWT State"
     lambda: |-
       if (id(bwt_blue).state > id(bwt_green).state  && id(bwt_blue).state > id(bwt_red).state) {
         return {"Normal"};
       } else if (id(bwt_green).state > id(bwt_red).state  && id(bwt_green).state > id(bwt_blue).state) {
         return {"Regeneration"};
       } else if (id(bwt_red).state > id(bwt_blue).state && id(bwt_red).state > id(bwt_green).state) {
         return {"Error"};
       } else {
         return {"Unknown"};
       }      
     update_interval: 5s
 
 

Result ๐Ÿ”—

I temporarily mounted the boards with tape to the decalcification system but I plan to create a 3D printed mount for it.

setup

Adding the sensor to Home-Assistant ist very easy, the ESPHome integration is absolutely perfect!

Home Assistant card

I also added an automation to Home-Assistant that sens me a notification whenever the state changes to error.