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.
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.
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.
Wiring ๐
The wiring is pretty straight forward
- 3.3V <-> 3V3
- GND <-> GND
- IO21 <-> SDA
- 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.
---
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.
Adding the sensor to Home-Assistant ist very easy, the ESPHome integration is absolutely perfect!
I also added an automation to Home-Assistant that sens me a notification whenever the state changes to error.