Install the ESPHome Device Builder add-on by following the official ESPHome documentation. (Note: This tutorial is based on ESPHome 2025.12.5. If you encounter compilation errors, switch to this version for verification.)
Click the Online Flashing button below and follow the prompts to flash the firmware and configure Wi-Fi. You can then quickly experience AtomS3R-M12 integration with Home Assistant.
After completing online flashing, you do not need to perform the "Firmware Compilation & Flashing" steps. Proceed directly to 4. Getting Started.
3. Firmware Compilation & Flashing
This section explains how to recompile the project from the yaml configuration file for secondary development, feature modifications, or adding new features.
Compilation Time
The first build may take some time, depending on the performance of the Home Assistant host and network quality.
Create Device
Click the green button in the lower-right corner to create the device.
Click CONTINUE.
Click New Device Setup.
Enter the device name, then click NEXT.
Click ESP32-S3.
Click SKIP.
Modify Configuration
Click EDIT to customize device functions through the YAML file.
The following is the core part of the code. Related references and instructions are provided below.
Due to the hardware circuit design, AtomS3R-M12 needs to pull GPIO18 low after power-on to enable correct I2C communication. If GPIO18 is not set to a low level before I2C bus initialization or access, I2C communication may fail. Therefore, GPIO18 control must be assigned the highest priority to ensure it is pulled low during the early stages of system startup.
Since ESPHome does not yet provide official BMI270 / BMM150 components, this project uses a third-party component library contributed by a community developer. Thanks to the author for their contribution.