krzmaz / LinakDeskEsp32Controller

Standalone ESP32 controller for Linak standing desks (e.g. Ikea Idasen) with HTTP API and Alexa integration
MIT License
33 stars 2 forks source link

Issues while compiling in PlatformIO #8

Closed ranger81 closed 2 years ago

ranger81 commented 3 years ago

Hi, I'm getting the below error message during compilation. Any hints?

Tool Manager: Installing git+https://github.com/espressif/arduino-esp32.git#idf-release/v4.0 git version 2.30.1 (Apple Git-130) Cloning into '/Users/<user>/.platformio/.cache/tmp/pkg-installing-r4ijqaa0'... warning: Could not find remote branch idf-release/v4.0 to clone. fatal: Remote branch idf-release/v4.0 not found in upstream origin Error: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', '--branch', 'idf-release/v4.0', 'https://github.com/espressif/arduino-esp32.git', '/Users/<user>/.platformio/.cache/tmp/pkg-installing-r4ijqaa0'] The terminal process "platformio 'run'" terminated with exit code: 1.

Thanks

krzmaz commented 3 years ago

Hi, thank you for your interest in the project! I'm currently on vacation and won't be able to look into the issue until the end of next week.

However looking at the error output I think that the problem is that the branch of arduino-esp32 package I was using got deleted.
You can experiment with changing the line 18 of platformio.ini to point to a different revision of the repo

ranger81 commented 3 years ago

Hi, thanks for your quick response even though you are on vacation. First of all, enjoy your holiday :-)

I tried experimenting with a few other branched but it caused several different follow up issues which I could not really handle to solve by myself.

Thanks!

krzmaz commented 3 years ago

Hey, sorry for the delay, getting back to reality was hard 😁 I've looked into the project, but haven't found any quick fix.

As a temporary solution, if you want to experiment on your own, while I figure out how to freeze the dependencies better, here are the exact commits I was using:

https://github.com/platformio/platform-espressif32/commit/833f645be533d0c25f29d05680031771260492ac https://github.com/espressif/arduino-esp32/commit/beedeea4541116106b38fc5c3a03821cdf6fe288

You can try pointing platformio.ini to them, but I'm not sure if it will work for the second, detached one. You can create a fork and point it to that 😁

I'll try to figure it out next week, but it might require some code changes, which will prolong things...

mancu1 commented 3 years ago

Hi, Do you have any updates on this issue?😁

krzmaz commented 2 years ago

Hey folks, sorry for the super late response. 😅

I finally got some time to look into the project again. I've managed to get it to compile again and noted the versions/commits of the dependencies I'm using. It seems that some behaviors of the Bluetooth stack have changed in the updated platform packages and I'm seeing problems with the new build working as the previous one.

Nevertheless, you should be now able to compile the project and use the WiFi captive portal to configure the WiFi and Bluetooth connection. It should pair with your desk (remember to put your desk into pairing mode) and print the height to the serial monitor. Sadly, the movement part does not work for me yet...

I'd appreciate it if you could test if you see the same problems.

Merry Christmas! 🎄

macca16 commented 2 years ago

No issues compiling with latest for me today. I was able to set configuration, but I'm not sure I've located the correct MAC address for my desk yet, so no pairing or printing of height as yet for me.

Thanks and Happy New Year!

krzmaz commented 2 years ago

Hey, thanks for the confirmation! For finding the MAC address of your desk, I recommend using an app like "nRF connect" on your smartphone. Regarding the Bluetooth stack problems I've mentioned above, I was investigating it in scope of https://github.com/h2zero/NimBLE-Arduino/issues/323 and even found a hacky fix in that library. I've pushed a commit changing the dependency to my fork with the fix. A clean project compiles and works for me fully! 🥳 Happy New Year! 😁