Last active
July 27, 2024 05:24
-
-
Save wolph/bc284ba9aeb5d1263f72d6294e239c1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: plant_moisture | |
platform: ESP32 | |
board: esp32dev | |
wifi: | |
ssid: "spam" | |
password: "eggs" | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: "password" | |
ota: | |
password: "password" | |
sensor: | |
- platform: dht | |
pin: 22 | |
model: DHt11 | |
temperature: | |
name: "plant_0_temperature" | |
humidity: | |
name: "plant_0_humidity" | |
- platform: adc | |
pin: 32 | |
name: "plant_0_soil_moisture" | |
attenuation: 11db | |
unit_of_measurement: '%' | |
filters: | |
# 1.1v = in water | |
# 2.94v = dry | |
lambda: |- | |
return (2.95 - x) * 100.0 / (2.95 - 1.1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TTGO Higrow version with battery and deep sleep enabled. Battery life not tested yet | |
esphome: | |
name: higrow_00 | |
platform: ESP32 | |
board: lolin_d32 | |
on_shutdown: | |
then: | |
- switch.turn_off: spower | |
switch: | |
- platform: gpio | |
pin: GPIO4 | |
name: "Sensor Power" | |
id: spower | |
restore_mode: ALWAYS_ON | |
internal: true | |
setup_priority: 1000 | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: GPIO35 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: "Wake Button" | |
i2c: | |
sda: 25 | |
scl: 26 | |
scan: True | |
id: bus_a | |
setup_priority: -200 | |
deep_sleep: | |
run_duration: 10s | |
sleep_duration: 15min | |
sensor: | |
- platform: dht | |
model: dht11 | |
pin: | |
number: 16 | |
mode: input | |
temperature: | |
name: "HiGrow1 Temperature" | |
humidity: | |
name: "HiGrow1 Humidity" | |
update_interval: 15min | |
setup_priority: -100 | |
- platform: adc | |
pin: GPIO32 | |
name: "HiGrow1 Soil" | |
update_interval: 15min | |
attenuation: 11db | |
unit_of_measurement: '%' | |
filters: | |
- calibrate_linear: | |
# Map 0.0 (from sensor) to 0.0 (true value) | |
- 3.08 -> 0.0 | |
- 1.42 -> 100.0 | |
- platform: adc | |
pin: 33 | |
name: "HiGrow1 Battery" | |
attenuation: 6db | |
unit_of_measurement: 'V' | |
update_interval: 15min | |
filters: | |
- calibrate_linear: | |
# Map 0.0 (from sensor) to 0.0 (true value) | |
- 0.0 -> 0.0 | |
- 2.06 -> 1.89 | |
- lambda: return x * 2.0; | |
- platform: adc | |
pin: GPIO34 | |
name: "HiGrow1 Salt" | |
update_interval: 15min | |
unit_of_measurement: '%' | |
accuracy_decimals: 4 | |
filters: | |
- calibrate_linear: | |
# Map 0.0 (from sensor) to 0.0 (true value) | |
- 0.0 -> 0.0 | |
- 1.1 -> 100.0 | |
- platform: bh1750 | |
i2c_id: bus_a | |
name: "BH1750 Illuminance" | |
address: 0x23 | |
update_interval: 15min | |
setup_priority: -300 |
That looks very nice @bruvv!
Wow, thanks a lot. Which GPIO (PIN) can I use for a relay to control a waterpump? And do you have a pinout. I don't know which pin is which GPIO.
Wow, thanks a lot. Which GPIO (PIN) can I use for a relay to control a waterpump? And do you have a pinout. I don't know which pin is which GPIO.
Maybe you have a different version but mine includes the pin numbers right next to the pins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made my first automated esphome github build action for the LilyGo T-Higrow plant sensor that monitors your plant and is also a bluetooth proxy hub. For me it has been a great learning expierence and I hope I can make someones day with this.
If you want to flash the sensor just connect it to your computer/laptop and with chrome go to:
https://bruvv.github.io/LILYGO-T-Higrow-Esphome/
and follow the instructions.
Source code:
https://github.com/bruvv/LILYGO-T-Higrow-Esphome