esphome-idasen-desk-controller
esphome-idasen-desk-controller copied to clipboard
Support for esp-idf framework?
Any idea what it would take to allow this to work with the esp-idf framework? I'm trying to run this on an M5 Stamp C3U (an ESP32-C3 variant), but only the esp-idf framework supports the esp32-c3 boards. When I attempt to compile with esp-idf framework, I get the following:
INFO Reading configuration /config/office-desk-controller.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing office-desk-controller (board: esp32-c3-devkitm-1; framework: espidf; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- framework-espidf 3.40302.0 (4.3.2)
- tool-cmake 3.16.4
- tool-ninja 1.7.1
- toolchain-riscv32-esp 8.4.0+2021r2-patch2
- toolchain-xtensa-esp32s2 8.4.0+2021r2-patch2
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
No dependencies
Compiling .pioenvs/office-desk-controller/src/esphome/components/idasen_desk_controller/idasen_desk_controller.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/mdns/mdns_esp_idf.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/network/util.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/ota/ota_backend_arduino_esp32.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/ota/ota_backend_arduino_esp8266.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/ota/ota_backend_esp_idf.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/ota/ota_component.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/sensor/automation.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/sensor/filter.o
Compiling .pioenvs/office-desk-controller/src/esphome/components/sensor/sensor.o
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:16:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::loop() {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:18:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::setup() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::setup()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:20:3: error: invalid use of 'this' in non-member function
this->set_interval("update_desk", 200, [this]() { this->move_desk_(); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:20:43: error: invalid use of 'this' in non-member function
this->set_interval("update_desk", 200, [this]() { this->move_desk_(); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In lambda function:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:20:53: error: 'this' was not captured for this lambda function
this->set_interval("update_desk", 200, [this]() { this->move_desk_(); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:23:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::dump_config() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::dump_config()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:25:51: error: invalid use of 'this' in non-member function
ESP_LOGCONFIG(TAG, " MAC address : %s", this->parent()->address_str().c_str());
^~~~
src/esphome/core/log.h:94:90: note: in definition of macro 'esph_log_config'
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:25:3: note: in expansion of macro 'ESP_LOGCONFIG'
ESP_LOGCONFIG(TAG, " MAC address : %s", this->parent()->address_str().c_str());
^~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:26:51: error: invalid use of 'this' in non-member function
ESP_LOGCONFIG(TAG, " Notifications : %s", this->notify_disable_ ? "disable" : "enable");
^~~~
src/esphome/core/log.h:94:90: note: in definition of macro 'esph_log_config'
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:26:3: note: in expansion of macro 'ESP_LOGCONFIG'
ESP_LOGCONFIG(TAG, " Notifications : %s", this->notify_disable_ ? "disable" : "enable");
^~~~~~~~~~~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.h:4,
from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:1:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:27: error: invalid use of 'this' in non-member function
LOG_COVER(" ", "Desk", this);
^~~~
src/esphome/components/cover/cover.h:16:8: note: in definition of macro 'LOG_COVER'
if ((obj) != nullptr) { \
^~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:27: error: invalid use of 'this' in non-member function
LOG_COVER(" ", "Desk", this);
^~~~
src/esphome/core/log.h:94:90: note: in definition of macro 'esph_log_config'
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/cover/cover.h:17:5: note: in expansion of macro 'ESP_LOGCONFIG'
ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
^~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:3: note: in expansion of macro 'LOG_COVER'
LOG_COVER(" ", "Desk", this);
^~~~~~~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.h:4,
from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:1:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:27: error: invalid use of 'this' in non-member function
LOG_COVER(" ", "Desk", this);
^~~~
src/esphome/components/cover/cover.h:18:21: note: in definition of macro 'LOG_COVER'
auto traits_ = (obj)->get_traits(); \
^~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:27: error: invalid use of 'this' in non-member function
LOG_COVER(" ", "Desk", this);
^~~~
src/esphome/components/cover/cover.h:22:11: note: in definition of macro 'LOG_COVER'
if (!(obj)->get_device_class().empty()) { \
^~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:27: error: invalid use of 'this' in non-member function
LOG_COVER(" ", "Desk", this);
^~~~
src/esphome/core/log.h:94:90: note: in definition of macro 'esph_log_config'
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/cover/cover.h:23:7: note: in expansion of macro 'ESP_LOGCONFIG'
ESP_LOGCONFIG(TAG, "%s Device Class: '%s'", prefix, (obj)->get_device_class().c_str()); \
^~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:27:3: note: in expansion of macro 'LOG_COVER'
LOG_COVER(" ", "Desk", this);
^~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:30:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:42:55: error: invalid use of 'this' in non-member function
ESP_LOGI(TAG, "[%s] Connected successfully!", this->get_name().c_str());
^~~~
src/esphome/core/log.h:105:88: note: in definition of macro 'esph_log_i'
esp_log_printf_(ESPHOME_LOG_LEVEL_INFO, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:42:9: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "[%s] Connected successfully!", this->get_name().c_str());
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:49:43: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "[%s] Disconnected!", this->get_name().c_str());
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:49:7: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "[%s] Disconnected!", this->get_name().c_str());
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:50:7: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:56:7: error: invalid use of 'this' in non-member function
this->output_handle_ = 0;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:57:25: error: invalid use of 'this' in non-member function
auto chr_output = this->parent()->get_characteristic(this->output_service_uuid_, this->output_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:57:60: error: invalid use of 'this' in non-member function
auto chr_output = this->parent()->get_characteristic(this->output_service_uuid_, this->output_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:57:88: error: invalid use of 'this' in non-member function
auto chr_output = this->parent()->get_characteristic(this->output_service_uuid_, this->output_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:59:9: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:60:72: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->output_service_uuid_.to_string().c_str(),
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:60:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->output_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:61:18: error: invalid use of 'this' in non-member function
this->output_char_uuid_.to_string().c_str());
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:60:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->output_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:64:7: error: invalid use of 'this' in non-member function
this->output_handle_ = chr_output->handle;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:68:45: error: invalid use of 'this' in non-member function
esp_ble_gattc_register_for_notify(this->parent()->gattc_if, this->parent()->remote_bda, this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:68:71: error: invalid use of 'this' in non-member function
esp_ble_gattc_register_for_notify(this->parent()->gattc_if, this->parent()->remote_bda, this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:68:99: error: invalid use of 'this' in non-member function
esp_ble_gattc_register_for_notify(this->parent()->gattc_if, this->parent()->remote_bda, this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:74:7: error: invalid use of 'this' in non-member function
this->input_handle_ = 0;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:75:24: error: invalid use of 'this' in non-member function
auto chr_input = this->parent()->get_characteristic(this->input_service_uuid_, this->input_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:75:59: error: invalid use of 'this' in non-member function
auto chr_input = this->parent()->get_characteristic(this->input_service_uuid_, this->input_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:75:86: error: invalid use of 'this' in non-member function
auto chr_input = this->parent()->get_characteristic(this->input_service_uuid_, this->input_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:77:9: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:78:72: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->input_service_uuid_.to_string().c_str(),
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:78:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->input_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:79:18: error: invalid use of 'this' in non-member function
this->input_char_uuid_.to_string().c_str());
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:78:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->input_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:82:7: error: invalid use of 'this' in non-member function
this->input_handle_ = chr_input->handle;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:85:7: error: invalid use of 'this' in non-member function
this->control_handle_ = 0;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:86:26: error: invalid use of 'this' in non-member function
auto chr_control = this->parent()->get_characteristic(this->control_service_uuid_, this->control_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:86:61: error: invalid use of 'this' in non-member function
auto chr_control = this->parent()->get_characteristic(this->control_service_uuid_, this->control_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:86:90: error: invalid use of 'this' in non-member function
auto chr_control = this->parent()->get_characteristic(this->control_service_uuid_, this->control_char_uuid_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:88:9: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:89:72: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->control_service_uuid_.to_string().c_str(),
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:89:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->control_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:90:18: error: invalid use of 'this' in non-member function
this->control_char_uuid_.to_string().c_str());
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:89:9: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "No characteristic found at service %s char %s", this->control_service_uuid_.to_string().c_str(),
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:93:7: error: invalid use of 'this' in non-member function
this->control_handle_ = chr_control->handle;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:95:7: error: invalid use of 'this' in non-member function
this->set_timeout("desk_init", 5000, [this]() { this->read_value_(this->output_handle_); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:95:45: error: invalid use of 'this' in non-member function
this->set_timeout("desk_init", 5000, [this]() { this->read_value_(this->output_handle_); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In lambda function:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:95:55: error: 'this' was not captured for this lambda function
this->set_timeout("desk_init", 5000, [this]() { this->read_value_(this->output_handle_); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:95:73: error: 'this' was not captured for this lambda function
this->set_timeout("desk_init", 5000, [this]() { this->read_value_(this->output_handle_); });
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:101:34: error: invalid use of 'this' in non-member function
if (param->read.conn_id != this->parent()->conn_id)
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:107:33: error: invalid use of 'this' in non-member function
if (param->read.handle == this->output_handle_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:108:9: error: invalid use of 'this' in non-member function
this->status_clear_warning();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:109:9: error: invalid use of 'this' in non-member function
this->publish_cover_state_(param->read.value, param->read.value_len);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:115:36: error: invalid use of 'this' in non-member function
if (param->notify.conn_id != this->parent()->conn_id || param->notify.handle != this->output_handle_)
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:115:87: error: invalid use of 'this' in non-member function
if (param->notify.conn_id != this->parent()->conn_id || param->notify.handle != this->output_handle_)
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:119:7: error: invalid use of 'this' in non-member function
this->publish_cover_state_(param->notify.value, param->notify.value_len);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:124:7: error: invalid use of 'this' in non-member function
this->node_state = espbt::ClientState::ESTABLISHED;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:124:26: error: 'espbt' has not been declared
this->node_state = espbt::ClientState::ESTABLISHED;
^~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:126:9: error: invalid use of 'this' in non-member function
this->notify_disable_ = false;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:136:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::write_value_(uint16_t handle, unsigned short value) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::write_value_(uint16_t, short unsigned int)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:141:49: error: invalid use of 'this' in non-member function
esp_err_t status = ::esp_ble_gattc_write_char(this->parent()->gattc_if, this->parent()->conn_id, handle, 2, data,
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:141:75: error: invalid use of 'this' in non-member function
esp_err_t status = ::esp_ble_gattc_write_char(this->parent()->gattc_if, this->parent()->conn_id, handle, 2, data,
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:145:5: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:146:76: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "[%s] Error sending write request for cover, status=%d", this->get_name().c_str(), status);
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:146:5: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "[%s] Error sending write request for cover, status=%d", this->get_name().c_str(), status);
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:150:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::read_value_(uint16_t handle) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::read_value_(uint16_t)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:152:31: error: invalid use of 'this' in non-member function
esp_ble_gattc_read_char(this->parent()->gattc_if, this->parent()->conn_id, handle, ESP_GATT_AUTH_REQ_NONE);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:152:57: error: invalid use of 'this' in non-member function
esp_ble_gattc_read_char(this->parent()->gattc_if, this->parent()->conn_id, handle, ESP_GATT_AUTH_REQ_NONE);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:154:5: error: invalid use of 'this' in non-member function
this->status_set_warning();
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:155:75: error: invalid use of 'this' in non-member function
ESP_LOGW(TAG, "[%s] Error sending read request for cover, status=%d", this->get_name().c_str(), status_read);
^~~~
src/esphome/core/log.h:114:88: note: in definition of macro 'esph_log_w'
esp_log_printf_(ESPHOME_LOG_LEVEL_WARN, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:155:5: note: in expansion of macro 'ESP_LOGW'
ESP_LOGW(TAG, "[%s] Error sending read request for cover, status=%d", this->get_name().c_str(), status_read);
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:159:20: error: 'IdasenDeskControllerComponent' has not been declared
cover::CoverTraits IdasenDeskControllerComponent::get_traits() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:167:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::publish_cover_state_(uint8_t *value, uint16_t value_len) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::publish_cover_state_(uint8_t*, uint16_t)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:176:5: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_IDLE;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:177:14: error: invalid use of 'this' in non-member function
} else if (this->position < position) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:178:5: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_OPENING;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:179:14: error: invalid use of 'this' in non-member function
} else if (this->position > position) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:180:5: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_CLOSING;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:183:3: error: invalid use of 'this' in non-member function
this->position = position;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:184:3: error: invalid use of 'this' in non-member function
this->publish_state(false);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:187:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::move_desk_() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::move_desk_()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:188:7: error: invalid use of 'this' in non-member function
if (this->notify_disable_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:189:9: error: invalid use of 'this' in non-member function
if (this->controlled_ || this->current_operation != cover::COVER_OPERATION_IDLE) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:189:30: error: invalid use of 'this' in non-member function
if (this->controlled_ || this->current_operation != cover::COVER_OPERATION_IDLE) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:190:7: error: invalid use of 'this' in non-member function
this->read_value_(this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:190:25: error: invalid use of 'this' in non-member function
this->read_value_(this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:194:8: error: invalid use of 'this' in non-member function
if (!this->controlled_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:199:7: error: invalid use of 'this' in non-member function
if (this->is_at_target_()) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:201:5: error: invalid use of 'this' in non-member function
this->stop_move_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:205:7: error: invalid use of 'this' in non-member function
if (this->notify_disable_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:206:9: error: invalid use of 'this' in non-member function
if (this->current_operation == cover::COVER_OPERATION_IDLE) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:207:7: error: invalid use of 'this' in non-member function
Compiling .pioenvs/office-desk-controller/src/esphome/components/socket/bsd_sockets_impl.o
this->not_moving_loop_++;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:208:11: error: invalid use of 'this' in non-member function
if (this->not_moving_loop_ > 4) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:210:9: error: invalid use of 'this' in non-member function
this->stop_move_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:213:7: error: invalid use of 'this' in non-member function
this->not_moving_loop_ = 0;
^~~~
In file included from src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:2:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:217:57: error: invalid use of 'this' in non-member function
ESP_LOGD(TAG, "Update Desk - Move from %.0f to %.0f", this->position * 100, this->position_target_ * 100);
^~~~
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/idasen_desk_controller/idasen_desk_controller.cpp:217:3: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD(TAG, "Update Desk - Move from %.0f to %.0f", this->position * 100, this->position_target_ * 100);
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:217:79: error: invalid use of 'this' in non-member function
ESP_LOGD(TAG, "Update Desk - Move from %.0f to %.0f", this->position * 100, this->position_target_ * 100);
^~~~
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/idasen_desk_controller/idasen_desk_controller.cpp:217:3: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD(TAG, "Update Desk - Move from %.0f to %.0f", this->position * 100, this->position_target_ * 100);
^~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:218:3: error: invalid use of 'this' in non-member function
this->move_torwards_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:221:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::control(const cover::CoverCall &call) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::control(const esphome::cover::CoverCall&)':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:222:7: error: invalid use of 'this' in non-member function
if (this->notify_disable_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:223:5: error: invalid use of 'this' in non-member function
this->read_value_(this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:223:23: error: invalid use of 'this' in non-member function
this->read_value_(this->output_handle_);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:227:9: error: invalid use of 'this' in non-member function
if (this->current_operation != cover::COVER_OPERATION_IDLE) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:228:7: error: invalid use of 'this' in non-member function
this->stop_move_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:231:5: error: invalid use of 'this' in non-member function
this->position_target_ = *call.get_position();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:233:9: error: invalid use of 'this' in non-member function
if (this->position == this->position_target_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:233:27: error: invalid use of 'this' in non-member function
if (this->position == this->position_target_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:237:9: error: invalid use of 'this' in non-member function
if (this->position_target_ > this->position) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:237:34: error: invalid use of 'this' in non-member function
if (this->position_target_ > this->position) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:238:7: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_OPENING;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:240:7: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_CLOSING;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:243:5: error: invalid use of 'this' in non-member function
this->start_move_torwards_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:249:5: error: invalid use of 'this' in non-member function
this->stop_move_();
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:253:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::start_move_torwards_() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::start_move_torwards_()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:254:3: error: invalid use of 'this' in non-member function
this->controlled_ = true;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:255:7: error: invalid use of 'this' in non-member function
if (this->notify_disable_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:256:5: error: invalid use of 'this' in non-member function
this->not_moving_loop_ = 0;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:258:16: error: invalid use of 'this' in non-member function
if (false == this->use_only_up_down_command_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:259:5: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFE);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:259:24: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFE);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:260:5: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFF);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:260:24: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFF);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:264:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::move_torwards_() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::move_torwards_()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:265:7: error: invalid use of 'this' in non-member function
if (this->use_only_up_down_command_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:266:9: error: invalid use of 'this' in non-member function
if (this->current_operation == cover::COVER_OPERATION_OPENING) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:267:7: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0x47);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:267:26: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0x47);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:268:16: error: invalid use of 'this' in non-member function
} else if (this->current_operation == cover::COVER_OPERATION_CLOSING) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:269:7: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0x46);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:269:26: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0x46);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:272:5: error: invalid use of 'this' in non-member function
this->write_value_(this->input_handle_, transform_position_to_height(this->position_target_));
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:272:24: error: invalid use of 'this' in non-member function
this->write_value_(this->input_handle_, transform_position_to_height(this->position_target_));
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:272:74: error: invalid use of 'this' in non-member function
this->write_value_(this->input_handle_, transform_position_to_height(this->position_target_));
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:276:6: error: 'IdasenDeskControllerComponent' has not been declared
void IdasenDeskControllerComponent::stop_move_() {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'void esphome::idasen_desk_controller::stop_move_()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:277:3: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFF);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:277:22: error: invalid use of 'this' in non-member function
this->write_value_(this->control_handle_, 0xFF);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:278:16: error: invalid use of 'this' in non-member function
if (false == this->use_only_up_down_command_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:279:5: error: invalid use of 'this' in non-member function
this->write_value_(this->input_handle_, 0x8001);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:279:24: error: invalid use of 'this' in non-member function
this->write_value_(this->input_handle_, 0x8001);
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:282:3: error: invalid use of 'this' in non-member function
this->current_operation = cover::COVER_OPERATION_IDLE;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:283:3: error: invalid use of 'this' in non-member function
this->controlled_ = false;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:286:6: error: 'IdasenDeskControllerComponent' has not been declared
bool IdasenDeskControllerComponent::is_at_target_() const {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:286:53: error: non-member function 'bool esphome::idasen_desk_controller::is_at_target_()' cannot have cv-qualifier
bool IdasenDeskControllerComponent::is_at_target_() const {
^~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: In function 'bool esphome::idasen_desk_controller::is_at_target_()':
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:287:11: error: invalid use of 'this' in non-member function
switch (this->current_operation) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:289:14: error: invalid use of 'this' in non-member function
return this->position >= this->position_target_;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:289:32: error: invalid use of 'this' in non-member function
return this->position >= this->position_target_;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:291:14: error: invalid use of 'this' in non-member function
return this->position <= this->position_target_;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:291:32: error: invalid use of 'this' in non-member function
return this->position <= this->position_target_;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:293:11: error: invalid use of 'this' in non-member function
if (this->notify_disable_) {
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:294:17: error: invalid use of 'this' in non-member function
return !this->controlled_;
^~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp: At global scope:
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:301:1: error: 'espbt' does not name a type
espbt::ESPBTUUID uuid128_from_string(std::string value) {
^~~~~
src/esphome/components/idasen_desk_controller/idasen_desk_controller.cpp:14:14: warning: 'float esphome::idasen_desk_controller::transform_position_to_height(float)' defined but not used [-Wunused-function]
static float transform_position_to_height(float position) { return position * DESK_MAX_HEIGHT; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** [.pioenvs/office-desk-controller/src/esphome/components/idasen_desk_controller/idasen_desk_controller.o] Error 1
========================= [FAILED] Took 10.72 seconds =========================
Looks like getting it to compile with the esp-idf framework is relatively simple. Just had to replace the #ifdef ARDUINO_ARCH_ESP32
with #ifdef USE_ESP32
so it applies to all esp32. This should work in any of the 2.x+ release since we're just relying on the bluetooth stuff from esphome.
However, I'm not sure if this is something with the ESP32 C3, or something with the esp-idf framework, but I cannot connect to the device (and it's very different from the failing to pair that many other of the open issues refer to, which i've attempted to fix with a PR in esphome). I'm getting the following when it tries to connect...
[17:17:31][V][esp-idf:000]: W (31161) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x100
[17:17:31][V][ble_client:147]: [e6:8a:37:a3:02:ea] ESP_GATTC_DISCONNECT_EVT, reason 256
[17:17:31][W][idasen_desk_controller:051]: [Office Desk] Disconnected!
[17:17:31][W][ble_sensor:039]: [Desk Height] Disconnected!
[17:17:31][V][sensor:074]: 'Desk Height': Received new state nan
[17:17:31][D][sensor:125]: 'Desk Height': Sending state nan cm with 1 decimals of accuracy
[17:17:31][W][ble_sensor:039]: [Desk Speed] Disconnected!
[17:17:31][V][sensor:074]: 'Desk Speed': Received new state nan
[17:17:31][D][sensor:125]: 'Desk Speed': Sending state nan cm/min with 0 decimals of accuracy
[17:17:31][V][ble_client:115]: [e6:8a:37:a3:02:ea] ESP_GATTC_OPEN_EVT
[17:17:31][W][ble_client:117]: connect to e6:8a:37:a3:02:ea failed, status=133
In this case, it's disconnecting well before the desk drops out of pair mode. And the disconnect reason is NOT a timeout. The disconnect reason here is:
ESP_GATT_CONN_CONN_CANCEL = 0x0100, /*!< L2CAP connection cancelled */ /* relate to BTA_GATT_CONN_CONN_CANCEL in bta/bta_gatt_api.h */
It doesn't even make enough of a connection to fetch the services and characteristics. I'll be experimenting more with it and will keep this issue updated.
The next thing I want to try is using the esp-idf framework with a regular ESP32 (instead of an ESP32-C3) and see if that makes a difference.
Looks like things are similar with a regular ESP32 with esp-idf framework where I'm still seeing the same disconnect. Though it appears to be able to retrieve the characteristics, but notifications don't work, so the state is not updated. I suspect this is ultimately more esphome issues rather than issues with this custom component. When I get a chance, I'll probably send a PR to fix it so it will at least compile correctly on esp-idf. That way, once we have working support in esphome, it should just work.
hrm...more wonky-ness. I tried to switch back to arduino framework and now notifications aren't working there now :( And now i'm getting 2 of these messages instead of 1.
[W][ble_client:177]: No descriptor found for notify of handle 0x1a
Previously, I would get 1 of them because for whatever reason unless I only had 1 sensor (in which case I didn't get the message at all).