I have all my switches connected so that they are all directly on mains supply, not via capacitor. Powering module via capacitor can cause problems. But, yes, i know… it’s not always possible to add another wire - in this using bigger capacitor could help perhaps (bigger capacitance).
That was exactly the error I was getting. Once I move the device to a different physical AP, it stopped happening. YMMV.
One thing you all can try is to activate the safe mode before running the update. This is easy as pressing a button once configured.
From my ~100 esphome devices I only experience such problems with the few ones that also work as ble receivers/proxies. It’s probably caused by the shared antenna (wifi and bluetooth can’t use it at the same time but technically they use it in alternating fashion) which in that case is able to somewhat break the upload over wifi.
If the safe mode is activated no components/scripts/etc. will be loaded but just the bare essentials - it should then always work to do a ota update (when a sufficient wifi signal is present )
you probably won’t believe me but I was trying to get some more enabling VERY_VERBOSE
but 40 installs later, and no issues. I had a few(2 or 3) errors, but at least the be devices always recovered from it. which is good enough as I don’t need physical access to fix it.
I will test some more but is looks really strange to me.
If I have the issue again, I will check some advanced network settings, add another AP and if needed purchase your suggestion. but for now suddenly all seems to work fine without any isseus.
good one,
but then I should’t forget to click this button.
And if I understand this correct
safe_mode will be enabled by default once OTA starts.
In that case you also should take care that you have the power_save_mode:
set to HIGH
(that’s the default for tasmota but not for esphome!) in case it’s a esp82xx
That’s because the moment the device is doing a ota update it is having a power peak.
Also If at the same time relays are toggled on (also drawing power) it can be easily that the internal PSU isn’t able to provide the power need for a longer period (for the whole time of the update for example) .
And that should really never happen and is definitely a bug.
I had this maybe two times in many years and probably thousand of ota updates for my now roughly 100 esphome devices
I actually assumed power_save_mode
would be disabled because of save safe_mode
.
but if this is not the case an automation like this would help I guess
ota:
password: !secret ota_password
on_begin:
- lambda: id(wifiId).set_power_save_mode(esphome::wifi::WIFI_POWER_SAVE_NONE);
after ota a reboot applies, and power_safe_mode is back to high
btw, I’m not using any buttons while updating, so drawing too much power is what I would think, but then I can’t be the only one having those issues.
true,
that’s why tasmota on the same device on idle uses ~0.4W of power and ESPHome ~1W
And I’m in Europe, so with the current prices and 30 devices and growing, this option isn’t optional for mee actually
I still have to dive in to the network part,
but I notices one thing,
whenever a device gets unresponsive after an upload fail it’s always an esp8285, I never have this with my one esp8266 device. In the past I had an esp32 running ESPHome, also with that one, I never had those issues.
I actually found something while using logger level: VERY_VERBOSE
the logs stops on a percentage like OTA in progress: 71.6%
but as soon as I try to load the site on another tab it logs 2 additial lines.
19:52:11 [D] [ota:312] OTA in progress: 70.5%
19:52:26 [D] [ota:312] OTA in progress: 70.8%
19:53:19 [D] [ota:312] OTA in progress: 71.6%
19:56:55 [V] [json:031] Attempting to allocate 512 bytes for JSON serialization
19:56:59 [V] [json:051] Size after shrink 64 bytes
19:57:20 [V] [json:031] Attempting to allocate 512 bytes for JSON serialization
19:57:21 [V] [json:051] Size after shrink 64 bytes
19:57:57 [V] [json:031] Attempting to allocate 512 bytes for JSON serialization
19:58:01 [V] [json:051] Size after shrink 64 bytes
could it be that there just isn’t enough RAM left? or does this mean anything to anyone?