Skip to content

Commit 0486d3f

Browse files
committed
docs(zigbee): Update Thermostat APIs
1 parent 32966a6 commit 0486d3f

File tree

1 file changed

+222
-27
lines changed

1 file changed

+222
-27
lines changed

docs/en/zigbee/ep_thermostat.rst

Lines changed: 222 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ ZigbeeThermostat
55
About
66
-----
77

8-
The ``ZigbeeThermostat`` class provides a thermostat endpoint for Zigbee networks that receives temperature data from temperature sensors. This endpoint implements the Zigbee Home Automation (HA) standard for thermostats that can bind to temperature sensors and receive temperature readings.
8+
The ``ZigbeeThermostat`` class provides a thermostat endpoint for Zigbee networks.
9+
This endpoint implements the Zigbee Home Automation (HA) standard for thermostats that can bind to temperature and humidity sensors and receive temperature and humidity readings.
910

1011
**Features:**
1112
* Automatic discovery and binding to temperature sensors
12-
* Temperature data reception from bound sensors
13-
* Configurable temperature reporting intervals
14-
* Sensor settings retrieval (min/max temperature, tolerance)
13+
* Temperature and humidity data reception from bound sensors
14+
* Configurable temperature and humidity reporting intervals
15+
* Sensor settings retrieval (min/max/tolerance for temperature and humidity)
1516
* Multiple addressing modes (group, specific endpoint, IEEE address)
1617

1718
API Reference
@@ -60,20 +61,60 @@ Sets a callback function for receiving temperature data with source information.
6061
* ``src_endpoint`` - Source endpoint that sent the temperature data
6162
* ``src_address`` - Source address information
6263

63-
onConfigReceive
64-
^^^^^^^^^^^^^^^
64+
onTempConfigReceive
65+
^^^^^^^^^^^^^^^^^^^
6566

6667
Sets a callback function for receiving sensor configuration data.
6768

6869
.. code-block:: arduino
6970
70-
void onConfigReceive(void (*callback)(float min_temp, float max_temp, float tolerance));
71+
void onTempConfigReceive(void (*callback)(float min_temp, float max_temp, float tolerance));
7172
7273
* ``callback`` - Function to call when sensor configuration is received
7374
* ``min_temp`` - Minimum temperature supported by the sensor
7475
* ``max_temp`` - Maximum temperature supported by the sensor
7576
* ``tolerance`` - Temperature tolerance of the sensor
7677

78+
onHumidityReceive
79+
^^^^^^^^^^^^^^^^^
80+
81+
Sets a callback function for receiving humidity data.
82+
83+
.. code-block:: arduino
84+
85+
void onHumidityReceive(void (*callback)(float humidity));
86+
87+
* ``callback`` - Function to call when humidity data is received
88+
* ``humidity`` - Humidity value in percentage
89+
90+
onHumidityReceiveWithSource
91+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
92+
93+
Sets a callback function for receiving humidity data with source information.
94+
95+
.. code-block:: arduino
96+
97+
void onHumidityReceiveWithSource(void (*callback)(float humidity, uint8_t src_endpoint, esp_zb_zcl_addr_t src_address));
98+
99+
* ``callback`` - Function to call when humidity data is received
100+
* ``humidity`` - Humidity value in percentage
101+
* ``src_endpoint`` - Source endpoint that sent the humidity data
102+
* ``src_address`` - Source address information
103+
104+
onHumidityConfigReceive
105+
^^^^^^^^^^^^^^^^^^^^^^^
106+
107+
Sets a callback function for receiving humidity sensor configuration data.
108+
109+
.. code-block:: arduino
110+
111+
void onHumidityConfigReceive(void (*callback)(float min_humidity, float max_humidity, float tolerance));
112+
113+
* ``callback`` - Function to call when humidity sensor configuration is received
114+
* ``min_humidity`` - Minimum humidity supported by the sensor
115+
* ``max_humidity`` - Maximum humidity supported by the sensor
116+
* ``tolerance`` - Humidity tolerance of the sensor
117+
77118
Temperature Data Retrieval
78119
**************************
79120

@@ -98,7 +139,7 @@ Requests temperature data from a specific group.
98139
* ``group_addr`` - Group address to send the request to
99140

