Skip to content

Conversation

@oarcher
Copy link
Contributor

@oarcher oarcher commented May 11, 2024

PR splitted

This PR has been splitted into smaller PRs for easyest review/merge.
This is the complete PR that testers should use.

Review/merge order:
#9801 Network components changes
#9836 Modem component without implementation
#9807 base implementation of the modem component
#6721 modem sensors component (This PR)
#7147 optional, Wifi AP that use the modem connection

What does this implement/fix?

This implement pppos tcp/ip for esp32, on lte/4G networks. It conflict with ethernet component, but can be used with Wifi AP with #7147

The modem component also expose GNSS/GPS location as sensors. Here is a blueprint to set up a device tracker in home assistant:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

See:

You can join me on this discord thread

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable):
fixes esphome/feature-requests#2303
fixes esphome/feature-requests#477
fixes esphome/feature-requests#1379
fixes esphome/feature-requests#1810

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#4056

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# While not merged, this PR is also available as an external component
external_components:
    - source: github://pr#6721
      components: [ network, modem ]  # also add 'watchdog' if not found
      refresh: 10min
   # To create a Wifi AP that will use the modem connection
   # - source: github://pr#7147
   #    components: [ wifi ]


modem:
  id: atmodem
  rx_pin: 26
  tx_pin: 27
  model: SIM7600  # or SIM7670 BG96 SIM7000 SIM800 GENERIC
  apn: orange
  pin_code: "0000"
  enable_cmux: True
  # we can send initial AT commands at setup
  init_at:
    - AT+GMM  # model

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

Implementation notes

The modem component use esp_modem from espressif, using simple_cmux_client example, and inspired from esphome ethernet component.

Eshome uart component not used

  • esp_modem need to create and to handle the uart event queue
    This conflict with

    err = uart_driver_install(this->uart_num_, /* UART RX ring buffer size. */ this->rx_buffer_size_,
    /* UART TX ring buffer size. If set to zero, driver will not use TX buffer, TX function will
    block task until all data have been sent out.*/
    0,
    /* UART event queue size/depth. */ 20, &(this->uart_event_queue_),
    /* Flags used to allocate the interrupt. */ 0);

  • the create_uart_dte is a private function in esp_modem. To much code need to be copied and modified.

@probot-esphome
Copy link

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (network) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@probot-esphome
Copy link

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (ota) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.27%. Comparing base (1c50c2b) to head (bf4f650).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6721   +/-   ##
=======================================
  Coverage   73.27%   73.27%           
=======================================
  Files          53       53           
  Lines       11263    11263           
  Branches     1532     1532           
=======================================
  Hits         8253     8253           
  Misses       2612     2612           
  Partials      398      398           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oarcher
Copy link
Contributor Author

oarcher commented May 11, 2024

oups, initial bad branch push, ota is not involved in this PR.

This is a currently a draft PR, it needs more works.

It is currently tested and developed on Lilygo T-SIM7600E.

It use esp-modem, so it's esp-idf only. Supported modem are SIM800, BG96, SIM7600.

I've been able to use mqtt and http_request.ota.
It doesn't works with wireguard while trombik/esp_wireguard#39 is open.

There is some modem initialisation that need to be fixed. For now, it's better to start the device from a cold state (with no power).

The PPPos data communication is done in CMUX mode, so it should be possible to send other AT command (gnss, gps, etc...) using the command channel (TODO).

And I'm sot sure that gsm is a good name for the component. perhaps cellular as a platform component, and

pppos:
  platform: cellular
  ...
  
 gps:
   platform: cellular

@oarcher oarcher changed the title [gsm] ppos tcp/ip for modem (esp-idf only) [gsm] pppos tcp/ip for uart modem (esp-idf only) May 12, 2024
@ShonP40
Copy link

ShonP40 commented Oct 5, 2025

Did anyone here have any luck with this?

modem:
  use_address: <IP>

I'm just getting an error when trying to use it

ERROR All specified devices: ['OTA'] could not be resolved.
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/esphome/esphome/__main__.py", line 1269, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 1256, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 673, in command_logs
    return show_logs(config, args, devices)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 554, in show_logs
    port = devices[0]
           ~~~~~~~^^^
IndexError: list index out of range

@oarcher
Copy link
Contributor Author

oarcher commented Oct 6, 2025

For use_address, this might be a bug on the modem side, as I've never tested this before. I will take a look.

For the gps boot, the modem component use AT+CGPS (for AT7600 modem, other modems use a different command set) command set for enable/disable gps.

Let me know if using manually AT+CGPS=0and AT+CGPS=1 using [modem.send_at](https://deploy-preview-4056--esphome.netlify.app/components/modem#modem-send-at-action) suppress your weird booting sequence.

for `"(It shows [modem.nmea_uart:291] Invalid GNSS data in the log, but the satellites number didn't reset)", I will also fix that on the modem side: If GNSS invalid data is found (ie no fix/data), the nmea frame is not sent to the gps component, so the gps use the last known state. On invalid data, the modem should send an empty NMEA frame, so the gps component know that the gps is not fixed.

@ShonP40
Copy link

ShonP40 commented Oct 8, 2025

Let me know if using manually AT+CGPS=0and AT+CGPS=1 using [modem.send_at](https://deploy-preview-4056--esphome.netlify.app/components/modem#modem-send-at-action) suppress your weird booting sequence.

If that's the same as the GNSS toggle, its not going to work.
It does let me disable GNSS, but it just never re-enables until a reboot (says that its enabling it in the log, but the switch just returns to the off position and nothing happens even if I wait a few minutes).

switch:
  - platform: modem
    gnss:
      name: "${friendly_name} GNSS"
      restore_mode: ALWAYS_ON

I managed to create an automation that detects when GPS fails & auto reboots tho, which does get it working again.

@ShonP40
Copy link

ShonP40 commented Oct 10, 2025

Been running great for the last few days

0 GPS disconnections and 0 crashes

image

@martivo
Copy link

martivo commented Nov 11, 2025

This is great work!
I got the LILYGO TTGO T-A7670E board working successfully with this PR.
Is wifi expected to work in parallel/at the same time? I dont mean AP mode. I had to comment out the wifi: block to make it work.

I also had to set enable_cmux: false to make it work. Is this modem related or something that should work?

I used wireguard and mqtt successfully with the modem.

external_components:
    - source: github://pr#6721
      components: [ network, modem ]  # also add 'watchdog' if not found
      refresh: 1h
      
modem:
  id: gsm_modem
  #setup_priority: -100
  # UART pins for A7670E on T-SIM board
  rx_pin: GPIO27
  tx_pin: GPIO26
  baud_rate: 115200
  
  # Power control pins
  power_pin:
    number: GPIO4
    inverted: true  # PWRKEY is active low
  # Modem model - try GENERIC first, or SIM7600 (similar AT commands)
  model: SIM7670
  # APN
  apn: "REDACTED"
  # SIM PIN code (leave empty if no PIN)
  pin_code: ""
  # Enable modem on boot
  enable_on_boot: true
  # Enable CMUX mode (allows AT commands + data simultaneously)
  enable_cmux: false
  # Reboot timeout if connection fails
  reboot_timeout: 1h
  # Optional: Custom AT commands at initialization
  init_at:
    - AT+CGMM  # Get modem model
  # Event handlers
  on_connect:
    - logger.log: "LTE modem connected!"
  on_disconnect:
    - logger.log: "LTE modem disconnected"
  on_not_responding:
    - logger.log: "Modem not responding - check power/SIM"

@oarcher
Copy link
Contributor Author

oarcher commented Nov 13, 2025

@martivo thanks for testing!

  • no, using wifi STA and modem at the same time is not supported. But I will to log an useful error message at validation stage.
  • For CMUX, it should works, as I've got the same hardware.

I'm not actively developing the component for the moment, but will be back in few month.

@martivo
Copy link

martivo commented Nov 16, 2025

I did some further testing. I hope these logs are useful. I attached full logs, but tried to point out the differences here.
My two main issues at the moment is OTA not working and not able to enable cmux.

With enable_cmux: true the modem connection does not work. And the following logs seem to be related.

[18:36:10][C][modem:140]:   Use CMUX  : Yes
[18:36:28][I][modem:389]: Modem initialized and ready
[18:36:28][W][component:287]: modem set Warning flag: Starting connection
[18:36:28][I][modem_handler:146]: Modem status: Good, attached: Yes, radio function: OK, SIM: READY, type: LTE, ber: nan%, rssi: -93dB ▂▄▆█
[18:36:30][E][modem:411]: Failed to enter PPP. Resetting modem.
[18:36:31][I][modem:480]: Disabling modem
[18:36:34][D][modem:320]: Modem should be OFF in 25.0s...
...
[18:36:59][I][modem:057]: Enabling modem
[18:37:00][D][modem_handler:033]: DTE baud rate: 115200
[18:37:01][D][modem:296]: Modem not responding, powering on...
[18:37:02][D][modem:310]: Modem ON in 14.0s...
[18:37:15][D][esp32.preferences:143]: Writing 1 items: 0 cached, 1 written, 0 failed
[18:37:16][D][modem:339]: Setting baud rate: 0 -> 115200
[18:37:16][D][modem:343]: Modem baud rate set to 115200.
[18:37:16][D][modem_handler:033]: DTE baud rate: 115200
[18:37:16][I][modem:350]: Modem synced at baud rate 115200.
[18:37:16][D][esp32.preferences:143]: Writing 1 items: 0 cached, 1 written, 0 failed
[18:37:16][D][modem:367]: Modem synced
[18:37:17][I][modem_handler:158]: init_at AT+CGMM: A7670E-LNXY-UBL
[18:37:19][D][modem_handler:178]: SIM: READY
[18:37:19][I][modem:389]: Modem initialized and ready
[18:37:19][I][modem_handler:146]: Modem status: Good, attached: Yes, radio function: OK, SIM: READY, type: LTE, ber: nan%, rssi: -89dB ▂▄▆█
[18:37:20][E][modem:411]: Failed to enter PPP. Resetting modem.
[18:37:21][I][modem:480]: Disabling modem

Full log cmux_enabled.txt

When I use wifi + wireguard I am able to do OTA updates to the firmware even when the device is not in my LAN - the wifi connects to a LTE hotspot and establishes vpn. However when I use the modem + wireguard then I always get the following error when trying to use OTA in esphome interface. MQTT and HA integration works both ways. The VPN has to work for MQTT to work, I am also able to open the web_server over the VPN IP with the modem. I am able to work around it by using the firmware upload form in the web_server - but would be nice to be able to use the esphome dashboard itself. It almost seems like the dashboard does not know how to get the Hostname - I have it setup so that the <name>.local resolves to the Wireguard client IP. So if it would simply output the same hostname as with wifi then it might start to work.

I tried both OTA configurations: platform: web_server and platform: esphome but same error:

========================= [SUCCESS] Took 17.94 seconds =========================
INFO Successfully compiled program.
ERROR All specified devices: ['OTA'] could not be resolved.
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/esphome/esphome/__main__.py", line 1269, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 1256, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 700, in command_run
    exit_code, successful_device = upload_program(config, args, devices)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 498, in upload_program
    host = devices[0]
           ~~~~~~~^^^
IndexError: list index out of range

Here is the log when I enable the wifi component. As I understand it is not supposed to work, but maybe the logs could be more clear on it or something. Without the modem configuraiton the wifi works. And I assume wireguard is not started because wifi is not able to start. It would seem the modem itself works.

[18:26:20][W][component:326]: modem cleared Warning flag
[18:26:20][C][modem:518]: Modem connection:
[18:26:20][C][modem:519]:   IP Address  : 10.129.63.69
[18:26:20][C][modem:520]:   Hostname    : 'kotka2'
[18:26:20][C][modem:521]:   Subnet      : 255.255.255.255
[18:26:20][C][modem:522]:   Gateway     : 10.64.64.64
[18:26:20][C][modem:523]:   DNS main    : 91.129.88.33
[18:26:20][C][modem:524]:   DNS backup  : 91.129.88.34
[18:26:20][D][main:305]: LTE modem connected!
[18:26:27][E][wifi:563]: Scan timeout
[18:26:32][D][wifi:507]: Starting scan
[18:26:32][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT
[18:27:00][D][esp32.preferences:143]: Writing 1 items: 1 cached, 0 written, 0 failed
[18:27:02][E][wifi:563]: Scan timeout
[18:27:07][D][wifi:507]: Starting scan
[18:27:07][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT
[18:27:37][E][wifi:563]: Scan timeout
[18:27:42][D][wifi:507]: Starting scan
[18:27:42][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT

Full log wifi_enabled.txt

If you need more logs or extra information about the configuration then let me know. I would like to help as this would make my setups so much easier. No need for a separate LTE router with this.

Normal boot log with wifi and cmux disabled. normal_boot.txt
And here is the conf that works conf.txt

@ShonP40
Copy link

ShonP40 commented Nov 18, 2025

I did some further testing. I hope these logs are useful. I attached full logs, but tried to point out the differences here.

My two main issues at the moment is OTA not working and not able to enable cmux.

With enable_cmux: true the modem connection does not work. And the following logs seem to be related.


[18:36:10][C][modem:140]:   Use CMUX  : Yes

[18:36:28][I][modem:389]: Modem initialized and ready

[18:36:28][W][component:287]: modem set Warning flag: Starting connection

[18:36:28][I][modem_handler:146]: Modem status: Good, attached: Yes, radio function: OK, SIM: READY, type: LTE, ber: nan%, rssi: -93dB ▂▄▆█

[18:36:30][E][modem:411]: Failed to enter PPP. Resetting modem.

[18:36:31][I][modem:480]: Disabling modem

[18:36:34][D][modem:320]: Modem should be OFF in 25.0s...

...

[18:36:59][I][modem:057]: Enabling modem

[18:37:00][D][modem_handler:033]: DTE baud rate: 115200

[18:37:01][D][modem:296]: Modem not responding, powering on...

[18:37:02][D][modem:310]: Modem ON in 14.0s...

[18:37:15][D][esp32.preferences:143]: Writing 1 items: 0 cached, 1 written, 0 failed

[18:37:16][D][modem:339]: Setting baud rate: 0 -> 115200

[18:37:16][D][modem:343]: Modem baud rate set to 115200.

[18:37:16][D][modem_handler:033]: DTE baud rate: 115200

[18:37:16][I][modem:350]: Modem synced at baud rate 115200.

[18:37:16][D][esp32.preferences:143]: Writing 1 items: 0 cached, 1 written, 0 failed

[18:37:16][D][modem:367]: Modem synced

[18:37:17][I][modem_handler:158]: init_at AT+CGMM: A7670E-LNXY-UBL

[18:37:19][D][modem_handler:178]: SIM: READY

[18:37:19][I][modem:389]: Modem initialized and ready

[18:37:19][I][modem_handler:146]: Modem status: Good, attached: Yes, radio function: OK, SIM: READY, type: LTE, ber: nan%, rssi: -89dB ▂▄▆█

[18:37:20][E][modem:411]: Failed to enter PPP. Resetting modem.

[18:37:21][I][modem:480]: Disabling modem

Full log cmux_enabled.txt

When I use wifi + wireguard I am able to do OTA updates to the firmware even when the device is not in my LAN - the wifi connects to a LTE hotspot and establishes vpn. However when I use the modem + wireguard then I always get the following error when trying to use OTA in esphome interface. MQTT and HA integration works both ways. The VPN has to work for MQTT to work, I am also able to open the web_server over the VPN IP with the modem. I am able to work around it by using the firmware upload form in the web_server - but would be nice to be able to use the esphome dashboard itself. It almost seems like the dashboard does not know how to get the Hostname - I have it setup so that the <name>.local resolves to the Wireguard client IP. So if it would simply output the same hostname as with wifi then it might start to work.

I tried both OTA configurations: platform: web_server and platform: esphome but same error:


========================= [SUCCESS] Took 17.94 seconds =========================

INFO Successfully compiled program.

ERROR All specified devices: ['OTA'] could not be resolved.

Traceback (most recent call last):

  File "/usr/local/bin/esphome", line 10, in <module>

    sys.exit(main())

             ^^^^^^

  File "/esphome/esphome/__main__.py", line 1269, in main

    return run_esphome(sys.argv)

           ^^^^^^^^^^^^^^^^^^^^^

  File "/esphome/esphome/__main__.py", line 1256, in run_esphome

    rc = POST_CONFIG_ACTIONS[args.command](args, config)

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/esphome/esphome/__main__.py", line 700, in command_run

    exit_code, successful_device = upload_program(config, args, devices)

                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/esphome/esphome/__main__.py", line 498, in upload_program

    host = devices[0]

           ~~~~~~~^^^

IndexError: list index out of range

Here is the log when I enable the wifi component. As I understand it is not supposed to work, but maybe the logs could be more clear on it or something. Without the modem configuraiton the wifi works. And I assume wireguard is not started because wifi is not able to start. It would seem the modem itself works.


[18:26:20][W][component:326]: modem cleared Warning flag

[18:26:20][C][modem:518]: Modem connection:

[18:26:20][C][modem:519]:   IP Address  : 10.129.63.69

[18:26:20][C][modem:520]:   Hostname    : 'kotka2'

[18:26:20][C][modem:521]:   Subnet      : 255.255.255.255

[18:26:20][C][modem:522]:   Gateway     : 10.64.64.64

[18:26:20][C][modem:523]:   DNS main    : 91.129.88.33

[18:26:20][C][modem:524]:   DNS backup  : 91.129.88.34

[18:26:20][D][main:305]: LTE modem connected!

[18:26:27][E][wifi:563]: Scan timeout

[18:26:32][D][wifi:507]: Starting scan

[18:26:32][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT

[18:27:00][D][esp32.preferences:143]: Writing 1 items: 1 cached, 0 written, 0 failed

[18:27:02][E][wifi:563]: Scan timeout

[18:27:07][D][wifi:507]: Starting scan

[18:27:07][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT

[18:27:37][E][wifi:563]: Scan timeout

[18:27:42][D][wifi:507]: Starting scan

[18:27:42][W][wifi_esp32:244]: esp_wifi_set_mode failed: ESP_ERR_WIFI_NOT_INIT

Full log wifi_enabled.txt

If you need more logs or extra information about the configuration then let me know. I would like to help as this would make my setups so much easier. No need for a separate LTE router with this.

Normal boot log with wifi and cmux disabled. normal_boot.txt

And here is the conf that works conf.txt

The only way to enable OTA updates through the ESPHome dashboard atm is by configuring the WiFi component (just for the AP) and adding use_address: <IP on WireGuard

Take a look at what I did on https://github.com/ShonP40/Car-Assistant

@oarcher
Copy link
Contributor Author

oarcher commented Nov 18, 2025

@martivo , I've bumped esp_modem from 1.4.0 to 1.4.2 . This might fix some bug related to Failed to enter PPP. Resetting modem. but I'm not sure, as it's difficult to reproduce the problem. esp_modem is actively under developpements theses days, so hopefully, some more bugs will be fixed!

For OTA, I haven't made some test for a while, but it should works with http_request platform: OTA can't be used in the legacy or web_server mode, because the modem has a private IP, and can't be reached from the internet unless you use a wiregard VPN as @ShonP40. (I will have to check for the use of use_adress).

@github-actions
Copy link
Contributor

Memory Impact Analysis

Components: modem
Platform: esp32-idf

Metric Target Branch This PR Change
RAM 12,036 bytes 15,644 bytes 📈 🚨 +3,608 bytes (+29.98%)
Flash 225,859 bytes 421,031 bytes 📈 🚨 +195,172 bytes (+86.41%)
📊 Component Memory Breakdown
Component Target Flash PR Flash Change
network_stack 0 bytes 35,587 bytes 📈 +35,587 bytes (0.00%)
mdns_lib 0 bytes 22,586 bytes 📈 +22,586 bytes (0.00%)
ppp_protocol 0 bytes 11,698 bytes 📈 +11,698 bytes (0.00%)
[esphome]modem 0 bytes 10,703 bytes 📈 🔸 +10,703 bytes (0.00%)
libc 51,876 bytes 62,176 bytes 📈 +10,300 bytes (+19.86%)
esp_system 1,823 bytes 10,852 bytes 📈 +9,029 bytes (+495.28%)
cpp_runtime 1,556 bytes 10,546 bytes 📈 +8,990 bytes (+577.76%)
dhcp 0 bytes 5,434 bytes 📈 +5,434 bytes (0.00%)
wifi_config 5,860 bytes 10,346 bytes 📈 +4,486 bytes (+76.55%)
rom_functions 4,203 bytes 8,681 bytes 📈 +4,478 bytes (+106.54%)
gpio_driver 915 bytes 5,173 bytes 📈 +4,258 bytes (+465.36%)
uart_driver 8,003 bytes 11,804 bytes 📈 +3,801 bytes (+47.49%)
app_framework 397 bytes 3,982 bytes 📈 +3,585 bytes (+903.02%)
misc_system 3,883 bytes 6,716 bytes 📈 +2,833 bytes (+72.96%)
memory_mgmt 8,996 bytes 11,331 bytes 📈 +2,335 bytes (+25.96%)
other 1,636 bytes 3,788 bytes 📈 +2,152 bytes (+131.54%)
timer 712 bytes 2,756 bytes 📈 +2,044 bytes (+287.08%)
freertos 14,415 bytes 16,329 bytes 📈 +1,914 bytes (+13.28%)
wifi_phy_pp 227 bytes 1,876 bytes 📈 +1,649 bytes (+726.43%)
[esphome]core 6,458 bytes 7,975 bytes 📈 🚨 +1,517 bytes (+23.49%)
... ... ... (45 more components not shown)
🔍 Symbol-Level Changes (click to expand)

Changed Symbols

Symbol Target Size PR Size Change
setup() 222 bytes 1,761 bytes 📈 +1,539 bytes (+693.24%)
esp_mmu_map 910 bytes 966 bytes 📈 +56 bytes (+6.15%)
esphome::App 176 bytes 232 bytes 📈 +56 bytes (+31.82%)
esp_panic_handler_feed_wdts 118 bytes 154 bytes 📈 +36 bytes (+30.51%)
rtc_init 930 bytes 966 bytes 📈 +36 bytes (+3.87%)
[global constructor for: esphome::Application::register_component_(esphome::Component*)] 148 bytes 182 bytes 📈 +34 bytes (+22.97%)
esp_sha_lock_engine_common 135 bytes 162 bytes 📈 +27 bytes (+20.00%)
periph_module_enable 151 bytes 171 bytes 📈 +20 bytes (+13.25%)
esp_mmu_unmap 249 bytes 269 bytes 📈 +20 bytes (+8.03%)
esp_panic_handler_enable_rtc_wdt 66 bytes 86 bytes 📈 +20 bytes (+30.30%)
esp_mmu_vaddr_to_paddr 169 bytes 189 bytes 📈 +20 bytes (+11.83%)
__func__$18 25 bytes 8 bytes 📉 -17 bytes (-68.00%)
sha_get_engine_state 95 bytes 111 bytes 📈 +16 bytes (+16.84%)
pthread_mutex_unlock 84 bytes 100 bytes 📈 +16 bytes (+19.05%)
multi_heap_get_info 86 bytes 102 bytes 📈 +16 bytes (+18.60%)
esp_panic_handler_disable_timg_wdts 59 bytes 75 bytes 📈 +16 bytes (+27.12%)
_lock_close 55 bytes 71 bytes 📈 +16 bytes (+29.09%)
esp_vfs_register_fs 176 bytes 192 bytes 📈 +16 bytes (+9.09%)
esp_sync_timekeeping_timers 77 bytes 92 bytes 📈 +15 bytes (+19.48%)
__func__$24 32 bytes 18 bytes 📉 -14 bytes (-43.75%)
__func__$22 30 bytes 17 bytes 📉 -13 bytes (-43.33%)
__func__$8 11 bytes 24 bytes 📈 +13 bytes (+118.18%)
__func__$14 18 bytes 31 bytes 📈 +13 bytes (+72.22%)
esp_timer_impl_early_init 192 bytes 204 bytes 📈 +12 bytes (+6.25%)
esp_vfs_register_fs_common 244 bytes 256 bytes 📈 +12 bytes (+4.92%)
__func__$23 22 bytes 10 bytes 📉 -12 bytes (-54.55%)
vQueueDeleteWithCaps 51 bytes 63 bytes 📈 +12 bytes (+23.53%)
print_entry 48 bytes 60 bytes 📈 +12 bytes (+25.00%)
esp_clk_tree_src_get_freq_hz 311 bytes 323 bytes 📈 +12 bytes (+3.86%)
lock_release_generic 95 bytes 107 bytes 📈 +12 bytes (+12.63%)
... ... ... (129 more changed symbols not shown)

New Symbols (top 15)

Symbol Size
mdns_parse_packet 7,571 bytes
_strtod_l 3,278 bytes
tcp_input 3,065 bytes
tcp_receive 2,654 bytes
esphome::modem::ModemNMEAUARTComponent::update() 1,889 bytes
_mdns_service_task 1,636 bytes
vj_compress_tcp 1,628 bytes
ipcp_nakci 1,533 bytes
packet$19 1,460 bytes
vj_uncompress_tcp 1,449 bytes
tcp_output 1,163 bytes
dhcp_recv 1,127 bytes
__gethex 1,093 bytes
ipcp_reqci 1,073 bytes
_mdns_append_answer [$constprop$0] 1,005 bytes
1540 more new symbols... Total: 156,371 bytes

Removed Symbols (top 15)

Symbol Size
_open_r 248 bytes
multi_heap_realloc 106 bytes
fsync 85 bytes
_write_r 83 bytes
_read_r 83 bytes
esp_vfs_lseek 83 bytes
multi_heap_malloc 83 bytes
_fstat_r 80 bytes
multi_heap_aligned_free 68 bytes
malloc 12 bytes
multi_heap_get_allocated_size_impl 12 bytes
cfree 10 bytes
std::type_info::__is_function_p() const 7 bytes

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

@github-actions
Copy link
Contributor

Memory Impact Analysis

Components: modem
Platform: esp32-idf

Metric Target Branch This PR Change
RAM 12,036 bytes 15,732 bytes 📈 🚨 +3,696 bytes (+30.71%)
Flash 225,863 bytes 423,631 bytes 📈 🚨 +197,768 bytes (+87.56%)
📊 Component Memory Breakdown
Component Target Flash PR Flash Change
network_stack 0 bytes 35,598 bytes 📈 +35,598 bytes (0.00%)
mdns_lib 0 bytes 22,586 bytes 📈 +22,586 bytes (0.00%)
ppp_protocol 0 bytes 11,698 bytes 📈 +11,698 bytes (0.00%)
[esphome]modem 0 bytes 10,952 bytes 📈 🔸 +10,952 bytes (0.00%)
libc 51,876 bytes 62,176 bytes 📈 +10,300 bytes (+19.86%)
esp_system 1,823 bytes 10,852 bytes 📈 +9,029 bytes (+495.28%)
cpp_runtime 1,556 bytes 10,546 bytes 📈 +8,990 bytes (+577.76%)
dhcp 0 bytes 5,453 bytes 📈 +5,453 bytes (0.00%)
rom_functions 4,203 bytes 8,693 bytes 📈 +4,490 bytes (+106.83%)
wifi_config 5,860 bytes 10,346 bytes 📈 +4,486 bytes (+76.55%)
app_framework 397 bytes 4,687 bytes 📈 +4,290 bytes (+1080.60%)
gpio_driver 915 bytes 5,173 bytes 📈 +4,258 bytes (+465.36%)
uart_driver 8,003 bytes 11,804 bytes 📈 +3,801 bytes (+47.49%)
misc_system 3,883 bytes 6,724 bytes 📈 +2,841 bytes (+73.17%)
memory_mgmt 8,996 bytes 11,331 bytes 📈 +2,335 bytes (+25.96%)
other 1,636 bytes 3,832 bytes 📈 +2,196 bytes (+134.23%)
[esphome]core 6,461 bytes 8,589 bytes 📈 🚨 +2,128 bytes (+32.94%)
timer 712 bytes 2,756 bytes 📈 +2,044 bytes (+287.08%)
freertos 14,415 bytes 16,329 bytes 📈 +1,914 bytes (+13.28%)
wifi_phy_pp 227 bytes 1,876 bytes 📈 +1,649 bytes (+726.43%)
... ... ... (48 more components not shown)
🔍 Symbol-Level Changes (click to expand)

Changed Symbols

Symbol Target Size PR Size Change
setup() 222 bytes 2,466 bytes 📈 +2,244 bytes (+1010.81%)
esphome::App 176 bytes 256 bytes 📈 +80 bytes (+45.45%)
esp_mmu_map 910 bytes 966 bytes 📈 +56 bytes (+6.15%)
[global constructor for: esphome::Application::register_component_(esphome::Component*)] 148 bytes 194 bytes 📈 +46 bytes (+31.08%)
esp_panic_handler_feed_wdts 118 bytes 154 bytes 📈 +36 bytes (+30.51%)
rtc_init 930 bytes 966 bytes 📈 +36 bytes (+3.87%)
esp_sha_lock_engine_common 135 bytes 162 bytes 📈 +27 bytes (+20.00%)
esp_mmu_vaddr_to_paddr 169 bytes 189 bytes 📈 +20 bytes (+11.83%)
esp_mmu_unmap 249 bytes 269 bytes 📈 +20 bytes (+8.03%)
periph_module_enable 151 bytes 171 bytes 📈 +20 bytes (+13.25%)
esp_panic_handler_enable_rtc_wdt 66 bytes 86 bytes 📈 +20 bytes (+30.30%)
__func__$18 25 bytes 8 bytes 📉 -17 bytes (-68.00%)
pthread_mutex_unlock 84 bytes 100 bytes 📈 +16 bytes (+19.05%)
multi_heap_get_info 86 bytes 102 bytes 📈 +16 bytes (+18.60%)
sha_get_engine_state 95 bytes 111 bytes 📈 +16 bytes (+16.84%)
esp_vfs_register_fs 176 bytes 192 bytes 📈 +16 bytes (+9.09%)
_lock_close 55 bytes 71 bytes 📈 +16 bytes (+29.09%)
esp_panic_handler_disable_timg_wdts 59 bytes 75 bytes 📈 +16 bytes (+27.12%)
esp_sync_timekeeping_timers 77 bytes 92 bytes 📈 +15 bytes (+19.48%)
__func__$24 32 bytes 18 bytes 📉 -14 bytes (-43.75%)
__func__$22 30 bytes 17 bytes 📉 -13 bytes (-43.33%)
__func__$14 18 bytes 31 bytes 📈 +13 bytes (+72.22%)
__func__$8 11 bytes 24 bytes 📈 +13 bytes (+118.18%)
print_entry 48 bytes 60 bytes 📈 +12 bytes (+25.00%)
esp_vfs_register_fs_common 244 bytes 256 bytes 📈 +12 bytes (+4.92%)
_reclaim_reent 184 bytes 196 bytes 📈 +12 bytes (+6.52%)
__func__$23 22 bytes 10 bytes 📉 -12 bytes (-54.55%)
get_flash_clock_divider 62 bytes 74 bytes 📈 +12 bytes (+19.35%)
vQueueDeleteWithCaps 51 bytes 63 bytes 📈 +12 bytes (+23.53%)
esp_timer_impl_early_init 192 bytes 204 bytes 📈 +12 bytes (+6.25%)
... ... ... (129 more changed symbols not shown)

New Symbols (top 15)

Symbol Size
mdns_parse_packet 7,571 bytes
_strtod_l 3,278 bytes
tcp_input 3,065 bytes
tcp_receive 2,654 bytes
esphome::modem::ModemNMEAUARTComponent::update() 1,889 bytes
_mdns_service_task 1,636 bytes
vj_compress_tcp 1,628 bytes
ipcp_nakci 1,533 bytes
packet$19 1,460 bytes
vj_uncompress_tcp 1,449 bytes
tcp_output 1,163 bytes
dhcp_recv 1,127 bytes
__gethex 1,093 bytes
ipcp_reqci 1,073 bytes
_mdns_append_answer [$constprop$0] 1,005 bytes
1598 more new symbols... Total: 157,829 bytes

Removed Symbols (top 15)

Symbol Size
_open_r 248 bytes
multi_heap_realloc 106 bytes
fsync 85 bytes
_write_r 83 bytes
esp_vfs_lseek 83 bytes
_read_r 83 bytes
multi_heap_malloc 83 bytes
_fstat_r 80 bytes
multi_heap_aligned_free 68 bytes
malloc 12 bytes
multi_heap_get_allocated_size_impl 12 bytes
cfree 10 bytes
std::type_info::__is_function_p() const 7 bytes

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

@github-actions
Copy link
Contributor

Memory Impact Analysis

Components: modem
Platform: esp32-idf

Metric Target Branch This PR Change
RAM 12,036 bytes 15,700 bytes 📈 🚨 +3,664 bytes (+30.44%)
Flash 225,863 bytes 422,375 bytes 📈 🚨 +196,512 bytes (+87.00%)
📊 Component Memory Breakdown
Component Target Flash PR Flash Change
network_stack 0 bytes 35,587 bytes 📈 +35,587 bytes (0.00%)
mdns_lib 0 bytes 22,586 bytes 📈 +22,586 bytes (0.00%)
ppp_protocol 0 bytes 11,698 bytes 📈 +11,698 bytes (0.00%)
[esphome]modem 0 bytes 10,990 bytes 📈 🔸 +10,990 bytes (0.00%)
libc 51,876 bytes 62,176 bytes 📈 +10,300 bytes (+19.86%)
esp_system 1,823 bytes 10,852 bytes 📈 +9,029 bytes (+495.28%)
cpp_runtime 1,556 bytes 10,546 bytes 📈 +8,990 bytes (+577.76%)
dhcp 0 bytes 5,453 bytes 📈 +5,453 bytes (0.00%)
wifi_config 5,860 bytes 10,346 bytes 📈 +4,486 bytes (+76.55%)
rom_functions 4,203 bytes 8,685 bytes 📈 +4,482 bytes (+106.64%)
gpio_driver 915 bytes 5,173 bytes 📈 +4,258 bytes (+465.36%)
app_framework 397 bytes 4,396 bytes 📈 +3,999 bytes (+1007.30%)
uart_driver 8,003 bytes 11,804 bytes 📈 +3,801 bytes (+47.49%)
misc_system 3,883 bytes 6,720 bytes 📈 +2,837 bytes (+73.06%)
memory_mgmt 8,996 bytes 11,331 bytes 📈 +2,335 bytes (+25.96%)
other 1,636 bytes 3,828 bytes 📈 +2,192 bytes (+133.99%)
timer 712 bytes 2,756 bytes 📈 +2,044 bytes (+287.08%)
[esphome]core 6,461 bytes 8,421 bytes 📈 🚨 +1,960 bytes (+30.34%)
freertos 14,415 bytes 16,329 bytes 📈 +1,914 bytes (+13.28%)
wifi_phy_pp 227 bytes 1,876 bytes 📈 +1,649 bytes (+726.43%)
... ... ... (45 more components not shown)
🔍 Symbol-Level Changes (click to expand)

Changed Symbols

Symbol Target Size PR Size Change
setup() 222 bytes 2,175 bytes 📈 +1,953 bytes (+879.73%)
esphome::App 176 bytes 236 bytes 📈 +60 bytes (+34.09%)
esp_mmu_map 910 bytes 966 bytes 📈 +56 bytes (+6.15%)
esp_panic_handler_feed_wdts 118 bytes 154 bytes 📈 +36 bytes (+30.51%)
rtc_init 930 bytes 966 bytes 📈 +36 bytes (+3.87%)
[global constructor for: esphome::Application::register_component_(esphome::Component*)] 148 bytes 182 bytes 📈 +34 bytes (+22.97%)
esp_sha_lock_engine_common 135 bytes 162 bytes 📈 +27 bytes (+20.00%)
esp_panic_handler_enable_rtc_wdt 66 bytes 86 bytes 📈 +20 bytes (+30.30%)
esp_mmu_unmap 249 bytes 269 bytes 📈 +20 bytes (+8.03%)
periph_module_enable 151 bytes 171 bytes 📈 +20 bytes (+13.25%)
esp_mmu_vaddr_to_paddr 169 bytes 189 bytes 📈 +20 bytes (+11.83%)
__func__$18 25 bytes 8 bytes 📉 -17 bytes (-68.00%)
sha_get_engine_state 95 bytes 111 bytes 📈 +16 bytes (+16.84%)
multi_heap_get_info 86 bytes 102 bytes 📈 +16 bytes (+18.60%)
esp_vfs_register_fs 176 bytes 192 bytes 📈 +16 bytes (+9.09%)
esp_panic_handler_disable_timg_wdts 59 bytes 75 bytes 📈 +16 bytes (+27.12%)
_lock_close 55 bytes 71 bytes 📈 +16 bytes (+29.09%)
pthread_mutex_unlock 84 bytes 100 bytes 📈 +16 bytes (+19.05%)
esp_sync_timekeeping_timers 77 bytes 92 bytes 📈 +15 bytes (+19.48%)
__func__$24 32 bytes 18 bytes 📉 -14 bytes (-43.75%)
__func__$8 11 bytes 24 bytes 📈 +13 bytes (+118.18%)
__func__$22 30 bytes 17 bytes 📉 -13 bytes (-43.33%)
__func__$14 18 bytes 31 bytes 📈 +13 bytes (+72.22%)
__func__$6 10 bytes 22 bytes 📈 +12 bytes (+120.00%)
__func__$19 9 bytes 21 bytes 📈 +12 bytes (+133.33%)
vQueueDeleteWithCaps 51 bytes 63 bytes 📈 +12 bytes (+23.53%)
esp_timer_impl_early_init 192 bytes 204 bytes 📈 +12 bytes (+6.25%)
get_flash_clock_divider 62 bytes 74 bytes 📈 +12 bytes (+19.35%)
_reclaim_reent 184 bytes 196 bytes 📈 +12 bytes (+6.52%)
esp_clk_tree_src_get_freq_hz 311 bytes 323 bytes 📈 +12 bytes (+3.86%)
... ... ... (129 more changed symbols not shown)

New Symbols (top 15)

Symbol Size
mdns_parse_packet 7,571 bytes
_strtod_l 3,278 bytes
tcp_input 3,065 bytes
tcp_receive 2,654 bytes
esphome::modem::ModemNMEAUARTComponent::update() 1,889 bytes
_mdns_service_task 1,636 bytes
vj_compress_tcp 1,628 bytes
ipcp_nakci 1,533 bytes
packet$19 1,460 bytes
vj_uncompress_tcp 1,449 bytes
tcp_output 1,163 bytes
dhcp_recv 1,127 bytes
__gethex 1,093 bytes
ipcp_reqci 1,073 bytes
_mdns_append_answer [$constprop$0] 1,005 bytes
1583 more new symbols... Total: 157,164 bytes

Removed Symbols (top 15)

Symbol Size
_open_r 248 bytes
multi_heap_realloc 106 bytes
fsync 85 bytes
_write_r 83 bytes
esp_vfs_lseek 83 bytes
multi_heap_malloc 83 bytes
_read_r 83 bytes
_fstat_r 80 bytes
multi_heap_aligned_free 68 bytes
multi_heap_get_allocated_size_impl 12 bytes
malloc 12 bytes
cfree 10 bytes
std::type_info::__is_function_p() const 7 bytes

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

@martivo
Copy link

martivo commented Nov 22, 2025

I think something is now broken. It will always give me this error without changing the config.

INFO ESPHome 2025.10.5
INFO Reading configuration /config/kotka2.yaml...
ERROR Unable to import component network:
Traceback (most recent call last):
  File "/esphome/esphome/loader.py", line 199, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/.esphome/external_components/33ed7537/esphome/components/network/__init__.py", line 6, in <module>
    from esphome.components.psram import is_guaranteed as psram_is_guaranteed
ImportError: cannot import name 'is_guaranteed' from 'esphome.components.psram' (/esphome/esphome/components/psram/__init__.py)
Failed config

network: None
  {}
Component not found: network

I still use the same external_components. When i remove it and the modem block it is compiling.

external_components:
    - source: github://pr#6721
      components: [ network, modem ]  # also add 'watchdog' if not found
      refresh: 1h

@martivo , I've bumped esp_modem from 1.4.0 to 1.4.2 . This might fix some bug related to Failed to enter PPP. Resetting modem. but I'm not sure, as it's difficult to reproduce the problem. esp_modem is actively under developpements theses days, so hopefully, some more bugs will be fixed!

For OTA, I haven't made some test for a while, but it should works with http_request platform: OTA can't be used in the legacy or web_server mode, because the modem has a private IP, and can't be reached from the internet unless you use a wiregard VPN as @ShonP40. (I will have to check for the use of use_adress).

@oarcher Thanks! I will give it a try. I already have wireguard working. However I am unable to try anything since I am now unable to compile it after the latest changes.

The only way to enable OTA updates through the ESPHome dashboard atm is by configuring the WiFi component (just for the AP) and adding use_address: <IP on WireGuard

Take a look at what I did on https://github.com/ShonP40/Car-Assistant

@ShonP40 Thanks, I will try to set it to AP mode.

@oarcher
Copy link
Contributor Author

oarcher commented Nov 22, 2025

@martivo , hare you using lastest dev esphome branch ? as @SeByDocKy noticed in discord, some changes has been introduced because of #11704

@martivo
Copy link

martivo commented Nov 23, 2025

@martivo , hare you using lastest dev esphome branch ? as @SeByDocKy noticed in discord, some changes has been introduced because of #11704

Hi, no I was using regular release until now. Ill try "dev" and see how it goes. However I now noticed that just adding the wifi.use_address made esphome dashboard show the device as online without updating the device firmware. I am pretty sure OTA will also work - will test this soon to confirm.

@SeByDocKy
Copy link
Contributor

@martivo , hare you using lastest dev esphome branch ? as @SeByDocKy noticed in discord, some changes has been introduced because of #11704

Hi, no I was using regular release until now. Ill try "dev" and see how it goes. However I now noticed that just adding the wifi.use_address made esphome dashboard show the device as online without updating the device firmware. I am pretty sure OTA will also work - will test this soon to confirm.

Do you mean you had both an internet WAN IP address and be able to do OTA over local WiFi ?

@martivo
Copy link

martivo commented Nov 23, 2025

@martivo , hare you using lastest dev esphome branch ? as @SeByDocKy noticed in discord, some changes has been introduced because of #11704

Hi, no I was using regular release until now. Ill try "dev" and see how it goes. However I now noticed that just adding the wifi.use_address made esphome dashboard show the device as online without updating the device firmware. I am pretty sure OTA will also work - will test this soon to confirm.

Do you mean you had both an internet WAN IP address and be able to do OTA over local WiFi ?

No, I put the wireguard VPN device ip as the wifi.use_address and this results in esphome dashboard using this as the destination for the OTA. It works in a similar way where i set the <hostname>.local to the VPN IP. However with the "modem" i was before unable to even start the installation due to the error posted earlier. So the update is done over VPN and over public internet not local wifi.

@martivo
Copy link

martivo commented Nov 24, 2025

@martivo , hare you using lastest dev esphome branch ? as @SeByDocKy noticed in discord, some changes has been introduced because of #11704

@oarcher, when I use the ghcr.io/esphome/esphome:dev container image then it compiles without issues. Thanks! OTA works now! As long as I set the wifi.use_address.

Unfortunately the modem.enable_cmux value true is still causing it to not work at all. The error and behavior seems to be the same as before. I did also try to not set any init_at values, but makes no difference. [E][modem:413]: Failed to enter PPP. Resetting modem. Full log cmuex_enabled_latest.txt

The wifi config I used:

wifi:
  id: wifi_component
  ap:
    ssid: "FOO"
    password: "BARSADSADSASADD34133"
  use_address: "10.192.168.11" # Wireguard address
  enable_on_boot: false
  reboot_timeout: 0s

This update was done over LTE and Wireguard.
image
I have disabled MQTT logs, that is why it will throw the error at the end and that is expected.
image

On a side note: I noticed that esphome dashboard will ping/pull the address all the time and creates quite a lot of traffic. This seems to happen even when the dashboard is not opened in the browser. If your LTE has very limited data capacity, then change wifi.use_address to a wrong IP while not working on it to reduce data usage.

@github-actions
Copy link
Contributor

Memory Impact Analysis

Components: modem
Platform: esp32-idf

Metric Target Branch This PR Change
RAM 12,036 bytes 15,732 bytes 📈 🚨 +3,696 bytes (+30.71%)
Flash 225,507 bytes 424,795 bytes 📈 🚨 +199,288 bytes (+88.37%)
📊 Component Memory Breakdown
Component Target Flash PR Flash Change
network_stack 0 bytes 37,062 bytes 📈 +37,062 bytes (0.00%)
mdns_lib 0 bytes 22,570 bytes 📈 +22,570 bytes (0.00%)
ppp_protocol 0 bytes 11,698 bytes 📈 +11,698 bytes (0.00%)
[esphome]modem 0 bytes 10,990 bytes 📈 🔸 +10,990 bytes (0.00%)
libc 52,098 bytes 62,221 bytes 📈 +10,123 bytes (+19.43%)
cpp_runtime 1,154 bytes 10,708 bytes 📈 +9,554 bytes (+827.90%)
esp_system 1,849 bytes 10,878 bytes 📈 +9,029 bytes (+488.32%)
dhcp 0 bytes 5,453 bytes 📈 +5,453 bytes (0.00%)
wifi_config 5,860 bytes 10,352 bytes 📈 +4,492 bytes (+76.66%)
rom_functions 4,203 bytes 8,673 bytes 📈 +4,470 bytes (+106.35%)
gpio_driver 915 bytes 5,173 bytes 📈 +4,258 bytes (+465.36%)
app_framework 394 bytes 4,325 bytes 📈 +3,931 bytes (+997.72%)
uart_driver 8,003 bytes 11,804 bytes 📈 +3,801 bytes (+47.49%)
misc_system 3,883 bytes 6,721 bytes 📈 +2,838 bytes (+73.09%)
freertos 14,415 bytes 16,810 bytes 📈 +2,395 bytes (+16.61%)
memory_mgmt 8,996 bytes 11,331 bytes 📈 +2,335 bytes (+25.96%)
[esphome]core 6,349 bytes 8,661 bytes 📈 🚨 +2,312 bytes (+36.42%)
other 1,636 bytes 3,841 bytes 📈 +2,205 bytes (+134.78%)
timer 712 bytes 2,756 bytes 📈 +2,044 bytes (+287.08%)
wifi_phy_pp 230 bytes 1,876 bytes 📈 +1,646 bytes (+715.65%)
... ... ... (45 more components not shown)
🔍 Symbol-Level Changes (click to expand)

Changed Symbols

Symbol Target Size PR Size Change
setup() 214 bytes 2,127 bytes 📈 +1,913 bytes (+893.93%)
esphome::App 172 bytes 264 bytes 📈 +92 bytes (+53.49%)
[global constructor for: esphome::Application::register_component_(esphome::Component*)] 146 bytes 211 bytes 📈 +65 bytes (+44.52%)
esp_mmu_map 910 bytes 966 bytes 📈 +56 bytes (+6.15%)
rtc_init 930 bytes 966 bytes 📈 +36 bytes (+3.87%)
esp_panic_handler_feed_wdts 118 bytes 154 bytes 📈 +36 bytes (+30.51%)
vTaskDelete 240 bytes 274 bytes 📈 +34 bytes (+14.17%)
xQueueGenericSend 255 bytes 279 bytes 📈 +24 bytes (+9.41%)
xTaskResumeAll 442 bytes 466 bytes 📈 +24 bytes (+5.43%)
esp_sha_lock_engine_common 135 bytes 158 bytes 📈 +23 bytes (+17.04%)
periph_module_enable 151 bytes 171 bytes 📈 +20 bytes (+13.25%)
xQueueSemaphoreTake 265 bytes 285 bytes 📈 +20 bytes (+7.55%)
esp_panic_handler_enable_rtc_wdt 66 bytes 86 bytes 📈 +20 bytes (+30.30%)
vTaskPrioritySet 294 bytes 314 bytes 📈 +20 bytes (+6.80%)
esp_mmu_vaddr_to_paddr 169 bytes 189 bytes 📈 +20 bytes (+11.83%)
esp_mmu_unmap 249 bytes 269 bytes 📈 +20 bytes (+8.03%)
xRingbufferSendComplete 141 bytes 161 bytes 📈 +20 bytes (+14.18%)
vRingbufferReturnItem 87 bytes 106 bytes 📈 +19 bytes (+21.84%)
__func__$18 25 bytes 8 bytes 📉 -17 bytes (-68.00%)
multi_heap_get_info 86 bytes 102 bytes 📈 +16 bytes (+18.60%)
vTaskDelay 59 bytes 75 bytes 📈 +16 bytes (+27.12%)
prvSendAcquireGeneric 208 bytes 224 bytes 📈 +16 bytes (+7.69%)
esp_vfs_register_fs 176 bytes 192 bytes 📈 +16 bytes (+9.09%)
esp_panic_handler_disable_timg_wdts 59 bytes 75 bytes 📈 +16 bytes (+27.12%)
prvReceiveGeneric 204 bytes 220 bytes 📈 +16 bytes (+7.84%)
esphome::Application::~Application() 54 bytes 70 bytes 📈 +16 bytes (+29.63%)
ulTaskGenericNotifyTake 174 bytes 190 bytes 📈 +16 bytes (+9.20%)
esp_sync_timekeeping_timers 77 bytes 92 bytes 📈 +15 bytes (+19.48%)
__func__$24 32 bytes 18 bytes 📉 -14 bytes (-43.75%)
__func__$8 11 bytes 24 bytes 📈 +13 bytes (+118.18%)
... ... ... (176 more changed symbols not shown)

New Symbols (top 15)

Symbol Size
mdns_parse_packet 7,567 bytes
_strtod_l 3,278 bytes
tcp_input 3,065 bytes
tcp_receive 2,654 bytes
esphome::modem::ModemNMEAUARTComponent::update() 1,889 bytes
vj_compress_tcp 1,628 bytes
_mdns_service_task 1,628 bytes
ipcp_nakci 1,533 bytes
packet$19 1,460 bytes
vj_uncompress_tcp 1,449 bytes
tcp_output 1,163 bytes
dhcp_recv 1,127 bytes
__gethex 1,093 bytes
ipcp_reqci 1,073 bytes
_mdns_append_answer [$constprop$0] 1,005 bytes
1596 more new symbols... Total: 159,021 bytes

Removed Symbols (top 15)

Symbol Size
_open_r 248 bytes
multi_heap_realloc 106 bytes
fsync 85 bytes
_write_r 83 bytes
_read_r 83 bytes
multi_heap_malloc 83 bytes
esp_vfs_lseek 83 bytes
_fstat_r 80 bytes
multi_heap_aligned_free 68 bytes
multi_heap_get_allocated_size_impl 12 bytes
malloc 12 bytes
cfree 10 bytes
std::type_info::__is_function_p() const 7 bytes

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use sim800l GPRS data transfer Add 3g / 4g txt support uisng SIM7600 or similar SIM7080G Add Data support for Sim800L