Hi all,
I’m pretty new to the Home Assistant universe, but the start went pretty fine for now.
Setup:
- Home Assistant up and running on Raspberry Pi 5 8GB.
- Berrybase ESP32 board connected and running
- BME680 sensor connected to ESP32 board and running
- 7.3" 7-color e-Paper display (not running and not yet connected)
Plan: I would like to show outside and inside sensor values on my e-Paper display via ESPHome (Berrybase ESP32 board). The outside sensor is from Airgradient. See actual fritzing sketch in the attachment.
Status: I’ve got the BME680 to work and show all its values on the Home Assistant Dashboard.
Problem 1: I’m having problems how to retrieve the values from the Airgradient outdoor device and integrate them into the ESPHome builder. So in the next step I’ll try to figure out how to display them on the e-Paper display.
Problem 2: I’m still trying to figure out the right connections for the e-Paper display on the ESP32, since the Waveshare 7.3" 7-color display documentation is only giving examples for Arduino, Raspberry Pi and SMT32 boards.
Can somebody help me with this please
? I couldn’t find any documentation about the Airgradient integration or I’m misunderstanding something. 
I just got the hint that Home Assistant Sensor is the way to go, but I’ve big problems in getting started. Where should I create this sensor? 
So after quite a lot of trying and secondary problems occuring, I managed to power on the display including deep sleep, but without the BME680. That’s the next thing. However, since my multimeter measuring the current of the display caused a lot of trouble with my setup with a couple of side effects, I can’t check the real current of the ePaper during sleep. The 3.3V are always present on the HAT. Here is my code. Now a need to implement the sensors, but I’m still not feeling comfortable without being sure that the display is in deep sleep as well during esp32 deep sleep.
substitutions:
gpio_spi_clk_pin: GPIO13 #yellow
gpio_spi_mosi_pin: GPIO14 #DIN and blue
gpio_cs_pin: GPIO15 #orange
gpio_dc_pin: GPIO27 #green
gpio_reset_pin: GPIO26 #white
gpio_busy_pin: GPIO25 #purple
#ePaper HAT PWR pin connected to 3.3V of ESP32 as well
#Deep sleep configutation ###########################
run_time: 60s
sleep_time: 60s
#####################################################
esphome:
name: eink
friendly_name: eInk
on_boot:
priority: 600
then:
- delay: 20s
- script.execute: update_screen
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key:
ota:
- platform: esphome
password:
wifi:
ssid:
password:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "
password: "
# Script to force display update after boot ###########
script:
- id: update_screen
then:
- component.update: epaper_display
#######################################################
# Deep Sleep ##########################################
deep_sleep:
run_duration: ${run_time}
sleep_duration: ${sleep_time}
#######################################################
captive_portal:
spi:
clk_pin: $gpio_spi_clk_pin
mosi_pin: $gpio_spi_mosi_pin
font:
- file: 'fonts/Comic Sans MS.ttf'
id: font1
size: 24
#ePaper display 7.5in v2 800x480 ########################
display:
- platform: waveshare_epaper
id: epaper_display
cs_pin: $gpio_cs_pin
dc_pin: $gpio_dc_pin
reset_pin: $gpio_reset_pin
busy_pin:
number: $gpio_busy_pin
inverted: true
model: 7.50inv2 #800x480
rotation: 0°
update_interval: never #so that it only updates one time after ESP32 wakes up from deep sleep
auto_clear_enabled: True
reset_duration: 200ms
lambda: |-
it.printf(155,295, id(font1), TextAlign::BASELINE_CENTER, "Hello World");