WEMOS LOLIN ESP32-S3 Mini V1.0.0 (S3FH4R2)

I have a Wemos Lolin ESP32-S3 Mini V1.0.0 (S3FH4R2) and I am not able to install esphome on it, I have tried with many of the configurations that appear in this forum, both with arduino framework and with ESP-IDF.

If anyone has this board working with esphome and can share the configuration file I would be very grateful or any suggestion would be welcome.

Thanks.

# https://www.wemos.cc/en/latest/s3/s3_mini.html

substitutions:
  friendly_name: 'Lolin'
  device_name: 'lolin'
  project_base: 'Wemos'
  project_name: 'ESP32'
  project_version: 'S3 mini'
  device_description: 'Lolin Wemos ESP32-S3 mini'

esphome:
  name: $device_name
  friendly_name: $friendly_name
  comment: $device_description
  project:
    name: ${project_base}.${project_name}
    version: $project_version
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: arduino
    platform_packages:
      - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32

esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: arduino
    version: latest    

light:
  - platform: neopixelbus
    type: GRB
    variant: 800KBPS
    pin: 47
    num_leds: 1
    name: Led
    icon: mdi:led-outline
    id: esp32s3_rgb_led
    entity_category: config
    restore_mode: ALWAYS_OFF
    internal: true
    default_transition_length: 500ms
    method:
      type: esp32_rmt
      channel: 0              

thanks.

working when compiled on esphome dev branch.

This configuration worked for me,

  name: ${host_name}
  friendly_name: ${upper_device_name}
  platformio_options: 
    board_build.flash_mode: dio
    board_build.extra_flags:
      #- "-DARDUINO_USB_MODE=0"
      - "-DARDUINO_USB_CDC_ON_BOOT=0"

esp32:
  board: ${board_type}
  framework:
    type: arduino

Although I can’t remember now if to get the initial flash I had do the hold the 0 button whilst reseting, but after that all operations carried out over WiFi.

Oh and don’t forget to add the output_power limit,

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

I’m able to compile and upload with the code below but I’m getting an error in the logger and it’s not booting.

Error is below

INFO Successfully uploaded program.
INFO Starting log output from /dev/cu.usbmodem1101 with baud rate 115200
[18:04:15]E (160) esp_core_dump_flash: No core dump partition found!
# https://www.wemos.cc/en/latest/s3/s3_mini.html

substitutions:
  friendly_name: 'Lolin'
  device_name: 'lolin'
  project_base: 'Wemos'
  project_name: 'ESP32'
  project_version: 'S3 mini'
  device_description: 'Lolin Wemos ESP32-S3 mini'

esphome:
  name: $device_name
  friendly_name: $friendly_name
  comment: $device_description
  project:
    name: ${project_base}.${project_name}
    version: $project_version
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: arduino
    platform_packages:
      - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32
    board_build.flash_mode: dio
    board_build.extra_flags:
      #- "-DARDUINO_USB_MODE=0"
      - "-DARDUINO_USB_CDC_ON_BOOT=0"
      
esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: arduino
    version: latest    

light:
  - platform: neopixelbus
    type: GRB
    variant: 800KBPS
    pin: 47
    num_leds: 1
    name: Led
    icon: mdi:led-outline
    id: esp32s3_rgb_led
    entity_category: config
    restore_mode: ALWAYS_OFF
    internal: true
    default_transition_length: 500ms
    method:
      type: esp32_rmt
      channel: 0              


logger:

wifi:
  networks:
    - ssid: !secret ssid1
      password: !secret ssid1_password
  fast_connect: True
  power_save_mode: none
  output_power: 10


Any ideas about what could be happening? Thanks!

Here’s a config that worked for me. It turns out support for the Lolin S3 Mini was only added to platformio recently, so you need to specify some more recent versions of packages than the default ESPHome config provides. The platformio_options are merged from a collection of several posts I found here and elsewhere. I’m not sure these are all needed.

Important: when flashing over USB, I noticed that the S3 Mini doesn’t always reboot itself after the flash process completes. I had to manually press the RST button and wait a couple of seconds for it to reboot and join the wifi.

