Home Assistant with Seeed D1001

Anyone managed to get ESPHome or any sort of Home Assistant integration on the Seeed D1001?

I couldn’t figure out how to configure ESP Home for it as it seems the board/vender isn’t yet fully supported with a default config.

I’m looking into ESP-IDF and coding a custom app and will post updates if I’m succesfull

Looks like there is some development for the D1001 and ESPHome going on

With a bit of help from Claude and the latest dev release of the ESPHome builder I have managed to get the screen to boot and display some text.

  • Disclaimer, I not an expert of this, potentially incorrect settings could damage your device, use at own risk
  • Some configuration may be redundant, I need to go back through and clean up.
  • Not sure if network is working yet

esphome:
  name: reterminal-d1001
  friendly_name: reTerminal D1001
  on_boot:
    priority: 800
    then:
      - output.turn_on: lcd_pwr_en
      - output.turn_on: en_lcd_pwr
      - output.set_level:
          id: lcd_backlight_pwm
          level: 100%

esp32:
  board: esp32-p4
  framework:
    type: esp-idf
    version: recommended
    advanced:
      enable_idf_experimental_features: true
      ignore_efuse_mac_crc: false
    sdkconfig_options:
      CONFIG_LV_ATTRIBUTE_FAST_MEM: "y"
      CONFIG_SPIRAM_FETCH_INSTRUCTIONS: "n"
      CONFIG_SPIRAM_RODATA: "n"
      CONFIG_ESP32P4_CACHE_L2_CACHE_SIZE_512KB: "y"
      CONFIG_MIPI_DSI_USES_PSRAM: "n"
  flash_size: 32MB

psram:
  speed: 100MHz

logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG

esp_ldo:
  - channel: 3
    voltage: 2.5V

i2c:
  - id: i2c_lcd
    sda: GPIO37
    scl: GPIO38
    scan: true
    frequency: 400kHz

  - id: i2c_misc
    sda: GPIO20
    scl: GPIO21
    scan: false
    frequency: 400kHz

xl9535:
  - id: xl9535_hub
    i2c_id: i2c_misc
    address: 0x20

output:
  - platform: gpio
    id: lcd_pwr_en
    pin:
      xl9535: xl9535_hub
      number: 0             # LCD_PWR_EN

  - platform: gpio
    id: en_lcd_pwr
    pin:
      xl9535: xl9535_hub
      number: 7             # EN_LCD_PWR

  - platform: ledc
    id: lcd_backlight_pwm
    pin: GPIO14             # LCD_PWMc
    frequency: 1000Hz

light:
  - platform: monochromatic
    output: lcd_backlight_pwm
    name: "Display Backlight"
    id: backlight
    restore_mode: ALWAYS_ON

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "reTerminal Fallback"

api:
  encryption:
    key: !secret api_key

esp32_hosted:
  variant: esp32c6
  clk_pin: GPIO11
  cmd_pin: GPIO6
  reset_pin: GPIO13
  d0_pin: GPIO7
  d1_pin: GPIO8
  d2_pin: GPIO9
  d3_pin: GPIO10
  active_high: false

ota:
  - platform: esphome

# binary_sensor:
#   - platform: gpio
#     pin:
#       number: GPIO35
#       mode: INPUT_PULLUP
#       inverted: true
#     name: "Boot Button"
#     id: boot_button

display:
  - platform: mipi_dsi
    id: main_display
    model: SEEED-RETERMINAL-D1001
    auto_clear_enabled: false
    update_interval: never

lvgl:
  displays:
    - main_display
  color_depth: 16
  draw_rounding: 2
  buffer_size: 10%
  full_refresh: false
  theme:
    label:
      text_color: 0xFFFFFF
  bg_color: 0x1a1a2e
  pages:
    - id: main_page
      widgets:
        - label:
            text: "reTerminal D1001"
            align: CENTER
            text_color: 0xFFFFFF
            text_font: MONTSERRAT_48

Ok some more progress

Wifi is working and also power button toggles the display on/off

Some color issues, by default the color orders seems to be BRG (not RGB or BGR) i suspect this is an issue with the display driver (which is still experimental), i have tried color_order and invert_colors but these give other odd results


esphome:
  name: reterminal-d1001
  friendly_name: reTerminal D1001
  on_boot:
    priority: 800
    then:
      - output.turn_on: lcd_pwr_en
      - output.turn_on: en_lcd_pwr
      - output.set_level:
          id: lcd_backlight_pwm
          level: 100%

esp32:
  board: esp32-p4
  cpu_frequency: 360MHz
  framework:
    type: esp-idf
    version: recommended
    advanced:
      enable_idf_experimental_features: true
    sdkconfig_options:
      # CONFIG_LV_ATTRIBUTE_FAST_MEM: "y"
      # CONFIG_SPIRAM_FETCH_INSTRUCTIONS: "n"
      # CONFIG_SPIRAM_RODATA: "n"
      CONFIG_ESP32P4_CACHE_L2_CACHE_SIZE_512KB: "y"
      # CONFIG_MIPI_DSI_USES_PSRAM: "n"
  flash_size: 32MB

psram:
  speed: 100MHz

logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG

esp_ldo:
  - channel: 3
    voltage: 2.5V

i2c:
  - id: i2c_lcd
    sda: GPIO37
    scl: GPIO38
    scan: true
    frequency: 400kHz

  - id: i2c_misc
    sda: GPIO20
    scl: GPIO21
    scan: false
    frequency: 400kHz

xl9535:
  - id: xl9535_hub
    i2c_id: i2c_misc
    address: 0x20

