Hallo,
Ich wollte nur mein Projekt hier veröffentlichen. Vielleicht hilft es dem einen oder anderen.
Es geht um Poolüberwachung/Wasserqualität.
Die Anzeige erfolgt im HomeAssistant.
Das Ganze läuft auf ESP-Home und das wurde wiederum im HomeAssistant genutzt/gespielt.
Eigentlich habe ich alle Sensoren über die ESOHome Anleitung neu erstellt . Ich habe mir genau angeschaut, wie ein analoger Sensor aussieht UND welche Filter es gibt.
Hardware:
ESP32-WROVER-E
Drucksensor https://www.amazon.de/dp/B07T5CSWHL?ref=ppx_yo2ov_dt_b_product_details&th=1
PH-Sensor https://www.amazon.de/dp/B07QKK1XB6?psc=1&ref=ppx_yo2ov_dt_b_product_details
Kalibrierungslösung
TDS-Sendor Verschmutzung
Temperatur DS18B20
Code
esphome:
name: esphome-xxxxxxxxx
friendly_name: ESPHomePool
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxx"
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "xxxxx"
password: "xxxxx"
captive_portal:
dallas:
- pin: GPIO25
update_interval: 60s
sensor:
#TDS Sensor
# Temperature In °C
- platform: dallas
address: xxxxxxxx
name: "Pool Temperatur"
id: probe01
# Raw TDS Reading
- platform: adc
pin: GPIO36
name: "TDS 01 Raw"
attenuation: 6db # only for ESP32
id: tds01_raw
update_interval: 60s
unit_of_measurement: "v"
accuracy_decimals: 3
internal: true
# Temperature Compensated Voltage
- platform: template
name: "TDS 01 TCV"
id: temp01_comp_v
unit_of_measurement: 'v'
accuracy_decimals: 3
lambda: 'return ((id(tds01_raw).state) / (1 + (0.02 * ((id(probe01).state) - 25.0))));'
update_interval: 60s
internal: true
# Temperature Compensated TDS
- platform: template
name: "TDS-01"
unit_of_measurement: "PPM"
state_class: "measurement"
accuracy_decimals: 0
update_interval: 60s
lambda: return (133.42*(id(temp01_comp_v).state)*(id(temp01_comp_v).state)*(id(temp01_comp_v).state) - 255.86*(id(temp01_comp_v).state)*(id(temp01_comp_v).state) + 857.39*(id(temp01_comp_v).state))*0.5;
#PH Sensor
- platform: adc
pin: GPIO35
name: "pH Sensor"
update_interval: 60s
attenuation: auto
device_class: ""
unit_of_measurement: "pH"
filters:
- calibrate_linear:
- 1.145 -> 6.88
- 1.319 -> 9.22
#Druck Sensor
- platform: adc
pin: GPIO34
name: "Pumpe Druck"
update_interval: 60s
attenuation: auto
device_class: ATMOSPHERIC_PRESSURE
state_class: "measurement"
unit_of_measurement: "bar"
filters:
- calibrate_linear:
- 0.4 -> 0
- 0.85 -> 0.5
- 1.45 -> 1
- 2.1 -> 1.5
- 2.9 -> 2
#Voltlesen
# - platform: adc
# pin: GPIO35
# name: "Flex 0"
# update_interval: 1s
# attenuation: auto
Vielleicht hilft das ja jemanden.