Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies not found despite installed on esp-idf framework #5764

Open
SodaWithoutSparkles opened this issue May 4, 2024 · 3 comments
Open

Comments

@SodaWithoutSparkles
Copy link

SodaWithoutSparkles commented May 4, 2024

The problem

I was trying to use the IRremoteESP8266 library to implement control of a daikin air conditioner. Code of which can be found here. The issue is that, when using the esp-idf framework, esphome reports missing dependency, despite installing it.

Which version of ESPHome has the issue?

2024.4.1 and 2024.4.2

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

Does not matter

What platform are you using?

ESP32

Board

Compile time issue, not even installed to hardware

Component causing the issue

library manager(?)

Example YAML snippet

esphome:
  name: test-esp32
  friendly_name: test-esp32
  includes: 
    # Find this file at the linked repo
    - include/irdaikin.h
  libraries:
    - crankyoldgit/IRremoteESP8266@^2.8.6

esp32:
  board: esp32dev
  framework:
    # Change this to arduino and it would be fine
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "REDACTED"

ota:
  password: "REDACTED"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password


time:
  - platform: homeassistant
    timezone: Europe/London
    id: esptime
    
switch:
  - platform: template
    name: "AC status"
    id: ac_status
    restore_mode: RESTORE_DEFAULT_OFF 
    optimistic: True

sensor:
  - platform: homeassistant
    id: living_room_temperature
    entity_id: sensor.living_room_temperature
    internal: true
climate:
  - platform: custom
    lambda: |-
      auto daikinac = new DaikinAC();
      daikinac->set_sensor(id(living_room_temperature));
      App.register_component(daikinac);
      return {daikinac};
    climates:
      - name: "AC"
        on_state: 
          - lambda: |-
              id(ac_status).publish_state(x.mode != CLIMATE_MODE_OFF);

Anything in the logs that might be useful for us?

