TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/esphome/esphome.io/llms.txt
Use this file to discover all available pages before exploring further.
ethernet: component provides wired network connectivity for ESP32 and RP2040/RP2350 boards. For ESP32, both RMII PHY chips (LAN8720, RTL8201, IP101, and others) connected to the built-in Ethernet MAC, and SPI-based controllers (W5500, DM9051, ENC28J60) are supported. For RP2040/RP2350, only SPI/PIO controllers are supported (W5100, W5500, W6100, W6300, ENC28J60). Wired Ethernet and Wi-Fi cannot be used simultaneously, even when both are physically present on a board.
Minimal Examples
Supported Chipsets
| Type | Interface | Platforms |
|---|---|---|
LAN8720 | RMII | ESP32 only |
LAN8670 | RMII | ESP32 only |
RTL8201 | RMII | ESP32 only |
DP83848 | RMII | ESP32 only |
IP101 | RMII | ESP32 only |
JL1101 | RMII | ESP32 only |
KSZ8081 | RMII | ESP32 only |
KSZ8081RNA | RMII | ESP32 only |
OPENETH | QEMU | ESP32 only |
W5500 | SPI | ESP32 + RP2040 |
DM9051 | SPI | ESP32 only |
ENC28J60 | SPI (10 Mbps) | ESP32 + RP2040 |
W5100 | SPI | RP2040 only |
W6100 | SPI | RP2040/RP2350 only |
W6300 | PIO QSPI | RP2040/RP2350 only |
RMII Configuration Variables
PHY chipset type. See the supported chipsets table above.
Management Data Clock pin. Typically
GPIO23 on ESP32 boards with built-in PHY.Management Data I/O pin. Typically
GPIO18 on ESP32 boards with built-in PHY.RMII clock configuration.
- pin (Required, pin): The clock GPIO pin.
- mode (Required, string): Clock source.
CLK_EXT_INuses an external crystal oscillator on the PHY board;CLK_OUTuses the ESP32’s internal oscillator.
PHY chip address on the MDIO bus. Defaults to
0. Check your board’s schematic.GPIO pin controlling the PHY’s power or reset line. Leave unset if your board has no power control pin.
Arbitrary PHY register values to write after Ethernet initialization. Each entry requires
address (hex) and value (hex), and optionally page_id (hex, RTL8201 only).SPI Configuration Variables
SPI clock pin.
SPI MOSI (controller-out, peripheral-in) pin.
SPI MISO (controller-in, peripheral-out) pin.
SPI chip select pin.
Interrupt pin for packet-ready notification. Required for older ESP-IDF frameworks. Optional on ESP-IDF 5.1.4+ (use
polling_interval instead).GPIO pin wired to the controller’s reset line. Optional but recommended.
ESP32 only. SPI bus clock speed. Any frequency 8–80 MHz is accepted; the nearest integer divisor of 80 MHz is used. Defaults to
26.67MHz (80 MHz ÷ 3).ESP32 only. Polling interval when no
interrupt_pin is configured. Requires ESP-IDF 5.1.4+. Minimum 1ms. Defaults to 10ms. Cannot be set simultaneously with interrupt_pin.ESP32 only. Which SPI peripheral to use:
spi2 or spi3.Common Configuration Variables
Configure a static IP address. Recommended for reliable OTA and fast reconnection.
- static_ip (Required, IPv4): Static IP address.
- gateway (Required, IPv4): Default gateway (router IP).
- subnet (Required, IPv4): Subnet mask (e.g.
255.255.255.0). - dns1 (Optional, IPv4): Primary DNS server.
- dns2 (Optional, IPv4): Secondary DNS server.
Override the target address for OTA uploads. Useful when migrating between IPs.
mDNS domain suffix. Defaults to
.local.Override the Ethernet interface MAC address.
Triggered when a wired network link is established.
Triggered when the wired network link is lost.
Board-Specific Examples
Complete Example with Static IP and Automations
SPI-based Ethernet chips do not use the ESPHome SPI bus component. Their SPI pins cannot be shared with other SPI devices. Wire each Ethernet controller to dedicated GPIO pins.
The ENC28J60 is limited to 10 Mbps. For applications requiring higher throughput, use a W5500 (100 Mbps) instead.