Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Can't build with ESPHome 2024.3.0 because remote_package doesn't update #1975

Open
X-Ryl669 opened this issue Mar 23, 2024 · 33 comments
Open
Labels
Bug Identifies an issue where the system is not functioning as expected. Error: Compiling For issues specifically related to compilation errors.

Comments

@X-Ryl669
Copy link
Contributor

X-Ryl669 commented Mar 23, 2024

TFT Version

latest

ESPHome Version

latest

Blueprint Version

latest

Panel Model

EU

What is the bug?

When trying to build with latest ESPHome version, it fails with this log:

/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml: In lambda function:
/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2818:73: error: 'get_ip_address' is not a member of 'esphome::network'
                         disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str());
                                                                         ^~~~~~~~~~~~~~
/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2818:73: note: suggested alternative: 'get_ip_addresses'
                         disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str());
                                                                         ^~~~~~~~~~~~~~
                                                                         get_ip_addresses

Steps to Reproduce

No response

Your Panel's YAML

# substitutions hidden for privacy

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      - esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
    refresh: 0s

##### My customization - Start #####
wifi:
  networks:
    - id: !extend wifi_default
      ssid: ${wifi_ssid}
      password: ${wifi_password}
      ##### advanced config - uncomment to use static IP-Config #####
      manual_ip:
        static_ip: ${ip}
        gateway: ${gw}
        subnet: ${subnet}
        dns1: ${dns}
  # domain: ${domain}
  ##### Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${device_name}"
    password: ${wifi_password}

ota:
  password: ${ota_password}

api:
  encryption:
    key: ${api_password}

esp32:
  framework:
    type: esp-idf
  flash_size: 4MB
  partitions: "nspanel1_part.csv"
##### My customization - End #####

ESPHome Logs

No response

Home Assistant Logs

No response

@X-Ryl669 X-Ryl669 added the Bug Identifies an issue where the system is not functioning as expected. label Mar 23, 2024
@X-Ryl669
Copy link
Contributor Author

Please notice that I have @main on the remote package definition (so it should download the latest version), but I still get this in the ESPHome build dialog:

INFO ESPHome 2024.3.0
INFO Reading configuration /config/esphome/nspanel1.yaml...
INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main
INFO Reverting changes to https://github.com/Blackymas/NSPanel_HA_Blueprint@main -> 01161b9f254e11d60c4ac0f4a93763226bd23eca
INFO Detected timezone 'Europe/Paris'
INFO Generating C++ source...
INFO Compiling app...
Processing nspanel1 (board: esp32dev; framework: espidf; platform: platformio/[email protected])

Notice the Reverting changes line that seems to reset the head to a much older version, so I can't fetch the version v4.3.1 that should have fixed this issue. I don't understand where this revert comes from.

@X-Ryl669
Copy link
Contributor Author

X-Ryl669 commented Mar 23, 2024

Please see here. It seems the refreshkey is ignored for remote_package.

I've cleaned the project but it didn't work. Changing the ref to v4.3.1 worked (after cleaning again), but it's not useful to keep updated to latest changes.

@X-Ryl669 X-Ryl669 changed the title Bug Can't build with ESPHome 2024.3.0 Bug Can't build with ESPHome 2024.3.0 because remote_package doesn't update Mar 23, 2024
@edwardtfn edwardtfn added the Error: Compiling For issues specifically related to compilation errors. label Mar 23, 2024
@giannoug
Copy link

Same issue here.

Home Assistant Core 2024.3.3
ESPHome 2024.3.0
NSPanel_HA_Blueprint pinned to v4.2.6

I have multiple panels and they now require TTL flashing 😅 so I want to stay at the latest arduino version until I have time to flash each one to idf but I want to keep updated with ESPHome in the meantime.

Release v4.3.1 mentions a fix that I believe could be related to this issue, and if true I think that all previous versions of NSPanel_HA_Blueprint are broken: https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.1

Patch v4.3.1 focuses primarily on ensuring full compatibility with the latest ESPHome v2024.3.0 IP address format changes, crucial for the smooth compilation and operation of the NSPanel project.

@X-Ryl669
Copy link
Contributor Author

X-Ryl669 commented Mar 26, 2024

See #1821 for how to build a ESP-IDF version that's compatible with your Arduino's partition layout. That's what I'm using and it's working fine. The issue in ESPHome has been identified. It's mainly due to ESPHome silently reverting the package's git repository to the previous version when it encounter a YAML error on the new version.

But since it doesn't tell you the error, you can't fix it and you're struck to a non functional system. On my case, it was the line

      - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting

That caused the breakage. The file was moved between version v4.2.6 and v4.3.1 so the generated YAML with the old path failed to build. Update the path to the new version and it should work.

As long as you get a log from your build that says:

