ESPHome BLE Keyboard

Overview

ESPHome BLE Keyboard

donate paypal donate tinkoff

The firmware implements the ability to connect your esp32 device as a BLE keyboard and send keystrokes via Home Assistant

Table of Contents

FAQ

Q. Are all keys supported?

A. No, only those that are implemented in the ESP32 BLE Keyboard library. This also applies to languages.

Q. What devices can the keyboard be connected to?

A. Windows, Linux, Android - Fully supported. MacOS, IOS - It does not work stably. But it works. More details in the library: ESP32 BLE Keyboard library

Q. No keys are pressed or one is pressed several times. What to do?

A. The delay modification will help.

Build

  1. Fill in WiFi credentials and esp32 board in blekeyboard.yaml
  2. Use ESPHome to build and upload firmware

Sensors

  • Connected (binary_sensor) - Whether the device is connected to the keyboard.
  • Delay (sensor) - The last set delay. After rebooting the device is reset to 8ms by default.
  • Wifi Signal (sensor) - Wifi signal strength.

Service

Via GUI (Recommended)

Developer-tools > Service > esphome.blekeyboard_send

Via YAML (legacy way)

service: esphome.blekeyboard_send
data:
  message: 'Hello world!' # Message or key name, if the is_combination flag is set, then you can specify a key combination separated by +.
  is_combination: false # Whether a key combination is used in the message.
  delay_ms: 8 # Delay between clicks in milliseconds

Examples

Sending a simple message

service: esphome.blekeyboard_send
data:
  message: 'Hello world!'
  is_combination: false
  delay_ms: 8

Pressing the ENTER key

service: esphome.blekeyboard_send
data:
  message: 'KEY_RETURN'
  is_combination: false
  delay_ms: 8

Press CTRL + ALT + DELETE

service: esphome.blekeyboard_send
data:
  message: 'KEY_LEFT_CTRL+KEY_LEFT_ALT+KEY_DELETE'
  is_combination: true
  delay_ms: 10

Keys

The following keys are supported:

  • KEY_LEFT_CTRL

  • KEY_LEFT_SHIFT

  • KEY_LEFT_ALT

  • KEY_LEFT_GUI

  • KEY_RIGHT_CTRL

  • KEY_RIGHT_SHIFT

  • KEY_RIGHT_ALT

  • KEY_RIGHT_GUI

  • KEY_UP_ARROW

  • KEY_DOWN_ARROW

  • KEY_LEFT_ARROW

  • KEY_RIGHT_ARROW

  • KEY_BACKSPACE

  • KEY_TAB

  • KEY_RETURN

  • KEY_ESC

  • KEY_INSERT

  • KEY_DELETE

  • KEY_PAGE_UP

  • KEY_PAGE_DOWN

  • KEY_HOME

  • KEY_END

  • KEY_CAPS_LOCK

  • KEY_F1

  • KEY_F2

  • KEY_F3

  • KEY_F4

  • KEY_F5

  • KEY_F6

  • KEY_F7

  • KEY_F8

  • KEY_F9

  • KEY_F10

  • KEY_F11

  • KEY_F12

  • KEY_F13

  • KEY_F14

  • KEY_F15

  • KEY_F16

  • KEY_F17

  • KEY_F18

  • KEY_F19

  • KEY_F20

  • KEY_F21

  • KEY_F22

  • KEY_F23

  • KEY_F24

  • KEY_MEDIA_NEXT_TRACK

  • KEY_MEDIA_PREVIOUS_TRACK

  • KEY_MEDIA_STOP

  • KEY_MEDIA_PLAY_PAUSE

  • KEY_MEDIA_MUTE

  • KEY_MEDIA_VOLUME_UP

  • KEY_MEDIA_VOLUME_DOWN

  • KEY_MEDIA_WWW_HOME

  • KEY_MEDIA_LOCAL_MACHINE_BROWSER

  • KEY_MEDIA_CALCULATOR

  • KEY_MEDIA_WWW_BOOKMARKS

  • KEY_MEDIA_WWW_SEARCH

  • KEY_MEDIA_WWW_STOP

  • KEY_MEDIA_WWW_BACK

  • KEY_MEDIA_CONSUMER_CONTROL_CONFIGURATION

  • KEY_MEDIA_EMAIL_READER

Comments
  • ESP32-C3 doesn't compile

    ESP32-C3 doesn't compile

    Hi, with my M5Stack C3U ESP32-CE it does not compile ordaniery. It fails all the time with the following output:

    INFO Reading configuration /config/esphome/test.yaml...
    INFO Generating C++ source...
    INFO Compiling app...
    Processing c3u (board: esp32doit-devkit-v1; framework: espidf; platform: platformio/espressif32 @ 3.5.0)
    --------------------------------------------------------------------------------
    HARDWARE: ESP32C3 240MHz, 320KB RAM, 4MB Flash
     - framework-arduinoespressif32 @ 0.0.0+sha.caef400 
     - 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
    Dependency Graph
    |-- noise-c @ 0.1.4
    |   |-- libsodium @ 1.10018.1
    Compiling /data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/ble_keyboard.o
    Compiling /data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/button.o
    Compiling /data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/number.o
    Compiling /data/c3u/.pioenvs/c3u/src/esphome/components/homeassistant/text_sensor/homeassistant_text_sensor.o
    In file included from src/esphome/components/ble_keyboard/button.h:7,
                     from src/esphome/components/ble_keyboard/button.cpp:3:
    src/esphome/components/ble_keyboard/ble_keyboard.h:28:14: error: 'MediaKeyReport' has not been declared
       void press(MediaKeyReport key, bool with_timer = true);
                  ^~~~~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.h:38:3: error: 'BleKeyboard' does not name a type; did you mean 'ble_keyboard'?
       BleKeyboard bleKeyboard;
       ^~~~~~~~~~~
       ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.h: In constructor 'esphome::ble_keyboard::Esp32BleKeyboard::Esp32BleKeyboard(std::__cxx11::string, std::__cxx11::string, uint8_t)':
    src/esphome/components/ble_keyboard/ble_keyboard.h:15:33: error: class 'esphome::ble_keyboard::Esp32BleKeyboard' does not have any field named 'bleKeyboard'
           : PollingComponent(1000), bleKeyboard(name, manufacturer_id, battery_level) {}
                                     ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/button.cpp: In member function 'virtual void esphome::ble_keyboard::Esp32BleKeyboardButton::press_action()':
    src/esphome/components/ble_keyboard/button.cpp:15:5: error: 'MediaKeyReport' was not declared in this scope
         MediaKeyReport mediaKey = {(uint8_t) first_value_, (uint8_t) second_value_};
         ^~~~~~~~~~~~~~
    src/esphome/components/ble_keyboard/button.cpp:17:20: error: 'mediaKey' was not declared in this scope
         parent_->press(mediaKey);
                        ^~~~~~~~
    *** [/data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/button.o] Error 1
    In file included from src/esphome/components/ble_keyboard/number.h:8,
                     from src/esphome/components/ble_keyboard/number.cpp:3:
    src/esphome/components/ble_keyboard/ble_keyboard.h:28:14: error: 'MediaKeyReport' has not been declared
       void press(MediaKeyReport key, bool with_timer = true);
                  ^~~~~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.h:38:3: error: 'BleKeyboard' does not name a type; did you mean 'ble_keyboard'?
       BleKeyboard bleKeyboard;
       ^~~~~~~~~~~
       ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.h: In constructor 'esphome::ble_keyboard::Esp32BleKeyboard::Esp32BleKeyboard(std::__cxx11::string, std::__cxx11::string, uint8_t)':
    src/esphome/components/ble_keyboard/ble_keyboard.h:15:33: error: class 'esphome::ble_keyboard::Esp32BleKeyboard' does not have any field named 'bleKeyboard'
           : PollingComponent(1000), bleKeyboard(name, manufacturer_id, battery_level) {}
                                     ^~~~~~~~~~~
    In file included from src/esphome/components/ble_keyboard/ble_keyboard.cpp:3:
    src/esphome/components/ble_keyboard/ble_keyboard.h:28:14: error: 'MediaKeyReport' has not been declared
       void press(MediaKeyReport key, bool with_timer = true);
                  ^~~~~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.h:38:3: error: 'BleKeyboard' does not name a type; did you mean 'ble_keyboard'?
       BleKeyboard bleKeyboard;
       ^~~~~~~~~~~
       ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.h: In constructor 'esphome::ble_keyboard::Esp32BleKeyboard::Esp32BleKeyboard(std::__cxx11::string, std::__cxx11::string, uint8_t)':
    src/esphome/components/ble_keyboard/ble_keyboard.h:15:33: error: class 'esphome::ble_keyboard::Esp32BleKeyboard' does not have any field named 'bleKeyboard'
           : PollingComponent(1000), bleKeyboard(name, manufacturer_id, battery_level) {}
                                     ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'virtual void esphome::ble_keyboard::Esp32BleKeyboard::setup()':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:14:3: error: 'bleKeyboard' was not declared in this scope
       bleKeyboard.begin();
       ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:14:3: note: suggested alternative: 'ble_keyboard'
       bleKeyboard.begin();
       ^~~~~~~~~~~
       ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'virtual void esphome::ble_keyboard::Esp32BleKeyboard::update()':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:18:64: error: 'bleKeyboard' was not declared in this scope
     void Esp32BleKeyboard::update() { state_sensor_->publish_state(bleKeyboard.isConnected()); }
                                                                    ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:18:64: note: suggested alternative: 'ble_keyboard'
     void Esp32BleKeyboard::update() { state_sensor_->publish_state(bleKeyboard.isConnected()); }
                                                                    ^~~~~~~~~~~
                                                                    ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'bool esphome::ble_keyboard::Esp32BleKeyboard::is_connected()':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:21:8: error: 'bleKeyboard' was not declared in this scope
       if (!bleKeyboard.isConnected()) {
            ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:21:8: note: suggested alternative: 'ble_keyboard'
       if (!bleKeyboard.isConnected()) {
            ^~~~~~~~~~~
            ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'void esphome::ble_keyboard::Esp32BleKeyboard::set_delay(uint32_t)':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:35:59: error: 'bleKeyboard' was not declared in this scope
     void Esp32BleKeyboard::set_delay(uint32_t delay_ms = 8) { bleKeyboard.setDelay(delay_ms); }
                                                               ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:35:59: note: suggested alternative: 'ble_keyboard'
     void Esp32BleKeyboard::set_delay(uint32_t delay_ms = 8) { bleKeyboard.setDelay(delay_ms); }
                                                               ^~~~~~~~~~~
                                                               ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'void esphome::ble_keyboard::Esp32BleKeyboard::press(std::__cxx11::string)':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:41:9: error: 'bleKeyboard' was not declared in this scope
             bleKeyboard.print(message.substr(i, 5).c_str());
             ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:41:9: note: suggested alternative: 'ble_keyboard'
             bleKeyboard.print(message.substr(i, 5).c_str());
             ^~~~~~~~~~~
             ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:43:9: error: 'delay' was not declared in this scope
             delay(default_delay_);
             ^~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:49:5: error: 'bleKeyboard' was not declared in this scope
         bleKeyboard.print(message.c_str());
         ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:49:5: note: suggested alternative: 'ble_keyboard'
         bleKeyboard.print(message.c_str());
         ^~~~~~~~~~~
         ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'void esphome::ble_keyboard::Esp32BleKeyboard::press(uint8_t, bool)':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:59:5: error: 'bleKeyboard' was not declared in this scope
         bleKeyboard.press(key);
         ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:59:5: note: suggested alternative: 'ble_keyboard'
         bleKeyboard.press(key);
         ^~~~~~~~~~~
         ble_keyboard
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: At global scope:
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:63:30: error: variable or field 'press' declared void
     void Esp32BleKeyboard::press(MediaKeyReport key, bool with_timer) {
                                  ^~~~~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:63:30: error: 'MediaKeyReport' was not declared in this scope
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:63:50: error: expected primary-expression before 'bool'
     void Esp32BleKeyboard::press(MediaKeyReport key, bool with_timer) {
                                                      ^~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp: In member function 'void esphome::ble_keyboard::Esp32BleKeyboard::release()':
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:75:5: error: 'bleKeyboard' was not declared in this scope
         bleKeyboard.releaseAll();
         ^~~~~~~~~~~
    src/esphome/components/ble_keyboard/ble_keyboard.cpp:75:5: note: suggested alternative: 'ble_keyboard'
         bleKeyboard.releaseAll();
         ^~~~~~~~~~~
         ble_keyboard
    *** [/data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/number.o] Error 1
    *** [/data/c3u/.pioenvs/c3u/src/esphome/components/ble_keyboard/ble_keyboard.o] Error 1
    ========================= [FAILED] Took 48.78 seconds =========================
    
    

    My yaml:

    # BLE Keyboard project
    # https://github.com/dmamontov/esphome-blekeyboard
    
    ############# User configuration #############
    
    substitutions:
    
      mdns_name: blekeyboard
    
      # Wifi credentials
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      fast_connect: on
    
    ########### End user configuration ###########
    
    
    ############# Base configuration #############
    
    esphome:
      name: c3u
      platformio_options:
        board_build.flash_mode: dio
        board_build.mcu: esp32c3
        platform_packages:
          - platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.2
    
    esp32:
      board: esp32doit-devkit-v1
      framework:
        type: esp-idf
        sdkconfig_options:
          CONFIG_COMPILER_CXX_EXCEPTIONS: y
        advanced:
          ignore_efuse_mac_crc: true
    
    # Enable logging
    logger:
    
    # Enable OTA
    ota:
      password: "****"
    
    # Enable Home Assistant API
    api:
      encryption:
        key: "****"
    
    
    ########### End base configuration ###########
    
    # Enable components
    external_components:
      - source: github://dmamontov/esphome-blekeyboard
    
    ble_keyboard:
      id: my_ble_keyboard
      name: "MyBleKeyboard"
      manufacturer_id: "Apple"
      battery_level: 50
      buttons: true
    
    text_sensor:
      - platform: homeassistant
        id: input_text
        entity_id: input_text.blekeyboard_new_message
        internal: true
    
    sensor:
      - platform: wifi_signal
        name: "WiFi Signal"
        update_interval: 60s
    
    button:
      - platform: restart
        entity_category: "config"
        name: "Restart"
    
      - platform: template
        name: "Release"
        id: key_release
        icon: "mdi:send"
        on_press:
          then:
            - ble_keyboard.print:
                id: my_ble_keyboard
                text: !lambda "return id(input_text).state;"
            - ble_keyboard.release: my_ble_keyboard
    
      - platform: template
        name: "Ctrl + A"
        id: key_ctrl_a
        icon: "mdi:vector-combine"
        on_press:
          then:
            - ble_keyboard.combination:
                id: my_ble_keyboard
                delay: 8
                keys:
                  - 0x80
                  - "a"
    

    Please complete the following information:

    • ESPHome version: dev
    • Component version: 2.2.0

    Any suggestions?

    enhancement 
    opened by gekberlin 6
  • Doesn't compile on latest ESPHome

    Doesn't compile on latest ESPHome

    Hi!

    Thanks for this library. It's a fantastic idea.

    It doesn't look like it compiles on the latest ESPHome. I've tried with both Arduino and Espressif frameworks without success.

    My basic YAML:

    esphome:
      name: bt-test
      platformio_options: # Delete if you don't want to use NimBLE mode. More details: https://github.com/T-vK/ESP32-BLE-Keyboard#nimble-mode
        build_flags: -D USE_NIMBLE
      includes:
        - libraries/ble-2/keyboard.h
        - libraries/ble-2/keymap.h
    
      libraries:
        - ESP32 BLE Arduino@>=1.0.1
        - https://github.com/h2zero/NimBLE-Arduino/archive/refs/tags/1.3.2.zip
        - https://github.com/T-vK/ESP32-BLE-Keyboard/releases/download/0.3.1-beta/ESP32-BLE-Keyboard.zip
    
      
    esp32:
      board: tinypico
      framework:
        type: arduino
        version: recommended
    
    # Enable logging
    logger:
    
    # Enable Home Assistant API
    api:
    
    ota:
      password: "<removed>"
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    
      # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
        ssid: "Bt-Test Fallback Hotspot"
        password: "<removed>"
    
    # captive_portal:
    

    Compiling under Arduino does the following:

    INFO Reading configuration /config/bt-test.yaml...
    INFO Generating C++ source...
    INFO Compiling app...
    Processing bt-test (board: tinypico; 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
    Library Manager: Installing https://github.com/h2zero/NimBLE-Arduino/archive/refs/tags/1.3.2.zip
    
    
    Unpacking  [####################################]  100%
    Library Manager: NimBLE-Arduino @ 1.3.1 has been installed!
    Library Manager: Installing https://github.com/T-vK/ESP32-BLE-Keyboard/releases/download/0.3.1-beta/ESP32-BLE-Keyboard.zip
    
    
    Unpacking  [####################################]  100%
    Library Manager: ESP32 BLE Keyboard @ 0.3.1 has been installed!
    Dependency Graph
    |-- <ESP32 BLE Arduino> 1.0.1
    |-- <NimBLE-Arduino> 1.3.1
    |-- <ESP32 BLE Keyboard> 0.3.1
    |-- <WiFi> 1.0
    |-- <ESPmDNS> 1.0
    |-- <Update> 1.0
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_connection.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_frame_helper.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_pb2.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_pb2_service.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_server.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/list_entities.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/proto.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/subscribe_state.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/user_services.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/core.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/gpio_arduino.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/gpio_idf.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/preferences.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/logger/logger.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/md5/md5.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_component.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp8266.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp_idf.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/network/util.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_component.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/bsd_sockets_impl.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/socket.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/application.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/color.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/component.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/component_iterator.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/controller.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/entity_base.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/helpers.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/log.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/scheduler.cpp.o
    Compiling .pioenvs/bt-test/src/esphome/core/util.cpp.o
    Compiling .pioenvs/bt-test/src/main.cpp.o
    Generating partitions .pioenvs/bt-test/partitions.bin
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLE2902.cpp.o
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLE2904.cpp.o
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLEAddress.cpp.o
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLEAdvertisedDevice.cpp.o
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLEAdvertising.cpp.o
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLEBeacon.cpp.o
    In file included from src/main.cpp:20:0:
    src/keyboard.h:45:5: error: 'BinarySensor' does not name a type
         BinarySensor *connected_binarysensor = new BinarySensor();
         ^
    src/keyboard.h:46:5: error: 'Sensor' does not name a type
         Sensor *delay_sensor = new Sensor();
         ^
    In file included from src/main.cpp:20:0:
    src/keyboard.h: In member function 'virtual void Esp32BLEKeyboard::setup()':
    src/keyboard.h:56:9: error: 'delay_sensor' was not declared in this scope
             delay_sensor->publish_state(8);
             ^
    src/keyboard.h: In member function 'virtual void Esp32BLEKeyboard::update()':
    src/keyboard.h:60:9: error: 'connected_binarysensor' was not declared in this scope
             connected_binarysensor->publish_state(bleKeyboard.isConnected());
             ^
    src/keyboard.h: In member function 'void Esp32BLEKeyboard::release(std::__cxx11::string, uint32_t)':
    src/keyboard.h:73:9: error: 'delay_sensor' was not declared in this scope
             delay_sensor->publish_state(delay_ms);
             ^
    Compiling .pioenvs/bt-test/lib1c8/BLE/BLECharacteristic.cpp.o
    *** [.pioenvs/bt-test/src/main.cpp.o] Error 1
    ========================== [FAILED] Took 5.76 seconds ==========================
    
    

    Compiling under Esspresif:

    INFO Reading configuration /config/bt-test.yaml...
    INFO Generating C++ source...
    INFO Compiling app...
    Processing bt-test (board: tinypico; framework: espidf; platform: platformio/espressif32 @ 3.5.0)
    --------------------------------------------------------------------------------
    HARDWARE: ESP32 240MHz, 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-esp32 8.4.0+2021r2-patch2 
     - toolchain-xtensa-esp32s2 8.4.0+2021r2-patch2
    Reading CMake configuration...
    Library Manager: Installing ESP32 BLE Arduino @ >=1.0.1
    
    Unpacking  [####################################]  100%
    Library Manager: ESP32 BLE Arduino @ 1.0.1 has been installed!
    Library Manager: Installing https://github.com/h2zero/NimBLE-Arduino/archive/refs/tags/1.3.2.zip
    
    
    Unpacking  [####################################]  100%
    Library Manager: NimBLE-Arduino @ 1.3.1 has been installed!
    Library Manager: Installing https://github.com/T-vK/ESP32-BLE-Keyboard/releases/download/0.3.1-beta/ESP32-BLE-Keyboard.zip
    
    
    Unpacking  [####################################]  100%
    Library Manager: ESP32 BLE Keyboard @ 0.3.1 has been installed!
    Generating assembly for certificate bundle...
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    No dependencies
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_connection.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_frame_helper.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_pb2.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_pb2_service.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/api_server.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/list_entities.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/proto.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/subscribe_state.o
    Compiling .pioenvs/bt-test/src/esphome/components/api/user_services.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/core.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/gpio_arduino.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/gpio_idf.o
    Compiling .pioenvs/bt-test/src/esphome/components/esp32/preferences.o
    Compiling .pioenvs/bt-test/src/esphome/components/logger/logger.o
    Compiling .pioenvs/bt-test/src/esphome/components/md5/md5.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_component.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp32_arduino.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp8266.o
    Compiling .pioenvs/bt-test/src/esphome/components/mdns/mdns_esp_idf.o
    Compiling .pioenvs/bt-test/src/esphome/components/network/util.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_arduino_esp32.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_arduino_esp8266.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_backend_esp_idf.o
    Compiling .pioenvs/bt-test/src/esphome/components/ota/ota_component.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/bsd_sockets_impl.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/lwip_raw_tcp_impl.o
    Compiling .pioenvs/bt-test/src/esphome/components/socket/socket.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp32_arduino.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp8266.o
    Compiling .pioenvs/bt-test/src/esphome/components/wifi/wifi_component_esp_idf.o
    Compiling .pioenvs/bt-test/src/esphome/core/application.o
    Compiling .pioenvs/bt-test/src/esphome/core/color.o
    Compiling .pioenvs/bt-test/src/esphome/core/component.o
    Compiling .pioenvs/bt-test/src/esphome/core/component_iterator.o
    Compiling .pioenvs/bt-test/src/esphome/core/controller.o
    Compiling .pioenvs/bt-test/src/esphome/core/entity_base.o
    Compiling .pioenvs/bt-test/src/esphome/core/helpers.o
    Compiling .pioenvs/bt-test/src/esphome/core/log.o
    Compiling .pioenvs/bt-test/src/esphome/core/scheduler.o
    Compiling .pioenvs/bt-test/src/esphome/core/util.o
    Compiling .pioenvs/bt-test/src/main.o
    Generating LD script .pioenvs/bt-test/esp32_out.ld
    In file included from src/main.cpp:15:
    src/keyboard.h:4:10: fatal error: BleKeyboard.h: No such file or directory
    
    *********************************************************************
    * Looking for BleKeyboard.h dependency? Check our library registry!
    *
    * CLI  > platformio lib search "header:BleKeyboard.h"
    * Web  > https://registry.platformio.org/search?q=header:BleKeyboard.h
    *
    *********************************************************************
    
     #include <BleKeyboard.h>
              ^~~~~~~~~~~~~~~
    compilation terminated.
    *** [.pioenvs/bt-test/src/main.o] Error 1
    ========================= [FAILED] Took 10.01 seconds =========================
    

    Trying to meet the dependency just goes around in circles.

    Any suggestions?

    TIA.

    opened by ThisIsTheOnlyUsernameAvailable 6
  • Whenever the ESP reboots/resets, I have to re-pair it to my device

    Whenever the ESP reboots/resets, I have to re-pair it to my device

    First I want to say thank you so much for making this a real thing! I've been searching for a solution like this for a while!

    The title says most of it. Whenever the ESP looses power I have to repair it to my Google TV. However, it doesn't loose connection when I reboot my Google TV. Just for clarity it's running android 10.

    Is this something I should be asking in the ESP32-BLE-Keyboard library?

    Also, I'm working on a custom card that can be used to input text which reflects the text box on the tv (for the most part). I can link the repository once I create it if that is of interest?

    Thanks again!

    opened by jonathanrobichaud4 6
  • Compilation error

    Compilation error

    When I try to install the firmware on the node, or even just download the binary, I get an error. Looking at the log I suspect it is caused by ble keyboard, as a matter of fact if I remove this component there are no errors.

    I run Esphome as a Home Assistant plugin Esphome plugin version: 2022.12.1 Home Assistant OS version: 8.5

    Log:

    INFO Reading configuration /config/esphome/cinema.yaml...
    INFO Generating C++ source...
    INFO Compiling app...
    Processing cinema (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
    |-- ESP32 BLE Arduino @ 1.0.1
    |-- NimBLE-Arduino @ 1.4.0
    |-- ESP32 BLE Keyboard @ 0.3.2
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLE2902.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLE2904.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEAdvertisedDevice.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEAdvertising.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLECharacteristic.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLECharacteristicMap.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEClient.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDescriptor.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDescriptorMap.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDevice.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEHIDDevice.cpp.o
    Compiling /data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLERemoteCharacteristic.cpp.o
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:19,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:14,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLE2904.h:13,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLE2904.cpp:15:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:19,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:14,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLE2902.h:13,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLE2902.cpp:15:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLE2904.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLE2902.cpp.o] Error 1
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEAdvertising.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEAdvertising.cpp:21:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteDescriptor.h:18,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.h:18,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteService.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEClient.h:19,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEClient.cpp:13:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEService.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristicMap.cpp:11:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteDescriptor.h:18,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.h:18,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteService.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEClient.h:19,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEScan.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEAdvertisedDevice.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEAdvertisedDevice.cpp:17:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.cpp:15:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEAdvertising.cpp.o] Error 1
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEHIDDevice.h:14,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEHIDDevice.cpp:10:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEService.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.cpp:15:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEService.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEClient.h:20,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteService.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.cpp:8:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptor.h:16,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLECharacteristic.h:17,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDescriptorMap.cpp:11:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEHIDDevice.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEAdvertisedDevice.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLECharacteristicMap.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLECharacteristic.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDescriptor.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDescriptorMap.cpp.o] Error 1
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEAdvertising.h:15,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEServer.h:19,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.h:18,
                     from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp:26:
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/FreeRTOS.h:61:28: error: 'ringbuf_type_t' has not been declared
      Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
                                ^~~~~~~~~~~~~~
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.cpp: In member function 'std::__cxx11::string BLERemoteCharacteristic::readValue()':
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLERemoteCharacteristic.cpp:409:34: error: exception handling disabled, use -fexceptions to enable
       throw BLEDisconnectedException();
                                      ^
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLERemoteCharacteristic.cpp.o] Error 1
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp: In static member function 'static void BLEDevice::whiteListAdd(BLEAddress)':
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp:490:75: error: too few arguments to function 'esp_err_t esp_ble_gap_update_whitelist(bool, uint8_t*, esp_ble_wl_addr_type_t)'
      esp_err_t errRc = esp_ble_gap_update_whitelist(true, *address.getNative());  // True to add an entry.
                                                                               ^
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp:17:
    /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h:1478:11: note: declared here
     esp_err_t esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_t remote_bda, esp_ble_wl_addr_type_t wl_addr_type);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp: In static member function 'static void BLEDevice::whiteListRemove(BLEAddress)':
    /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp:504:76: error: too few arguments to function 'esp_err_t esp_ble_gap_update_whitelist(bool, uint8_t*, esp_ble_wl_addr_type_t)'
      esp_err_t errRc = esp_ble_gap_update_whitelist(false, *address.getNative());  // False to remove an entry.
                                                                                ^
    In file included from /data/cinema/.piolibdeps/cinema/ESP32 BLE Arduino/src/BLEDevice.cpp:17:
    /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h:1478:11: note: declared here
     esp_err_t esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_t remote_bda, esp_ble_wl_addr_type_t wl_addr_type);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEClient.cpp.o] Error 1
    *** [/data/cinema/.pioenvs/cinema/lib77d/ESP32 BLE Arduino/BLEDevice.cpp.o] Error 1
    ========================= [FAILED] Took 16.38 seconds =========================
    
    
    bug 
    opened by LucaLa2001 3
  • Press and hold down key

    Press and hold down key

    Describe the bug How can I press and hold a key? For example I would like to hold down the space bar for five seconds. Would have expected this to work:

    button:
      - platform: template
        name: "Hold Space"
        id: hold_space
        on_press:
          then:
          - ble_keyboard.press:
              id: myblekeyboard
              code: 0x20 # space
          - delay: 5000ms
          - ble_keyboard.release: myblekeyboard
    

    It results in just the space bar being sent and immediately relesed. Did I misunderstand the press function in that it doesn't hold down the key until release is called? When would you use the release function otherwise?

    Please complete the following information:

    • ESPHome version: 2022.11.5
    • Component version: latest? (how to find out? I simply put source: github://dmamontov/esphome-blekeyboard)
    question 
    opened by gitolicious 2
Releases(v2.3.1)
  • v2.3.1(Dec 19, 2022)

    Telegram

    Changes in v2.3.1

    BREAKING CHANGES

    • The use_default_libs option is now false by default.

    BUGFIXES

    • Fixed compilation error for EspHome >= 2022.12.0 - #17
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Aug 7, 2022)

    Telegram

    Changes in v2.3.0

    BREAKING CHANGES

    • Added advertising management;
    • Added battery level management;
    • Added support for esp32s2, esp32s3, esp32c3 and esp32h2.

    BUGFIXES

    • Fixed bug when pressing default buttons.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Aug 2, 2022)

  • v2.1.0(Aug 1, 2022)

    Telegram

    Changes in v2.1.0

    BREAKING CHANGES

    • Added new action ble_keyboard.combination. Allows you to execute a key combination with its own delay;
    • Added a buttons setting that allows you to disable the automatic generation of buttons for each key.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Jul 31, 2022)

    Telegram

    Changes in v2.0.0

    ❗❗❗ Warning! This version implements a full-fledged ESPHome component. It is not compatible with the previous ones.

    BREAKING CHANGES

    • The component has been completely rewritten
    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(Nov 22, 2021)

  • v1.0.0(Nov 22, 2021)

Owner
Dmitry Mamontov
Dmitry Mamontov
nrf52832 nrf52810 ble keyboard firmware

BLEKeyboard nrf52832 nrf52810 ble keyboard firmware WHY Learm more about hardware design and engineering. WHAT Implement a full featured powerful and

Jason Zhou 周正昌 42 Dec 1, 2022
BLE keyboard for Japanese Kana typing

FlickInput BLE keyboard for Japanese Kana typing. BLEフリック入力キーボード M5Paperを用いた軽量なフリック入力キーボードファームウェアです。 片手でPCに文字入力を素早く行うことができます。 使い方 サイドボタンを長押しすると電源が入り、起

Yuki MIZUNO 19 Sep 28, 2022
split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.

split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support. This keyboar

null 54 Jan 7, 2023
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Raspberry Pi 400 as a USB HID Keyboard Hook your Pi 400 up to your PC somehow, using a USB Type-C cable into the power port. Anker make good ones- I u

Philip Howard 182 Dec 12, 2022
Use Atari keyboard as USB keyboard with a Teensy 3.6

Atari Keyboard Convert an Atari 600/800/1200 XL into a USB keyboard. I bricked my Atari mainboard. My goal is to use the keyboard of the Atari on a Ra

Jos Koenis 2 Dec 3, 2021
Gesture-Detecting-Macro-Keyboard - Glorified Bluetooth macro keyboard with machine learning (TensorFlow Lite for Microcontrollers) running on an ESP32.

Gesture detection tldr; Glorified Bluetooth macro keyboard with machine learning (TensorFlow Lite for Microcontrollers) running on an ESP32. Main feat

Jakob Krantz 68 Dec 1, 2022
Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Jari Tulilahti 9 Dec 23, 2022
ESPHome integration for the Xiaomi Mijia Bedside Lamp v2.

esphome-xiaomi_bslamp2 Warning: this code is still under development This code might not yet be production-ready. At this point, it is declared beta-q

Maurice Makaay 136 Dec 27, 2022
Simple ESPHome Wiegand custom component

esphome-wiegand Simple ESPHome Wiegand custom component Based on this code: https://github.com/Luisiado/wiegand_esphome_module To use: Drop wiegand_de

Av 24 Dec 26, 2022
SmartShunt ve.direct to ESPHOME node

VictronSmartShunt-ESPHOME SmartShunt ve.direct to ESPHOME node A configured uart component is required. Example: victron: uart_id: the_uart sensor:

null 33 Dec 11, 2022
A collection of my ESPHome components.

ESPHome components A collection of my ESPHome components. To use this repository you should confugure it inside your yaml-configuration: external_comp

null 89 Jan 4, 2023
Projects related to sync'ing esphome devices with other protocols: DDP, E131, etc...

esphome sync This project is due to a desire to leverage WLED's new virtual strip (via DDP) feature or software like xLights or LEDFx to controls ESP

tony 12 Dec 24, 2022
Custom ESPHome Component for generic Sit-Stand-Desks

ESPHomeGenericSitStandDesk I have one of those generic relatively cheap Sit Stand Desks. In an effort to monitor my desk usage I developed this overki

Till 18 Dec 27, 2022
EspHoMaTriX - A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io

EspHoMaTriX (ehmtx) A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io Introduction There are some status displays out

LuBeDa 55 Dec 29, 2022
ESPHome component to send and receive HDMI-CEC messages.

HDMI-CEC ESPHome Component An ESPHome component that supports receiving and transmitting HDMI-CEC messages to connected HDMI devices. The ultimate goa

John Boiles 23 Dec 16, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

null 343 Dec 27, 2022
🪴💧 A Bluetooth Low Energy (BLE) soil moisture sensor.

b-parasite b-parasite is an open source Bluetooth Low Energy (BLE) soil moisture and ambient temperature/humidity sensor. Features Soil moisture senso

null 1.3k Jan 8, 2023
Arduino Sketch and a Web Bluetooth API for loading models and running inference on the Nano Sense 33 BLE device.

TF4Micro Motion Kit This repo contains the Arduino Sketch and a Web Bluetooth API for loading models and running inference on the device. Install and

Google Creative Lab 52 Nov 24, 2022
Bluetooth low energy (BLE) tracker for ESP32

BLEcker Bluetooth low energy (BLE) tracker for ESP32 This software is written for ESP32 boards to track BLE devices. It can be used for your smart hom

Vörös Ákos 42 Jan 3, 2023