dmitry-cherkas / esphome-danfoss-eco

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

Compile error #3

Closed bipsendk closed 2 years ago

bipsendk commented 2 years ago

When trying to compile on ESPhome 2022.1.2 in HomeAssistant, I get:

` Processing thermostat-sleepingroom (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 3.3.2)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf Library Manager: Installing xxtea-iot-crypt @ 2.0.1

Downloading [------------------------------------] 0% Downloading [##################------------------] 50% Downloading [####################################] 100%

Unpacking [------------------------------------] 0% Unpacking [###---------------------------------] 8% Unpacking [######------------------------------] 16% Unpacking [#########---------------------------] 25% Unpacking [############------------------------] 33% Unpacking [###############---------------------] 41% Unpacking [##################------------------] 50% Unpacking [#####################---------------] 58% Unpacking [########################------------] 66% Unpacking [###########################---------] 75% Unpacking [##############################------] 83% Unpacking [#################################---] 91% Unpacking [####################################] 100% Library Manager: xxtea-iot-crypt @ 2.0.1 has been installed! Dependency Graph |-- 1.2.2 |-- 2.0.1 |-- 1.0 |-- 1.0 |-- 1.0 |-- 2.1.0 | |-- 1.2.2 |-- 1.1.0 |-- 1.0 Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/api_connection.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/api_frame_helper.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/api_pb2.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/api_pb2_service.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/api_server.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/list_entities.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/proto.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/subscribe_state.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/user_services.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/api/util.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/binary_sensor/automation.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/binary_sensor/binary_sensor.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/binary_sensor/filter.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/ble_client/ble_client.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/captive_portal/captive_portal.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/climate/climate.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/climate/climate_mode.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/climate/climate_traits.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/danfoss_eco/device.cpp.o Compiling /data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/danfoss_eco/helpers.cpp.o src/esphome/components/danfoss_eco/helpers.cpp: In function 'void esphome::danfoss_eco::parse_hex_str(const char, size_t, uint8_t)': src/esphome/components/danfoss_eco/helpers.cpp:22:49: error: no matching function for call to 'parse_hex(const char&)' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:477:8: note: candidate: size_t esphome::parse_hex(const char, size_t, uint8_t, size_t) size_t parse_hex(const char str, size_t len, uint8_t data, size_t count); ^ src/esphome/core/helpers.h:477:8: note: candidate expects 4 arguments, 1 provided src/esphome/core/helpers.h:479:13: note: candidate: bool esphome::parse_hex(const char, uint8_t, size_t) inline bool parse_hex(const char str, uint8_t data, size_t count) { ^ src/esphome/core/helpers.h:479:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:483:13: note: candidate: bool esphome::parse_hex(const string&, uint8_t, size_t) inline bool parse_hex(const std::string &str, uint8_t data, size_t count) { ^ src/esphome/core/helpers.h:483:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:487:13: note: candidate: bool esphome::parse_hex(const char, std::vector&, size_t) inline bool parse_hex(const char str, std::vector &data, size_t count) { ^ src/esphome/core/helpers.h:487:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:492:13: note: candidate: bool esphome::parse_hex(const string&, std::vector&, size_t) inline bool parse_hex(const std::string &str, std::vector &data, size_t count) { ^ src/esphome/core/helpers.h:492:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:502:13: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const char, size_t) optional parse_hex(const char str, size_t len) { ^ src/esphome/core/helpers.h:502:13: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:48: note: cannot convert '(data + ((sizetype)(i 2u)))' (type 'const char') to type 'const char' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:509:84: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const char) template<typename T, enable_if_t<std::is_unsigned::value, int> = 0> optional parse_hex(const char str) { ^ src/esphome/core/helpers.h:509:84: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:48: note: cannot convert '(data + ((sizetype)(i 2u)))' (type 'const char') to type 'const char' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:513:84: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const string&) template<typename T, enable_if_t<std::is_unsigned::value, int> = 0> optional parse_hex(const std::string &str) { ^ src/esphome/core/helpers.h:513:84: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:48: note: cannot convert '(data + ((sizetype)(i 2u)))' (type 'const char') to type 'const string& {aka const std::cxx11::basic_string&}' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ src/esphome/components/danfoss_eco/helpers.cpp:22:92: error: no matching function for call to 'parse_hex(const char&)' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:477:8: note: candidate: size_t esphome::parse_hex(const char, size_t, uint8_t, size_t) size_t parse_hex(const char str, size_t len, uint8_t data, size_t count); ^ src/esphome/core/helpers.h:477:8: note: candidate expects 4 arguments, 1 provided src/esphome/core/helpers.h:479:13: note: candidate: bool esphome::parse_hex(const char, uint8_t, size_t) inline bool parse_hex(const char str, uint8_t data, size_t count) { ^ src/esphome/core/helpers.h:479:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:483:13: note: candidate: bool esphome::parse_hex(const string&, uint8_t, size_t) inline bool parse_hex(const std::string &str, uint8_t data, size_t count) { ^ src/esphome/core/helpers.h:483:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:487:13: note: candidate: bool esphome::parse_hex(const char, std::vector&, size_t) inline bool parse_hex(const char str, std::vector &data, size_t count) { ^ src/esphome/core/helpers.h:487:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:492:13: note: candidate: bool esphome::parse_hex(const string&, std::vector&, size_t) inline bool parse_hex(const std::string &str, std::vector &data, size_t count) { ^ src/esphome/core/helpers.h:492:13: note: candidate expects 3 arguments, 1 provided src/esphome/core/helpers.h:502:13: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const char, size_t) optional parse_hex(const char str, size_t len) { ^ src/esphome/core/helpers.h:502:13: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:91: note: cannot convert '(data + (((sizetype)(i 2u)) + 1u))' (type 'const char') to type 'const char' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:509:84: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const char) template<typename T, enable_if_t<std::is_unsigned::value, int> = 0> optional parse_hex(const char str) { ^ src/esphome/core/helpers.h:509:84: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:91: note: cannot convert '(data + (((sizetype)(i 2u)) + 1u))' (type 'const char') to type 'const char' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ In file included from src/esphome/components/danfoss_eco/helpers.cpp:1:0: src/esphome/core/helpers.h:513:84: note: candidate: template<class T, typename std::enable_if<std::is_unsigned<_Tp>::value, int>::type > esphome::optional esphome::parse_hex(const string&) template<typename T, enable_if_t<std::is_unsigned::value, int> = 0> optional parse_hex(const std::string &str) { ^ src/esphome/core/helpers.h:513:84: note: template argument deduction/substitution failed: src/esphome/components/danfoss_eco/helpers.cpp:22:91: note: cannot convert '(data + (((sizetype)(i 2u)) + 1u))' (type 'const char') to type 'const string& {aka const std::cxx11::basic_string&}' buff[i] = (parse_hex(data[i 2]).value() << 4) | parse_hex(data[i 2 + 1]).value(); ^ *** [/data/thermostat-sleepingroom/.pioenvs/thermostat-sleepingroom/src/esphome/components/danfoss_eco/helpers.cpp.o] Error 1 ========================= [FAILED] Took 28.50 seconds ========================= `

dmitry-cherkas commented 2 years ago

@bipsendk , thanks for reporting the issue. I've prepared a new release (v1.1.1), which should address this issue.