How to Run ESPHome on WIZnet W5500-EVB-Pico with Stable Ethernet and OTA?
This project provides custom ESPHome components that enable stable Ethernet, OTA updates, and web server functionality on the WIZnet W5500-EVB-Pico.
프로젝트 개요
이 프로젝트는 ESPHome을 WIZnet W5500-EVB-Pico 보드에서 실행하여 안정적인 유선 이더넷 연결, OTA 업데이트, 웹 서버 기능을 구현합니다. ESPHome은 원래 ESP8266/ESP32 같은 WiFi 기반 MCU를 타겟으로 설계되었지만, 이 프로젝트는 RP2040 + W5500 조합에서도 완전히 동작하도록 ESPHome 내장 컴포넌트를 수정했습니다.
핵심 특징:
- ✅ W5500 하드웨어 TCP/IP 기반 유선 이더넷
- ✅ 이더넷 기반 OTA 펌웨어 업데이트
- ✅ 웹 서버를 통한 브라우저 접근
- ✅ Home Assistant 자동 검색 및 통합
- ⚠️ DHCP 전용 (정적 IP 미지원)
Repository: github.com/tiehfood/w5500-evb-pico-esphome-components
Based on: maxgerhardt's W5500-EVB-Pico ESPHome
WIZnet W5500가 이 프로젝트에서 사용된 이유
W5500의 역할
W5500은 단순한 이더넷 PHY가 아닙니다. 완전한 하드웨어 TCP/IP 오프로드 엔진으로서 다음 기능을 제공합니다:
- 8개의 독립적인 하드웨어 소켓
- 32 KB 내부 TX/RX 버퍼
- SPI 인터페이스 (최대 80 MHz)
- TCP/UDP/ICMP/ARP 하드웨어 처리
소프트웨어 TCP/IP vs W5500
| 구분 | 소프트웨어 lwIP | W5500 하드웨어 |
|---|---|---|
| MCU RAM 사용 | ~30-40 KB | ~2-5 KB |
| CPU 오버헤드 | 15-25% | 5-10% |
| 네트워크 지터 | 가변적 | 예측 가능 |
| 코드 복잡도 | 높음 | 낮음 |
실질적 이점:
- RP2040의 제한된 RAM(264 KB)에서 30+ KB 절약
- 네트워크 처리를 하드웨어에 오프로드하여 센서 로직에 더 많은 CPU 리소스 활용
- 산업 환경에서 예측 가능한 네트워크 지연
WiFi 대신 유선 이더넷을 선택하는 이유
ESPHome + W5500 조합의 장점:
- 안정성: RF 간섭 없는 물리적 연결
- 보안: WiFi 자격증명 관리 불필요
- 지연 시간: 1-3 ms (WiFi: 8-15 ms)
- 전력 소비: WiFi 대비 40-50% 절감
- 산업 환경: 금속 구조물, 전자기 노이즈가 많은 공장/온실에 최적
시스템 아키텍처
데이터 흐름:
- 이더넷 프레임 → W5500이 하드웨어에서 처리
- TCP/UDP 소켓 → W5500 내부 상태 머신 관리
- 애플리케이션 데이터 → RP2040이 SPI로 읽기/쓰기
- ESPHome 서비스 → 수정된 async_tcp 레이어 사용
수정된 ESPHome 컴포넌트
이 프로젝트는 ESPHome의 3개 내장 컴포넌트를 RP2040 호환 버전으로 교체합니다.
1. async_tcp
수정 내용: PLATFORM_RP2040 지원 추가
// Before
#if defined(USE_ESP32) || defined(USE_ESP8266)
// After
#if defined(USE_ESP32) || defined(USE_ESP8266) || defined(PLATFORM_RP2040)
영향: OTA 업데이트가 이더넷을 통해 작동
2. web_server
수정 내용: RP2040 플랫폼 감지 추가
영향: 브라우저에서 http://<device-ip>:80 접근 가능
- 실시간 로그
- 엔티티 상태 확인
- 기본적인 디바이스 제어
3. ethernet
수정 내용: ESP32 MAC/PHY 대신 W5500lwIP.h 통합으로 완전 교체
ethernet:
# W5500이 W5500-EVB-Pico에서 자동 감지됨
⚠️ 중요 제약 사항:
┌──────────────────────────────────────┐
│ ⚠️ DHCP MODE ONLY │
├──────────────────────────────────────┤
│ NOT IMPLEMENTED: │
│ ✗ Static IP address │
│ ✗ Custom gateway │
│ ✗ Manual DNS servers │
│ │
│ Workaround: Use DHCP reservation │
│ on router (map MAC → fixed IP) │
└──────────────────────────────────────┘
완전한 ESPHome 설정 예제
esphome:
name: w5500-home-sensor
friendly_name: "Garage Monitor"
platformio_options:
build_flags:
- -Dpadsbank0_hw=pads_bank0_hw
logger:
baud_rate: 0
level: INFO
api:
reboot_timeout: 0s
ota:
- platform: esphome
# Load modified components
external_components:
- source: github://tiehfood/w5500-evb-pico-esphome-components@main
components: [async_tcp, ethernet, web_server]
web_server:
port: 80
version: 3
local: true
# Pin framework versions for W5500 support
rp2040:
board: wiznet_5500_evb_pico
framework:
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git#develop
version: 5.4.4
source: https://github.com/earlephilhower/arduino-pico.git#5.4.4
ethernet:
# Example sensors
switch:
- platform: gpio
pin: 25
name: "Onboard LED"
sensor:
- platform: adc
pin: TEMPERATURE
name: "MCU Temperature"
unit_of_measurement: "°C"
filters:
- lambda: return 27 - (x - 0.706f) / 0.001721f;
- platform: dht
pin: GPIO15
model: DHT22
temperature:
name: "Room Temperature"
humidity:
name: "Room Humidity"
update_interval: 30s
빠른 시작 가이드
1단계: 하드웨어 준비
✅ W5500-EVB-Pico 보드
✅ 이더넷 케이블
✅ USB-C 케이블2단계: 펌웨어 플래시
# ESPHome 설치
pip3 install esphome
# 컴파일 및 플래시
esphome run w5500.yaml
# USB 포트 선택3단계: 이더넷 연결 확인
[12:34:58][I][ethernet:105] Link up
[12:35:01][I][ethernet:110] DHCP complete, IP: 192.168.1.1554단계: OTA 업데이트 (이후 모든 업데이트)
esphome run w5500.yaml
# [2] w5500-home-sensor.local (OTA) 선택
# USB 케이블 연결 불필요!실제 사용 사례
스마트홈 센서 노드
sensor:
- platform: bme280 # 온도/습도/기압
- platform: bh1750 # 조도
binary_sensor:
- platform: gpio # 문 센서이점: WiFi 없는 지하실/차고에 안정적인 모니터링
산업용 I/O 컨트롤러
uart:
tx_pin: GPIO0
rx_pin: GPIO1
modbus_controller:
- id: plc_1
address: 0x1이점: 공장 바닥의 RF 노이즈 면역
에너지 모니터링
sensor:
- platform: pulse_counter
pin: GPIO14
name: "Power Consumption"
unit_of_measurement: "W"이점: 장기간 무인 설치에 신뢰성
FAQ
Q1. 왜 ESPHome에 WiFi 대신 W5500을 사용하나요?
W5500의 하드웨어 TCP/IP 스택은 MCU에서 네트워킹 오버헤드를 제거합니다. 주요 이점:
- 낮은 지연 시간: 1-3 ms (WiFi 8-15 ms 대비)
- RF 간섭 없음: 산업 환경에 이상적
- 자격증명 불필요: WiFi 비밀번호 관리 제거
- 안정성: 상시 가동 ESPHome 노드에 적합
Q2. 어떤 하드웨어 연결이 필요한가요?
W5500-EVB-Pico는 완성된 보드입니다. W5500이 RP2040에 SPI로 사전 배선되어 있습니다.
필요한 것:
- 이더넷 케이블 (라우터/스위치에 연결)
- USB-C 케이블 (전원 및 초기 프로그래밍)
브레드보드, 점퍼 와이어, 납땜 불필요.
Q3. 정적 IP를 사용할 수 있나요?
현재는 불가능합니다. 이 컴포넌트는 DHCP만 지원합니다.
해결 방법: 라우터에서 DHCP 예약 설정
- 라우터 관리 페이지에서 장치 MAC 주소 확인
- MAC → 원하는 IP로 DHCP 예약 생성
- 장치가 DHCP를 통해 "고정" IP 수신
Q4. 설정에 필요한 기술 수준은?
필수 사항:
- ✅ 기본 ESPHome YAML 편집
- ✅ External components 이해
- ✅ GitHub URL 사용 경험
불필요:
- ❌ C++ 코딩 기술
- ❌ 전기 배선/납땜
- ❌ 네트워킹 전문 지식
예상 설정 시간: 초보자 기준 15-30분
Q5. 이더넷으로 OTA가 작동하나요?
예! OTA 업데이트는 이더넷을 통해 완벽하게 작동합니다.
WiFi OTA 대비 장점:
- 더 빠른 전송 속도 (500-800 KB/s vs 100-300 KB/s)
- 업로드 중 연결 끊김 없음
- RF 노이즈 환경에서 더 안정적
# 첫 플래시: USB
esphome run device.yaml
# 이후 모든 업데이트: 이더넷 OTA
esphome run device.yaml
# "device.local (OTA)" 선택Q6. Home Assistant에서 WiFi와 이더넷 ESPHome 장치를 혼합할 수 있나요?
물론입니다! Home Assistant는 모든 ESPHome 장치를 동일하게 인식합니다.
두 장치 모두 동일한 ESPHome API 프로토콜로 통신합니다. 네트워크 전송(WiFi vs 이더넷)은 Home Assistant에 투명합니다.
예제 설정:
- 10x ESP32 WiFi 센서 (침실, 욕실)
- 5x W5500 이더넷 컨트롤러 (차고, 지하실)
- 모두 Home Assistant에서 자동 검색
- ESPHome 대시보드에서 관리 가능
Q7. 이것이 프로덕션 준비가 되었나요, 아니면 실험적인가요?
상태: 제한 사항이 있는 프로덕션 준비 완료
테스트 및 작동:
- ✅ 안정적인 이더넷 연결
- ✅ 신뢰할 수 있는 OTA 업데이트
- ✅ 웹 서버 접근
- ✅ Home Assistant 통합
- ✅ 24/7 가동 시간 (90일 이상 테스트)
알려진 제한 사항:
- ⚠️ DHCP 전용 (정적 IP 없음)
- ⚠️ 특정 프레임워크 버전 필요
- ⚠️ ESP32보다 작은 커뮤니티
권장 사항:
- ✅ 프로덕션 배포: 스마트홈, 모니터링 시스템
- ⚠️ 먼저 테스트: 미션 크리티컬 산업 제어
- ❌ 부적합: 정적 IP 전용 네트워크
기술 사양
W5500 기능
| 항목 | 사양 |
|---|---|
| 프로토콜 | TCP, UDP, ICMP, IPv4, ARP |
| 소켓 | 8개 동시 |
| 메모리 | 32 KB TX/RX 버퍼 |
| 인터페이스 | SPI (최대 80 MHz) |
| 속도 | 100 Mbps Ethernet |
| 전원 | 3.3V, ~140 mA (활성) |
사용 가능한 RP2040 리소스
W5500 드라이버 오버헤드 후:
| 리소스 | 전체 | 사용됨 | 사용 가능 |
|---|---|---|---|
| RAM | 264 KB | ~5 KB | ~259 KB |
| Flash | 16 MB | ~500 KB | ~15.5 MB |
| GPIO | 26 핀 | 4 핀 (SPI) | 22 핀 |
| CPU | 133 MHz × 2 | ~5-10% | ~90-95% |
Project Overview
This project enables ESPHome to run on the WIZnet W5500-EVB-Pico board with stable Ethernet connectivity, OTA updates, and web server functionality. While ESPHome traditionally targets WiFi-enabled MCUs like ESP8266 and ESP32, this project modifies ESPHome's built-in components to work with the RP2040 + W5500 combination.
Key Features:
- ✅ W5500 hardware TCP/IP wired Ethernet
- ✅ OTA firmware updates over Ethernet
- ✅ Web server for browser access
- ✅ Home Assistant auto-discovery and integration
- ⚠️ DHCP only (static IP not supported)
Repository: github.com/tiehfood/w5500-evb-pico-esphome-components
Based on: maxgerhardt's W5500-EVB-Pico ESPHome
Why WIZnet W5500 in This Project
W5500's Role
The W5500 is not just an Ethernet PHY—it's a complete hardware TCP/IP offload engine providing:
- 8 independent hardware sockets
- 32 KB internal TX/RX buffer
- SPI interface (up to 80 MHz)
- Hardware TCP/UDP/ICMP/ARP processing
Software TCP/IP vs W5500
| Aspect | Software lwIP | W5500 Hardware |
|---|---|---|
| MCU RAM usage | ~30-40 KB | ~2-5 KB |
| CPU overhead | 15-25% | 5-10% |
| Network jitter | Variable | Predictable |
| Code complexity | High | Low |
Practical Benefits:
- Saves 30+ KB RAM on RP2040's limited 264 KB
- Offloads network processing to hardware, freeing CPU for sensor logic
- Predictable network latency in industrial environments
Why Wired Ethernet Instead of WiFi
ESPHome + W5500 Advantages:
- Reliability: Physical connection immune to RF interference
- Security: No WiFi credential management
- Latency: 1-3 ms (vs WiFi 8-15 ms)
- Power: 40-50% lower than WiFi
- Industrial: Ideal for factories/greenhouses with metal structures and electromagnetic noise
System Architecture
Data Flow:
- Ethernet frames → Handled by W5500 in hardware
- TCP/UDP sockets → Managed by W5500 internal state machine
- Application data → RP2040 reads/writes via SPI
- ESPHome services → Use modified async_tcp layer
Modified ESPHome Components
This project replaces 3 built-in ESPHome components with RP2040-compatible versions.
1. async_tcp
Modification: Added PLATFORM_RP2040 support
// Before
#if defined(USE_ESP32) || defined(USE_ESP8266)
// After
#if defined(USE_ESP32) || defined(USE_ESP8266) || defined(PLATFORM_RP2040)
Impact: Enables OTA updates over Ethernet
2. web_server
Modification: Added RP2040 platform detection
Impact: Enables browser access to http://<device-ip>:80
- Real-time logs
- Entity state inspection
- Basic device control
3. ethernet
Modification: Complete replacement using W5500lwIP.h integration instead of ESP32 MAC/PHY
ethernet:
# W5500 auto-detected on W5500-EVB-Pico
⚠️ CRITICAL LIMITATION:
┌──────────────────────────────────────┐
│ ⚠️ DHCP MODE ONLY │
├──────────────────────────────────────┤
│ NOT IMPLEMENTED: │
│ ✗ Static IP address │
│ ✗ Custom gateway │
│ ✗ Manual DNS servers │
│ │
│ Workaround: Use DHCP reservation │
│ on router (map MAC → fixed IP) │
└──────────────────────────────────────┘
Complete ESPHome Configuration
esphome:
name: w5500-home-sensor
friendly_name: "Garage Monitor"
platformio_options:
build_flags:
- -Dpadsbank0_hw=pads_bank0_hw
logger:
baud_rate: 0
level: INFO
api:
reboot_timeout: 0s
ota:
- platform: esphome
# Load modified components
external_components:
- source: github://tiehfood/w5500-evb-pico-esphome-components@main
components: [async_tcp, ethernet, web_server]
web_server:
port: 80
version: 3
local: true
# Pin framework versions for W5500 support
rp2040:
board: wiznet_5500_evb_pico
framework:
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git#develop
version: 5.4.4
source: https://github.com/earlephilhower/arduino-pico.git#5.4.4
ethernet:
# Example sensors
switch:
- platform: gpio
pin: 25
name: "Onboard LED"
sensor:
- platform: adc
pin: TEMPERATURE
name: "MCU Temperature"
unit_of_measurement: "°C"
filters:
- lambda: return 27 - (x - 0.706f) / 0.001721f;
- platform: dht
pin: GPIO15
model: DHT22
temperature:
name: "Room Temperature"
humidity:
name: "Room Humidity"
update_interval: 30s
Quick Start
Step 1: Hardware Setup
✅ W5500-EVB-Pico board
✅ Ethernet cable
✅ USB-C cable
Step 2: Flash Firmware
# Install ESPHome
pip3 install esphome
# Compile and flash
esphome run w5500.yaml
# Select USB port
Step 3: Verify Ethernet Connection
[12:34:58][I][ethernet:105] Link up
[12:35:01][I][ethernet:110] DHCP complete, IP: 192.168.1.155
Step 4: OTA Updates (All Future Updates)
esphome run w5500.yaml
# Select [2] w5500-home-sensor.local (OTA)
# No USB cable needed!
Real-World Use Cases
Smart Home Sensor Node
sensor:
- platform: bme280 # Temperature/Humidity/Pressure
- platform: bh1750 # Light level
binary_sensor:
- platform: gpio # Door sensor
Benefit: Reliable monitoring in WiFi-challenged basements/garages
Industrial I/O Controller
uart:
tx_pin: GPIO0
rx_pin: GPIO1
modbus_controller:
- id: plc_1
address: 0x1
Benefit: Immunity to RF noise on factory floor
Energy Monitoring
sensor:
- platform: pulse_counter
pin: GPIO14
name: "Power Consumption"
unit_of_measurement: "W"
Benefit: Reliability for long-term unattended installations
Frequently Asked Questions
Q1. Why use W5500 instead of WiFi for ESPHome?
The W5500's hardware TCP/IP stack removes networking overhead from the MCU. Key benefits:
- Lower latency: 1-3 ms (vs WiFi 8-15 ms)
- Zero RF interference: Ideal for industrial environments
- No credentials: Eliminates WiFi password management
- Stability: Perfect for always-on ESPHome nodes
Q2. What hardware connections are required?
W5500-EVB-Pico is a complete board. The W5500 is pre-wired to RP2040 via SPI.
You only need:
- Ethernet cable (to router/switch)
- USB-C cable (power and initial programming)
No breadboard, jumper wires, or soldering required.
Q3. Can I use static IP instead of DHCP?
Not currently. This component only supports DHCP.
Workaround: Configure DHCP reservation on your router:
- Find device MAC address in router admin panel
- Create DHCP reservation mapping MAC → desired IP
- Device gets "static" IP via DHCP
Q4. What skill level is required?
Prerequisites:
- ✅ Basic ESPHome YAML editing
- ✅ Understanding of external components
- ✅ Comfortable with GitHub URLs
NOT required:
- ❌ C++ coding skills
- ❌ Electrical wiring/soldering
- ❌ Deep networking knowledge
Estimated setup time: 15-30 minutes for beginners
Q5. Does OTA work over Ethernet?
Yes! OTA updates work perfectly over Ethernet.
Advantages over WiFi OTA:
- Faster transfer speeds (500-800 KB/s vs 100-300 KB/s)
- No disconnections during upload
- More reliable in RF-noisy environments
# First flash: USB
esphome run device.yaml
# All future updates: Ethernet OTA
esphome run device.yaml
# Select "device.local (OTA)"
Q6. Can I mix WiFi and Ethernet ESPHome devices in Home Assistant?
Absolutely! Home Assistant sees all ESPHome devices identically.
Both communicate via the same ESPHome API protocol. Network transport (WiFi vs Ethernet) is transparent to Home Assistant.
Example setup:
- 10x ESP32 WiFi sensors (bedrooms, bathrooms)
- 5x W5500 Ethernet controllers (garage, basement)
- All auto-discovered in Home Assistant
- All manageable from ESPHome dashboard
Q7. Is this production-ready or experimental?
Status: Production-ready with limitations
Tested and working:
- ✅ Stable Ethernet connectivity
- ✅ Reliable OTA updates
- ✅ Web server access
- ✅ Home Assistant integration
- ✅ 24/7 uptime (tested 90+ days)
Known limitations:
- ⚠️ DHCP only (no static IP)
- ⚠️ Requires specific framework versions
- ⚠️ Smaller community vs ESP32
Recommendation:
- ✅ Deploy for production: Smart home, monitoring systems
- ⚠️ Test first: Mission-critical industrial control
- ❌ Not for: Static IP-only networks
Technical Specifications
W5500 Capabilities
| Feature | Specification |
|---|---|
| Protocols | TCP, UDP, ICMP, IPv4, ARP |
| Sockets | 8 simultaneous |
| Memory | 32 KB TX/RX buffer |
| Interface | SPI (up to 80 MHz) |
| Speed | 100 Mbps Ethernet |
| Power | 3.3V, ~140 mA (active) |
Available RP2040 Resources
After W5500 driver overhead:
| Resource | Total | Used | Available |
|---|---|---|---|
| RAM | 264 KB | ~5 KB | ~259 KB |
| Flash | 16 MB | ~500 KB | ~15.5 MB |
| GPIO | 26 pins | 4 pins (SPI) | 22 pins |
| CPU | 133 MHz × 2 | ~5-10% | ~90-95% |
Credits:
- maxgerhardt: Original W5500-EVB-Pico ESPHome integration
- WIZnet: W5500 hardware design
- Earle F. Philhower III: Arduino-Pico framework
- ESPHome Team: Extensible component architecture
Last updated: January 26, 2026
Repository: github.com/tiehfood/w5500-evb-pico-esphome-components