INFO Reverting changes to https://github.com/Blackymas/NSPanel_HA_Blueprint@main -> 01161b9f254e11d60c4ac0f4a93763226bd23eca

Your YAML is failing, this line shouldn't be there.

@giannoug
Copy link

See #1821 for how to build a ESP-IDF version that's compatible with your Arduino's partition layout.

I just removed the first panel from the wall and setup my tools 😅 I'm going to flash them because I'll have to eventually, but thanks for the tip!

@ali96adil
Copy link

What's the issue? Why am I getting this error, and how can it be resolved?

/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml: In lambda function: /data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2818:73: error: 'get_ip_address' is not a member of 'esphome::network' disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str()); ^~~~~~~~~~~~~~ /data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2818:73: note: suggested alternative: 'get_ip_addresses' disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str()); ^~~~~~~~~~~~~~ get_ip_addresses

@giannoug
Copy link

how can it be resolved?

Personally I ended up upgrading all my panels (with TTL) to the latest version

@ali96adil
Copy link

ali96adil commented Mar 27, 2024

Personally I ended up upgrading all my panels (with TTL) to the latest version

###How do I manually upload the file? with TTL

Screenshot 2024-03-28 at 2 20 49 AM

@ali96adil
Copy link

Screenshot 2024-03-28 at 2 26 05 AM

@giannoug
Copy link

@X-Ryl669
Copy link
Contributor Author

You probably are using advanced mode in YAML. The files have changed position so you need to update the file location. In case of doubt, just replace the ref key in your YAML from main to v4.3.1, clean the project and try to build again. It'd give you the errors. Once fixed, you can put back the main reference.

@jaymunro
Copy link

I'm also getting this "Reverting changes" behaviour in a completely different compile (https://github.com/jaymunro/esphome_firmware/blob/continued-conversation/wake-word-voice-assistant/esp32-s3-box-3.yaml).

It's making testing very troublesome as no errors are reported anymore while developing. It strikes me this new behaviour is desirable for end users in a production environment, but there must be some new flag to turn this off, surely.

@X-Ryl669
Copy link
Contributor Author

We have discussed this issue on Discord. There's no message (and no way to have one) in current code, except by going into the docker and deleting the Git repository for the package. If a repository exists, its current HEAD is remembered and restored upon error. If it doesn't exist, this doesn't happen and you get the error reported.

@jaymunro
Copy link

I found another work around was to create another branch and update the reference in ESPHome, but it's not practical for the long term.
I hope there's an issue on the matter and the devs are aware.

@gednet
Copy link

gednet commented Apr 4, 2024

Same problem here. I don't knowhow i can fix it. There is solution for this issue?

ESPHome 2024.3.1

image

/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml: In lambda function:
/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2713:73: error: 'get_ip_address' is not a member of 'esphome::network'
disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str());
^~~~~~~~~~~~~~
/data/packages/566b10a3/advanced/esphome/nspanel_esphome_core.yaml:2713:73: note: suggested alternative: 'get_ip_addresses'
disp1->set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str());
^~~~~~~~~~~~~~
get_ip_addresses

@X-Ryl669
Copy link
Contributor Author

X-Ryl669 commented Apr 4, 2024

Change your ref in your YAML from main to v4.3.1. Clean, build, fix error, repeat. Once built, change back to main

@gednet
Copy link

gednet commented Apr 4, 2024

Change your ref in your YAML from main to v4.3.1. Clean, build, fix error, repeat. Once built, change back to main

Cleaned, changed to ref to v4.3.1 and i have other error:

Why? please help.

image

@edwardtfn
Copy link
Collaborator

edwardtfn commented Apr 4, 2024

Are you still having these issues with v4.3.2?

For my own reference, this is the related Discord discussion around this: https://discord.com/channels/429907082951524364/524177279270780928/1221336605093269535
If the issue persists with v4.3.2 I will try to change that in ESPHome side.

@gednet
Copy link

gednet commented Apr 4, 2024

Yes, still the same issue when i try to compilate with v4.3.2:
image
No matter what i do: clean build files, change ref ver, try to compilate with 4.3.2 and after that i try to back to main ref.

@edwardtfn
Copy link
Collaborator

Could you please share the logs before this error message.
The error is related to old code being used. I wanna find in the logs why the newest code isn't downloaded.

@spitfire
Copy link

spitfire commented Apr 4, 2024

same here after changing ref, commenting out nspanel_advanced, cleaning build files and trying to build again:

/config/.esphome/packages/03e2381c/esphome/nspanel_esphome_core.yaml: In lambda function:
/config/.esphome/packages/03e2381c/esphome/nspanel_esphome_core.yaml:2735:101: error: request for member 'c_str' in 'component.nspanel_ha_blueprint::NextionComponent::component_id', which is of non-class type 'char [15]'
           if (component.is_current_page) disp1->send_command_printf("vis %s,%i", component.component_id.c_str(), show ? 1 : 0);