output:
  - platform: gpio
    id: lcd_pwr_en
    pin:
      xl9535: xl9535_hub
      number: 0             # LCD_PWR_EN

  - platform: gpio
    id: en_lcd_pwr
    pin:
      xl9535: xl9535_hub
      number: 7             # EN_LCD_PWR

  - platform: ledc
    id: lcd_backlight_pwm
    pin: GPIO14             # LCD_PWMc
    frequency: 1000Hz

light:
  - platform: monochromatic
    output: lcd_backlight_pwm
    name: "Display Backlight"
    id: backlight
    restore_mode: ALWAYS_ON

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
  encryption:
    key: !secret api_key

esp32_hosted:
  variant: esp32c6
  clk_pin: GPIO11
  cmd_pin: GPIO6
  reset_pin: GPIO13
  d0_pin: GPIO7
  d1_pin: GPIO8
  d2_pin: GPIO9
  d3_pin: GPIO10
  active_high: true
  

ota:
  - platform: esphome

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO35
      mode: INPUT_PULLUP
      inverted: true
    name: "Boot Button"
    id: boot_button

  - platform: gpio
    pin:
      number: GPIO3
      mode: INPUT_PULLUP
      inverted: true
    name: "Power Button"
    id: power_button
    on_press:
      then:
        - light.toggle: backlight

display:
  - platform: mipi_dsi
    id: main_display
    model: SEEED-RETERMINAL-D1001
    auto_clear_enabled: false
    update_interval: never

    
lvgl:
  displays:
    - main_display
  draw_rounding: 2
  full_refresh: false
  rotation: 270
  bg_color: 0x000000
  pages:
    - id: main_page
      bg_opa: COVER
      widgets:
        - label:
            text: "RED"
            align: TOP_MID
            text_color: 0xFF0000
            text_font: MONTSERRAT_48
        - label:
            text: "GREEN"
            align: CENTER
            text_color: 0x00FF00
            text_font: MONTSERRAT_48
        - label:
            text: "BLUE"
            align: BOTTOM_MID
            text_color: 0x0000FF
            text_font: MONTSERRAT_48

The display test card works
I think it might be an issue with the display being 24bit and LVGL only supporting 16bit

Setting the lvgl byte_order: little_endian fixes the colours


esphome:
  name: reterminal-d1001
  friendly_name: reTerminal D1001
  on_boot:
    priority: 800
    then:
      - output.turn_on: lcd_pwr_en
      - output.turn_on: en_lcd_pwr
      - output.set_level:
          id: lcd_backlight_pwm
          level: 60%

esp32:
  board: esp32-p4
  cpu_frequency: 360MHz
  framework:
    type: esp-idf
    version: recommended
    advanced:
      enable_idf_experimental_features: true
    sdkconfig_options:
      CONFIG_ESP32P4_CACHE_L2_CACHE_SIZE_512KB: "y"
  flash_size: 32MB

psram:
  speed: 100MHz

logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG

esp_ldo:
  - channel: 3
    voltage: 2.5V

i2c:
  - id: i2c_lcd
    sda: GPIO37
    scl: GPIO38
    scan: true
    frequency: 400kHz

  - id: i2c_misc
    sda: GPIO20
    scl: GPIO21
    scan: false
    frequency: 400kHz

xl9535:
  - id: xl9535_hub
    i2c_id: i2c_misc
    address: 0x20

output:
  - platform: gpio
    id: lcd_pwr_en
    pin:
      xl9535: xl9535_hub
      number: 0             # LCD_PWR_EN

  - platform: gpio
    id: en_lcd_pwr
    pin:
      xl9535: xl9535_hub
      number: 7             # EN_LCD_PWR

  - platform: gpio
    id: tp_rst
    pin:
      xl9535: xl9535_hub
      number: 12            # TP_RST

  - platform: ledc
    id: lcd_backlight_pwm
    pin: GPIO14             # LCD_PWMc
    frequency: 1000Hz



light:
  - platform: monochromatic
    output: lcd_backlight_pwm
    name: "Display Backlight"
    id: backlight
    restore_mode: ALWAYS_ON

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
  encryption:
    key: !secret api_key

esp32_hosted:
  variant: esp32c6
  clk_pin: GPIO11
  cmd_pin: GPIO6
  reset_pin: GPIO13
  d0_pin: GPIO7
  d1_pin: GPIO8
  d2_pin: GPIO9
  d3_pin: GPIO10
  active_high: true
  

ota:
  - platform: esphome


display:
  - platform: mipi_dsi
    id: main_display
    model: SEEED-RETERMINAL-D1001
    auto_clear_enabled: false
    update_interval: never   



globals:
  - id: last_activity
    type: int
    restore_value: false
    initial_value: '0'
  - id: snow_colour
    type: int
    restore_value: false
    initial_value: '0'



lvgl:
  draw_rounding: 2
  full_refresh: false
  rotation: 270
  byte_order: little_endian
  bg_color: 0x000000
  pages:
    - id: main_page
      bg_opa: COVER
      widgets:
        - label:
            text: "RED"
            align: TOP_MID
            text_color: 0xFF0000
            text_font: MONTSERRAT_48
        - label:
            text: "GREEN"
            align: CENTER
            text_color: 0x00FF00
            text_font: MONTSERRAT_48
        - label:
            text: "BLUE"
            align: BOTTOM_MID
            text_color: 0x0000FF
            text_font: MONTSERRAT_48

I’ll have the touchscreen working shortly.

Awesome, thanks for your work.

Here's a config that demonstrates the display, touchscreen, accelerometer, battery charge.

Thanks for your hard work!

I've done some testing with your config and mine and the display, touch, motion and battery all seem to work great.

The only minor issue I found (using your config) was the power hold to power off is not working, the button/binary sensor is raising an event so I think its either the condition or the script.

Never mind!

Power off button only works when running on battery.

1 Like

This thread was super helpful in getting custom firmware working on my LuxWX platform. Thank you!!