any known good yaml configs for esphome for the tab5 v2
-
I'm looking for a working yaml to set up the tab5v2 for use with home assistant. So far it's taken me 5 hours to learn that I have a v2 tab5 and not the one that the demo uses. I have gotten it to boot, and it connects to the wifi, but I just get a blank screen with blacklight on. no telling if touch works or anything else.
esphome: name: tab5-homeassistant friendly_name: M5Stack Tab5 V2 min_version: 2025.9.3 esp32: board: esp32-p4-evboard flash_size: 16MB framework: type: esp-idf advanced: enable_idf_experimental_features: true external_components: - source: github://pr#12075 components: [st7123] refresh: 0s - source: github://pr#12074 components: [mipi_dsi] refresh: 0s # 2. WIFI CO-PROCESSOR esp32_hosted: variant: esp32c6 active_high: true clk_pin: GPIO12 cmd_pin: GPIO13 d0_pin: GPIO11 d1_pin: GPIO10 d2_pin: GPIO9 d3_pin: GPIO8 reset_pin: GPIO15 slot: 1 logger: hardware_uart: USB_SERIAL_JTAG psram: mode: hex speed: 200MHz wifi: ssid: !secret wifi_ssid password: !secret wifi_password i2c: - id: bsp_bus sda: GPIO31 scl: GPIO32 frequency: 200kHz scan: true pi4ioe5v6408: - id: pi4ioe1 address: 0x43 - id: pi4ioe2 address: 0x44 switch: - platform: gpio id: wifi_power name: "WiFi Power" pin: pi4ioe5v6408: pi4ioe2 number: 0 restore_mode: ALWAYS_ON - platform: gpio id: usb_5v_power name: "USB Power" pin: pi4ioe5v6408: pi4ioe2 number: 3 restore_mode: ALWAYS_ON - platform: gpio id: external_5v_power name: "External 5V Power" pin: pi4ioe5v6408: pi4ioe1 number: 2 restore_mode: ALWAYS_ON - platform: gpio id: speaker_enable name: "Speaker Enable" pin: pi4ioe5v6408: pi4ioe1 number: 1 restore_mode: ALWAYS_ON # 4. TOUCHSCREEN (V2) touchscreen: - platform: st7123 i2c_id: bsp_bus interrupt_pin: GPIO23 display: lcd reset_pin: pi4ioe5v6408: pi4ioe1 number: 5 id: touch # 5. LDO & DISPLAY esp_ldo: - voltage: 1.1V channel: 4 # MIPI DSI Logic - voltage: 2.7V channel: 3 # Analog Power display: - platform: mipi_dsi id: lcd pixel_mode: 24bit dimensions: height: 1280 width: 720 model: M5STACK-TAB5-V2 reset_pin: pi4ioe5v6408: pi4ioe1 number: 4 inverted: true output: - platform: ledc pin: GPIO22 id: backlight_pwm frequency: 1000Hz light: - platform: monochromatic output: backlight_pwm name: "Display Backlight" id: backlight restore_mode: RESTORE_DEFAULT_ON initial_state: brightness: "100%" font: - file: "gfonts://Roboto" id: roboto_16 size: 16 lvgl: buffer_size: 10% displays: - lcd touchscreens: - touch # 1. DEFINE STYLES HERE (Global Level) style_definitions: - id: red_bg_style bg_color: 0xFF0000 bg_opa: 100% - id: blue_btn_style bg_color: 0x0000FF bg_opa: 100% text_color: 0xFFFFFF # 2. USE STYLES HERE pages: - id: main_page # Apply the red background to the whole page styles: - red_bg_style widgets: - button: id: test_button align: center width: 50% height: 20% text: "PRESS ME" text_font: roboto_16 # Apply the blue style to the button styles: - blue_btn_style on_click: - logger.log: "TOUCH IS WORKING!" -
@manmade nothing is shown on the screen still, however I have been able to add the device to home assistant and connect to the api to turn the backlight on and off.
-
@manmade
I dont see the nRESET signal being removed from the LCD, TouchPanel (and Camera).
It's a low=active reset for these devices, and the E1 pi4ioe5v6408 chip that controls them will default these pins to low (actually, input-pulldown) and holds the reset pin active. These are pins 4,5,6 on the chip:Maybe you need something like:
- platform: gpio id: lcd_nreset name: "LCD nRESET" pin: pi4ioe5v6408: pi4ioe1 number: 4 restore_mode: ALWAYS_ON - platform: gpio id: tp_nreset name: "TP nRESET" pin: pi4ioe5v6408: pi4ioe1 number: 5 restore_mode: ALWAYS_ON - platform: gpio id: cam_nreset name: "CAM nRESET" pin: pi4ioe5v6408: pi4ioe1 number: 6 restore_mode: ALWAYS_ONBecause these are active-low lines they are being applied when the unit powers up, you have to explicitly remove them after boot.
This is a guess, I'm not running HA on my tab5. There may be other things that need to happen too or are broken. But I just spent all day playing with some TAB5 hardware stuff in MicroPython and
this was one of the things I discovered..