Skip to content

Commit

Permalink
SiliconLabsGH-31: Generated files for custom thermostat cluster
Browse files Browse the repository at this point in the history
Forwarded: SiliconLabs#31
Bug-SiliconLabs: UIC-3071
Bug-Github: SiliconLabs#31
  • Loading branch information
silabs-borisl committed May 21, 2024
1 parent 29107ef commit 06f6e52
Show file tree
Hide file tree
Showing 37 changed files with 2,159 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15863,5 +15863,5 @@ export let ClusterTypeAttrs: any = {
commands: [
]
}
}
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/applications/dev_ui/dev_gui/zap-generated/src/cluster-types/cluster-type-attributes.ts b/applications/dev_ui/dev_gui/zap-generated/src/cluster-types/cluster-type-attributes.ts (rejected hunks)
@@ -1,7 +1,7 @@
//This file is generated automatically. Don't try to change something here.
//To add support for new clusters, modify addon-helper.js
//To change the stucture of the ClusterTypeAttrs, modify cluster-type-attributes.zapt
-
+

//generate ClusterTypes
export let ClusterTypeAttrs: any = {
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,8 @@ typedef enum {
#define DOTDOT_PROTOCOL_CONTROLLER_NETWORK_MANAGEMENT_NETWORK_MANAGEMENT_STATE_ATTRIBUTE_ID ((dotdot_attribute_id_t)0x1)
// Definitions for cluster: Descriptor
#define DOTDOT_DESCRIPTOR_DEVICE_TYPE_LIST_ATTRIBUTE_ID ((dotdot_attribute_id_t)0x0)
// Definitions for cluster: UnifyThermostat
#define DOTDOT_UNIFY_THERMOSTAT_OPERATING_STATE_ATTRIBUTE_ID ((dotdot_attribute_id_t)0x3)

// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@

// Commands for cluster: Descriptor

// Commands for cluster: UnifyThermostat

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@
#define DOTDOT_DESCRIPTOR_CLUSTER_ID ((dotdot_cluster_id_t)0xFD13)


// Definitions for cluster: UnifyThermostat
#define DOTDOT_UNIFY_THERMOSTAT_CLUSTER_ID ((dotdot_cluster_id_t)0xFD15)


#ifdef __cplusplus
extern "C" {
#endif
Expand Down
16 changes: 16 additions & 0 deletions components/uic_dotdot/zap-generated/include/zap-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,22 @@ typedef enum {
ZCL_TX_REPORT_TRANSMISSION_SPEED_UNKNOWN = 255,
} TxReportTransmissionSpeed;

// Enum for UnifyThermostatOperatingState
typedef enum {
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_OFF = 0,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_HEATING = 1,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_COOLING = 2,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_FAN_ONLY = 3,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_PENDING_HEAT = 4,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_PENDING_COOL = 5,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_VENT_ECONOMIZER = 6,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_AUX_HEATING = 7,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_2ND_STAGE_HEATING = 8,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_2ND_STAGE_COOLING = 9,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_2ND_STAGE_AUX_HEAT = 10,
ZCL_UNIFY_THERMOSTAT_OPERATING_STATE_3RD_STAGE_AUX_HEAT = 11,
} UnifyThermostatOperatingState;

// Enum for WindowCoveringWindowCoveringType
typedef enum {
ZCL_WINDOW_COVERING_WINDOW_COVERING_TYPE_ROLLERSHADE = 0,
Expand Down
300 changes: 300 additions & 0 deletions components/uic_dotdot/zap-generated/readme_ucl_mqtt_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -53949,6 +53949,273 @@ mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/Descriptor/Commands/ForceReadAttribute
<!-- END OF Descriptor Commands Section -->
<!-- -->

<br><br><br>


<!-- -->
<!-- -->
<!-- NEW Page Cluster Support -->
<!-- -->
<!-- -->
\page unify_thermostat UnifyThermostat Cluster
The following commands and attributes are accepted as JSON payloads for the
UnifyThermostat cluster.

<br><br>

<!-- -->
<!-- START OF UnifyThermostat Attributes Section -->
<!-- -->
\section unify_thermostat_attrs UnifyThermostat Attributes
The following attribute topics are used to retrieve the UnifyThermostat cluster state.

<br>

\subsection unify_thermostat_attr_operating_state UnifyThermostat/OperatingState Attribute

**MQTT Topic Pattern:**

```
[PREFIX]/UnifyThermostat/Attributes/OperatingState/Reported
[PREFIX]/UnifyThermostat/Attributes/OperatingState/Desired
```

**MQTT Payload JSON Schema:**

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostat Cluster OperatingState Attribute Properties",
"type": "object",
"properties": {
"value": {
"type": "UnifyThermostatOperatingState"
}
},
"required": [
"value"
]
}
```


**Example Mosquitto CLI Tool Usage**

To see desired/reported value for OperatingState attribute under the by-unid topic space:

```console
mosquitto_sub -t 'ucl/by-unid/+/+/UnifyThermostat/Attributes/OperatingState/+'

# Example output

ucl/by-unid/<UNID>/ep0/UnifyThermostat/Attributes/OperatingState/Desired { "value": <DESIRED_OPERATING_STATE>}
ucl/by-unid/<UNID>/ep0/UnifyThermostat/Attributes/OperatingState/Reported { "value": <REPORTED_OPERATING_STATE>}

```

<br><br>


\subsection unify_thermostat_attr_cluster_revision UnifyThermostat/ClusterRevision Attribute

**MQTT Topic Pattern:**

```
[PREFIX]/UnifyThermostat/Attributes/ClusterRevision/Reported
[PREFIX]/UnifyThermostat/Attributes/ClusterRevision/Desired
```

**MQTT Payload JSON Schema:**

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostat Cluster ClusterRevision Attribute Properties",
"type": "object",
"properties": {
"value": {
"type": "integer"
}
},
"required": [
"value"
]
}
```

**Example Mosquitto CLI Tool Usage**

To see desired/reported value for ClusterRevision attribute under the by-unid topic space:

```console
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Attributes/ClusterRevision/+'
# Example output
ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Attributes/ClusterRevision/Desired { "value": <DESIRED_CLUSTER_REVISION> }
ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Attributes/ClusterRevision/Reported { "value": <REPORTED_CLUSTER_REVISION> }
```

<!-- -->
<!-- END OF UnifyThermostat Attributes Section -->
<!-- -->

<br><br>

<!-- -->
<!-- START OF UnifyThermostat Supported Commands Section -->
<!-- -->
\section unify_thermostat_recv_cmd_support UnifyThermostat Command Support

**MQTT Topic Pattern:**

```
[PREFIX]/UnifyThermostat/SupportedCommands
[PREFIX]/UnifyThermostat/SupportedGeneratedCommands
```

**MQTT Payload JSON Schema:**

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostat Command Support Properties",
"type": "object",
"properties": {
"value": {
"type": "array",
"items" : {
"type": "string",
"enum": [
]
}
}
}
},
"required": [
"value"
]
}
```

**Example Mosquitto CLI Tool Usage**

To see supported commands for UnifyThermostat cluster under the by-unid topic space:

```console
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/SupportedCommands'
# Example output
ucl/by-unid/<UNID>/<EP>/UnifyThermostat/SupportedCommands { "value": [] }
```

To see supported generated commands for UnifyThermostat cluster under the by-unid topic space:

```console
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/SupportedGeneratedCommands'
# Example output
ucl/by-unid/<UNID>/<EP>/UnifyThermostat/SupportedGeneratedCommands { "value": [] }
```

<!-- -->
<!-- END OF UnifyThermostat Supported Commands Section -->
<!-- -->

<br><br>

<!-- -->
<!-- START OF UnifyThermostat Commands Section -->
<!-- -->
\section unify_thermostat_cmds UnifyThermostat Commands

<br><br>

\subsection unify_thermostat_write_attr_cmd UnifyThermostat/WriteAttributes Command

**MQTT Topic Pattern:**

```
[PREFIX]/UnifyThermostat/Commands/WriteAttributes
```

**MQTT Payload JSON Schema:**

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostat Cluster WriteAttributes Command Properties",
"type": "object",
"properties": {
"OperatingState": {
"type": "UnifyThermostatOperatingState"
}
},
"required": [
"value"
]
}
```

**Example Mosquitto CLI Tool Usage**

To update all UnifyThermostat attributes under the by-unid topic space:

```console
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Commands/WriteAttributes' -m '{ "OperatingState": <OPERATING_STATE_VALUE> }'
```

> NOTE: Specify only the list of attributes to write in this command.
> Unspecified attributes will not be updated.

<br><br>

\subsection unify_thermostat_force_read_attr_cmd UnifyThermostat/ForceReadAttributes Command

**MQTT Topic Pattern:**

```
[PREFIX]/UnifyThermostat/Commands/ForceReadAttributes
```

**MQTT Payload JSON Schema:**

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostat Cluster ForceReadAttributes Command Properties",
"type": "object",
"properties": {
"value": {
"type": "array"
"items": {
"type": "string",
"enum": [
"OperatingState"
]
}
}
},
"required": [
"value"
]
}
```

**Example Mosquitto CLI Tool Usage**

To force read all UnifyThermostat attributes under the by-unid topic space (by sending an empty array):

```console
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Commands/ForceReadAttributes' -m '{ "value": [] }'
```

To force read one of the UnifyThermostat attributes under the by-unid topic space:

```console
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/UnifyThermostat/Commands/ForceReadAttributes' -m '{ "value": ["OperatingState"] }'
```

<!-- -->
<!-- END OF UnifyThermostat Commands Section -->
<!-- -->


<br><br><br>

Expand Down Expand Up @@ -57545,6 +57812,39 @@ mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/Descriptor/Commands/ForceReadAttribute

<br><br>

<!-- -->
<!-- START OF Enum UnifyThermostatOperatingState Section -->
<!-- -->
\section enum_unify_thermostat_operating_state UnifyThermostatOperatingState Enum

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UnifyThermostatOperatingState Enum Properties",
"type": "string",
"enum": [
"Off",
"Heating",
"Cooling",
"FanOnly",
"PendingHeat",
"PendingCool",
"Vent/Economizer",
"AuxHeating",
"2ndStageHeating",
"2ndStageCooling",
"2ndStageAuxHeat",
"3rdStageAuxHeat"
]
}
```

<!-- -->
<!-- END OF Enum UnifyThermostatOperatingState Section -->
<!-- -->

<br><br>

<!-- -->
<!-- START OF Enum WindowCoveringWindowCoveringType Section -->
<!-- -->
Expand Down
Loading

0 comments on commit 06f6e52

Please sign in to comment.