I’d think this signal level is OK for ESP8266? And if so what may cause these errors?
INFO ESPHome 2025.5.0
[16:46:26][I][app:100]: ESPHome version 2025.4.2 compiled on May 21 2025, 12:02:49
[16:46:26][C][wifi:600]: WiFi:
[16:46:26][C][wifi:443]: Signal strength: -72 dB ▂▄▆█
[16:46:26][C][wifi:447]: Channel: 6
[16:46:26][C][wifi:448]: Subnet: 255.255.255.0
[16:46:26][C][logger:178]: Max Level: DEBUG
[16:46:26][C][logger:179]: Initial Level: DEBUG
[16:46:26][C][logger:181]: Log Baud Rate: 115200
[16:46:26][C][logger:182]: Hardware UART: UART0
[16:46:26][C][switch.gpio:068]: GPIO Switch 'GH relay'
[16:46:26][C][switch.gpio:076]: Inverted: YES
[16:46:26][C][switch.gpio:090]: Restore Mode: always OFF
[16:46:26][C][switch.gpio:031]: Pin: GPIO0
[16:46:26][C][captive_portal:089]: Captive Portal:
[16:46:26][C][mdns:116]: mDNS:
[16:46:26][C][mdns:117]: Hostname: gh-relay
[16:46:26][C][esphome.ota:073]: Over-The-Air updates:
[16:46:26][C][esphome.ota:074]: Address: gh-relay.local:8266
[16:46:26][C][esphome.ota:075]: Version: 2
[16:46:26][C][esphome.ota:078]: Password configured
[16:46:26][C][safe_mode:018]: Safe Mode:
[16:46:26][C][safe_mode:019]: Boot considered successful after 60 seconds
[16:46:26][C][safe_mode:021]: Invoke after 10 boot attempts
[16:46:26][C][safe_mode:022]: Remain in safe mode for 300 seconds
[16:46:26][C][api:140]: API Server:
[16:46:26][C][api:141]: Address: gh-relay.local:6053
[16:46:26][C][api:143]: Using noise encryption: YES
[16:46:26][C][wifi_signal.sensor:010]: WiFi Signal 'WiFi Signal'
[16:46:26][C][wifi_signal.sensor:010]: Device Class: 'signal_strength'
[16:46:26][C][wifi_signal.sensor:010]: State Class: 'measurement'
[16:46:26][C][wifi_signal.sensor:010]: Unit of Measurement: 'dBm'
[16:46:26][C][wifi_signal.sensor:010]: Accuracy Decimals: 0
[16:46:26][C][wifi_signal.sensor:010]: Icon: 'mdi:wifi'
[16:47:25][D][sensor:093]: 'WiFi Signal': Sending state -70.00000 dBm with 0 decimals of accuracy
INFO Processing unexpected disconnect from ESPHome API for gh-relay @ xxx.107.240
WARNING Disconnected from API
INFO Successfully connected to gh-relay @ xxx.107.240 in 0.005s
WARNING Can't connect to ESPHome API for gh-relay @ xxx.107.240: Timeout waiting for HelloResponse, ConnectResponse after 30.0s (TimeoutAPIError)
INFO Trying to connect to gh-relay @ xxx.107.240 in the background
WARNING gh-relay @ xxx.107.240: Connection error occurred: gh-relay @ xxx.107.240: Connection lost
INFO Successfully connected to gh-relay @ xxx.107.240 in 0.007s
INFO Successful handshake with gh-relay @ xxx.107.240 in 7.536s
[16:54:55][D][sensor:093]: 'WiFi Signal': Sending state -70.26667 dBm with 0 decimals of accuracy
I would say that is not a great signal. It is marginal at best. I have one device with slightly worse signal level and it connects and disconnects regularly, but still works.
Remember that the WiFi signal strength you see is the one from the AP to the ESP device.
For WiFi to work the ESP device also need to have a working signal from the ESP device to the AP. For this to work the ESP needs a good signal way and your signal strength is already not the best the other way.
The signal can be improved with a better antenna on the ESP device, but that might require the device to be replaced.
There are ESP devices with external antenna connectors for optimal signal.
This happening frequently. I’m watching wifi signal strengths. But open to consider othe possibilities
[16:47:25][D][sensor:093]: 'WiFi Signal': Sending state -70.00000 dBm with 0 decimals of accuracy
INFO Processing unexpected disconnect from ESPHome API for gh-relay @ xxx.107.240
WARNING Disconnected from API
INFO Successfully connected to gh-relay @ xxx.107.240 in 0.005s
WARNING Can't connect to ESPHome API for gh-relay @ xxx.107.240: Timeout waiting for HelloResponse, ConnectResponse after 30.0s (TimeoutAPIError)
INFO Trying to connect to gh-relay @ xxx.107.240 in the background
WARNING gh-relay @ xxx.107.240: Connection error occurred: gh-relay @ xxx.107.240: Connection lost
INFO Successfully connected to gh-relay @ xxx.107.240 in 0.007s
INFO Successful handshake with gh-relay @ xxx.107.240 in 7.536s
[16:54:55][D][sensor:093]: 'WiFi Signal': Sending state -70.26667 dBm with 0 decimals of accuracy
I have similar problem, I think, with this sprinkle relay @ xxx.xxx.xxx.205 MAC …9e:99. Wifi signal -48 dB.
In the log it says Connection error.
Also this relay is not in use in any automation. But you can see something attempted to turn it off? Time stamps in System and Device logs are matching.
It looks like it was something externally from HA that turned it off or it did it by itself.
Maybe it crashed or reseted itself and then it is set to startup in the off state.
It is me only have access to HA.
more from the device log. It’s frequent occurrence.
Some times there is a breack for an hour or a few and then the error comes back.
11:15:39 AM - 4 hours ago
became unavailable
11:14:57 AM - 4 hours ago
turned off
11:08:02 AM - 4 hours ago
became unavailable
11:07:53 AM - 4 hours ago
turned off
10:55:52 AM - 4 hours ago
became unavailable
10:55:42 AM - 4 hours ago
turned off
10:51:38 AM - 4 hours ago
became unavailable
10:51:29 AM - 4 hours ago
turned off
Just to mention I have 4 esp8266 based relays. 3 of these have perfect wifi signal. One is marginal. All 4 report frequent disconnect. All have the same YAML. Of course identity are different.
I like you theory.
But where I can look to see if that is ESP crash, EMI or they are wrongly configured in HA?
Not sure. I use MQTT (because I have built infrastructure around it for a decade and a half) it is very reliable. Tasmota keeps track of disconnects. I haven’t yet found the esphome equivalent way of doing this. I do keep track of up uptime and reset reason and that tells part of the picture.
If I have a problematic node I connect it to a PC running a terminal emulator that logs all the output from the serial port. With the right logging level that gives a clue to the real problem.
I stopped using esphome on one of my nodes because it would reset too frequently. I never did figure out why. I switched to Tasmota and the problem went away. I am working on an esphome replacement that will hopefully work better. I have another node that did have questionable Wi-Fi, but I put an AP closer and it still restarts sometimes (days to weeks of good uptime, so acceptable for now).
Sprinkler valves generate a lot of electromagnetic noise when they switch.
I had the same issue. ESP rebooting whenever I operated my irrigation valves. I tried all sorts of RC snubbers and ferrite cores to suppress the noise but in the end realised it was radiated not conducted noise. The only way I solved it was to switch to a different valve with a soft open / close.
@ Neel-M. Thank you. I may try to start logging over serial in hope to find if ESP is crashing.
@ Tom-I. Yes I understand EMI generated by coils in the solenoid valves or relays. But I have multiple ESP8266 some just seating power to ESP, clean 5V and they would became unavailable very frequently. Here is an example I posted before. This Sprinkle relay isolated, idle, nothing connected, no automatons, no power to the coils. Strong WIFI signal.
11:15:39 AM - 4 hours ago
became unavailable
11:14:57 AM - 4 hours ago
turned off
11:08:02 AM - 4 hours ago
became unavailable
11:07:53 AM - 4 hours ago
turned off
10:55:52 AM - 4 hours ago
became unavailable
10:55:42 AM - 4 hours ago
turned off
10:51:38 AM - 4 hours ago
became unavailable
10:51:29 AM - 4 hours ago
turned off
Yes, You are correct. I started to see disconnects on this gh-relay. And Assumed it’s WIFI signal. Then I expended the sampling to total of four devices. One of these is the Sprinkle relay I mentioned in this post yesterday. ( the thread is getting longer and it’s easy to overlook)
It is TP link Archer A7 v5 running DD-WRT. Here is the list of the clients, qty. 10. And while getting the screenshot, I saw the Sprinkle relay mac 9e:95 reconnected. I may need to put it on bench and get logs from serial interface.