Skip to content

Commit

Permalink
Merge branch 'appliance-dev-types' into 'main'
Browse files Browse the repository at this point in the history
Add air purifier, air quality sensor, dish washer device types

See merge request app-frameworks/esp-matter!484
  • Loading branch information
dhrishi committed Oct 27, 2023
2 parents 8b28a13 + 18da50c commit d53cdb1
Show file tree
Hide file tree
Showing 15 changed files with 5,333 additions and 215 deletions.
9 changes: 9 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ Features
- RainMaker integration.
- Zigbee to Matter and BLE Mesh to Matter Bridge.

# 25-Sep-2023

API Change

```
esp_err_t add(endpoint_t *endpoint, config_t *config)
```
- Above API returns the esp_err instread of endpoint.

Known Issues
------------
- BLE memory is not freed if the device has already been commissioned on bootup.
Expand Down
944 changes: 944 additions & 0 deletions components/esp_matter/esp_matter_attribute.cpp

Large diffs are not rendered by default.

236 changes: 236 additions & 0 deletions components/esp_matter/esp_matter_attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,205 @@ attribute_t *create_ac_capacity_format(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* thermostat */

namespace air_quality {
namespace attribute {
attribute_t *create_air_quality(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* air_quality */

namespace hepa_filter_monitoring {
namespace attribute {
attribute_t *create_condition(cluster_t *cluster, uint8_t value);
attribute_t *create_degradation_direction(cluster_t *cluster, uint8_t value);
attribute_t *create_change_indication(cluster_t *cluster, uint8_t value);
attribute_t *create_in_place_indicator(cluster_t *cluster, bool value);
attribute_t *create_last_changed_time(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
} /* attribute */
} /* hepa_filter_monitoring */

namespace activated_carbon_filter_monitoring {
namespace attribute {
attribute_t *create_condition(cluster_t *cluster, uint8_t value);
attribute_t *create_degradation_direction(cluster_t *cluster, uint8_t value);
attribute_t *create_change_indication(cluster_t *cluster, uint8_t value);
attribute_t *create_in_place_indicator(cluster_t *cluster, bool value);
attribute_t *create_last_changed_time(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
} /* attribute */
} /* activated_carbon_filter_monitoring */

namespace carbon_monoxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* carbon_monoxide_concentration_measurement */

namespace carbon_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* carbon_dioxide_concentration_measurement */

namespace nitrogen_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* nitrogen_dioxide_concentration_measurement */

namespace ozone_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* ozone_concentration_measurement */

namespace formaldehyde_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* formaldehyde_concentration_measurement */

namespace pm1_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* pm1_concentration_measurement */

namespace pm25_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* pm25_concentration_measurement */

namespace pm10_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* pm10_concentration_measurement */

namespace radon_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* radon_concentration_measurement */

namespace total_volatile_organic_compounds_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* total_volatile_organic_compounds_concentration_measurement */

namespace operational_state {
namespace attribute {
attribute_t *create_phase_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
attribute_t *create_current_phase(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_countdown_time(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_operational_state_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
attribute_t *create_operational_state(cluster_t *cluster, uint8_t value);
attribute_t *create_operational_error(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* operational_state */

namespace door_lock {
namespace attribute {
attribute_t *create_lock_state(cluster_t *cluster, nullable<uint8_t> value);
Expand All @@ -435,6 +634,29 @@ attribute_t *create_supported_operating_modes(cluster_t *cluster, uint16_t value
} /* attribute */
} /* door_lock */

namespace laundry_washer_mode {
namespace attribute {
attribute_t *create_supported_modes(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_mode(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* laundry_washer_mode */

namespace laundry_washer_controls {
namespace attribute {
attribute_t *create_spin_speeds(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
attribute_t *create_spin_speed_current(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_number_of_rinses(cluster_t *cluster, uint8_t value);
attribute_t *create_supported_rinses(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
} /* attribute */
} /* laundry_washer_controls */

namespace dish_washer_mode {
namespace attribute {
attribute_t *create_supported_modes(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_mode(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* dish_washer_mode */

namespace window_covering {
namespace attribute {
attribute_t *create_type(cluster_t *cluster, uint8_t value);
Expand Down Expand Up @@ -652,5 +874,19 @@ attribute_t *create_supported(cluster_t *cluster, uint32_t value);
} /* attribute */
} /* refrigerator_alarm */

namespace rvc_run_mode {
namespace attribute {
attribute_t *create_supported_modes(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_mode(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* rvc_run_mode */

namespace rvc_clean_mode {
namespace attribute {
attribute_t *create_supported_modes(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_mode(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* rvc_clean_mode */

} /* cluster */
} /* esp_matter */
4 changes: 2 additions & 2 deletions components/esp_matter/esp_matter_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ void binding_init()
}
} // namespace client

#if CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
namespace cluster {
using client::peer_device_t;

Expand All @@ -194,7 +195,6 @@ static void send_command_failure_callback(void *context, CHIP_ERROR error)
{
ESP_LOGI(TAG, "Send command failure: err: %" CHIP_ERROR_FORMAT, error.Format());
}
#if CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
namespace on_off {
namespace command {

Expand Down Expand Up @@ -1616,7 +1616,7 @@ esp_err_t send_revoke_commissioning(peer_device_t *remote_device, uint16_t remot
} // namespace command
} // namespace administrator_commissioning

} // namespace cluster
#endif // CONFIG_ESP_MATTER_ENABLE_DATA_MODEL

} // namespace cluster
} // namespace esp_matter
Loading

0 comments on commit d53cdb1

Please sign in to comment.