Closed duojianghuji closed 2 years ago
Thanks for reporting this. I can confirm that I can reproduce this issue. Just to make sure the error message is searcheable, here is the output
Compiling .pioenvs/esp-43-fireplace/src/main.cpp.o
Generating LD script .pioenvs/esp-43-fireplace/ld/local.eagle.app.v6.common.ld
Compiling .pioenvs/esp-43-fireplace/lib0cb/ESPAsyncTCP-esphome/AsyncPrinter.cpp.o
Compiling .pioenvs/esp-43-fireplace/lib0cb/ESPAsyncTCP-esphome/ESPAsyncTCP.cpp.o
In file included from src/mlx90614_sensor.h:3:0,
from src/main.cpp:46:
.piolibdeps/esp-43-fireplace/Adafruit MLX90614 Library/Adafruit_MLX90614.h:18:32: fatal error: Adafruit_I2CDevice.h: No such file or directory
****************************************************************************
* Looking for Adafruit_I2CDevice.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Adafruit_I2CDevice.h"
* Web > https://platformio.org/lib/search?query=header:Adafruit_I2CDevice.h
*
****************************************************************************
#include <Adafruit_I2CDevice.h>
^
compilation terminated.
*** [.pioenvs/esp-43-fireplace/src/main.cpp.o] Error 1
======================================================================================================= [FAILED] Took 14.49 seconds ================
It seems as if more libraries need to be defined explicitly for the custom component to compile. On top of that a specific version of BusIO appears to be needed.
Can you please try the following configuration:
esphome:
...
includes:
- "custom_components/mlx90614_sensor.h"
libraries:
- SPI
- Wire
- adafruit/Adafruit BusIO @ 1.9.6
- "Adafruit MLX90614 Library"
Yes, it's working perfectly after adding more libraries. Thanks a lot!
It seems as if more libraries need to be defined explicitly for the custom component to compile. On top of that a specific version of BusIO appears to be needed.
Can you please try the following configuration:
esphome: ... includes: - "custom_components/mlx90614_sensor.h" libraries: - SPI - Wire - adafruit/Adafruit BusIO @ 1.9.6 - "Adafruit MLX90614 Library"
This worked! Thanks.
For users who use platformio:
Your in platformio.ini file lib_deps should be something like this : As @exxamalte mentioned.
lib_deps =
SPI
Wire
adafruit/Adafruit SSD1306@^2.5.7
adafruit/Adafruit GFX Library@^1.11.7
adafruit/Adafruit BusIO@^1.14.1
Adafruit MLX90614 Library
Hi, I tried to follow your instructions, but something wrong happened. it shows "Adafruit_I2CDevice.h: No such file or directory" It has been a long since I have been stuck in. Can you help to tackle it? I'm running the ESPHome version(2021.12.4)![image](https://user-images.githubusercontent.com/66355796/145513975-1c3870df-ed32-4300-a04b-386eddea9b9b.png)