Starter ESPHome config
Built from the pinout above. Keys and the Wi-Fi password come from secrets.yaml in ESPHome. Check the pins against your hardware revision before flashing: one model can ship with different boards.
substitutions:
name: tuya-t3e-esp32-480480-sm
esphome:
name: ${name}
friendly_name: "TuYa T3E - ESP32 480480 Smart Screen"
esp32:
board: esp32dev
logger:
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap: {}
captive_portal:
switch:
- platform: gpio
pin: GPIO2
id: relay1
name: "Relay" # Relay 3
restore_mode: RESTORE_DEFAULT_OFF
binary_sensor:
- platform: gpio
pin:
number: GPIO6
mode: INPUT_PULLUP
inverted: true
name: "Button 1" # SCL (Touchscreen)
on_press:
- switch.toggle: relay1
- platform: gpio
pin:
number: GPIO7
mode: INPUT_PULLUP
inverted: true
name: "Button 2" # SDA (Touchscreen)
on_press:
- switch.toggle: relay1
status_led:
pin:
number: GPIO42
inverted: false # Led Backlight (Screen)
# Other pins from the pinout:
# GPIO0: Red 5 (Screen)
# GPIO1:
# GPIO3: Green 6 (Screen)
# GPIO4: Cs Pin (Screen)
# GPIO5:
# GPIO8: Red 1 (Screen)
# GPIO9: Green 5 (Screen)
# GPIO10: Green 4 (Screen)
# GPIO11: Green 3 (Screen)
# GPIO12: Green 2 (Screen)
# GPIO13: Green 1 (Screen)
# GPIO14: Blue 5 (Screen)
# GPIO15: Blue 1 (Screen) + CLK (spi)
# GPIO16: Red 4 (Screen)
# GPIO17: Red 3 (Screen)
# GPIO18: Red 2 (Screen)
# GPIO19: TX Pin of ZT3L
# GPIO20: RX Pin of ZT3L
# GPIO21: Blue 4 (Screen)
# GPIO35: PSRAM
# GPIO36: PSRAM
# GPIO37: PSRAM
# GPIO38: HSync (Screen)
# GPIO39: HSync (Screen)
# GPIO40: DE (Screen)
# GPIO43: TXD
How to flash
- Most devices are flashed over UART: a 3.3 V USB-TTL adapter to RX, TX, GND and 3V3, holding GPIO0 to ground at power-on (ESP8266/ESP32). Mains power disconnected.
- Beken (BK72xx) and Realtek chips are flashed with ltchiptool, or with cloudcutter without opening the case if the firmware allows it.
- Details and board photos: the device page in the ESPHome database.
A config from scratch: ESPHome generator. Which pins are safe: pinout.