forked from espressif/arduino-esp32
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathZigbeeTempSensor.h
44 lines (30 loc) · 1.34 KB
/
ZigbeeTempSensor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* Class of Zigbee Temperature + Humidity sensor endpoint inherited from common EP class */
#pragma once
#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
class ZigbeeTempSensor : public ZigbeeEP {
public:
ZigbeeTempSensor(uint8_t endpoint);
~ZigbeeTempSensor();
// Set the temperature value in 0,01°C
void setTemperature(float value);
// Set the min and max value for the temperature sensor in 0,01°C
void setMinMaxValue(float min, float max);
// Set the tolerance value for the temperature sensor in 0,01°C
void setTolerance(float tolerance);
// Set the reporting interval for temperature measurement in seconds and delta (temp change in 0,01 °C)
void setReporting(uint16_t min_interval, uint16_t max_interval, float delta);
// Report the temperature value
void reportTemperature();
// Add humidity cluster to the temperature sensor device
void addHumiditySensor(float min, float max, float tolerance);
// Set the humidity value in 0,01%
void setHumidity(float value);
// Set the reporting interval for humidity measurement in seconds and delta (humidity change in 0,01%)
void setHumidityReporting(uint16_t min_interval, uint16_t max_interval, float delta);
// Report the humidity value
void reportHumidity();
};
#endif //SOC_IEEE802154_SUPPORTED