dmitry-cherkas / esphome-danfoss-eco

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

Unable to compile with Home Assistant 2022.10.3 #10

Closed ryssel closed 1 year ago

ryssel commented 1 year ago

I get this error trying to install esphome-danfoss-eco. It has been working perfectly i think it broke with Home Assistant 2022.10.0

src/esphome/components/danfoss_eco/properties.cpp: In member function 'bool esphome::danfoss_eco::DeviceProperty::read_request(esphome::ble_client::BLEClient)': src/esphome/components/danfoss_eco/properties.cpp:29:59: error: 'class esphome::ble_client::BLEClient' has no member named 'gattc_if' auto status = esp_ble_gattc_read_char(client->gattc_if, ^ src/esphome/components/danfoss_eco/properties.cpp:30:59: error: 'class esphome::ble_client::BLEClient' has no member named 'conn_id' client->conn_id, ^ In file included from src/esphome/components/climate/climate.h:7:0, from src/esphome/components/danfoss_eco/properties.cpp:1: src/esphome/components/danfoss_eco/properties.cpp: In member function 'bool esphome::danfoss_eco::WritableProperty::write_request(esphome::ble_client::BLEClient, uint8_t, uint16_t)': src/esphome/components/danfoss_eco/properties.cpp:41:148: warning: 'std::__cxx11::string esphome::hexencode(const uint8_t, uint32_t)' is deprecated: hexencode() is deprecated, use format_hex_pretty() instead. [-Wdeprecated-declarations] ESP_LOGD(TAG, "[%s] writerequest: handle=%#04x, data=%s", this->component->get_name().c_str(), this->handle, hexencode(data, data_len).c_str()); ^ src/esphome/core/log.h:92:89: note: in definition of macro 'esph_log_d' esp_logprintf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS) ^ src/esphome/components/danfoss_eco/properties.cpp:41:13: note: in expansion of macro 'ESP_LOGD' ESP_LOGD(TAG, "[%s] writerequest: handle=%#04x, data=%s", this->component->get_name().c_str(), this->handle, hexencode(data, data_len).c_str()); ^ In file included from src/esphome/components/climate/climate.h:5:0, from src/esphome/components/danfoss_eco/properties.cpp:1: src/esphome/core/helpers.h:654:20: note: declared here inline std::string hexencode(const uint8_t data, uint32_t len) { return format_hex_pretty(data, len); } ^ src/esphome/components/danfoss_eco/properties.cpp:43:60: error: 'class esphome::ble_client::BLEClient' has no member named 'gattc_if' auto status = esp_ble_gattc_write_char(client->gattc_if, ^ src/esphome/components/danfoss_eco/properties.cpp:44:60: error: 'class esphome::ble_client::BLEClient' has no member named 'conn_id' client->conn_id, ^ src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::setup()': src/esphome/components/danfoss_eco/device.cpp:22:36: error: 'class esphome::ble_client::BLEClient' has no member named 'address' copy_address(this->parent()->address, this->parent()->remote_bda); ^ src/esphome/components/danfoss_eco/device.cpp:22:61: error: 'class esphome::ble_client::BLEClient' has no member named 'remote_bda' copy_address(this->parent()->address, this->parent()->remote_bda); ^ src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t)': src/esphome/components/danfoss_eco/device.cpp:99:63: error: 'class esphome::ble_client::BLEClient' has no member named 'remote_bda' if (memcmp(param->connect.remote_bda, this->parent()->remote_bda, 6) != 0) ^ In file included from src/esphome/components/climate/climate.h:7:0, from src/esphome/components/danfoss_eco/device.h:4, from src/esphome/components/danfoss_eco/device.cpp:1: src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::set_secret_key(uint8_t*, bool)': src/esphome/components/danfoss_eco/device.cpp:268:108: warning: 'std::cxx11::string esphome::hexencode(const uint8_t*, uint32_t)' is deprecated: hexencode() is deprecated, use format_hex_pretty() instead. [-Wdeprecated-declarations] ESP_LOGD(TAG, "[%s] secret_key bytes: %s", this->get_name().c_str(), hexencode(key, SECRET_KEY_LENGTH).c_str()); ^ src/esphome/core/log.h:92:89: note: in definition of macro 'esph_log_d' esp_logprintf(ESPHOME_LOG_LEVEL_DEBUG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS__) ^ src/esphome/components/danfoss_eco/device.cpp:268:7: note: in expansion of macro 'ESP_LOGD' ESP_LOGD(TAG, "[%s] secret_key bytes: %s", this->get_name().c_str(), hexencode(key, SECRET_KEY_LENGTH).c_str()); ^ In file included from src/esphome/core/automation.h:5:0, from src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.h:4, from src/esphome/components/esp32_ble_client/ble_client_base.h:5, from src/esphome/components/ble_client/ble_client.h:3, from src/esphome/components/danfoss_eco/device.h:3, from src/esphome/components/danfoss_eco/device.cpp:1: src/esphome/core/helpers.h:654:20: note: declared here inline std::string hexencode(const uint8_t *data, uint32_t len) { return format_hex_pretty(data, len); } ^ Compiling /data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/socket/bsd_sockets_impl.cpp.o [/data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/properties.cpp.o] Error 1 [/data/wemos-esp32/.pioenvs/wemos-esp32/src/esphome/components/danfoss_eco/device.cpp.o] Error 1

Aephir commented 1 year ago

I can report the same errors on HA v2022.10.4, ESPHome add-on v2022.9.4.

This is an ESP32 I had already set up with both Airthings Wave and the Danfoss Eco in previous versions (can't remember exactly, but think ESPhome was around 2022.4 last time I compiled), but wanting to make a few changes, I could no longer compile in the new ESPHome version.

My yaml ``` esphome: name: esp32-ble-proxy-1 libraries: - xxtea-iot-crypt@2.0.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: "REDACTED" 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: ```
My compile logs ``` INFO Reading configuration /config/esphome/esp32-ble-proxy-1.yaml... INFO Generating C++ source... INFO Compiling app... 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 |-- AsyncTCP-esphome @ 1.2.2 |-- xxtea-iot-crypt @ 2.0.1 |-- WiFi @ 1.0 |-- FS @ 1.0 |-- Update @ 1.0 |-- ESPAsyncWebServer-esphome @ 2.1.0 | |-- AsyncTCP-esphome @ 1.2.2 |-- DNSServer @ 1.1.0 |-- ESPmDNS @ 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/properties.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/md5/md5.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/mdns/mdns_component.cpp.o Compiling /data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o src/esphome/components/danfoss_eco/properties.cpp: In member function 'bool esphome::danfoss_eco::DeviceProperty::read_request(esphome::ble_client::BLEClient*)': src/esphome/components/danfoss_eco/properties.cpp:29:59: error: 'class esphome::ble_client::BLEClient' has no member named 'gattc_if' auto status = esp_ble_gattc_read_char(client->gattc_if, ^ src/esphome/components/danfoss_eco/properties.cpp:30:59: error: 'class esphome::ble_client::BLEClient' has no member named 'conn_id' client->conn_id, ^ In file included from src/esphome/components/climate/climate.h:7:0, from src/esphome/components/danfoss_eco/properties.cpp:1: src/esphome/components/danfoss_eco/properties.cpp: In member function 'bool esphome::danfoss_eco::WritableProperty::write_request(esphome::ble_client::BLEClient*, uint8_t*, uint16_t)': src/esphome/components/danfoss_eco/properties.cpp:41:148: warning: 'std::__cxx11::string esphome::hexencode(const uint8_t*, uint32_t)' is deprecated: hexencode() is deprecated, use format_hex_pretty() instead. [-Wdeprecated-declarations] ESP_LOGD(TAG, "[%s] write_request: handle=%#04x, data=%s", this->component_->get_name().c_str(), this->handle, hexencode(data, data_len).c_str()); ^ src/esphome/core/log.h:92:89: note: in definition of macro 'esph_log_d' esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__) ^ src/esphome/components/danfoss_eco/properties.cpp:41:13: note: in expansion of macro 'ESP_LOGD' ESP_LOGD(TAG, "[%s] write_request: handle=%#04x, data=%s", this->component_->get_name().c_str(), this->handle, hexencode(data, data_len).c_str()); ^ In file included from src/esphome/components/climate/climate.h:5:0, from src/esphome/components/danfoss_eco/properties.cpp:1: src/esphome/core/helpers.h:654:20: note: declared here inline std::string hexencode(const uint8_t *data, uint32_t len) { return format_hex_pretty(data, len); } ^ src/esphome/components/danfoss_eco/properties.cpp:43:60: error: 'class esphome::ble_client::BLEClient' has no member named 'gattc_if' auto status = esp_ble_gattc_write_char(client->gattc_if, ^ src/esphome/components/danfoss_eco/properties.cpp:44:60: error: 'class esphome::ble_client::BLEClient' has no member named 'conn_id' client->conn_id, ^ src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::setup()': src/esphome/components/danfoss_eco/device.cpp:22:36: error: 'class esphome::ble_client::BLEClient' has no member named 'address' copy_address(this->parent()->address, this->parent()->remote_bda); ^ src/esphome/components/danfoss_eco/device.cpp:22:61: error: 'class esphome::ble_client::BLEClient' has no member named 'remote_bda' copy_address(this->parent()->address, this->parent()->remote_bda); ^ src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)': src/esphome/components/danfoss_eco/device.cpp:99:63: error: 'class esphome::ble_client::BLEClient' has no member named 'remote_bda' if (memcmp(param->connect.remote_bda, this->parent()->remote_bda, 6) != 0) ^ In file included from src/esphome/components/climate/climate.h:7:0, from src/esphome/components/danfoss_eco/device.h:4, from src/esphome/components/danfoss_eco/device.cpp:1: src/esphome/components/danfoss_eco/device.cpp: In member function 'virtual void esphome::danfoss_eco::Device::set_secret_key(uint8_t*, bool)': src/esphome/components/danfoss_eco/device.cpp:268:108: warning: 'std::__cxx11::string esphome::hexencode(const uint8_t*, uint32_t)' is deprecated: hexencode() is deprecated, use format_hex_pretty() instead. [-Wdeprecated-declarations] ESP_LOGD(TAG, "[%s] secret_key bytes: %s", this->get_name().c_str(), hexencode(key, SECRET_KEY_LENGTH).c_str()); ^ src/esphome/core/log.h:92:89: note: in definition of macro 'esph_log_d' esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__) ^ src/esphome/components/danfoss_eco/device.cpp:268:7: note: in expansion of macro 'ESP_LOGD' ESP_LOGD(TAG, "[%s] secret_key bytes: %s", this->get_name().c_str(), hexencode(key, SECRET_KEY_LENGTH).c_str()); ^ In file included from src/esphome/core/automation.h:5:0, from src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.h:4, from src/esphome/components/esp32_ble_client/ble_client_base.h:5, from src/esphome/components/ble_client/ble_client.h:3, from src/esphome/components/danfoss_eco/device.h:3, from src/esphome/components/danfoss_eco/device.cpp:1: src/esphome/core/helpers.h:654:20: note: declared here inline std::string hexencode(const uint8_t *data, uint32_t len) { return format_hex_pretty(data, len); } ^ *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/properties.cpp.o] Error 1 *** [/data/esp32-ble-proxy-1/.pioenvs/esp32-ble-proxy-1/src/esphome/components/danfoss_eco/device.cpp.o] Error 1 ========================== [FAILED] Took 6.44 seconds ========================== ```
NdS-Research-Facilities commented 1 year ago

update here https://github.com/dmitry-cherkas/esphome-danfoss-eco/issues/11