nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
weather_station.h File Reference
#include <zcl/zb_zcl_temp_measurement_addons.h>
#include "sensor.h"

Go to the source code of this file.

Data Structures

struct  zb_zcl_pressure_measurement_attrs_t
 
struct  zb_zcl_humidity_measurement_attrs_t
 
struct  zb_device_ctx
 

Macros

#define ZCL_TEMPERATURE_MEASUREMENT_MEASURED_VALUE_MULTIPLIER   100
 
#define ZCL_PRESSURE_MEASUREMENT_MEASURED_VALUE_MULTIPLIER   10
 
#define ZCL_HUMIDITY_MEASUREMENT_MEASURED_VALUE_MULTIPLIER   100
 
#define WEATHER_STATION_ATTR_TEMP_MIN
 
#define WEATHER_STATION_ATTR_TEMP_MAX
 
#define WEATHER_STATION_ATTR_TEMP_TOLERANCE
 
#define WEATHER_STATION_ATTR_PRESSURE_MIN
 
#define WEATHER_STATION_ATTR_PRESSURE_MAX
 
#define WEATHER_STATION_ATTR_PRESSURE_TOLERANCE
 
#define WEATHER_STATION_ATTR_HUMIDITY_MIN
 
#define WEATHER_STATION_ATTR_HUMIDITY_MAX
 
#define WEATHER_STATION_ATTR_HUMIDITY_TOLERANCE
 
#define WEATHER_STATION_ENDPOINT_NB   42
 
#define ZB_HA_DEVICE_VER_TEMPERATURE_SENSOR   0
 
#define ZB_HA_WEATHER_STATION_IN_CLUSTER_NUM   5
 
#define ZB_HA_WEATHER_STATION_OUT_CLUSTER_NUM   1
 
#define ZB_HA_WEATHER_STATION_REPORT_ATTR_COUNT   3
 
#define ZB_HA_DECLARE_WEATHER_STATION_CLUSTER_LIST( cluster_list_name, basic_attr_list, identify_client_attr_list, identify_server_attr_list, temperature_measurement_attr_list, pressure_measurement_attr_list, humidity_measurement_attr_list)
 
#define ZB_ZCL_DECLARE_WEATHER_STATION_DESC( ep_name, ep_id, in_clust_num, out_clust_num)
 
#define ZB_HA_DECLARE_WEATHER_STATION_EP(ep_name, ep_id, cluster_list)
 

Functions

int weather_station_init (void)
 Initializes HW sensor used for performing measurements.
 
int weather_station_check_weather (void)
 Updates internal measurements performed by sensor.
 
int weather_station_update_temperature (void)
 Updates ZCL temperature attribute using value obtained during last weather check.
 
int weather_station_update_pressure (void)
 Updates ZCL pressure attribute using value obtained during last weather check.
 
int weather_station_update_humidity (void)
 Updates ZCL relative humidity attribute using value obtained during last weather check.