5.2.5. Home Automation (HA)
This section provides the Home Automation (HA) application profile related APIs and defines of ESP Zigbee Core. The APIs are used to create a standard Zigbee Home Automation (ZHA) device.
5.2.5.1. API Reference
5.2.5.1.1. Header File
5.2.5.1.2. Functions
-
ezb_af_ep_desc_t ezb_zha_create_custom_gateway(uint8_t ep_id, const ezb_zha_custom_gateway_config_t *cfg)
Create Zigbee Home Automation (ZHA) Custom Gateway device.
- Parameters:
ep_id -- The endpoint ID that the custom gateway device is assigned to.
cfg -- The pointer to custom gateway device configuration, ezb_zha_custom_gateway_config_t.
- Returns:
The created Zigbee ZHA Custom Gateway.
-
ezb_af_ep_desc_t ezb_zha_create_on_off_light(uint8_t ep_id, const ezb_zha_on_off_light_config_t *cfg)
Create Zigbee Home Automation (ZHA) On/Off Light device.
- Parameters:
ep_id -- The endpoint ID that the on-off light device is assigned to.
cfg -- The pointer to on-off light device configuration, ezb_zha_on_off_light_config_s.
- Returns:
The created Zigbee ZHA On/Off Light.
-
ezb_af_ep_desc_t ezb_zha_create_on_off_switch(uint8_t ep_id, const ezb_zha_on_off_switch_config_t *cfg)
Create Zigbee Home Automation (ZHA) On/Off Switch device.
- Parameters:
ep_id -- The endpoint ID that the on-off switch device is assigned to.
cfg -- The pointer to on-off switch device configuration, ezb_zha_on_off_switch_config_t.
- Returns:
The created Zigbee ZHA On/Off Switch.
-
ezb_af_ep_desc_t ezb_zha_create_dimmable_light(uint8_t ep_id, const ezb_zha_dimmable_light_config_t *cfg)
Create Zigbee Home Automation (ZHA) Dimmable Light device.
- Parameters:
ep_id -- The endpoint ID that the dimmable light device is assigned to.
cfg -- The pointer to dimmable light device configuration, ezb_zha_dimmable_light_config_s.
- Returns:
The created Zigbee ZHA Dimmable Light.
-
ezb_af_ep_desc_t ezb_zha_create_color_dimmable_light(uint8_t ep_id, const ezb_zha_color_dimmable_light_config_t *cfg)
Create Zigbee Home Automation (ZHA) Color Dimmable Light device.
- Parameters:
ep_id -- The endpoint ID that the color dimmable light device is assigned to.
cfg -- The pointer to color dimmable light device configuration, ezb_zha_color_dimmable_light_config_s.
- Returns:
The created Zigbee ZHA Color Dimmable Light.
-
ezb_af_ep_desc_t ezb_zha_create_dimmer_switch(uint8_t ep_id, const ezb_zha_dimmer_switch_config_t *cfg)
Create Zigbee Home Automation (ZHA) Dimmer Switch device.
- Parameters:
ep_id -- The endpoint ID that the dimmer switch device is assigned to.
cfg -- The pointer to dimmer switch device configuration, ezb_zha_dimmer_switch_config_t.
- Returns:
The created Zigbee ZHA Dimmer Switch.
-
ezb_af_ep_desc_t ezb_zha_create_color_dimmer_switch(uint8_t ep_id, const ezb_zha_color_dimmer_switch_config_t *cfg)
Create Zigbee Home Automation (ZHA) Color Dimmer Switch device.
- Parameters:
ep_id -- The endpoint ID that the color dimmer switch device is assigned to.
cfg -- The pointer to color dimmer switch device configuration, ezb_zha_color_dimmer_switch_config_t.
- Returns:
The created Zigbee ZHA Color Dimmer Switch.
-
ezb_af_ep_desc_t ezb_zha_create_mains_power_outlet(uint8_t ep_id, const ezb_zha_mains_power_outlet_config_t *cfg)
Create Zigbee Home Automation (ZHA) Mains Power Outlet device.
- Parameters:
ep_id -- The endpoint ID that the mains power outlet device is assigned to.
cfg -- The pointer to mains power outlet device configuration, ezb_zha_mains_power_outlet_config_s.
- Returns:
The created Zigbee ZHA Mains Power Outlet.
-
ezb_af_ep_desc_t ezb_zha_create_temperature_sensor(uint8_t ep_id, const ezb_zha_temperature_sensor_config_t *cfg)
Create Zigbee Home Automation (ZHA) Temperature Sensor device.
- Parameters:
ep_id -- The endpoint ID that the temperature sensor device is assigned to.
cfg -- The pointer to temperature sensor device configuration, ezb_zha_temperature_sensor_config_s.
- Returns:
The created Zigbee ZHA Temperature Sensor.
-
ezb_af_ep_desc_t ezb_zha_create_light_sensor(uint8_t ep_id, const ezb_zha_light_sensor_config_t *cfg)
Create Zigbee Home Automation (ZHA) Light Sensor device.
- Parameters:
ep_id -- The endpoint ID that the light sensor device is assigned to.
cfg -- The pointer to light sensor device configuration, ezb_zha_light_sensor_config_s.
- Returns:
The created Zigbee ZHA Light Sensor.
-
ezb_af_ep_desc_t ezb_zha_create_configuration_tool(uint8_t ep_id, const ezb_zha_configuration_tool_config_t *cfg)
Create Zigbee Home Automation (ZHA) Configuration Tool device.
- Parameters:
ep_id -- The endpoint ID that the configuration tool device is assigned to.
cfg -- The pointer to configuration tool device configuration, ezb_zha_configuration_tool_config_t.
- Returns:
The created Zigbee ZHA Configuration Tool.
-
ezb_af_ep_desc_t ezb_zha_create_thermostat(uint8_t ep_id, const ezb_zha_thermostat_config_t *cfg)
Create Zigbee Home Automation (ZHA) Thermostat device.
- Parameters:
ep_id -- The endpoint ID that the thermostat device is assigned to.
cfg -- The pointer to thermostat device configuration, ezb_zha_thermostat_config_s.
- Returns:
The created Zigbee ZHA Thermostat.
-
ezb_af_ep_desc_t ezb_zha_create_shade(uint8_t ep_id, const ezb_zha_shade_config_t *cfg)
Create Zigbee Home Automation (ZHA) Shade device.
- Parameters:
ep_id -- The endpoint ID that the shade device is assigned to.
cfg -- The pointer to shade device configuration, ezb_zha_shade_config_s.
- Returns:
The created Zigbee ZHA Shade.
-
ezb_af_ep_desc_t ezb_zha_create_shade_controller(uint8_t ep_id, const ezb_zha_shade_controller_config_t *cfg)
Create Zigbee Home Automation (ZHA) Shade controller device.
- Parameters:
ep_id -- The endpoint ID that the shade controller device is assigned to.
cfg -- The pointer to shade controller device configuration, ezb_zha_shade_controller_config_t.
- Returns:
The created Zigbee ZHA Shade controller.
-
ezb_af_ep_desc_t ezb_zha_create_window_covering(uint8_t ep_id, const ezb_zha_window_covering_config_t *cfg)
Create Zigbee Home Automation (ZHA) Window Covering device.
- Parameters:
ep_id -- The endpoint ID that the window covering device is assigned to.
cfg -- The pointer to window covering device configuration, ezb_zha_window_covering_config_s.
- Returns:
The created Zigbee ZHA Window Covering.
-
ezb_af_ep_desc_t ezb_zha_create_window_covering_controller(uint8_t ep_id, const ezb_zha_window_covering_controller_config_t *cfg)
Create Zigbee Home Automation (ZHA) Window Covering controller device.
- Parameters:
ep_id -- The endpoint ID that the window covering controller device is assigned to.
cfg -- The pointer to window covering controller device configuration, ezb_zha_window_covering_controller_config_t.
- Returns:
The created Zigbee ZHA Window Covering controller.
-
ezb_af_ep_desc_t ezb_zha_create_door_lock(uint8_t ep_id, const ezb_zha_door_lock_config_t *cfg)
Create Zigbee Home Automation (ZHA) Door Lock device.
- Parameters:
ep_id -- The endpoint ID that the door lock device is assigned to.
cfg -- The pointer to door lock device configuration, ezb_zha_door_lock_config_s.
- Returns:
The created Zigbee ZHA Door Lock.
-
ezb_af_ep_desc_t ezb_zha_create_door_lock_controller(uint8_t ep_id, const ezb_zha_door_lock_controller_config_t *cfg)
Create Zigbee Home Automation (ZHA) Door Lock controller device.
- Parameters:
ep_id -- The endpoint ID that the door lock controller device is assigned to.
cfg -- The pointer to door lock controller device configuration, ezb_zha_door_lock_controller_config_t.
- Returns:
The created Zigbee ZHA Door Lock controller.
5.2.5.1.3. Structures
-
struct ezb_zha_common_device_config_s
Zigbee Home Automation (ZHA) common device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_on_off_light_config_s
Zigbee Home Automation (ZHA) On/Off Light device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_on_off_cluster_server_config_t on_off_cfg
On off cluster configuration, see ezb_zcl_on_off_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_dimmable_light_config_s
Zigbee Home Automation (ZHA) Dimmable Light device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_on_off_cluster_server_config_t on_off_cfg
On off cluster configuration, see ezb_zcl_on_off_cluster_server_config_s
-
ezb_zcl_level_cluster_server_config_t level_cfg
Level cluster configuration, see ezb_zcl_level_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_color_dimmable_light_config_s
Zigbee Home Automation (ZHA) Color Dimmable Light device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_on_off_cluster_server_config_t on_off_cfg
On off cluster configuration, see ezb_zcl_on_off_cluster_server_config_s
-
ezb_zcl_level_cluster_server_config_t level_cfg
Level cluster configuration, see ezb_zcl_level_cluster_server_config_s
-
ezb_zcl_color_control_cluster_server_config_t color_cfg
Color control cluster configuration, see ezb_zcl_color_control_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_mains_power_outlet_config_s
Zigbee Home Automation (ZHA) Mains Power Outlet device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_on_off_cluster_server_config_t on_off_cfg
On off cluster configuration, see ezb_zcl_on_off_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_temperature_sensor_config_s
Zigbee Home Automation (ZHA) Temperature Sensor device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_temperature_measurement_cluster_server_config_t temp_meas_cfg
Temperature measurement cluster configuration, see ezb_zcl_temperature_measurement_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_light_sensor_config_s
Zigbee Home Automation (ZHA) Light Sensor device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_illuminance_measurement_cluster_server_config_t illuminance_cfg
Illuminance measurement cluster configuration, see ezb_zcl_illuminance_measurement_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_thermostat_config_s
Zigbee Home Automation (ZHA) Thermostat device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_thermostat_cluster_server_config_t thermostat_cfg
Thermostat cluster configuration, see ezb_zcl_thermostat_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_shade_config_s
Zigbee Home Automation (ZHA) Shade device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_shade_config_cluster_server_config_t shade_cfg
Shade config cluster configuration, see ezb_zcl_shade_config_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_on_off_cluster_server_config_t on_off_cfg
On off cluster configuration, see ezb_zcl_on_off_cluster_server_config_s
-
ezb_zcl_level_cluster_server_config_t level_cfg
Level cluster configuration, see ezb_zcl_level_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_window_covering_config_s
Zigbee Home Automation (ZHA) Window Covering device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_window_covering_cluster_server_config_t window_covering_cfg
Window covering cluster configuration, see ezb_zcl_window_covering_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
-
struct ezb_zha_door_lock_config_s
Zigbee Home Automation (ZHA) Door Lock device configuration.
Public Members
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
Basic cluster configuration, see ezb_zcl_basic_cluster_server_config_s
-
ezb_zcl_identify_cluster_server_config_t identify_cfg
Identify cluster configuration, see ezb_zcl_identify_cluster_server_config_s
-
ezb_zcl_door_lock_cluster_server_config_t door_lock_cfg
Door lock cluster configuration, see ezb_zcl_door_lock_cluster_server_config_s
-
ezb_zcl_groups_cluster_server_config_t groups_cfg
Groups cluster configuration, see ezb_zcl_groups_cluster_server_config_s
-
ezb_zcl_scenes_cluster_server_config_t scenes_cfg
Scenes cluster configuration, see ezb_zcl_scenes_cluster_server_config_s
-
ezb_zcl_basic_cluster_server_config_t basic_cfg
5.2.5.1.4. Macros
-
EZB_ZHA_COMMON_DEVICE_CONFIG()
Zigbee Home Automation (ZHA) common device configuration.
-
EZB_ZHA_CUSTOM_GATEWAY_CONFIG()
Zigbee Home Automation (ZHA) Custom Gateway device configuration.
-
EZB_ZHA_ON_OFF_LIGHT_CONFIG()
Zigbee Home Automation (ZHA) On/Off Light device configuration.
-
EZB_ZHA_ON_OFF_SWITCH_CONFIG()
Zigbee Home Automation (ZHA) On/Off Switch device configuration.
-
EZB_ZHA_DIMMABLE_LIGHT_CONFIG()
Zigbee Home Automation (ZHA) Dimmable Light device configuration.
-
EZB_ZHA_COLOR_DIMMABLE_LIGHT_CONFIG()
Zigbee Home Automation (ZHA) Color Dimmable Light device configuration.
-
EZB_ZHA_DIMMER_SWITCH_CONFIG()
Zigbee Home Automation (ZHA) Dimmer Switch device configuration.
-
EZB_ZHA_COLOR_DIMMER_SWITCH_CONFIG()
Zigbee Home Automation (ZHA) Color Dimmer Switch device configuration.
-
EZB_ZHA_MAINS_POWER_OUTLET_CONFIG()
Zigbee Home Automation (ZHA) Mains Power Outlet device configuration.
-
EZB_ZHA_TEMPERATURE_SENSOR_CONFIG()
Zigbee Home Automation (ZHA) Temperature Sensor device configuration.
-
EZB_ZHA_LIGHT_SENSOR_CONFIG()
Zigbee Home Automation (ZHA) Light Sensor device configuration.
-
EZB_ZHA_CONFIGURATION_TOOL_CONFIG()
Zigbee Home Automation (ZHA) Configuration Tool device configuration.
-
EZB_ZHA_THERMOSTAT_CONFIG()
Zigbee Home Automation (ZHA) Thermostat device configuration.
-
EZB_ZHA_SHADE_CONFIG()
Zigbee Home Automation (ZHA) Shade device configuration.
-
EZB_ZHA_SHADE_CONTROLLER_CONFIG()
Zigbee Home Automation (ZHA) Shade controller device configuration.
-
EZB_ZHA_WINDOW_COVERING_CONFIG()
Zigbee Home Automation (ZHA) Window Covering device configuration.
-
EZB_ZHA_WINDOW_COVERING_CONTROLLER_CONFIG()
Zigbee Home Automation (ZHA) Window Covering controller device configuration.
-
EZB_ZHA_DOOR_LOCK_CONFIG()
Zigbee Home Automation (ZHA) Door Lock device configuration.
-
EZB_ZHA_DOOR_LOCK_CONTROLLER_CONFIG()
Zigbee Home Automation (ZHA) Door Lock controller device configuration.
5.2.5.1.5. Type Definitions
-
typedef uint16_t ezb_zha_device_id_t
Zigbee Home Automation (ZHA) device ID type.
-
typedef struct ezb_zha_common_device_config_s ezb_zha_common_device_config_t
Zigbee Home Automation (ZHA) common device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_custom_gateway_config_t
Zigbee Home Automation (ZHA) Custom Gateway device configuration. .
-
typedef struct ezb_zha_on_off_light_config_s ezb_zha_on_off_light_config_t
Zigbee Home Automation (ZHA) On/Off Light device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_on_off_switch_config_t
Zigbee Home Automation (ZHA) On/Off Switch device configuration. .
-
typedef struct ezb_zha_dimmable_light_config_s ezb_zha_dimmable_light_config_t
Zigbee Home Automation (ZHA) Dimmable Light device configuration.
-
typedef struct ezb_zha_color_dimmable_light_config_s ezb_zha_color_dimmable_light_config_t
Zigbee Home Automation (ZHA) Color Dimmable Light device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_dimmer_switch_config_t
Zigbee Home Automation (ZHA) Dimmer Switch device configuration. .
-
typedef ezb_zha_common_device_config_t ezb_zha_color_dimmer_switch_config_t
Zigbee Home Automation (ZHA) Color Dimmer Switch device configuration. .
-
typedef struct ezb_zha_mains_power_outlet_config_s ezb_zha_mains_power_outlet_config_t
Zigbee Home Automation (ZHA) Mains Power Outlet device configuration.
-
typedef struct ezb_zha_temperature_sensor_config_s ezb_zha_temperature_sensor_config_t
Zigbee Home Automation (ZHA) Temperature Sensor device configuration.
-
typedef struct ezb_zha_light_sensor_config_s ezb_zha_light_sensor_config_t
Zigbee Home Automation (ZHA) Light Sensor device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_configuration_tool_config_t
Zigbee Home Automation (ZHA) Configuration Tool device configuration. .
-
typedef struct ezb_zha_thermostat_config_s ezb_zha_thermostat_config_t
Zigbee Home Automation (ZHA) Thermostat device configuration.
-
typedef struct ezb_zha_shade_config_s ezb_zha_shade_config_t
Zigbee Home Automation (ZHA) Shade device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_shade_controller_config_t
Zigbee Home Automation (ZHA) Shade controller device configuration. .
-
typedef struct ezb_zha_window_covering_config_s ezb_zha_window_covering_config_t
Zigbee Home Automation (ZHA) Window Covering device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_window_covering_controller_config_t
Zigbee Home Automation (ZHA) Window Covering controller device configuration. .
-
typedef struct ezb_zha_door_lock_config_s ezb_zha_door_lock_config_t
Zigbee Home Automation (ZHA) Door Lock device configuration.
-
typedef ezb_zha_common_device_config_t ezb_zha_door_lock_controller_config_t
Zigbee Home Automation (ZHA) Door Lock controller device configuration. .