100141
getTemperature (Endpoint + Short Address)
101-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102143

103144
Requests temperature data from a specific endpoint using short address.
104145

@@ -110,7 +151,7 @@ Requests temperature data from a specific endpoint using short address.
110151
* ``short_addr`` - Short address of the target device
111152

112153
getTemperature (Endpoint + IEEE Address)
113-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114155

115156
Requests temperature data from a specific endpoint using IEEE address.
116157

@@ -121,49 +162,143 @@ Requests temperature data from a specific endpoint using IEEE address.
121162
* ``endpoint`` - Target endpoint number
122163
* ``ieee_addr`` - IEEE address of the target device
123164

124-
Sensor Settings Retrieval
125-
*************************
165+
Humidity Data Retrieval
166+
***********************
126167

127-
getSensorSettings
128-
^^^^^^^^^^^^^^^^^
168+
getHumidity
169+
^^^^^^^^^^^
170+
171+
Requests humidity data from all bound sensors.
172+
173+
.. code-block:: arduino
174+
175+
void getHumidity();
176+
177+
getHumidity (Group)
178+
^^^^^^^^^^^^^^^^^^^
179+
180+
Requests humidity data from a specific group.
181+
182+
.. code-block:: arduino
183+
184+
void getHumidity(uint16_t group_addr);
185+
186+
* ``group_addr`` - Group address to send the request to
187+
188+
getHumidity (Endpoint + Short Address)
189+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190+
191+
Requests humidity data from a specific endpoint using short address.
192+
193+
.. code-block:: arduino
194+
195+
void getHumidity(uint8_t endpoint, uint16_t short_addr);
196+
197+
* ``endpoint`` - Target endpoint number
198+
* ``short_addr`` - Short address of the target device
199+
200+
getHumidity (Endpoint + IEEE Address)
201+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202+
203+
Requests humidity data from a specific endpoint using IEEE address.
204+
205+
.. code-block:: arduino
206+
207+
void getHumidity(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr);
208+
209+
* ``endpoint`` - Target endpoint number
210+
* ``ieee_addr`` - IEEE address of the target device
211+
212+
Temperature Settings Retrieval
213+
******************************
214+
215+
getTemperatureSettings
216+
^^^^^^^^^^^^^^^^^^^^^^
217+
218+
Requests temperature sensor settings from all bound sensors.
219+
220+
.. code-block:: arduino
221+
222+
void getTemperatureSettings();
223+
224+
getTemperatureSettings (Group)
225+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
226+
227+
Requests temperature sensor settings from a specific group.
129228

130-
Requests sensor settings from all bound sensors.
229+
.. code-block:: arduino
230+
231+
void getTemperatureSettings(uint16_t group_addr);
232+
233+
* ``group_addr`` - Group address to send the request to
234+
235+
getTemperatureSettings (Endpoint + Short Address)
236+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237+
238+
Requests temperature sensor settings from a specific endpoint using short address.
131239

132240
.. code-block:: arduino
133241
134-
void getSensorSettings();
242+
void getTemperatureSettings(uint8_t endpoint, uint16_t short_addr);
243+
244+
* ``endpoint`` - Target endpoint number
245+
* ``short_addr`` - Short address of the target device
246+
247+
getTemperatureSettings (Endpoint + IEEE Address)
248+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
249+
250+
Requests temperature sensor settings from a specific endpoint using IEEE address.
251+
252+
.. code-block:: arduino
253+
254+
void getTemperatureSettings(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr);
255+
256+
* ``endpoint`` - Target endpoint number
257+
* ``ieee_addr`` - IEEE address of the target device
258+
259+
Humidity Settings Retrieval
260+
***************************
261+
262+
getHumiditySettings
263+
^^^^^^^^^^^^^^^^^^^
135264

136-
getSensorSettings (Group)
137-
^^^^^^^^^^^^^^^^^^^^^^^^^
265+
Requests humidity sensor settings from all bound sensors.
138266

139-
Requests sensor settings from a specific group.
267+
.. code-block:: arduino
268+
269+
void getHumiditySettings();
270+
271+
getHumiditySettings (Group)
272+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
273+
274+
Requests humidity sensor settings from a specific group.
140275

