Tweak timeouts, remove build artifacts
This commit is contained in:
parent
95b7a41adf
commit
3dcff4b0ee
|
@ -16,6 +16,8 @@ esphome.io based plant monitoring.
|
||||||
| 1 | Waveshare 2.9" e-ink display | https://www.waveshare.com/product/modules/oleds-lcds/e-paper/2.9inch-e-paper-module.htm |
|
| 1 | Waveshare 2.9" e-ink display | https://www.waveshare.com/product/modules/oleds-lcds/e-paper/2.9inch-e-paper-module.htm |
|
||||||
| 1 | 18650 Battery Holder | https://www.sparkfun.com/products/12899 |
|
| 1 | 18650 Battery Holder | https://www.sparkfun.com/products/12899 |
|
||||||
| 15 | 4 pin 2.54mm pitch screw terminals | N/A |
|
| 15 | 4 pin 2.54mm pitch screw terminals | N/A |
|
||||||
|
https://www.dfrobot.com/product-1712.html?search=solar
|
||||||
|
https://www.adafruit.com/product/500
|
||||||
|
|
||||||
## Software
|
## Software
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ class MAX1704xSensor : public PollingComponent, public sensor::Sensor {
|
||||||
sensor::Sensor *alertIsActiveSensor = new sensor::Sensor();
|
sensor::Sensor *alertIsActiveSensor = new sensor::Sensor();
|
||||||
sensor::Sensor *getThresholdSensor = new sensor::Sensor();
|
sensor::Sensor *getThresholdSensor = new sensor::Sensor();
|
||||||
|
|
||||||
MAX1704xSensor() : PollingComponent(5*60*1000) { }
|
MAX1704xSensor() : PollingComponent(3*60*1000) { }
|
||||||
|
|
||||||
void setup() override {
|
void setup() override {
|
||||||
_fuelGauge1.begin();
|
_fuelGauge1.begin();
|
||||||
|
|
|
@ -22,7 +22,7 @@ esphome:
|
||||||
- SPI
|
- SPI
|
||||||
- Wire
|
- Wire
|
||||||
- "346"
|
- "346"
|
||||||
- "13"
|
# - "13"
|
||||||
- "86"
|
- "86"
|
||||||
- "5812"
|
- "5812"
|
||||||
|
|
||||||
|
@ -43,12 +43,15 @@ spi:
|
||||||
mosi_pin: 18
|
mosi_pin: 18
|
||||||
|
|
||||||
deep_sleep:
|
deep_sleep:
|
||||||
run_duration: 12min
|
run_duration: 6min
|
||||||
sleep_duration: 48min
|
sleep_duration: 54min
|
||||||
wakeup_pin: 32
|
|
||||||
|
wakeup_pin_mode: INVERT_WAKEUP # stop caring and be judicious about tolerance of goofy pin modes
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
|
level: DEBUG # Flip to ERROR for production deployments
|
||||||
|
baud_rate: 0 # Disable UART logging
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
#api:
|
#api:
|
||||||
|
@ -78,132 +81,132 @@ mqtt:
|
||||||
|
|
||||||
# 2.9" Waveshare 3-color (red) e-ink setup
|
# 2.9" Waveshare 3-color (red) e-ink setup
|
||||||
# BUSY -> 21, RST -> 14, DC -> 15, CS -> 27, CLK -> SCK(5), DIN -> MOSI(18), GND -> GND, 3.3V -> 3.3V
|
# BUSY -> 21, RST -> 14, DC -> 15, CS -> 27, CLK -> SCK(5), DIN -> MOSI(18), GND -> GND, 3.3V -> 3.3V
|
||||||
display:
|
#display:
|
||||||
- platform: waveshare_epaper
|
# - platform: waveshare_epaper
|
||||||
cs_pin: 27
|
# cs_pin: 27
|
||||||
dc_pin: 15
|
# dc_pin: 15
|
||||||
busy_pin: 21
|
# busy_pin: 21
|
||||||
reset_pin: 14
|
# reset_pin: 14
|
||||||
model: 2.90in
|
# model: 2.90in
|
||||||
rotation: 90
|
# rotation: 90
|
||||||
update_interval: 30s
|
# update_interval: 30s
|
||||||
lambda: |-
|
# lambda: |-
|
||||||
// Setup / Clear
|
# // Setup / Clear
|
||||||
it.powerOn();
|
# it.powerOn();
|
||||||
it.clear();
|
# it.clear();
|
||||||
// Battery
|
# // Battery
|
||||||
if (id(Battery_Level).state > 90) {
|
# if (id(Battery_Level).state > 90) {
|
||||||
it.image(0, 0, id(battery_100));
|
# it.image(0, 0, id(battery_100));
|
||||||
}
|
# }
|
||||||
else if (id(Battery_Level).state > 75) {
|
# else if (id(Battery_Level).state > 75) {
|
||||||
it.image(0, 0, id(battery_75));
|
# it.image(0, 0, id(battery_75));
|
||||||
}
|
# }
|
||||||
if (id(Battery_Level).state > 50) {
|
# if (id(Battery_Level).state > 50) {
|
||||||
it.image(0, 0, id(battery_50));
|
# it.image(0, 0, id(battery_50));
|
||||||
}
|
# }
|
||||||
if (id(Battery_Level).state > 25) {
|
# if (id(Battery_Level).state > 25) {
|
||||||
it.image(0, 0, id(inverted_battery_25));
|
# it.image(0, 0, id(inverted_battery_25));
|
||||||
}
|
# }
|
||||||
else {
|
# else {
|
||||||
it.image(0, 0, id(inverted_battery_0));
|
# it.image(0, 0, id(inverted_battery_0));
|
||||||
}
|
# }
|
||||||
if (id(Battery_Alert).state != 0) {
|
# if (id(Battery_Alert).state != 0) {
|
||||||
it.image(37,0, id(alert_filled));
|
# it.image(37,0, id(alert_filled));
|
||||||
}
|
# }
|
||||||
else {
|
# else {
|
||||||
it.printf(37, 0, id(deja_vu_mono_bold_8), "%.1f%%", id(Battery_Level).state);
|
# it.printf(37, 0, id(deja_vu_mono_bold_8), "%.1f%%", id(Battery_Level).state);
|
||||||
}
|
# }
|
||||||
// WiFi
|
# // WiFi
|
||||||
it.image(148, 0, id(wifi_icon));
|
# it.image(148, 0, id(wifi_icon));
|
||||||
it.printf(185, 0, id(deja_vu_mono_bold_8), "%.1fdB", id(sensor_wifi_signal).state);
|
# it.printf(185, 0, id(deja_vu_mono_bold_8), "%.1fdB", id(sensor_wifi_signal).state);
|
||||||
// Temperature
|
# // Temperature
|
||||||
it.image(37, 0, id(thermometer));
|
# it.image(37, 0, id(thermometer));
|
||||||
it.printf(37,37, id(deja_vu_mono_bold_8), "%.1f°F", id(Temperature_F).state);
|
# it.printf(37,37, id(deja_vu_mono_bold_8), "%.1f°F", id(Temperature_F).state);
|
||||||
// Humidity
|
# // Humidity
|
||||||
it.image(148,37, id(humidity));
|
# it.image(148,37, id(humidity));
|
||||||
it.printf(185,37, id(deja_vu_mono_bold_8), "%.1f%%", id(Humidity).state);
|
# it.printf(185,37, id(deja_vu_mono_bold_8), "%.1f%%", id(Humidity).state);
|
||||||
// Plants
|
# // Plants
|
||||||
it.image(0, 96, id(cat_grass));
|
# it.image(0, 96, id(cat_grass));
|
||||||
it.image(37, 96, id(tarragon));
|
# it.image(37, 96, id(tarragon));
|
||||||
it.image(74, 96, id(cat_nip));
|
# it.image(74, 96, id(cat_nip));
|
||||||
it.image(111, 96, id(christmas_cactus));
|
# it.image(111, 96, id(christmas_cactus));
|
||||||
it.image(148, 96, id(inverted_cat_grass));
|
# it.image(148, 96, id(inverted_cat_grass));
|
||||||
it.image(185, 96, id(inverted_tarragon));
|
# it.image(185, 96, id(inverted_tarragon));
|
||||||
it.image(222, 96, id(inverted_catnip));
|
# it.image(222, 96, id(inverted_catnip));
|
||||||
it.image(259, 96, id(inverted_christmas_cactus));
|
# it.image(259, 96, id(inverted_christmas_cactus));
|
||||||
// Sleep to conserve power
|
# // Sleep to conserve power
|
||||||
//it.powerOff();
|
# //it.powerOff();
|
||||||
|
|
||||||
|
|
||||||
font:
|
#font:
|
||||||
- file: "DejaVuSansMono-Bold.ttf"
|
# - file: "DejaVuSansMono-Bold.ttf"
|
||||||
id: deja_vu_mono_bold_8
|
# id: deja_vu_mono_bold_8
|
||||||
size: 8
|
# size: 8
|
||||||
|
|
||||||
image:
|
#image:
|
||||||
- file: noun_Alert_2145614.png # empty
|
# - file: noun_Alert_2145614.png # empty
|
||||||
id: alert_empty
|
# id: alert_empty
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_Alert_2490416.png # filled
|
# - file: noun_Alert_2490416.png # filled
|
||||||
id: alert_filled
|
# id: alert_filled
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_battery indicator_1601217.png # battery 75%
|
# - file: noun_battery indicator_1601217.png # battery 75%
|
||||||
id: battery_75
|
# id: battery_75
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_battery level_1601219.png # battery 50%
|
# - file: noun_battery level_1601219.png # battery 50%
|
||||||
id: battery_50
|
# id: battery_50
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_Cactus_1197535.png # christmas cactus
|
# - file: noun_Cactus_1197535.png # christmas cactus
|
||||||
id: christmas_cactus
|
# id: christmas_cactus
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_empty battery_1601215.png # battery 25%
|
# - file: noun_empty battery_1601215.png # battery 25%
|
||||||
id: battery_25
|
# id: battery_25
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_empty battery_1601218.png # battery 0%
|
# - file: noun_empty battery_1601218.png # battery 0%
|
||||||
id: battery_0
|
# id: battery_0
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_Full Battery_1601214.png # battery 100%
|
# - file: noun_Full Battery_1601214.png # battery 100%
|
||||||
id: battery_100
|
# id: battery_100
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_grass_355100.png # cat grass
|
# - file: noun_grass_355100.png # cat grass
|
||||||
id: cat_grass
|
# id: cat_grass
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_humidity_1762738.png # temp + humidity
|
# - file: noun_humidity_1762738.png # temp + humidity
|
||||||
id: temp_humidity
|
# id: temp_humidity
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_humidity_2280622.png # humidity
|
# - file: noun_humidity_2280622.png # humidity
|
||||||
id: humidity
|
# id: humidity
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_leaf_1153077.png # catnip
|
# - file: noun_leaf_1153077.png # catnip
|
||||||
id: cat_nip
|
# id: cat_nip
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_Tarragon_499800.png # tarragon
|
# - file: noun_Tarragon_499800.png # tarragon
|
||||||
id: tarragon
|
# id: tarragon
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_Thermometer_217722.png # thermometer
|
# - file: noun_Thermometer_217722.png # thermometer
|
||||||
id: thermometer
|
# id: thermometer
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: noun_wifi_2201334.png # wifi
|
# - file: noun_wifi_2201334.png # wifi
|
||||||
id: wifi_icon
|
# id: wifi_icon
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_Tarragon_499800.png # inverted tarragon
|
# - file: inverted_noun_Tarragon_499800.png # inverted tarragon
|
||||||
id: inverted_tarragon
|
# id: inverted_tarragon
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_leaf_1153077.png # inverted catnip
|
# - file: inverted_noun_leaf_1153077.png # inverted catnip
|
||||||
id: inverted_catnip
|
# id: inverted_catnip
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_grass_355100.png # inverted cat grass
|
# - file: inverted_noun_grass_355100.png # inverted cat grass
|
||||||
id: inverted_cat_grass
|
# id: inverted_cat_grass
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_empty battery_1601218.png # inverted battery_0
|
# - file: inverted_noun_empty battery_1601218.png # inverted battery_0
|
||||||
id: inverted_battery_0
|
# id: inverted_battery_0
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_empty battery_1601215.png # inverted battery_25
|
# - file: inverted_noun_empty battery_1601215.png # inverted battery_25
|
||||||
id: inverted_battery_25
|
# id: inverted_battery_25
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
- file: inverted_noun_Cactus_1197535.png # inverted christmas cactus
|
# - file: inverted_noun_Cactus_1197535.png # inverted christmas cactus
|
||||||
id: inverted_christmas_cactus
|
# id: inverted_christmas_cactus
|
||||||
resize: 32x32
|
# resize: 32x32
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: status
|
- platform: status
|
||||||
|
@ -213,11 +216,12 @@ sensor:
|
||||||
- platform: wifi_signal
|
- platform: wifi_signal
|
||||||
id: sensor_wifi_signal
|
id: sensor_wifi_signal
|
||||||
name: "WiFi_Signal"
|
name: "WiFi_Signal"
|
||||||
update_interval: 60s
|
update_interval: 3min
|
||||||
unit_of_measurement: "dB"
|
unit_of_measurement: "dB"
|
||||||
accuracy_decimals: 1
|
accuracy_decimals: 1
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
name: Uptime
|
name: Uptime
|
||||||
|
update_interval: 3min
|
||||||
- platform: custom
|
- platform: custom
|
||||||
lambda: |-
|
lambda: |-
|
||||||
auto sht1x = new SHT1xSensor();
|
auto sht1x = new SHT1xSensor();
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
nvs, data, nvs, 0x009000, 0x005000,
|
|
||||||
otadata, data, ota, 0x00e000, 0x002000,
|
|
||||||
app0, app, ota_0, 0x010000, 0x190000,
|
|
||||||
app1, app, ota_1, 0x200000, 0x190000,
|
|
||||||
eeprom, data, 0x99, 0x390000, 0x001000,
|
|
||||||
spiffs, data, spiffs, 0x391000, 0x00F000
|
|
|
|
@ -1,3 +0,0 @@
|
||||||
src/
|
|
||||||
.pioenvs/
|
|
||||||
partitions.csv
|
|
|
@ -17,7 +17,7 @@ class SHT1xSensor : public PollingComponent, public sensor::Sensor {
|
||||||
sensor::Sensor *temp_f_sensor = new sensor::Sensor();
|
sensor::Sensor *temp_f_sensor = new sensor::Sensor();
|
||||||
sensor::Sensor *humidity_sensor = new sensor::Sensor();
|
sensor::Sensor *humidity_sensor = new sensor::Sensor();
|
||||||
|
|
||||||
SHT1xSensor() : PollingComponent(5*60*1000) { }
|
SHT1xSensor() : PollingComponent(3*60*1000) { }
|
||||||
|
|
||||||
void setup() override {
|
void setup() override {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue