echavet / MitsubishiCN105ESPHome

ESPHome firmware inspired by GeoffDavis’s esphome-mitsubishiheatpump, directly integrating the SwiCago library within its codebase.
214 stars 43 forks source link

uptime_sensor.h has been removed in 2024.7.0 #131

Closed Matze5800 closed 4 months ago

Matze5800 commented 4 months ago

Compilation fails with 2024.7.0 as uptime_sensor.h is missing. It has been replaced with uptime_seconds_sensor.h and uptime_timestamp_sensor.h. This is the breaking change: https://github.com/esphome/esphome/pull/7029

Thanks a lot for your hard work!

Schlichi83 commented 4 months ago

I have exactly the same issue.

echavet commented 4 months ago

Hi guys, Are you using the esp32 framework or the Arduino one? I haven't committed any modification since a moment. So it might be a local issue.

Try to do a clean and rebuild:

esphome clean your_yaml.yaml
Mense1978 commented 4 months ago

does not work either

Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/api/subscribe_state.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/api/user_services.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/binary_sensor/automation.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/binary_sensor/binary_sensor.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/binary_sensor/filter.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/button/button.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/captive_portal/captive_portal.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/climate/climate.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/climate/climate_mode.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/climate/climate_traits.cpp.o Compiling .pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/cn105/climateControls.cpp.o In file included from src/esphome.h:35, from src/esphome/components/cn105/Globals.h:2, from src/esphome/components/cn105/cn105.h:2, from src/esphome/components/cn105/climateControls.cpp:1: src/esphome/components/cn105/uptime_connection_sensor.h:2:10: fatal error: esphome/components/uptime/uptime_sensor.h: No such file or directory 2 | #include "esphome/components/uptime/uptime_sensor.h" | ^~~~~~~~~~~ compilation terminated. *** [.pioenvs/aa-mitsubishi-porchemesa/src/esphome/components/cn105/climateControls.cpp.o] Error 1 ========================== [FAILED] Took 7.49 seconds ==========================

c-mholm commented 4 months ago

I get the same error. I have ESP-IDF framework. I have tried to clean build files and reinstall, but still get the same error.

revoka commented 4 months ago

I can confirm this error shows up while compiling with latest ESP home 2024.7.0 It is caused by a breaking change in the uptime sensor of ESP Home latest release as mentioned in the opening post by Matze5800. Check the link he has provided in the first post about the changes made in the latest ESP Home these changes break the code. The code needs to be adapted to the new implementation of the uptime sensor. Temporary solution for new users is to downgrade to last 2024.6 version of ESP Home for now.

avanh86 commented 4 months ago

Same problem. I tried a clean build also then i get the same error.

phidauex commented 4 months ago

This problem is a bit odd - the feature change is listed as "new feature/non-breaking change" so it shouldn't be expected to break current configurations. Either it was mislabeled/incorrectly tested on the ESPHome side, or there is a regression that needs to be addressed. https://github.com/esphome/esphome/pull/7029

Anyone more familiar with the build able to confirm if the required file changes were intentional? Or is this something that will get fixed in 2024.7.1?

ESPHome has been introducing a lot of breaking changes recently, it seems a bit chaotic for the integration developers.

echavet commented 4 months ago

Ok thanks for the info. I'll check that tomorrow.

Le mer. 17 juil. 2024, 19:27, Sam @.***> a écrit :

This problem is a bit odd - the feature change is listed as "new feature/non-breaking change" so it shouldn't be expected to break current configurations. Either it was mislabeled/incorrectly tested on the ESPHome side, or there is a regression that needs to be addressed. esphome/esphome#7029 https://github.com/esphome/esphome/pull/7029

Anyone more familiar with the build able to confirm if the required file changes were intentional? Or is this something that will get fixed in 2024.7.1?

ESPHome has been introducing a lot of breaking changes recently, it seems a bit chaotic for the integration developers.

— Reply to this email directly, view it on GitHub https://github.com/echavet/MitsubishiCN105ESPHome/issues/131#issuecomment-2233829703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTHBHLRHW52JNBHYA3U5TZM2SRPAVCNFSM6AAAAABK76G2LKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZTHAZDSNZQGM . You are receiving this because you commented.Message ID: @.***>

ghisch commented 4 months ago

Hey, the fix is simple enough that I could do it. Made a PR for it https://github.com/echavet/MitsubishiCN105ESPHome/pull/133

Edit: closed the PR as someone did the same one just before. I can confirm it works ! https://github.com/echavet/MitsubishiCN105ESPHome/pull/132

uspino2 commented 4 months ago

Hello, I know this issue looks as fixed, and thank you for that, but how do I upload the fix to the device? (Sorry, not too used to ESPHome yet). These are the messages I get when trying to update wirelessly to 2024.7.0. Thanks.

Compiling .pioenvs/mitsubishi-esp32-office/src/esphome/components/cn105/cycle_management.cpp.o
In file included from src/esphome.h:33,
                 from src/esphome/components/cn105/Globals.h:2,
                 from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/climateControls.cpp:1:
src/esphome/components/cn105/uptime_connection_sensor.h:2:10: fatal error: esphome/components/uptime/uptime_sensor.h: No such file or directory
 #include "esphome/components/uptime/uptime_sensor.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/mitsubishi-esp32-office/src/esphome/components/cn105/climateControls.cpp.o] Error 1
In file included from src/esphome.h:33,
                 from src/esphome/components/cn105/Globals.h:2,
                 from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/cycle_management.cpp:2:
src/esphome/components/cn105/uptime_connection_sensor.h:2:10: fatal error: esphome/components/uptime/uptime_sensor.h: No such file or directory
 #include "esphome/components/uptime/uptime_sensor.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from src/esphome.h:33,
                 from src/esphome/components/cn105/Globals.h:2,
                 from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/cn105.cpp:2:
src/esphome/components/cn105/uptime_connection_sensor.h:2:10: fatal error: esphome/components/uptime/uptime_sensor.h: No such file or directory
 #include "esphome/components/uptime/uptime_sensor.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/mitsubishi-esp32-office/src/esphome/components/cn105/cycle_management.cpp.o] Error 1
*** [.pioenvs/mitsubishi-esp32-office/src/esphome/components/cn105/cn105.cpp.o] Error 1
In file included from src/esphome.h:33,
                 from src/esphome/components/cn105/Globals.h:2,
                 from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/componentEntries.cpp:1:
src/esphome/components/cn105/uptime_connection_sensor.h:2:10: fatal error: esphome/components/uptime/uptime_sensor.h: No such file or directory
 #include "esphome/components/uptime/uptime_sensor.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/mitsubishi-esp32-office/src/esphome/components/cn105/componentEntries.cpp.o] Error 1
revoka commented 4 months ago

Hi uspino2,

Commits have been made by a pull request but the need to make it to the PR. The software that is pulled from github during compilation is still the version that contains the old code. That is the reason you still see the errors while trying to compile.

uspino2 commented 4 months ago

Hi uspino2,

Commits have been made by a pull request but the need to make it to the PR. The software that is pulled from github during compilation is still the version that contains the old code. That is the reason you still see the errors while trying to compile.

I guess it's a matter of waiting now. Thank you so much!