esphome:
  name: device-name
  friendly_name: "device-friendly-name"
  platformio_options:
    board_build.arduino.memory_type: qio_qspi
    board_upload.flash_size: 4MB
    board_upload.ram_size: 327680
    board_upload_maximum_size: 4193404
    board_upload_speed: 460800
    build_flags: [
      "-DBOARD_HAS_PSRAM",
      "-DARDUINO_LOLIN_S3_MINI",
      "-DARDUINO_USB_MODE=1"
      ]

esp32:
  board: lolin_s3_mini
  variant: esp32s3
 
  framework:
    type: arduino
    version: 2.0.8
    platform_version: 6.3.2

I am brand new to ESPHome and I got a few of these little Wemos Lolin S3 Minis and was hoping to use them for this Digiblur mmWave presence sensor project (minus the humidity sensor as I don’t need it where I’m placing these sensors): This DIY mmWave Presence Sensor Changed Everything - LD1125H How To Guide | digiblurDIY.

Digiblur’s code seems to leverage Patrick’s code from here: https://github.com/patrick3399/Hi-Link_mmWave_Radar_ESPHome/blob/797b2d1334f5c6b75e2e1e887e03e395a1ab5092/LD1125H/ESP32-LD1125H-Complete.yaml.

All of the linked code makes use of a nodemcu-32s board, so my assumption was to change it to “lolin_s3_mini” but I have not had any luck getting the code to compile. I’ve then tried appending the esphome section to some of the examples provided above in the thread but I unfortunately have not had any success.

Is anyone able to shine some light on this?

Solved, my own problem: I was finally able to figure out a solution and now I have the mmWave sensor working in my HA/ESPHome. The key for me was getting the framework to work using “version: latest”. Hope this helps someone else out!

  name: $devicename
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: espidf
    board_build.flash_mode: dio
....
esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: esp-idf  
    version: latest
3 Likes

Thanks for this, got me going!!

1 Like

thanks!! I got this to work but had to change the flash mode back to qio
Tried all the other configurations I could find and couldn’t get anything to work.

1 Like

Thanks, just tried with S3 mini, C3 mini and C3 pico and it works.
I changed
board: lolin_c3_mini
for both c3 mini and c3 pico which share the same chip.

1 Like

Thanks! I had to use version 5.1.2 instead of latest to get it to build but now everything works!

esphome:
  name: lolin-s3-mini
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: espidf
    board_build.flash_mode: dio

esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: esp-idf
    version: 5.1.2
1 Like

Can someone please help ? I have Lolin ESP32 s3 mini .

I want to get on-board LED [Pin 47] (WS2812B) to work.

  • esp-idf framework: Compiles and uploads successfully (config below)
  • arduino framework: Doesn’t compile. I tried examples given above in this thread.

Can someone please share the configuration using arduino framework that compiles and works ?

My current config using esp-idf (compiles and uploads successfully):

esphome:
  name: s3-mini-usbc
  friendly_name: s3-mini-usbc
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: espidf
    board_build.flash_mode: dio

esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: esp-idf
    version: latest

RMT light config (doesn’t compile):

light:
  - platform: esp32_rmt_led_strip
    rgb_order: GRB
    pin: 47
    num_leds: 1
    rmt_channel: 1
    chipset: WS2812
    name: "My Light"

I know this is kind of old now, but if you never got RMT light working here’s what works for me. I didn’t have to add any platformio_options: to the esphome: component.

esp32:
  board: lolin_s3_mini
  variant: esp32s3
  framework:
    type: esp-idf
    # version: latest  # https://github.com/espressif/esp-idf/releases
    version: 5.2.2     # 5.2.2 is currently the latest, but compiling w/ 'latest' fails(it pulls 5.1.2 🤷‍♂️) 2024-07-02  
    platform_version: 6.7.0  # https://github.com/platformio/platform-espressif32/releases/

light:
  - platform: esp32_rmt_led_strip
    id: onboard_led
    name: "${name} Led"
    rgb_order: GRB
    chipset: WS2812
    rmt_channel: 0
    num_leds: 1
    pin: 47
1 Like

I’m just getting started with ESPhome and just tried a new Lolin S3 mini with the current ESPHome 2024.7 - The default ESPhome bootstrap install with the Arduino framework worked on it. The framework automatically selected board: esp32-s3-devkitc-1 (Note: Board type lolin_s3_mini is still not defined out of the box with 2024.7)

I only had to add this to the generated config to get access to the LED:

light:
  - platform: esp32_rmt_led_strip
    id: onboard_led
    name: ${name} Led
    rgb_order: RGB
    chipset: WS2812
    rmt_channel: 0
    num_leds: 1
    pin: 47

Note: that RGB order was is different.

However, I’m confused about getting the non-reset button available to ESPhome. The wemos docs don’t mention which pin the right hand (non RST button) is connected to.

If I’m reading the schematic correctly, the right hand button is connected to IO0 while the reset button on the left is connected to EN.

However this doesn’t seem to work.

binary_sensor:
  - platform: gpio
    pin: GPIO0
    name: ${name} Button
    on_press:
      then:
        - logger.log: Button Pressed
        - light.toggle: onboard_led

Hitting the reset button will toggle the LED but will also reset the board.

Is this something I’m not understanding about pin naming/numbering? Or is this related to not using the right board config?

Hi, I try to build an esphome project with this configuration:

substitutions:
  friendly_name: 'Lolin'
  device_name: 'lolin'
  project_base: 'Wemos'
  project_name: 'ESP32'
  project_version: 'S3 mini'
  device_description: 'Lolin Wemos ESP32-S3 mini'

esphome:
  name: $device_name
  friendly_name: $friendly_name
  comment: $device_description
  project:
    name: ${project_base}.${project_name}
    version: $project_version
  platformio_options:
    platform: https://github.com/platformio/platform-espressif32.git
    board: lolin_s3_mini
    framework: arduino
    platform_packages:
      - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32

esp32:
  variant: esp32s3
  board: lolin_s3_mini
  framework:
    type: arduino
    version: latest

but when compile it I receive this error message

HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB Flash
 - framework-arduinoespressif32 @ 3.0.5+sha.7018cd1 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
KeyError: 'framework-arduinoespressif32-libs':
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/main.py", line 173:
    env.SConscript("$BUILD_SCRIPT")
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 612:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 279:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/config/.esphome/platformio/platforms/espressif32/builder/main.py", line 368:
    target_elf = env.BuildProgram()
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 61:
    env.ProcessProgramDeps()
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 121:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 347:
    SConscript(env.GetFrameworkScript(name), exports="env")
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 676:
    return method(*args, **kw)
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 612:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 279:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/config/.esphome/platformio/platforms/espressif32/builder/frameworks/arduino.py", line 36:
    SConscript(
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 676:
    return method(*args, **kw)
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 612:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/config/.esphome/platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 279:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/config/.esphome/platformio/packages/framework-arduinoespressif32@src-4942392190fa5de522c4d55bf2967706/tools/platformio-build.py", line 38:
    FRAMEWORK_LIBS_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")
  File "/usr/local/lib/python3.11/dist-packages/platformio/platform/_packages.py", line 32:
    pkg = self.get_package(name)
  File "/usr/local/lib/python3.11/dist-packages/platformio/platform/_packages.py", line 29:
    return self.pm.get_package(spec or self.get_package_spec(name))
  File "/usr/local/lib/python3.11/dist-packages/platformio/platform/_packages.py", line 21:
    owner=self.packages[name].get("owner"),
========================== [FAILED] Took 8.25 seconds ==========================

I don’t understand what is wrong, can anyone help me?

I’ve had a fair amount of trial an error with the Lolin ESP32 and found you have to use espidf framework and a flash mode option.
Below my code, you just have to change c3 with s3, I’ve tried the S3 as well and the C3 pico which works with the C3 mini code.

esphome:
  name: c3-pico
  platformio_options:
    board: lolin_c3_mini
    framework: espidf
    board_build.flash_mode: dio

esp32:
  variant: esp32c3
  board: lolin_c3_mini
  framework:
    type: esp-idf