INFO ESPHome 2024.4.1
INFO Reading configuration /config/test-esp32.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing test-esp32 (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
Library Manager: Installing crankyoldgit/IRremoteESP8266 @ ^2.8.6
INFO Installing crankyoldgit/IRremoteESP8266 @ ^2.8.6
Unpacking  [####################################]  100%
Library Manager: IRremoteESP8266@2.8.6 has been installed!
INFO IRremoteESP8266@2.8.6 has been installed!
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking  [####################################]  100%
Library Manager: noise-c@0.1.4 has been installed!
INFO noise-c@0.1.4 has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking  [####################################]  100%
Library Manager: libsodium@1.10018.1 has been installed!
INFO libsodium@1.10018.1 has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40406.240122 (4.4.6) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Generating assembly for certificate bundle...
Dependency Graph
|-- noise-c @ 0.1.4
Compiling .pioenvs/test-esp32/src/esphome/components/api/api_connection.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/api_frame_helper.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/api_pb2.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/api_pb2_service.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/api_server.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/list_entities.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/proto.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/subscribe_state.o
Compiling .pioenvs/test-esp32/src/esphome/components/api/user_services.o
Compiling .pioenvs/test-esp32/src/esphome/components/climate/climate.o
Compiling .pioenvs/test-esp32/src/esphome/components/climate/climate_mode.o
Compiling .pioenvs/test-esp32/src/esphome/components/climate/climate_traits.o
Compiling .pioenvs/test-esp32/src/esphome/components/esp32/core.o
Compiling .pioenvs/test-esp32/src/esphome/components/esp32/gpio.o
Compiling .pioenvs/test-esp32/src/esphome/components/esp32/preferences.o
Compiling .pioenvs/test-esp32/src/esphome/components/homeassistant/sensor/homeassistant_sensor.o
Compiling .pioenvs/test-esp32/src/esphome/components/homeassistant/time/homeassistant_time.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger_esp32.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger_esp8266.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger_host.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger_libretiny.o
Compiling .pioenvs/test-esp32/src/esphome/components/logger/logger_rp2040.o
Compiling .pioenvs/test-esp32/src/esphome/components/md5/md5.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_component.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_esp32.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_esp8266.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_host.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_libretiny.o
Compiling .pioenvs/test-esp32/src/esphome/components/mdns/mdns_rp2040.o
Compiling .pioenvs/test-esp32/src/esphome/components/network/util.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_backend_arduino_esp32.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_backend_arduino_esp8266.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_backend_arduino_libretiny.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_backend_arduino_rp2040.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_backend_esp_idf.o
Compiling .pioenvs/test-esp32/src/esphome/components/ota/ota_component.o
Compiling .pioenvs/test-esp32/src/esphome/components/sensor/automation.o
Compiling .pioenvs/test-esp32/src/esphome/components/sensor/filter.o
Compiling .pioenvs/test-esp32/src/esphome/components/sensor/sensor.o
Compiling .pioenvs/test-esp32/src/esphome/components/socket/bsd_sockets_impl.o
Compiling .pioenvs/test-esp32/src/esphome/components/socket/lwip_raw_tcp_impl.o
Compiling .pioenvs/test-esp32/src/esphome/components/socket/lwip_sockets_impl.o
Compiling .pioenvs/test-esp32/src/esphome/components/socket/socket.o
Compiling .pioenvs/test-esp32/src/esphome/components/switch/automation.o
Compiling .pioenvs/test-esp32/src/esphome/components/switch/switch.o
Compiling .pioenvs/test-esp32/src/esphome/components/template/switch/template_switch.o
Compiling .pioenvs/test-esp32/src/esphome/components/time/automation.o
Compiling .pioenvs/test-esp32/src/esphome/components/time/real_time_clock.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component_esp32_arduino.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component_esp8266.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component_esp_idf.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component_libretiny.o
Compiling .pioenvs/test-esp32/src/esphome/components/wifi/wifi_component_pico_w.o
Compiling .pioenvs/test-esp32/src/esphome/core/application.o
Compiling .pioenvs/test-esp32/src/esphome/core/color.o
Compiling .pioenvs/test-esp32/src/esphome/core/component.o
Compiling .pioenvs/test-esp32/src/esphome/core/component_iterator.o
Compiling .pioenvs/test-esp32/src/esphome/core/controller.o
Compiling .pioenvs/test-esp32/src/esphome/core/entity_base.o
Compiling .pioenvs/test-esp32/src/esphome/core/helpers.o
Compiling .pioenvs/test-esp32/src/esphome/core/log.o
Compiling .pioenvs/test-esp32/src/esphome/core/ring_buffer.o
Compiling .pioenvs/test-esp32/src/esphome/core/scheduler.o
Compiling .pioenvs/test-esp32/src/esphome/core/string_ref.o
Compiling .pioenvs/test-esp32/src/esphome/core/time.o
Compiling .pioenvs/test-esp32/src/esphome/core/util.o
Compiling .pioenvs/test-esp32/src/main.o
Generating LD script .pioenvs/test-esp32/memory.ld
In file included from src/main.cpp:26:
src/irdaikin.h:2:10: fatal error: IRremoteESP8266.h: No such file or directory

*************************************************************************
* Looking for IRremoteESP8266.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:IRremoteESP8266.h"
* Web  > https://registry.platformio.org/search?q=header:IRremoteESP8266.h
*
*************************************************************************

 #include "IRremoteESP8266.h"
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/test-esp32/src/main.o] Error 1
Compiling .pioenvs/test-esp32/app_trace/app_trace.o
========================= [FAILED] Took 50.62 seconds =========================

Additional information

@Gadgit83
Copy link

I get similar issues when trying to include external libraries, did you find a solution?

@Gadgit83
Copy link

Gadgit83 commented Jul 13, 2024

You may need a 'platformio.ini' file alongside your .yaml file in the ESPHome config folder with content something like this:

[env:test-esp32]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
  crankyoldgit/IRremoteESP8266@^2.8.6

@SodaWithoutSparkles
Copy link
Author

SodaWithoutSparkles commented Jul 14, 2024

@Gadgit83 but I am not using the arduino framework?

And no, I did not find a solution. I just bought a esp8266.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants