dmitry-cherkas / esphome-danfoss-eco

Extend Danfoss Eco eTRV BLE range over WiFi with ESPHome.
MIT License
21 stars 11 forks source link

I can't install it can't find xxtea-lib.h #9

Closed ryssel closed 1 year ago

ryssel commented 1 year ago

I cant install. I get this error: Compiling /data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/device.cpp.o Compiling /data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/helpers.cpp.o Compiling /data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/properties.cpp.o Compiling /data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/xxtea.cpp.o In file included from src/esphome/components/danfoss_eco/xxtea.cpp:1:0: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory


compilation terminated. *** [/data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/xxtea.cpp.o] Error 1 In file included from src/esphome/components/danfoss_eco/helpers.h:3:0, from src/esphome/components/danfoss_eco/helpers.cpp:4: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory

dmitry-cherkas commented 1 year ago

Hi @ryssel , please share some info on your build environment: esphome/platformio/python versions? Also, which command are you using to build?

Aephir commented 1 year ago

Hi, I can report the same (full log below).

I am doing this on an ESP32 already set up in ESPHome, so over wifi via the Home Assistant ESPHome integration. I'm running Home Assistant OS (v8.5) as a VM with Home Assistant Core 2022.9.1.

The ESPHome was already running to monitor Airthings Wave BLE devices, where it has worked fine for a while.

I got though the discovery "phase" to obtain the MAC just fine, no problems with build on that part.

The logs from the ESPHome section of Home Assistant when trying to install. ``` Processing esp32-ble-proxy-1 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0) -------------------------------------------------------------------------------- HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf Dependency Graph |-- 1.2.2 |-- 1.0 |-- 1.0 |-- 1.0 |-- 2.1.0 | |-- 1.2.2 |-- 1.1.0 |-- 1.0 Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/device.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/helpers.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/properties.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/xxtea.cpp.o In file included from src/esphome/components/danfoss_eco/xxtea.cpp:1:0: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory ******************************************************************* * Looking for xxtea-lib.h dependency? Check our library registry! * * CLI > platformio lib search "header:xxtea-lib.h" * Web > https://registry.platformio.org/search?q=header:xxtea-lib.h * ******************************************************************* compilation terminated. *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/xxtea.cpp.o] Error 1 In file included from src/esphome/components/danfoss_eco/helpers.h:3:0, from src/esphome/components/danfoss_eco/helpers.cpp:4: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory ******************************************************************* * Looking for xxtea-lib.h dependency? Check our library registry! * * CLI > platformio lib search "header:xxtea-lib.h" * Web > https://registry.platformio.org/search?q=header:xxtea-lib.h * ******************************************************************* compilation terminated. *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/helpers.cpp.o] Error 1 In file included from src/esphome/components/danfoss_eco/helpers.h:3:0, from src/esphome/components/danfoss_eco/my_component.h:8, from src/esphome/components/danfoss_eco/properties.h:6, from src/esphome/components/danfoss_eco/properties.cpp:4: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory ******************************************************************* * Looking for xxtea-lib.h dependency? Check our library registry! * * CLI > platformio lib search "header:xxtea-lib.h" * Web > https://registry.platformio.org/search?q=header:xxtea-lib.h * ******************************************************************* compilation terminated. *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/properties.cpp.o] Error 1 In file included from src/esphome/components/danfoss_eco/helpers.h:3:0, from src/esphome/components/danfoss_eco/device.h:8, from src/esphome/components/danfoss_eco/device.cpp:1: src/esphome/components/danfoss_eco/xxtea.h:3:23: fatal error: xxtea-lib.h: No such file or directory ******************************************************************* * Looking for xxtea-lib.h dependency? Check our library registry! * * CLI > platformio lib search "header:xxtea-lib.h" * Web > https://registry.platformio.org/search?q=header:xxtea-lib.h * ******************************************************************* compilation terminated. *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/device.cpp.o] Error 1 ========================== [FAILED] Took 2.55 seconds ========================== ```
The yaml file including everything related to Airthings Wave - Would it be anissue to use the same ESP32 for both? ``` esphome: name: esp32-ble-proxy-1 esp32: board: esp32dev framework: type: arduino # Enable logging logger: level: DEBUG # Required for the tracker to show the device # Enable Home Assistant API api: ota: password: "c99817a108cdca3e4260d3fe94390da7" wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Esp32-Ble-Proxy-1" password: "REDACTED" captive_portal: sensor: - platform: airthings_wave_plus ble_client_id: airthings_basement update_interval: 5min # default temperature: name: "WavePlus Basement Temperature" radon: name: "WavePlus Basement Radon" radon_long_term: name: "WavePlus Basement Radon Long Term" pressure: name: "WavePlus Basement Pressure" humidity: name: "WavePlus Basement Humidity" co2: name: "WavePlus Basement CO2" tvoc: name: "WavePlus Basement VOC" - platform: airthings_wave_plus ble_client_id: airthings_bedroom update_interval: 5min # default temperature: name: "WavePlus Bedroom Temperature" radon: name: "WavePlus Bedroom Radon" radon_long_term: name: "WavePlus Bedroom Radon Long Term" pressure: name: "WavePlus Bedroom Pressure" humidity: name: "WavePlus Bedroom Humidity" co2: name: "WavePlus Bedroom CO2" tvoc: name: "WavePlus Bedroom VOC" climate: - platform: danfoss_eco name: "Danfoss eTRV 01" ble_client_id: danfoss_eco_01 battery_level: name: "Danfoss eTRV 01 Battery Level" temperature: name: "Danfoss eTRV 01 Temperature" update_interval: 30min external_components: - source: github://dmitry-cherkas/esphome-danfoss-eco@v1.1.2 ble_client: - mac_address: REDACTED id: airthings_basement - mac_address: REDACTED id: airthings_bedroom - mac_address: REDACTED id: danfoss_eco_01 esp32_ble_tracker: ```
dmitry-cherkas commented 1 year ago