@gednet
Copy link

gednet commented Apr 4, 2024

Could you please share the logs before this error message. The error is related to old code being used. I wanna find in the logs why the newest code isn't downloaded.

Here is log before cleaning build files:
logs_nspanelweranda_run (1).txt

And full log after cleaning buld files for the nspanel:
logs_nspanelweranda_run (2).txt

If i can replace some file or if you want me to check some solution feel free. I'm ready. I want to update because i'm after big chcange in my home and i try to prepare new configuration on the newest version.

@edwardtfn
Copy link
Collaborator

@gednet, by looking at your logs I just realized you are using Arduino, so this is different than the original case which was ESP-IDF.

Do you mind sharing your panel's yaml? Please remove any sensitive info before sharing.

@ali96adil
Copy link

The same problem after several attempts did not solve the problem

logs_nsali_run.txt
logs_nsali_run-2.txt
logs_nsali_run-3.txt
logs_nsali_run-4.txt

@edwardtfn
Copy link
Collaborator

@ali96adil, could you please share your panel's yaml? Please remove any sensitive information before sharing.

@edwardtfn edwardtfn added the 👀Missing information Additional information needed label Apr 5, 2024
@ali96adil
Copy link

ali96adil commented Apr 5, 2024

@ali96adil, could you please share your panel's yaml? Please remove any sensitive information before sharing.


substitutions:
  # Settings - Editable values
  device_name: "nsali"
  friendly_name: "nsali"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####
##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    refresh: 300s
    files:
      - nspanel_esphome.yaml # Basic package
      # Optional advanced and add-on configurations
      # - esphome/nspanel_esphome_advanced.yaml
      # - nspanel_esphome_addon_climate_cool.yaml
      # - nspanel_esphome_addon_climate_heat.yaml
      # - nspanel_esphome_addon_climate_dual.yaml ```

@edwardtfn
Copy link
Collaborator

Your logs shows a mix of frameworks and tags used, so I believe you have tried different things, right?
Could you please share the logs when using this yaml you just shared? Please clean build files before trying compiling to capture the logs.

@gednet
Copy link

gednet commented Apr 5, 2024

@gednet, by looking at your logs I just realized you are using Arduino, so this is different than the original case which was ESP-IDF.

Do you mind sharing your panel's yaml? Please remove any sensitive info before sharing.

Ok. But i don't understand why still is arduino framework, when in nspanel_esphome_core.yaml from lin no 103 is right definition esp-idf framework type.

Here is my original yaml

substitutions:

###### CHANGE ME START ######
  device_name: "nspanelweranda" 
  nextion_update_url: "http://192.168.xxx.xxx:8123/local/nspanel_eu.tft" # URL to local tft File
#  nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_eu.tft" # URL to Github
#  web_password: !secret nspanel_web_password
#  wifi_password: !secret wifi_password

wifi:
  networks:
    - id: wifi_wlan
      ssid: !secret wifi_ssid
      password: !secret wifi_password
#  ssid: !secret wifi_ssid
#  password: !secret wifi_password
  power_save_mode: none
  manual_ip:
    static_ip: 192.168.xx.yy
    gateway: 192.168.xx.xx
    subnet: 255.255.255.0
    dns1: 192.168.xx.xx

##### CHANGE ME END #####



##### DO NOT CHANGE ANYTHING! #####

packages:
  ##### download esphome code from Github
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: never
##### DO NOT CHANGE ANYTHING! #####

After i have read your suggestion i put in my yaml all framework definition from nspanel_esphome_core.yaml.
esp32:
board: esp32dev
framework:
type: esp-idf

But compilation still gave me the same error.
logs_nspanelweranda_run (3).txt

@edwardtfn
Copy link
Collaborator

Could you please try changing from refresh: never to refresh: 30s?

@gednet
Copy link

gednet commented Apr 5, 2024

Nothing changed :(
logs_nspanelweranda_run (4).txt

If i may check or change something i'm ready.

@X-Ryl669
Copy link
Contributor Author

X-Ryl669 commented Apr 5, 2024

Could you please try changing from refresh: never to refresh: 30s?

That doesn't work on ESPHome. He has to change the ref to refresh, the refresh time is ignored upon error.

@edwardtfn edwardtfn removed the 👀Missing information Additional information needed label Apr 8, 2024
@morpheus8888
Copy link

I have the same problem and cannot build

@edwardtfn
Copy link
Collaborator

Please try changing from ref: main to ref: beta in the remote_package area. Right now beta have exactly the same code as main, but this will force a reload of the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Identifies an issue where the system is not functioning as expected. Error: Compiling For issues specifically related to compilation errors.
Projects
None yet
Development

No branches or pull requests

8 participants