141276
.. code-block:: arduino
142277
143-
void getSensorSettings(uint16_t group_addr);
278+
void getHumiditySettings(uint16_t group_addr);
144279
145280
* ``group_addr`` - Group address to send the request to
146281

147-
getSensorSettings (Endpoint + Short Address)
148-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
282+
getHumiditySettings (Endpoint + Short Address)
283+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149284

150-
Requests sensor settings from a specific endpoint using short address.
285+
Requests humidity sensor settings from a specific endpoint using short address.
151286

152287
.. code-block:: arduino
153288
154-
void getSensorSettings(uint8_t endpoint, uint16_t short_addr);
289+
void getHumiditySettings(uint8_t endpoint, uint16_t short_addr);
155290
156291
* ``endpoint`` - Target endpoint number
157292
* ``short_addr`` - Short address of the target device
158293

159-
getSensorSettings (Endpoint + IEEE Address)
160-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294+
getHumiditySettings (Endpoint + IEEE Address)
295+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161296

162-
Requests sensor settings from a specific endpoint using IEEE address.
297+
Requests humidity sensor settings from a specific endpoint using IEEE address.
163298

164299
.. code-block:: arduino
165300
166-
void getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr);
301+
void getHumiditySettings(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr);
167302
168303
* ``endpoint`` - Target endpoint number
169304
* ``ieee_addr`` - IEEE address of the target device
@@ -228,6 +363,66 @@ Configures temperature reporting for a specific endpoint using IEEE address.
228363
* ``max_interval`` - Maximum reporting interval in seconds
229364
* ``delta`` - Minimum change in temperature to trigger a report
230365

366+
Humidity Reporting Configuration
367+
********************************
368+
369+
setHumidityReporting
370+
^^^^^^^^^^^^^^^^^^^^
371+
372+
Configures humidity reporting for all bound sensors.
373+
374+
.. code-block:: arduino
375+
376+
void setHumidityReporting(uint16_t min_interval, uint16_t max_interval, float delta);
377+
378+
* ``min_interval`` - Minimum reporting interval in seconds
379+
* ``max_interval`` - Maximum reporting interval in seconds
380+
* ``delta`` - Minimum change in humidity to trigger a report
381+
382+
setHumidityReporting (Group)
383+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
384+
385+
Configures humidity reporting for a specific group.
386+
387+
.. code-block:: arduino
388+
389+
void setHumidityReporting(uint16_t group_addr, uint16_t min_interval, uint16_t max_interval, float delta);
390+
391+
* ``group_addr`` - Group address to configure
392+
* ``min_interval`` - Minimum reporting interval in seconds
393+
* ``max_interval`` - Maximum reporting interval in seconds
394+
* ``delta`` - Minimum change in humidity to trigger a report
395+
396+
setHumidityReporting (Endpoint + Short Address)
397+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
398+
399+
Configures humidity reporting for a specific endpoint using short address.
400+
401+
.. code-block:: arduino
402+
403+
void setHumidityReporting(uint8_t endpoint, uint16_t short_addr, uint16_t min_interval, uint16_t max_interval, float delta);
404+
405+
* ``endpoint`` - Target endpoint number
406+
* ``short_addr`` - Short address of the target device
407+
* ``min_interval`` - Minimum reporting interval in seconds
408+
* ``max_interval`` - Maximum reporting interval in seconds
409+
* ``delta`` - Minimum change in humidity to trigger a report
410+
411+
setHumidityReporting (Endpoint + IEEE Address)
412+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
413+
414+
Configures humidity reporting for a specific endpoint using IEEE address.
415+
416+
.. code-block:: arduino
417+
418+
void setHumidityReporting(uint8_t endpoint, esp_zb_ieee_addr_t ieee_addr, uint16_t min_interval, uint16_t max_interval, float delta);
419+
420+
* ``endpoint`` - Target endpoint number
421+
* ``ieee_addr`` - IEEE address of the target device
422+
* ``min_interval`` - Minimum reporting interval in seconds
423+
* ``max_interval`` - Maximum reporting interval in seconds
424+
* ``delta`` - Minimum change in humidity to trigger a report
425+
231426
Example
232427
-------
233428

0 commit comments

Comments
 (0)