From 92a0fba463e89c0ec2dbf60f3f118dd5d8eceafe Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 12 Jun 2021 08:31:35 +1200 Subject: [PATCH] Split ble server docs (#1234) --- components/esp32_ble.rst | 16 ++++------------ components/esp32_ble_server.rst | 32 ++++++++++++++++++++++++++++++++ components/esp32_improv.rst | 5 +---- 3 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 components/esp32_ble_server.rst diff --git a/components/esp32_ble.rst b/components/esp32_ble.rst index 39e5d0348..07def025d 100644 --- a/components/esp32_ble.rst +++ b/components/esp32_ble.rst @@ -5,30 +5,22 @@ BLE Component :description: Instructions for setting up Bluetooth LE in ESPHome. :image: bluetooth.svg -The ``esp32_ble`` component in ESPHome sets up a simple BLE GATT server that exposes the device name, -manufacturer and board. This component allows other components to create their own services to expose -data and control. +The ``esp32_ble`` component in ESPHome sets up the Bluetooth LE stack on the device so that a :doc:`esp32_ble_server` +can run. .. code-block:: yaml # Example configuration esp32_ble: - server: -Configuration variables: ------------------------- - -- **server** (*Optional*): Starts the BLE GATT server - - - **manufacturer** (*Optional*, string): The name of the manufacturer/firmware creator. Defaults to ``ESPHome``. - - **model** (*Optional*, string): The model name of the device. Defaults to the friendly name of the ``board`` chosen - in the :ref:`core configuration `. +No configuration variables. See Also -------- +- :doc:`esp32_ble_server` - :doc:`esp32_improv` - :apiref:`esp32_ble/ble.h` - :ghedit:`Edit` diff --git a/components/esp32_ble_server.rst b/components/esp32_ble_server.rst new file mode 100644 index 000000000..4d9748c52 --- /dev/null +++ b/components/esp32_ble_server.rst @@ -0,0 +1,32 @@ +BLE Server +========== + +.. seo:: + :description: Instructions for setting up Bluetooth LE GATT Server in ESPHome. + :image: bluetooth.svg + +The ``esp32_ble_server`` component in ESPHome sets up a simple BLE GATT server that exposes the device name, +manufacturer and board. This component allows other components to create their own services to expose +data and control. + +.. code-block:: yaml + + # Example configuration + + esp32_ble_server: + + +Configuration variables: +------------------------ + +- **manufacturer** (*Optional*, string): The name of the manufacturer/firmware creator. Defaults to ``ESPHome``. +- **model** (*Optional*, string): The model name of the device. Defaults to the friendly name of the ``board`` chosen + in the :ref:`core configuration `. + +See Also +-------- + +- :doc:`esp32_ble` +- :doc:`esp32_improv` +- :apiref:`esp32_ble/ble.h` +- :ghedit:`Edit` diff --git a/components/esp32_improv.rst b/components/esp32_improv.rst index d0405c872..f9a2589c2 100644 --- a/components/esp32_improv.rst +++ b/components/esp32_improv.rst @@ -8,7 +8,7 @@ Improv The ``esp32_improv`` component in ESPHome implements the open `Improv standard `__ for configuring Wi-Fi on an ESP32 device by using Bluetooth Low Energy to receive the credentials. -The ``esp32_improv`` component requires the :doc:`BLE Server ` to be set up. +The ``esp32_improv`` component will automatically set up the :doc:`BLE Server `. .. code-block:: yaml @@ -17,9 +17,6 @@ The ``esp32_improv`` component requires the :doc:`BLE Server ` to be wifi: # ... - esp32_ble: - server: # A BLE server is required - esp32_improv: authorizer: binary_sensor_id