Skip to content

shaikat21/esp32_sdspi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ESPHome SD SPI Card Component

Custom ESPHome component for ESP32 that adds SD card support over SPI.
It allows mounting an SD card, monitoring its storage, and handling files (including CSV logs) directly from ESPHome.


โœจ Features

  • ๐Ÿ“ฆ Mount SD card over SPI (ESP-IDF based, works with ESP32 boards)
  • ๐Ÿ“Š Expose sensors in ESPHome for:
    • Total space
    • Used space
    • Free space
    • File size for specific files
  • ๐Ÿ“‘ File operations:
    • Append text or CSV rows
    • Delete files
    • Write new files
  • ๐Ÿ“ˆ CSV helpers:
    • Count rows
    • Delete row ranges
    • Keep only last N rows
    • Read a specific column range
  • ๐Ÿ”„ Live detection of SD card removal & auto-remount
  • โšก Lightweight & optimized for ESP devices

๐Ÿ›  Installation

Add this repo as an external component in your ESPHome YAML:

external_components:
  - source: github://shaikat21/esp32_sdspi
    components: [ sd_spi_card ]