Skip to content

Commit

Permalink
Sync thermostat device type with specs (project-chip#21922)
Browse files Browse the repository at this point in the history
* Sync thermostat device type with specs

* Updated zap files

* Updated groups cluster to optional

* Addressed review comments and restyled
  • Loading branch information
jadhavrohit924 authored and isiu-apple committed Sep 16, 2022
1 parent b8e3521 commit c2af4de
Show file tree
Hide file tree
Showing 28 changed files with 2,050 additions and 16 deletions.
15 changes: 8 additions & 7 deletions src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1637,10 +1637,10 @@ limitations under the License.
<requireAttribute>CLIENT_LIST</requireAttribute>
<requireAttribute>PARTS_LIST</requireAttribute>
</include>
<include cluster="Binding" client="true" server="false" clientLocked="false" serverLocked="true">
<include cluster="Binding" client="false" server="false" clientLocked="true" serverLocked="false">
<requireAttribute>BINDING</requireAttribute>
</include>
<include cluster="Scenes" client="false" server="true" clientLocked="true" serverLocked="true">
<include cluster="Scenes" client="false" server="false" clientLocked="true" serverLocked="false">
<requireAttribute>SCENE_COUNT</requireAttribute>
<requireAttribute>CURRENT_SCENE</requireAttribute>
<requireAttribute>CURRENT_GROUP</requireAttribute>
Expand All @@ -1660,7 +1660,7 @@ limitations under the License.
<requireCommand>GetSceneMembership</requireCommand>
<requireCommand>GetSceneMembershipResponse</requireCommand>
</include>
<include cluster="Groups" client="false" server="true" clientLocked="true" serverLocked="true">
<include cluster="Groups" client="false" server="false" clientLocked="true" serverLocked="false">
<requireAttribute>GROUP_NAME_SUPPORT</requireAttribute>
<requireCommand>AddGroup</requireCommand>
<requireCommand>AddGroupResponse</requireCommand>
Expand All @@ -1674,11 +1674,12 @@ limitations under the License.
<requireCommand>AddGroupIfIdentifying</requireCommand>
</include>
<include cluster="Thermostat" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Time Synchronization" client="false" server="false" clientLocked="false" serverLocked="false"></include>
<include cluster="Thermostat User Interface Configuration" client="false" server="false" clientLocked="true" serverLocked="false"></include>
<include cluster="Fan Control" client="false" server="false" clientLocked="false" serverLocked="false"></include>
<include cluster="Temperature Measurement" client="false" server="false" clientLocked="false" serverLocked="false"></include>
<include cluster="Occupancy Sensing" client="false" server="false" clientLocked="false" serverLocked="false"></include>
<include cluster="Relative Humidity Measurement" client="false" server="false" clientLocked="false" serverLocked="false"></include>
<include cluster="Fan Control" client="false" server="false" clientLocked="false" serverLocked="true"></include>
<include cluster="Temperature Measurement" client="false" server="false" clientLocked="false" serverLocked="true"></include>
<include cluster="Occupancy Sensing" client="false" server="false" clientLocked="false" serverLocked="true"></include>
<include cluster="Relative Humidity Measurement" client="false" server="false" clientLocked="false" serverLocked="true"></include>
</clusters>
</deviceType>
<deviceType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,49 @@ limitations under the License.
<configurator>
<domain name="CHIP"/>

<enum name="GranularityEnum" type="ENUM8">
<cluster code="0x0038"/>
<item name="NoTimeGranularity" value="0x00"/>
<item name="MinutesGranularity" value="0x01"/>
<item name="SecondsGranularity" value="0x02"/>
<item name="MillisecondsGranularity" value="0x03"/>
<item name="MicrosecondsGranularity" value="0x04"/>
</enum>

<enum name="TimeSourceEnum" type="ENUM8">
<cluster code="0x0038"/>
<item name="None" value="0x00"/>
<item name="Unknown" value="0x01"/>
<item name="Admin" value="0x02"/>
<item name="NodeTimeCluster" value="0x03"/>
<item name="NonFabricSntp" value="0x04"/>
<item name="NonFabricNtp" value="0x05"/>
<item name="FabricSntp" value="0x06"/>
<item name="FabricNtp" value="0x07"/>
<item name="MixedNtp" value="0x08"/>
<item name="NonFabricSntpNts" value="0x09"/>
<item name="NonFabricNtpNts" value="0x0A"/>
<item name="FabricSntpNts" value="0x0B"/>
<item name="FabricNtpNts" value="0x0C"/>
<item name="MixedNtpNts" value="0x0D"/>
<item name="CloudSource" value="0x0E"/>
<item name="Ptp" value="0x0F"/>
<item name="Gnss" value="0x10"/>
</enum>

<struct name="TimeZoneType">
<cluster code="0x0038"/>
<item fieldId="0" name="Offset" type="INT32S"/>
<item fieldId="1" name="ValidAt" type="epoch_us"/>
<item fieldId="2" name="Name" type="CHAR_STRING" length="64" optional="true"/>
</struct>

<struct name="DstOffsetType">
<cluster code="0x0038"/>
<item fieldId="0" name="Offset" type="INT32S"/>
<item fieldId="1" name="ValidStarting" type="epoch_us"/>
<item fieldId="2" name="ValidUntil" type="epoch_us"/>
</struct>

<cluster>
<domain>General</domain>
Expand All @@ -28,8 +71,39 @@ limitations under the License.
<description>Accurate time is required for a number of reasons, including scheduling, display and validating
security materials.</description>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="UTC_TIME" type="epoch_us" isNullable="true" optional="false">UTCTime</attribute>
<attribute side="server" code="0x0001" define="GRANULARITY" type="GranularityEnum" default="0x00" optional="false">Granularity</attribute>
<attribute side="server" code="0x0002" define="TIME_SOURCE" type="TimeSourceEnum" default="0x00" optional="true">TimeSource</attribute>
<attribute side="server" code="0x0003" define="TRUSTED_TIME_NODE_ID" type="node_id" writable="true" isNullable="true" optional="false">
<description>TrustedTimeNodeId</description>
<access op="read" privilege="view"/>
<access op="write" privilege="administer"/>
</attribute>
<attribute side="server" code="0x0004" define="DEFAULT_NTP" type="CHAR_STRING" length="128" writable="true" isNullable="true" optional="true">
<description>DefaultNtp</description>
<access op="read" privilege="view"/>
<access op="write" privilege="administer"/>
</attribute>
<attribute side="server" code="0x0005" define="TIME_ZONE" type="ARRAY" entryType="TimeZoneType" min="1" max="2" writable="true" optional="true">
<description>TimeZone</description>
<access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
</attribute>
<attribute side="server" code="0x0006" define="DST_OFFSET" type="ARRAY" entryType="DstOffsetType" max="20" writable="true" optional="true">
<description>DstOffset</description>
<access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
</attribute>
<attribute side="server" code="0x0007" define="LOCAL_TIME" type="epoch_us" default="0x00" isNullable="true" optional="true">LocalTime</attribute>
<attribute side="server" code="0x0008" define="TIME_ZONE_DATABASE" type="boolean" default="0" optional="true">TimeZoneDatabase</attribute>
<attribute side="server" code="0x0009" define="NTP_SERVER_PORT" type="INT16U" isNullable="true" optional="true">NtpServerPort</attribute>

<!-- Test Commands -->

<command source="client" code="0x00" name="SetUtcTime" optional="false">
<description>Upon receipt of this command, the server MAY update its UTCTime Attribute to match the time specified in the command</description>
<arg name="UtcTime" type="epoch_us"/>
<arg name="Granularity" type="GranularityEnum"/>
<arg name="TimeSource" type="TimeSourceEnum" optional="true"/>
</command>
</cluster>
</configurator>
Loading

0 comments on commit c2af4de

Please sign in to comment.