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

Version 3.0 not compiling #100

Closed
Kurisutian opened this issue Sep 22, 2024 · 13 comments
Closed

Version 3.0 not compiling #100

Kurisutian opened this issue Sep 22, 2024 · 13 comments

Comments

@Kurisutian
Copy link

I just checked to switch to the component change made in v3.0 but for whatever reason the I cannot compile. I first had the time definition in my yaml which ultimately fail but also when being as close as possible to the example provided the compilation fails. I attached the log for the error. Couldn't figure out what went wrong here.

logs_klima-eg_run.txt

Thanks and please let me know if anything else is needed to be provided from my end. Gladly willing to help here.

@RobertJansen1
Copy link
Collaborator

Try cleaning up your build files

@Kurisutian
Copy link
Author

Thanks for the quick reply. I did use the cleanup function beforehand but it still won't compile. Checked it again just now to be sure and it was the same error

@RobertJansen1
Copy link
Collaborator

I have seen some duplicate definition errors when writing the code, and all of the cases it was duplicate / remaining files, so maybe double check the esphome folder for lingering old versions of the cpp and h files, which should no longer be placed in the folder manually. You can also try building it as a new entity in esphome to prevent old files lingering around in the build directories

@Kurisutian
Copy link
Author

Thanks for all your tips and willingness to help. I just checked that the esphome folder does not contain any remaining file whatsoever. Unfortunately the error remains. Checked again after that and cleaned everything again. Am I missing another folder which might contain files other than the esphome one?

@Kurisutian
Copy link
Author

I checked today on another device after upgrading to the new Esphome version and it seems that it's working now. Nothing changed though, but it went through. So I'm closing this one. Thanks a lot for your help. Don't know what fixed it but it is working. 🤷‍♂️

@jeroenleenarts
Copy link

Getting the exact same error here.

I run a Home Assistant Green with the ESP Addon, how can I check on a file level that the cached versions of these files are gone? A "clean" in ESPHome does not resolve this issue.

@jeroenleenarts
Copy link

Did a local commandline build. And that compiles fine, so that is in line with @RobertJansen1's statement on left over files being on my ESPHome instance. Question is, do these files expire by themselves if clean does not work?

@ervee
Copy link

ervee commented Oct 6, 2024

I had this exact same issue and I could solve it like this:

  • Do the "Clean Build Files" on the device in Home Assistant ESPHome.
  • Use SSH or console or some way to login onto the device running Home Assistant.
    • Go to ESPHome data folder for the device: cd /mnt/data/supervisor/addons/data/*_esphome/build/_devicename_/
    • Check folder content: ls -l
    • Make sure you are in the correct folder for your device and there is a scr folder! Rename the folder: mv src src.old
  • Now try to install / build / update the device in Home Assistant ESPHome again.

@jeroenleenarts
Copy link

That's the whole point isn't it. I was able to get into this situation through the SSH add on for Home Assistant. Now to clean this up I would need to enable developer mode SSH access to the host operating system.

Not something the author of this ESP home config should fix. But a clear issue with ESPHome to be sure.

@jeroenleenarts
Copy link

esphome/issues#6312

@hmmbob
Copy link
Contributor

hmmbob commented Oct 15, 2024

Just ran into the same problem, cleaning all files manually through SSH resolved the issue.

💡 Should we pin this issue to the top of the issue list? I guess more people will run into this issue....

@RobertJansen1 RobertJansen1 reopened this Oct 15, 2024
@RobertJansen1 RobertJansen1 pinned this issue Oct 15, 2024
@RobertJansen1
Copy link
Collaborator

I added this issue to the changelog (the comment from @ervee as that one seems to have the most complete steps to resolve the issue. sorry for the inconvenience everyone!

@1Dimension1
Copy link

1Dimension1 commented Nov 19, 2024

When using Homeassistant OS you need to SSH into your installation:

  • Install ssh addon (Advanced SSH & Web Terminal)
  • Set password in configuration
  • Connect to SSH
  • docker exec -it addon_5c53de3b_esphome sh
  • cd /data/build/

Then follow above comment (#100 (comment))

After that make sure to disable or remove the SSH extension for safety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants