feat(docs): Updaze Zigbee docs with latest changes (#11627)
This commit is contained in:
parent
a14ce89715
commit
f08efa1fa3
3 changed files with 159 additions and 0 deletions
133
docs/en/zigbee/ep_fan_control.rst
Normal file
133
docs/en/zigbee/ep_fan_control.rst
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
################
|
||||||
|
ZigbeeFanControl
|
||||||
|
################
|
||||||
|
|
||||||
|
About
|
||||||
|
-----
|
||||||
|
|
||||||
|
The ``ZigbeeFanControl`` class provides a Zigbee endpoint for controlling fan devices in a Home Automation (HA) network. This endpoint implements the Fan Control cluster and allows for controlling fan modes and sequences.
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
* Fan mode control (OFF, LOW, MEDIUM, HIGH, ON, AUTO, SMART)
|
||||||
|
* Fan mode sequence configuration
|
||||||
|
* State change callbacks
|
||||||
|
* Zigbee HA standard compliance
|
||||||
|
|
||||||
|
**Use Cases:**
|
||||||
|
* Smart ceiling fans
|
||||||
|
* HVAC system fans
|
||||||
|
* Exhaust fans
|
||||||
|
* Any device requiring fan speed control
|
||||||
|
|
||||||
|
API Reference
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Constructor
|
||||||
|
***********
|
||||||
|
|
||||||
|
ZigbeeFanControl
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Creates a new Zigbee fan control endpoint.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
ZigbeeFanControl(uint8_t endpoint);
|
||||||
|
|
||||||
|
* ``endpoint`` - Endpoint number (1-254)
|
||||||
|
|
||||||
|
Fan Mode Enums
|
||||||
|
**************
|
||||||
|
|
||||||
|
ZigbeeFanMode
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Available fan modes for controlling the fan speed and operation.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
enum ZigbeeFanMode {
|
||||||
|
FAN_MODE_OFF, // Fan is off
|
||||||
|
FAN_MODE_LOW, // Low speed
|
||||||
|
FAN_MODE_MEDIUM, // Medium speed
|
||||||
|
FAN_MODE_HIGH, // High speed
|
||||||
|
FAN_MODE_ON, // Fan is on (full speed)
|
||||||
|
FAN_MODE_AUTO, // Automatic mode
|
||||||
|
FAN_MODE_SMART, // Smart mode
|
||||||
|
};
|
||||||
|
|
||||||
|
ZigbeeFanModeSequence
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Available fan mode sequences that define which modes are available for the fan.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
enum ZigbeeFanModeSequence {
|
||||||
|
FAN_MODE_SEQUENCE_LOW_MED_HIGH, // Low -> Medium -> High
|
||||||
|
FAN_MODE_SEQUENCE_LOW_HIGH, // Low -> High
|
||||||
|
FAN_MODE_SEQUENCE_LOW_MED_HIGH_AUTO, // Low -> Medium -> High -> Auto
|
||||||
|
FAN_MODE_SEQUENCE_LOW_HIGH_AUTO, // Low -> High -> Auto
|
||||||
|
FAN_MODE_SEQUENCE_ON_AUTO, // On -> Auto
|
||||||
|
};
|
||||||
|
|
||||||
|
API Methods
|
||||||
|
***********
|
||||||
|
|
||||||
|
setFanModeSequence
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Sets the fan mode sequence and initializes the fan control.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
bool setFanModeSequence(ZigbeeFanModeSequence sequence);
|
||||||
|
|
||||||
|
* ``sequence`` - The fan mode sequence to set
|
||||||
|
|
||||||
|
This function will return ``true`` if successful, ``false`` otherwise.
|
||||||
|
|
||||||
|
getFanMode
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
Gets the current fan mode.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
ZigbeeFanMode getFanMode();
|
||||||
|
|
||||||
|
This function will return current fan mode.
|
||||||
|
|
||||||
|
getFanModeSequence
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Gets the current fan mode sequence.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
ZigbeeFanModeSequence getFanModeSequence();
|
||||||
|
|
||||||
|
This function will return current fan mode sequence.
|
||||||
|
|
||||||
|
Event Handling
|
||||||
|
**************
|
||||||
|
|
||||||
|
onFanModeChange
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Sets a callback function to be called when the fan mode changes.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
void onFanModeChange(void (*callback)(ZigbeeFanMode mode));
|
||||||
|
|
||||||
|
* ``callback`` - Function to call when fan mode changes
|
||||||
|
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
|
||||||
|
Fan Control Implementation
|
||||||
|
**************************
|
||||||
|
|
||||||
|
.. literalinclude:: ../../../libraries/Zigbee/examples/Zigbee_Fan_Control/Zigbee_Fan_Control.ino
|
||||||
|
:language: arduino
|
||||||
|
|
@ -345,6 +345,19 @@ Performs a factory reset, clearing all network settings.
|
||||||
|
|
||||||
* ``restart`` - ``true`` to restart after reset (default: ``true``)
|
* ``restart`` - ``true`` to restart after reset (default: ``true``)
|
||||||
|
|
||||||
|
onGlobalDefaultResponse
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Sets a global callback for default response messages.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
void onGlobalDefaultResponse(void (*callback)(zb_cmd_type_t resp_to_cmd, esp_zb_zcl_status_t status, uint8_t endpoint, uint16_t cluster));
|
||||||
|
|
||||||
|
* ``callback`` - Function pointer to the callback function
|
||||||
|
|
||||||
|
This callback will be called for all endpoints when a default response is received.
|
||||||
|
|
||||||
Utility Functions
|
Utility Functions
|
||||||
*****************
|
*****************
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -345,6 +345,19 @@ Sets a callback function for identify events.
|
||||||
* ``callback`` - Function to call when identify event occurs
|
* ``callback`` - Function to call when identify event occurs
|
||||||
* ``time`` - Identify time in seconds
|
* ``time`` - Identify time in seconds
|
||||||
|
|
||||||
|
onDefaultResponse
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Sets a callback for default response messages for this endpoint.
|
||||||
|
|
||||||
|
.. code-block:: arduino
|
||||||
|
|
||||||
|
void onDefaultResponse(void (*callback)(zb_cmd_type_t resp_to_cmd, esp_zb_zcl_status_t status));
|
||||||
|
|
||||||
|
* ``callback`` - Function pointer to the callback function
|
||||||
|
|
||||||
|
This callback will be called when a default response is received for this specific endpoint.
|
||||||
|
|
||||||
Supported Endpoints
|
Supported Endpoints
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue