Skip to content

Commit

Permalink
SiliconLabsGH-46: Humidity Control Setpoint CC
Browse files Browse the repository at this point in the history
ZPC implementation only
Fix documentation

Forwarded: SiliconLabs#46
Bug-SiliconLabs: UIC-3067
Bug-Github: SiliconLabs#46
  • Loading branch information
silabs-borisl committed May 21, 2024
1 parent 56de33c commit 7072222
Show file tree
Hide file tree
Showing 8 changed files with 1,867 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,41 @@ DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_OPERATING_STATE_VERSIO
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_OPERATING_STATE_CURRENT_STATE,
((COMMAND_CLASS_HUMIDITY_CONTROL_OPERATING_STATE << 8) | 0x02))

/////////////////////////////////////////////////
// Humidity Control Setpoint Command Class
///< This represents the version of the Humidity Control Mode Command class.
/// zwave_cc_version_t
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VERSION,
ZWAVE_CC_VERSION_ATTRIBUTE(COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT))

DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_SUPPORTED_TYPES,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x02))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_TYPE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x03))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_SUPPORTED_SCALE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x04))

DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x05))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE_SCALE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x06))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE_PRECISION,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x07))

DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x08))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE_SCALE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x09))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE_PRECISION,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x0A))

DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x0B))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE_SCALE,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x0C))
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE_PRECISION,
((COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT << 8) | 0x0D))

/////////////////////////////////////////////////
// Inclusion Controller Command Class
///< This represents the version of the Inclusion Controller Command class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ typedef uint8_t humidity_control_supported_modes_t;
///> Humidity Control Operating State. uint8_t
typedef uint8_t humidity_control_operating_state_t;

//>> Humidity Control Setpoint CC
///> Humidity Control Setpoint Supported Types Bitmask. uint8_t
typedef uint8_t humidity_control_setpoint_supported_types_t;
///> Humidity Control Setpoint Supported Scale Bitmask. uint8_t
typedef uint8_t humidity_control_setpoint_supported_scales_t;
///> Humidity Control Setpoint Type. uint8_t
typedef uint8_t humidity_control_setpoint_type_t;
///> Humidity Control Setpoint Value. int32_t
typedef int32_t humidity_control_setpoint_value_t;
///> Humidity Control Setpoint Scale. uint8_t
typedef uint8_t humidity_control_setpoint_scale_t;
///> Humidity Control Setpoint Precision. uint8_t
typedef uint8_t humidity_control_setpoint_precision_t;
///> Humidity Control Setpoint Size. uint8_t
typedef uint8_t humidity_control_setpoint_size_t;

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,28 @@ static const std::vector<attribute_schema_t> attribute_schema = {
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_OPERATING_STATE_VERSION, "Humidity Control Operating State Version", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_OPERATING_STATE_CURRENT_STATE, "Humidity Control Operating State Current State", ATTRIBUTE_INDICATOR_INDICATOR_ID, U8_STORAGE_TYPE},

/////////////////////////////////////////////////////////////////////
// Humidity Control Setpoint Command Class attributes
/////////////////////////////////////////////////////////////////////
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VERSION, "Humidity Control Setpoint Version", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_SUPPORTED_TYPES, "Humidity Control Supported Setpoint Types", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_TYPE, "Humidity Control Setpoint Type", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},

{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_SUPPORTED_SCALE, "Humidity Control Supported Scales", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},

{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE, "Value", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_TYPE, I32_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE_SCALE, "Value Scale", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE_PRECISION, "Value Precision", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_VALUE, U8_STORAGE_TYPE},

{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE, "Min Value", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_TYPE, I32_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE_SCALE, "Min Value Scale", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE_PRECISION, "Min Value Precision", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MIN_VALUE, U8_STORAGE_TYPE},

{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE, "Max Value", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_TYPE, I32_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE_SCALE, "Max Value Scale", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE_PRECISION, "Max Value Precision", ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_MAX_VALUE, U8_STORAGE_TYPE},


/////////////////////////////////////////////////////////////////////
// Meter Command Class attributes
/////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ add_library(
src/zwave_command_class_firmware_update.c
src/zwave_command_class_humidity_control_mode.c
src/zwave_command_class_humidity_control_operating_state.c
src/zwave_command_class_humidity_control_setpoint.c
src/zwave_command_class_indicator.c
src/zwave_command_class_indicator_control.cpp
src/zwave_command_class_manufacturer_specific.c
Expand Down
Loading

0 comments on commit 7072222

Please sign in to comment.