diff --git a/components/cover/am43.rst b/components/cover/am43.rst new file mode 100644 index 000000000..bb72041b1 --- /dev/null +++ b/components/cover/am43.rst @@ -0,0 +1,76 @@ +AM43 Cover +========== + +.. seo:: + :description: Setting up AM43/BLE covers in ESPHome. + :image: am43.png + +The ``am43`` cover platform allows you to control an AM43 based +BLE cover motor. These devices are sold under various brands, such +as Zemismart and A-OK. The platform connects to the device over the +ESP32's BLE peripheral and both controls and fetches the position +and state of the motor. + +.. note:: + + This component does NOT support Tuya-based versions of this device, + as the protocol is completely different. If your device is controlled + with the SmartLife app, then it will not work. + +.. figure:: images/am43.jpg + :align: right + +.. code-block:: yaml + + # Example configuration entry + + esp32_ble_tracker: + + ble_client: + - mac: AA:BB:CC:DD:EE:FF + id: am43_kitchen + + cover: + - platform: am43 + name: "Kitchen blinds" + ble_client_id: am43_kitchen + +Setup +----- + +The AM43 should first be setup either with the OEM app or the buttons +following the instruction sheet, so that the speed, direction, limits, +etc are programmed in (this component does not yet support setting these). + +Once setup, configure the yaml per the above example, using the MAC +address of your device. +See :ref:`Setting up devices ` for +how to discover the MAC address. + +To make use of the battery and light level sensors, see the +:doc:`/components/sensor/am43` component. + +Configuration variables: +------------------------ + +- **name** (**Required**, string): The name of the cover. +- **ble_client_id** (**Required**, :ref:`config-id`): The id of the ``ble_client`` entry associated with the device. +- **pin** (*Optional*, int): The pin for the device, as + set in the app. The default is usually printed on the + device. Defaults to ``8888``. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Cover `. + + +.. note:: + + The BLE stack on the ESP32 has a limit of three connected devices. + + +See Also +-------- + +- :doc:`index` +- :ref:`automation` +- :apiref:`am43/am43_cover.h` +- :ghedit:`Edit` diff --git a/components/cover/images/am43.jpg b/components/cover/images/am43.jpg new file mode 100644 index 000000000..3127c5b89 Binary files /dev/null and b/components/cover/images/am43.jpg differ diff --git a/components/sensor/am43.rst b/components/sensor/am43.rst new file mode 100644 index 000000000..e0fcc6192 --- /dev/null +++ b/components/sensor/am43.rst @@ -0,0 +1,71 @@ +AM43 Sensor +=========== + +.. seo:: + :description: Sensors on AM43/BLE covers in ESPHome. + :image: am43.png + +The ``am43`` sensor platform allows you to read the light and +battery sensors on an AM43 BLE cover motor. The platform connects +to the device over the ESP32's BLE peripheral. + +.. note:: + + This component does NOT support Tuya-based versions of this device, + as the protocol is completely different. If your device is controlled + with the SmartLife app, then it will not work. + +.. figure:: images/am43.jpg + :align: right + +.. code-block:: yaml + + # Example configuration entry + + esp32_ble_tracker: + + ble_client: + - mac: AA:BB:CC:DD:EE:FF + id: am43_device + + sensor: + - platform: am43 + ble_client_id: am43_device + battery_level: + name: "Kitchen blinds battery" + illuminance: + name: "Kitchen blinds light" + +For more details on setting up this device, see the +:doc:`/components/cover/am43` component. + +Configuration variables: +------------------------ + +- **ble_client_id** (**Required**, :ref:`config-id`): The id of the ``ble_client`` entry associated with the device. +- **battery_level** (*Optional*): The information for the battery level sensor. + + - **name** (**Required**, string): The name for the battery level sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. +- **illuminance** (*Optional*): The information for the light level sensor. + + - **name** (**Required**, string): The name for the light level sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. + +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. + +.. note:: + + It is recommended to also setup the :doc:`/components/cover/am43`. + +See Also +-------- + +- :doc:`index` +- :doc:`/components/cover/am43` +- :ref:`automation` +- :apiref:`sensor/am43/am43.h` +- :ghedit:`Edit` diff --git a/components/sensor/images/am43.jpg b/components/sensor/images/am43.jpg new file mode 100644 index 000000000..3127c5b89 Binary files /dev/null and b/components/sensor/images/am43.jpg differ diff --git a/images/am43.jpg b/images/am43.jpg new file mode 100644 index 000000000..3127c5b89 Binary files /dev/null and b/images/am43.jpg differ diff --git a/index.rst b/index.rst index b10ca0db1..aeaad00fc 100644 --- a/index.rst +++ b/index.rst @@ -183,6 +183,7 @@ Light ***** .. imgtable:: + AM43, components/sensor/am43, am43.jpg, Lux APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture BH1750, components/sensor/bh1750, bh1750.jpg, Lux TCS34725, components/sensor/tcs34725, tcs34725.jpg, Lux & RGB colour @@ -204,6 +205,7 @@ Bluetooth Low Energy (BLE) ************************** .. imgtable:: + AM43, components/sensor/am43, am43.jpg, Lux & Battery level BLE RSSI, components/sensor/ble_rssi, bluetooth.svg BLE Client Sensor, components/sensor/ble_client, bluetooth.svg Inkbird IBS-TH1 Mini, components/sensor/inkbird_ibsth1_mini, inkbird_isbth1_mini.jpg, Temperature & Humidity @@ -479,6 +481,7 @@ Cover Components Endstop Cover, components/cover/endstop, electric-switch.svg Time-Based Cover, components/cover/time_based, timer.svg Custom Cover, components/cover/custom, language-cpp.svg + AM43 Cover, components/cover/am43, am43.jpg Text Sensor Components ----------------------