Hi @Aephir , sorry for a delayed reply. I see you are missing a library definition in your YAML file, here is how you fix it:

esphome:
  name: esp32-ble-proxy-1
  libraries:
    - xxtea-iot-crypt@2.0.1
# the rest of the file is unchanged

Hope it helps!

Aephir commented 1 year ago

That seems to have done the trick, thanks a lot!

casperghst42 commented 5 months ago

I am having the same problem.

The package is installed:

$ pio pkg search "header:xxtea-lib.h" Found 1 packages (page 1 of 1)

boseji/xxtea-iot-crypt Library • 2.0.1 • Published on Thu May 13 04:04:51 2021 XXTEA Cryptography Library for use in IoT gadgets. Helps to encrypt and decrypt data using shor and simple XXTEA algorithm

yaml file

esphome:
  name: etrv2ha
  libraries:
    - xxtea-iot-crypt@2.0.1
  name_add_mac_suffix: true

external_components:
  - source: github://dmitry-cherkas/esphome-danfoss-eco@v1.1.4

Error:


Compiling .pioenvs/etrv2ha/src/esphome/components/danfoss_eco/properties.o
In file included from src/esphome/components/danfoss_eco/helpers.h:3,
                 from src/esphome/components/danfoss_eco/helpers.cpp:4:
src/esphome/components/danfoss_eco/xxtea.h:3:10: fatal error: xxtea-lib.h: No such file or directory

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

 #include <xxtea-lib.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/etrv2ha/src/esphome/components/danfoss_eco/helpers.o] Error 1
In file included from src/esphome/components/danfoss_eco/helpers.h:3,
                 from src/esphome/components/danfoss_eco/device.h:8,
                 from src/esphome/components/danfoss_eco/device.cpp:1:
src/esphome/components/danfoss_eco/xxtea.h:3:10: fatal error: xxtea-lib.h: No such file or directory

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

 #include <xxtea-lib.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/etrv2ha/src/esphome/components/danfoss_eco/device.o] Error 1
In file included from src/esphome/components/danfoss_eco/helpers.h:3,
                 from src/esphome/components/danfoss_eco/my_component.h:8,
                 from src/esphome/components/danfoss_eco/properties.h:6,
                 from src/esphome/components/danfoss_eco/properties.cpp:4:
src/esphome/components/danfoss_eco/xxtea.h:3:10: fatal error: xxtea-lib.h: No such file or directory

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

 #include <xxtea-lib.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/etrv2ha/src/esphome/components/danfoss_eco/properties.o] Error 1

For me it looks like there is an include problem, but I do not know how to fix this.

ckoca commented 5 months ago

@casperghst42 Can you try using the arduino framework:

esp32:
  board: esp32dev
  framework:
    type: arduino
    version: recommended
casperghst42 commented 5 months ago

@ckoca that fixed it - thank you very much.