Skip to content

Incompatible with bluetooth proxy #7

@aheath70

Description

@aheath70

I have been running this for a while and it has been working flawlessly.

On my ESP that gets Emerald data to HA, I also pick up bluetooth from a couple of Xiaomi temperature sensors. That works well as well.

I am in the process of converting over to use the HA Bluetooth Proxy functionality. I have converted 2 other ESP's to bluetooth proxies and that is working too. When I add the bluetooth_proxy: declaration and attempt to upload, I get the following:-

INFO Reading configuration /config/esphome/esp32-front.yaml...
INFO Detected timezone 'Australia/Sydney'
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-front (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/esp32-front/.pioenvs/esp32-front/src/esphome/components/api/api_connection.cpp.o
Compiling /data/esp32-front/.pioenvs/esp32-front/src/esphome/components/api/api_frame_helper.cpp.o
In file included from src/esphome/components/bluetooth_proxy/bluetooth_proxy.h:9,
                 from src/esphome/components/api/api_connection.cpp:16:
src/esphome/components/esp32_ble_client/ble_client_base.h:77:43: error: 'esphome::esp32_ble_client::espbt::ConnectionType' has not been declared
   virtual void set_connection_type(espbt::ConnectionType ct) { this->connection_type_ = ct; }
                                           ^~~~~~~~~~~~~~
src/esphome/components/esp32_ble_client/ble_client_base.h:89:10: error: 'ConnectionType' in namespace 'esphome::esp32_ble_client::espbt' does not name a type
   espbt::ConnectionType connection_type_{espbt::ConnectionType::V1};
          ^~~~~~~~~~~~~~
src/esphome/components/esp32_ble_client/ble_client_base.h:32:8: error: conflicting return type specified for 'virtual bool esphome::esp32_ble_client::BLEClientBase::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)'
   bool gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
        ^~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/esp32_ble_client/ble_client_base.h:5,
                 from src/esphome/components/bluetooth_proxy/bluetooth_proxy.h:9,
                 from src/esphome/components/api/api_connection.cpp:16:
src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.h:156:16: note: overridden function is 'virtual void esphome::esp32_ble_tracker::ESPBTClient::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)'
   virtual void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
                ^~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/bluetooth_proxy/bluetooth_proxy.h:9,
                 from src/esphome/components/api/api_connection.cpp:16:
src/esphome/components/esp32_ble_client/ble_client_base.h: In member function 'virtual void esphome::esp32_ble_client::BLEClientBase::set_connection_type(int)':
src/esphome/components/esp32_ble_client/ble_client_base.h:77:70: error: 'class esphome::esp32_ble_client::BLEClientBase' has no member named 'connection_type_'; did you mean 'connection_index_'?
   virtual void set_connection_type(espbt::ConnectionType ct) { this->connection_type_ = ct; }
                                                                      ^~~~~~~~~~~~~~~~
                                                                      connection_index_
*** [/data/esp32-front/.pioenvs/esp32-front/src/esphome/components/api/api_connection.cpp.o] Error 1
========================== [FAILED] Took 3.06 seconds ==========================

If I remove the bluetooth_proxy: line, I can then upload the code successfully. If I comment out the Emerald components and sensors, I can also upload the code successfully.

I suspect that there is a conflict between bluetooth proxy and the Emerald component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions