Open truglodite opened 2 years ago
I do believe I have a similar problem. With the newest ESPhome 2021.10.1, my home assistant crashes/stalls when I. try to compile and update med ESPhome devices. I have 10 esp8266 devices. I have tried to both update wirelessly, and compile to download for manual flashing. I have tried to wait it out. No change after 10-15 minutes.
One example of a log (I am aware that I should change device naming, but I do not think this is the problem):
INFO Reading configuration /config/esphome/stue_rf_bridge_1.yaml...
WARNING 'stue_rf_bridge_1': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
INFO Compiling app...
Processing stue_rf_bridge_1 (board: esp8285; framework: arduino; platform: platformio/espressif8266 @ 2.6.2)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20704.0 (2.7.4)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
| |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.3.0
| |-- <ESPAsyncTCP-esphome> 1.2.3
| | |-- <ESP8266WiFi> 1.0
| |-- <Hash> 1.0
| |-- <ESP8266WiFi> 1.0
| |-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266WiFi> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
| |-- <ESP8266WiFi> 1.0
|-- <noise-c> 0.1.3
| |-- <libsodium> 1.10018.1
|-- <DNSServer> 1.1.1
| |-- <ESP8266WiFi> 1.0
Compiling /data/stue_rf_bridge_1/.pioenvs/stue_rf_bridge_1/src/esphome/components/api/api_connection.cpp.o
Compiling /data/stue_rf_bridge_1/.pioenvs/stue_rf_bridge_1/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/stue_rf_bridge_1/.pioenvs/stue_rf_bridge_1/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/stue_rf_bridge_1/.pioenvs/stue_rf_bridge_1/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/stue_rf_bridge_1/.pioenvs/stue_rf_bridge_1/src/esphome/components/api/api_server.cpp.o
version | core-2021.10.6 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.7 |
os_name | Linux |
os_version | 5.10.17-v8 |
arch | aarch64 |
timezone | Europe/Copenhagen |
Just tried with 2021.10.2... still not working.
Same here. No change with 2021.10.2. Tried new install of ESPhome. No change either.
Hello, same problem for me. No solution for the moment. Is it possible to downgrade ESPhome to correct the problem? thanks
@Xray35 I tried, but couldn’t get the backup to work.
The new 2021.10.3 does not change anything either. I installed it, and tried to compile and upload new firmware to one of my devices. Stalled at the same exact point as in the example above, and crashed Home Assistant. Had to pull the power cord to get it back up. Will this be solved? I am very interested to supply more information if necessary. Right now I cannot update the firmware on any of my devices and I cannot add new devices. What are my options?
After stopping all other add-ons, I am able to compile and upload formware.
After stopping all other add-ons, I am able to compile and upload formware.
This sounds like it may have been caused by low memory; I see your post above shows it was a pi4, but how much ram? I had similar problems with HA crashing when compiling with a pi3b+, and going to a pi4 4GB I have never seen that happen.
Just wanted to ask if any of the devs have had a chance to look at this? I tried 2021.10.3 and still have the problem.
I suspect the issue may be related to the way I'm using strings in the code... probably not the most efficient. Would maybe upgrading that device to esp32 fix this? Better yet, maybe another way my code can be rewritten to function the same and also compile?
After stopping all other add-ons, I am able to compile and upload formware.
This sounds like it may have been caused by low memory; I see your post above shows it was a pi4, but how much ram? I had similar problems with HA crashing when compiling with a pi3b+, and going to a pi4 4GB I have never seen that happen.
Yes. That’s also the conclusion I’ve come to. I’m eagerly waiting for the HA Amber.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I can verify that it is a problem. It's caused by this line in the linker script:
MEMORY
{
iram1_0_seg : org = 0x40100000, len = 0x8000
}
I don't know why it's this size. I made it bigger and it compiled. The memory use line went up to:
RAM: [===== ] 49.3% (used 40416 bytes from 81920 bytes)
(It was around 39000 when I reduced the config enough to compile with the original setting.) I haven't verified that it will actually run on the device yet. I also don't know if that changed at some point or if the static memory use of components has increased.
I have the same issue flashing a Gosund SP01 (ESP8266) with ESPHome 2022.3.2:
INFO Reading configuration /config/esphome/esphome-web-2252df.yaml...
INFO Detected timezone 'Europe/Stockholm'
INFO Generating C++ source...
INFO Core config or version changed, cleaning build files...
INFO Deleting /data/power-01/.pioenvs
INFO Compiling app...
Processing power-01 (board: esp8285; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
| |-- <ESPAsyncTCP-esphome> 1.2.3
| |-- <Hash> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|-- <ArduinoJson> 6.18.5
Compiling /data/power-01/.pioenvs/power-01/src/esphome/components/api/api_connection.cpp.o
Compiling /data/power-01/.pioenvs/power-01/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/power-01/.pioenvs/power-01/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/power-01/.pioenvs/power-01/src/esphome/components/api/api_pb2_service.cpp.o
version | core-2022.3.8 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.9 |
os_name | Linux |
os_version | 5.10.92-v8 |
arch | aarch64 |
timezone | UTC |
I use a Raspberry Pi 3. Is there any workaround?
Raspberry Pi 3 B+
INFO Reading configuration /config/esphome/asdf-90.yaml... WARNING GPIO0 is a Strapping PIN and should be avoided. Attaching external pullup/down resistors to strapping pins can cause unexpected failures. See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins INFO Generating C++ source... INFO Compiling app... Processing asdf-90 (board: esp32cam; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf Dependency Graph |--
1.2.2 |-- 1.0 |-- 1.0 |-- 1.0 |-- 2.1.0 | |-- 1.2.2 |-- 1.1.0 |-- 1.0 Linking /data/asdf-90/.pioenvs/asdf-90/firmware.elf collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. *** [/data/asdf-90/.pioenvs/asdf-90/firmware.elf] Error 1 ========================= [FAILED] Took 15.65 seconds =========================
For all those posting about compiling crashing or not completing, this issue is not about that. That's a problem with using a too small device to compile with (usually a pi3).
This issue is about the section
.text1' will not fit in region iram1_0_seg'
error.
The problem
I just updated a bunch of my devices from esphome 2021.9.x to 10.1, and one of them is giving me compile errors. The device with the same yaml worked fine before the update. I tried removing some features I didn't really need on it, like the hotspot and encryption, but the same error keeps recurring no matter what I try.
Which version of ESPHome has the issue?
2021.10.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2021.10.6
What platform are you using?
ESP8266
Board
Wemos D1
Component causing the issue
Not apparent
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
My complete yaml is pasted above. The device has like I said worked before the latest esphome update, for years in fact.