ginkage / MHI-AC-Ctrl-ESPHome

ESPHome integration for MHI-AC-Ctrl project
MIT License
112 stars 39 forks source link

Version 3.0 not compiling #100

Closed Kurisutian closed 1 month ago

Kurisutian commented 2 months ago

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 commented 2 months ago

Try cleaning up your build files

Kurisutian commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

jeroenleenarts commented 1 month ago

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 commented 1 month ago

https://github.com/esphome/issues/issues/6312

hmmbob commented 1 month ago

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 commented 1 month ago

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 commented 3 days ago

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

Then follow above comment (https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/issues/100#issuecomment-2395388853)

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