ESP32-CAM Home Assistant Setup with ESPHome
Expose an AI Thinker ESP32-CAM as a camera entity in Home Assistant with ESPHome.
Parts and sourceBefore you start
ESPHome documents the camera component and the AI-Thinker pin mapping. The camera needs PSRAM and I²C configured alongside the usual Wi-Fi and native API settings.
Getting started
- Create a configuration for the exact board in ESPHome and add the AI-Thinker camera example, including I²C and PSRAM.
- Keep the initial resolution modest, validate the config and upload the firmware with the board in download mode.
- Restart in normal boot mode, add the device through Home Assistant’s ESPHome integration and check the camera entity on the local network.
Match the camera configuration
Use the AI-Thinker example from ESPHome’s camera documentation. For that board, the example uses GPIO26 and GPIO27 for the camera control bus, GPIO0 for the external clock and GPIO32 for camera power-down. Copy the complete matching pin map from the guide.
Check the result in Home Assistant
Confirm the ESPHome logs show a camera initialized without errors. Open the camera entity through Home Assistant and check an image before adding it to a dashboard. If the device connects but no image appears, check PSRAM, the I²C assignment and the camera ribbon before increasing resolution.