Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDF release/v5.1 #10577

Merged
merged 12 commits into from
Nov 6, 2024
6 changes: 4 additions & 2 deletions idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ dependencies:
espressif/network_provisioning:
version: "~1.0.0"
espressif/esp-zboss-lib:
version: "^1.0.1"
version: "==1.6.0"
require: public
rules:
- if: "target != esp32c2"
espressif/esp-zigbee-lib:
version: "^1.0.1"
version: "==1.6.0"
require: public
rules:
- if: "target != esp32c2"
espressif/esp-dsp:
Expand Down
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ZigbeeCore.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Zigbee Core Functions */

#include "ZigbeeCore.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeHandlers.cpp"
#include "Arduino.h"
Expand Down Expand Up @@ -407,4 +407,4 @@ const char *ZigbeeCore::getDeviceTypeString(esp_zb_ha_standard_devices_t deviceI

ZigbeeCore Zigbee = ZigbeeCore();

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ZigbeeCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "esp_zigbee_core.h"
#include "zdo/esp_zigbee_zdo_common.h"
Expand Down Expand Up @@ -122,4 +123,4 @@ class ZigbeeCore {

extern ZigbeeCore Zigbee;

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 2 additions & 3 deletions libraries/Zigbee/src/ZigbeeEP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "ZigbeeEP.h"

#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "esp_zigbee_cluster.h"
#include "zcl/esp_zigbee_zcl_power_config.h"
Expand Down Expand Up @@ -104,7 +104,6 @@ void ZigbeeEP::reportBatteryPercentage() {
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID;
report_attr_cmd.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE;
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_POWER_CONFIG;
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;

Expand Down Expand Up @@ -210,4 +209,4 @@ void ZigbeeEP::zbIdentify(const esp_zb_zcl_set_attr_value_message_t *message) {
}
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ZigbeeEP.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma once

#include "ZigbeeCore.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include <Arduino.h>

Expand Down Expand Up @@ -126,4 +126,4 @@ class ZigbeeEP {
friend class ZigbeeCore;
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ZigbeeHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "ZigbeeCore.h"
#include "Arduino.h"

#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

// forward declaration of all implemented handlers
static esp_err_t zb_attribute_set_handler(const esp_zb_zcl_set_attr_value_message_t *message);
Expand Down Expand Up @@ -138,4 +138,4 @@ static esp_err_t zb_cmd_default_resp_handler(const esp_zb_zcl_cmd_default_resp_m
return ESP_OK;
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeColorDimmableLight.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeColorDimmableLight.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

ZigbeeColorDimmableLight::ZigbeeColorDimmableLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_COLOR_DIMMABLE_LIGHT_DEVICE_ID;
Expand Down Expand Up @@ -109,4 +109,4 @@ void ZigbeeColorDimmableLight::lightChanged() {
}
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeColorDimmableLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand Down Expand Up @@ -38,4 +39,4 @@ class ZigbeeColorDimmableLight : public ZigbeeEP {
uint16_t _current_blue;
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeColorDimmerSwitch.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeColorDimmerSwitch.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

// Initialize the static instance pointer
ZigbeeColorDimmerSwitch *ZigbeeColorDimmerSwitch::_instance = nullptr;
Expand Down Expand Up @@ -400,4 +400,4 @@ void ZigbeeColorDimmerSwitch::setLightColor(uint8_t red, uint8_t green, uint8_t
}
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeColorDimmerSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand Down Expand Up @@ -57,4 +58,4 @@ class ZigbeeColorDimmerSwitch : public ZigbeeEP {
void calculateXY(uint8_t red, uint8_t green, uint8_t blue, uint16_t &x, uint16_t &y);
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeLight.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeLight.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

ZigbeeLight::ZigbeeLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID;
Expand Down Expand Up @@ -33,4 +33,4 @@ void ZigbeeLight::lightChanged() {
}
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand All @@ -30,4 +31,4 @@ class ZigbeeLight : public ZigbeeEP {
bool _current_state;
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
4 changes: 2 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeSwitch.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeSwitch.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

// Initialize the static instance pointer
ZigbeeSwitch *ZigbeeSwitch::_instance = nullptr;
Expand Down Expand Up @@ -230,4 +230,4 @@ void ZigbeeSwitch::lightOnWithTimedOff(uint8_t on_off_control, uint16_t time_on,
}
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand Down Expand Up @@ -39,4 +40,4 @@ class ZigbeeSwitch : public ZigbeeEP {
static void findCb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx);
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
6 changes: 2 additions & 4 deletions libraries/Zigbee/src/ep/ZigbeeTempSensor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeTempSensor.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

ZigbeeTempSensor::ZigbeeTempSensor(uint8_t endpoint) : ZigbeeEP(endpoint) {
_device_id = ESP_ZB_HA_TEMPERATURE_SENSOR_DEVICE_ID;
Expand Down Expand Up @@ -80,7 +80,6 @@ void ZigbeeTempSensor::reportTemperature() {
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID;
report_attr_cmd.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE;
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;

Expand Down Expand Up @@ -121,7 +120,6 @@ void ZigbeeTempSensor::reportHumidity() {
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID;
report_attr_cmd.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE;
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;

Expand Down Expand Up @@ -161,4 +159,4 @@ void ZigbeeTempSensor::setHumidityReporting(uint16_t min_interval, uint16_t max_
esp_zb_zcl_update_reporting_info(&reporting_info);
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeTempSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand Down Expand Up @@ -41,4 +42,4 @@ class ZigbeeTempSensor : public ZigbeeEP {
void reportHumidity();
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
6 changes: 3 additions & 3 deletions libraries/Zigbee/src/ep/ZigbeeThermostat.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ZigbeeThermostat.h"
#if SOC_IEEE802154_SUPPORTED
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

static float zb_s16_to_temperature(int16_t value) {
return 1.0 * value / 100;
Expand Down Expand Up @@ -185,7 +185,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t min_interval, uint16_t m
int16_t report_change = (int16_t)delta * 100;
esp_zb_zcl_config_report_record_t records[] = {
{
.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_SRV,
.direction = ESP_ZB_ZCL_REPORT_DIRECTION_SEND,
.attributeID = ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID,
.attrType = ESP_ZB_ZCL_ATTR_TYPE_S16,
.min_interval = min_interval,
Expand All @@ -202,4 +202,4 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t min_interval, uint16_t m
esp_zb_lock_release();
}

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
5 changes: 3 additions & 2 deletions libraries/Zigbee/src/ep/ZigbeeThermostat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#pragma once

#include "soc/soc_caps.h"
#if SOC_IEEE802154_SUPPORTED
#include "sdkconfig.h"
#if SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED

#include "ZigbeeEP.h"
#include "ha/esp_zigbee_ha_standard.h"
Expand Down Expand Up @@ -61,4 +62,4 @@ class ZigbeeThermostat : public ZigbeeEP {
void zbAttributeRead(uint16_t cluster_id, const esp_zb_zcl_attribute_t *attribute) override;
};

#endif //SOC_IEEE802154_SUPPORTED
#endif //SOC_IEEE802154_SUPPORTED && CONFIG_ZB_ENABLED
Loading
Loading