Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ZigbeeEP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ZigbeeEP::ZigbeeEP(uint8_t endpoint) {
_cluster_list = nullptr;
_on_identify = nullptr;
_on_ota_state_change = nullptr;
_on_default_response = nullptr;
_read_model = NULL;
_read_manufacturer = NULL;
_time_status = 0;
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeAnalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

ZigbeeAnalog::ZigbeeAnalog(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID;
_on_analog_output_change = nullptr;

//Create basic analog sensor clusters without configuration
_cluster_list = esp_zb_zcl_cluster_list_create();
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeBinary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

ZigbeeBinary::ZigbeeBinary(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID;
_on_binary_output_change = nullptr;

//Create basic binary sensor clusters without configuration
_cluster_list = esp_zb_zcl_cluster_list_create();
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeColorDimmableLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

ZigbeeColorDimmableLight::ZigbeeColorDimmableLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_COLOR_DIMMABLE_LIGHT_DEVICE_ID;
_on_light_change = nullptr;

esp_zb_color_dimmable_light_cfg_t light_cfg = ZIGBEE_DEFAULT_COLOR_DIMMABLE_LIGHT_CONFIG();
_cluster_list = esp_zb_color_dimmable_light_clusters_create(&light_cfg);
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeDimmableLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

ZigbeeDimmableLight::ZigbeeDimmableLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_DIMMABLE_LIGHT_DEVICE_ID;
_on_light_change = nullptr;

zigbee_dimmable_light_cfg_t light_cfg = ZIGBEE_DEFAULT_DIMMABLE_LIGHT_CONFIG();
_cluster_list = zigbee_dimmable_light_clusters_create(&light_cfg);
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeFanControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

ZigbeeFanControl::ZigbeeFanControl(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_THERMOSTAT_DEVICE_ID; //There is no FAN_CONTROL_DEVICE_ID in the Zigbee spec
_on_fan_mode_change = nullptr;

//Create basic analog sensor clusters without configuration
_cluster_list = esp_zb_zcl_cluster_list_create();
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeeLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

ZigbeeLight::ZigbeeLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID;
_on_light_change = nullptr;

esp_zb_on_off_light_cfg_t light_cfg = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG();
_cluster_list = esp_zb_on_off_light_clusters_create(&light_cfg); // use esp_zb_zcl_cluster_list_create() instead of esp_zb_on_off_light_clusters_create()
Expand Down
1 change: 1 addition & 0 deletions libraries/Zigbee/src/ep/ZigbeePowerOutlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

ZigbeePowerOutlet::ZigbeePowerOutlet(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID;
_on_state_change = nullptr;

esp_zb_mains_power_outlet_cfg_t outlet_cfg = ESP_ZB_DEFAULT_MAINS_POWER_OUTLET_CONFIG();
_cluster_list = esp_zb_mains_power_outlet_clusters_create(&outlet_cfg);
Expand Down
2 changes: 2 additions & 0 deletions libraries/Zigbee/src/ep/ZigbeeSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ZigbeeSwitch::ZigbeeSwitch(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID;
_instance = this; // Set the static pointer to this instance
_device = nullptr;
_on_light_state_change = nullptr;
_on_light_state_change_with_source = nullptr;

esp_zb_on_off_switch_cfg_t switch_cfg = ESP_ZB_DEFAULT_ON_OFF_SWITCH_CONFIG();
_cluster_list = esp_zb_on_off_switch_clusters_create(&switch_cfg);
Expand Down
6 changes: 6 additions & 0 deletions libraries/Zigbee/src/ep/ZigbeeThermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ ZigbeeThermostat::ZigbeeThermostat(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_THERMOSTAT_DEVICE_ID;
_instance = this; // Set the static pointer to this instance
_device = nullptr; // Initialize sensor pointer to null
_on_temp_receive = nullptr;
_on_temp_receive_with_source = nullptr;
_on_temp_config_receive = nullptr;
_on_humidity_receive = nullptr;
_on_humidity_receive_with_source = nullptr;
_on_humidity_config_receive = nullptr;

//use custom config to avoid narrowing error -> must be fixed in zigbee-sdk
esp_zb_thermostat_cfg_t thermostat_cfg = ZB_DEFAULT_THERMOSTAT_CONFIG();
Expand Down
5 changes: 5 additions & 0 deletions libraries/Zigbee/src/ep/ZigbeeWindowCovering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ esp_zb_cluster_list_t *ZigbeeWindowCovering::zigbee_window_covering_clusters_cre

ZigbeeWindowCovering::ZigbeeWindowCovering(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_WINDOW_COVERING_DEVICE_ID;
_on_open = nullptr;
_on_close = nullptr;
_on_go_to_lift_percentage = nullptr;
_on_go_to_tilt_percentage = nullptr;
_on_stop = nullptr;

// set default values for window covering attributes
_current_lift_percentage = ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_DEFAULT_VALUE;
Expand Down
Loading