devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
539 stars 66 forks source link

sdkconfig.h: No such file or directory #15

Closed npirtube closed 3 years ago

npirtube commented 3 years ago

Hello, good morning,

First of all I would like to thank you for the work that you have done, congratulations!

On the other hand, I am trying to install on a Wemos D1 Mini board through the Arduino IDE.

But I have encountered the following error.

Arduino:1.8.15 (Windows 10), Tarjeta:"WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

In file included from D:\Documents\Home Assistant\SwitchBot\SwitchBot-MQTT-BLE-ESP32-main\SwitchBot-BLE2MQTT-ESP32\SwitchBot-BLE2MQTT-ESP32.ino:258:0:

NimBLEDevice.h:17:23: fatal error: sdkconfig.h: No such file or directory

include "sdkconfig.h"

                   ^

compilation terminated.

exit status 1

sdkconfig.h: No such file or directory

Please, Can anyone tell me how I can solve it?

devWaves commented 3 years ago

did you setup your IDE for the esp32 type you have? and then install all the required libraries?

the error your getting is most likely an IDE setup issue. I think that file is generated by the IDE

This is an issue you can find throughout the internet, many users have had with ArduinoIDE or the PlatformIO IDE. you shouldnt have to manually copy that file though

maybe try running the IDE as admin?

It is possible one of the required libraries was updated recently and broke, but not that I am aware of

if you have other libraries installed other than the ones needed for the esp32 switchbot code, you could be getting conflicts. ESP8266 libraries can interfere with ESP32 libraries

npirtube commented 3 years ago

Did you configure your IDE for the type of esp32 you have, and then install all the necessary libraries? Yes, I can load other projects without problems.

Are you trying to run the IDE as administrator? I have also tried, but without success

I have made sure I have all the libraries up to date. I have loaded other test sketches correctly. But every time I try to load this project, I always get the same error. Also, if I generate the sdkconfig.h file manually, then it tells me that a different file is missing.

I will continue testing.

npirtube commented 3 years ago

I have continued testing and finally the error was in the IDE configuration, the board control was not configured for an ESP32.

I was able to successfully integrate with my HA installation. Thank you very much for your work.

devWaves commented 3 years ago

no problem. glad it is working for you