Reboot if not connected on boot-up

Hi there all :slight_smile:

I have installed an wt32-eth01 for controlling my chicken-door.
It is installed on an ethernet switch which connects 3 cameras to the single ethernet cable. And electrically on 1 electric line. The all thing is installed in a shelter 50m outside. The Ethernet signal is a bit weak (probably the cable has been too stretched when pulled into the sheath).

Sometimes, something go wrong (either the ESP32 or a camera) and i need to reboot. But if i shutdown remotely via the circuit breaker, on reconnect, the switch need about 30 seconds to start, but the ESP32 boots in 1 second… So, the network is unavailable while the switch starts, and the ESP leaves disconnected, forever. (the LED on the switch is OFF) I need to go outside, and electrically disconnect then reconnect only the ESP and it connects instantly.

I have tried other switches, but they dont sync the network…

So I would like to make an automation to check the network, 30-60 seconds after the boot, and if not connected, reboot.

I have seen “on_boot”, “wait_until”, “delay”, “api.connection” in the documentation but I’m unable to find how to code this simple check in yaml…

Could someone help me ?

NB: I’m french, so sorry if there are grammatical mistakes, I have google-trad some words that i was unable to find… :smiley:

You could set the api reboot_timeout to a lower value (60s etc).

Thank you, i have set this, and I will test tomorrow.