Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/components/ethernet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This ESPHome component enables *wired* Ethernet connections for ESP32 and RP2040
- **ESP32**: Supports RMII PHY chips (LAN8720, RTL8201, etc.) and SPI Ethernet chips (W5500, DM9051, ENC28J60).
- **RP2040/RP2350**: Supports SPI/PIO Ethernet chips (W5100, W5500, W6100, W6300, ENC28J60).

This component and the Wi-Fi component may **not** be used simultaneously, even if both are physically available.
On ESP32 family devices, Ethernet may be configured alongside [WiFi](/components/wifi/) in the same configuration; see [Multi-Interface Support](/components/network/#multi-interface-support) on the [Network](/components/network/) component for how to control which interface ESPHome prefers. On RP2040, only one network interface may be configured at a time.

```yaml
# Example configuration entry for RMII chips
Expand Down
34 changes: 34 additions & 0 deletions src/content/docs/components/network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ network:
- **enable_ipv6** (*Optional*, boolean): Enables IPv6 support. Defaults to `false`.
- **min_ipv6_addr_count** (*Optional*, integer): ESPHome considers the network to be connected when it has one IPv4 address and this number of IPv6 addresses. Defaults to `0` so as to not hang on boot with networks where IPv6 is not enabled. `2` is typically a reasonable value for configurations requiring IPv6.
- **enable_high_performance** (*Optional*, boolean): Explicitly enables or disables high-performance networking optimizations. Only supported on ESP32 devices. When not specified, this is automatically enabled by components that benefit from optimized network settings. Set to `false` to disable these optimizations if they cause memory issues on your device. Defaults to component-driven behavior.
- **priority** (*Optional*, list): Order in which network interfaces are brought up at boot. Each list entry names one of the supported interface types (`ethernet`, `wifi`, `openthread`, or `modem`) and may optionally specify a per-interface `timeout`. See [Multi-Interface Support](#multi-interface-support).

## High-performance networking

Expand Down Expand Up @@ -47,6 +48,39 @@ The optimization level depends on whether PSRAM is guaranteed to be available (c
> This has various security and privacy implications decribed in [RFC7721](https://datatracker.ietf.org/doc/rfc7721/), as this might leak outside of the smart home network and makes the device uniquely identifiable.
> Therefore, the address generation does not comply to [RFC7217](https://datatracker.ietf.org/doc/rfc7217/).

## Multi-Interface Support

Devices with more than one network interface — for example an ESP32 with both [WiFi](/components/wifi/) and SPI [Ethernet](/components/ethernet/) — can declare a `priority` list to control the order in which interfaces are brought up at boot and which one ESPHome prefers when more than one is connected.

```yaml
network:
priority:
- ethernet
- wifi
```

In the example above, Ethernet is started first and used as the default route while it is connected; WiFi is started afterwards and is used only if Ethernet is unavailable. The first entry in the list is the most-preferred interface.

Each entry may either be a plain interface name or a mapping with an optional per-interface `timeout`:

```yaml
network:
priority:
- ethernet:
timeout: 30s
- wifi
```

The `timeout` value bounds how long ESPHome waits for that interface to come up before starting the next one in the list. It accepts the usual ESPHome [time format](/guides/configuration-types/#time) (for example `30s`, `1min`, `500ms`). A plain integer is interpreted as seconds. When omitted, ESPHome waits indefinitely for that interface.

### Configuration variables (priority entries)

- **interface** (**Required**, string): One of `ethernet`, `wifi`, `openthread`, or `modem`. The entry is written as the interface name itself (either as a string list item or as the single key of a mapping). Each interface may appear at most once. Every interface named here must also have its own top-level component block configured.
- **timeout** (*Optional*, [Time](/guides/configuration-types/#time)): How long to wait for this interface to come up before moving on to the next one in the list. Defaults to waiting indefinitely.

> [!NOTE]
> Not every combination of interfaces is supported on every chip. WiFi and Ethernet may be used together on ESP32 family devices that have the necessary memory headroom; OpenThread and modem support depend on additional hardware and may be limited to specific variants. If `priority` is omitted, behavior is unchanged from earlier ESPHome releases and only a single interface component may be configured.

## See Also

- [WiFi Component](/components/wifi/)
Expand Down
7 changes: 4 additions & 3 deletions src/content/docs/components/wifi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import APIRef from '@components/APIRef.astro';


This core ESPHome component sets up WiFi connections to access points
for you. You need to have a network configuration (either Wifi or Ethernet)
or ESPHome will fail in the config validation stage. You also can't have both Wifi
and Ethernet setup in same time (even if your ESP has both wired).
for you. You need to have a network configuration (either WiFi or [Ethernet](/components/ethernet/))
or ESPHome will fail in the config validation stage.

On ESP32 family devices, WiFi may be configured alongside [Ethernet](/components/ethernet/) in the same configuration; see [Multi-Interface Support](/components/network/#multi-interface-support) on the [Network](/components/network/) component for how to control which interface ESPHome prefers. On other platforms only one network interface may be configured at a time.

It's recommended to provide a static IP for your node, as it can
dramatically improve connection times.
Expand Down