Hello everyone,
I have flashed ESPHome 2025.4.1 to an Olimex ESP32-EVB-IND board.
The board has two relays, wifi and an LAN8720 Ethernet port.
Toggling the switches from Home Assistant works very well, when the Olimex Board is connected via Wifi. I can toggle the switches on and off repeatedly ( with and without load).
But when I connect the board via Ethernet and toggle the switch, that has a light bulb attached to it, I can only toggle it once and if I try a second time, the NIC seems to crash or become unresponsive. After that I can only look at UART output of the Board, but this does not show anything helpful either, except a message from ESPHome, that it will reboot, because it cannot reach Home Assistant anymore. Yet I can toggle the second switch with no load attached to it a thousand times without triggering this behaviour.
The board is described here:
- manual: ESP32-EVB/DOCS/ESP32-EVB-user-manual.pdf at 2e299f40f5114a3add74c942eb15b471417edff2 · OLIMEX/ESP32-EVB · GitHub
- wiring: ESP32-EVB/HARDWARE/REV-K1/ESP32-EVB_Rev_K1.pdf at 2e299f40f5114a3add74c942eb15b471417edff2 · OLIMEX/ESP32-EVB · GitHub
And the yaml I use looks like this:
esphome:
name: solarsteuerung
friendly_name: Solarsteuerung
esp32:
board: esp32-evb
flash_size: 4MB
framework:
type: esp-idf
# Enable logging
logger:
level: VERY_VERBOSE
# Enable Home Assistant API
api:
encryption:
key: "XXX"
ota:
- platform: esphome
password: "YYY"
wifi:
ssid: "mywifi"
password: "ZZZ"
#ethernet:
# type: LAN8720
# mdc_pin: GPIO23
# mdio_pin: GPIO18
# clk_mode: GPIO0_IN
# phy_addr: 0
one_wire:
- platform: gpio
pin: 16
sensor:
- platform: dallas_temp
address: 0x450623b23acfbb28
name: "Solarsteuerung Puffertemperatur"
update_interval: 20s
icon: "mdi:thermometer"
on_value:
then:
- lambda: !lambda |-
if ((x >= id(solarsteuerung_temperaturschwelle_ein).state) &&
id(solarsteuerung_automatikbetrieb).state == 1.0 &&
!id(solarsteuerung_schalter_1).state) {
id(solarsteuerung_schalter_1).turn_on();
ESP_LOGI("main", "Puffertemperatur groesser als Einschaltwert, schalte Ein");
} else if ((x <= id(solarsteuerung_temperaturschwelle_aus).state) &&
id(solarsteuerung_automatikbetrieb).state == 1.0 &&
id(solarsteuerung_schalter_1).state) {
id(solarsteuerung_schalter_1).turn_off();
ESP_LOGI("main", "Puffertemperatur kleiner als Ausschaltwert, schalte Aus");
}
number:
- platform: template
name: "Solarsteuerung Temperaturschwelle EIN"
id: solarsteuerung_temperaturschwelle_ein
optimistic: true
icon: "mdi:thermometer"
initial_value: 100
min_value: 0
max_value: 200
step: 5
restore_value: true
on_value:
then:
- lambda: !lambda |-
if ( x < (id(solarsteuerung_temperaturschwelle_aus).state)) {
auto call = id(solarsteuerung_temperaturschwelle_aus).make_call();
call.set_value(id(solarsteuerung_temperaturschwelle_ein).state - 20);
call.perform();
ESP_LOGI("main", "Einschaltwert kleiner als Ausschaltwert, verringere Ausschaltwert auf: %f", id(solarsteuerung_temperaturschwelle_aus).state);
}
- platform: template
name: "Solarsteuerung Temperaturschwelle AUS"
id: solarsteuerung_temperaturschwelle_aus
optimistic: true
icon: "mdi:thermometer"
initial_value: 60
min_value: 0
max_value: 200
step: 5
restore_value: true
on_value:
then:
- lambda: !lambda |-
if ( x > (id(solarsteuerung_temperaturschwelle_ein).state)) {
auto call = id(solarsteuerung_temperaturschwelle_ein).make_call();
call.set_value(id(solarsteuerung_temperaturschwelle_aus).state + 20);
call.perform();
ESP_LOGI("main", "Ausschaltwert groesser als Einschaltwert, erhoehe Einschaltwert auf: %f", id(solarsteuerung_temperaturschwelle_ein).state);
}
switch:
- platform: restart
name: "Neustart"
id: solarsteuerung_neustart
- platform: gpio
name: "Solarsteuerung Schalter 1"
id: solarsteuerung_schalter_1
pin: 32
- platform: gpio
name: "Solarsteuerung Schalter 2"
id: solarsteuerung_schalter_2
pin: 33
- platform: template
name: "Automatikbetrieb AN/AUS"
id: solarsteuerung_automatikbetrieb
optimistic: true
icon: "mdi:cog-play-outline"
restore_mode: RESTORE_DEFAULT_ON
select:
- platform: logger
name: "Logger select"
Although there are some lambdas in this yaml, I used only the switches for testing. The ethernet section is straight from the wiki and seems to line up with the wiring diagram.
Once the Olimex becomes “not available” from Home Assistants point of view, I can see the following logs via UART:
[E][api:129]: No client connected to API. Rebooting...
[I][app:125]: Forcing a reboot...
[I][ethernet:604]: Powering down ethernet PHYets Jul 29 2019 12:21:46
...
[C][ethernet:041]: Setting up Ethernet...
[D][esp-idf:000]: E (1141) eth_phy_802_3: esp_eth_phy_802_3_pwrctl(250): power up timeout
[D][esp-idf:000]: E (1141) eth_phy_802_3: esp_eth_phy_802_3_basic_phy_init(433): power control failed
[D][esp-idf:000]: E (1142) lan87xx: lan87xx_init(341): failed to init PHY
[D][esp-idf:000]: E (1142) esp_eth: esp_eth_driver_install(229): init phy failed
[E][ethernet:204]: ETH driver install error: (-1) ESP_FAIL
[E][component:119]: Component ethernet was marked as failed.
[E][component:164]: Component ethernet set Error flag: unspecified
I would appreciate any help, I asked over at discord, where we discussed the possibility of a faulty power supply, tbh. I would rule it out, because switching works very well in wifi mode. Is there any way to get more information or insights? Even Very Verbose Logging mode does not seem to give a clue, why the NIC becomes unreachable for ESPHome.
Thanks,