esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Error binary size: at Athom presense sensors #5842

Closed MarkuBu closed 3 months ago

MarkuBu commented 3 months ago

The problem

I have several Athom presense sensors. Since the update to ESPHome 2024.5.1 or .2 I can't update the firmware. Latest installed version is 2024.5.0

Maybe I missed .1, so I'm not sure if .1 or .2 caused the issue at first

Which version of ESPHome has the issue?

2024.5.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.5.4

What platform are you using?

ESP8266

Board

Athom presense sensor PS01

Component causing the issue

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

INFO ESPHome 2024.5.2
INFO Reading configuration /config/esphome/athom-presence-sensor-f9a20d.yaml...
INFO Detected timezone 'Europe/Oslo'
INFO Generating C++ source...
INFO Compiling app...
Processing athom-presence-sensor-f9a20d (board: esp8285; framework: arduino; platform: platformio/espressif8266@4.2.1)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- Wire @ 1.0
|-- ArduinoJson @ 6.18.5
RAM:   [=====     ]  49.1% (used 40240 bytes from 81920 bytes)
Flash: [======    ]  59.4% (used 608089 bytes from 1023984 bytes)
========================= [SUCCESS] Took 5.94 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.178.68
INFO Uploading /data/build/athom-presence-sensor-f9a20d/.pioenvs/athom-presence-sensor-f9a20d/firmware.bin (612240 bytes)
INFO Compressed to 414758 bytes
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)

Additional information

No response

whateverthatis commented 3 months ago

I have the same issue...

mshrem commented 3 months ago

Same issue here

seiferrtalle commented 3 months ago

Same issue here. Does anyone have a workaround/solution? Thanx! BR, Ralf

bdleung commented 3 months ago

Same issue here. Does anyone have a workaround/solution? Thanx! BR, Ralf

A workaround is to flash via direct-connected USB port. A pain, but better than nothing.

When I asked athom last week the size of the flash, they reported 2M - however as we're all finding it's detecting as 1M so the OTA method is failing as there's not enough space to store the update when flashing OTA.

The size increased with 5.0 so OTA upgrades have been failing ever since (ie. from 5.0 to 5.1, 5.0 to 5.2 and now 5.0 to 5.3). I can confirm 5.2->5.3 OTA also failing so just about to grab my ladder again :)

whateverthatis commented 3 months ago

The workaround I did is that I took the original .yaml form Athom's GitHub page and took out the webserver component and it did flash OTA and works as good as ever. I never used the webserver anyway as I'm using it through Home Assistant.

Here is my code:

`esphome: name: "presence-sensor" friendly_name: "Presence Sensor"

esp8266: board: esp8285 restore_from_flash: true

preferences: flash_write_interval: 1min

logger:

api: encryption: key: "whoknows?"

ota: password: "whoknows?"

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

captive_portal:

light:

i2c: sda: GPIO4 scl: GPIO5 scan: true

uart: tx_pin: GPIO15 rx_pin: GPIO13 baud_rate: 115200

binary_sensor:

sensor:

switch:

number:

button:

text_sensor:

time:

MarkuBu commented 3 months ago

Thanks for the work around. I forked the repo, removed the web server config and changed the link in the config yaml to the new repo

https://github.com/MarkuBu/athom-configs/blob/main/athom-presence-sensor.yaml

substitutions:
  name: athom-presence-sensor-xxxx
  friendly_name: Presence
packages:
  Athom_Technology.Presence_Sensor: github://MarkuBu/athom-configs/athom-presence-sensor.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Since this is just a work around and not a solution I leave this issue open

seiferrtalle commented 3 months ago

Thanx at all for working on workarounds!!! 👍🏻

bdleung commented 3 months ago

I was able to OTA from 5.3->5.4

seiferrtalle commented 3 months ago

Mee too. Needed some retries and restarts of the devices, but finally worked: OTA -> 5.4

ssieb commented 3 months ago

The size increase was fixed in 5.4.

MarkuBu commented 3 months ago

Great, thanks. But I think I will continue without the Webserver. I just don't need it.