Skip to content

Commit

Permalink
Add featuremap for thermostat and power source clusters (#12903)
Browse files Browse the repository at this point in the history
* Add featuremap definitions in Thermostat and Power Source cluster

+ moved thermostat cluster to a separate file

* Regenerate all

* Removed attributelist

+ add cluster element to feature bitmaps

* Regenerate all

* More discoballing of thermostat cluster definition

* Regenerate all
  • Loading branch information
fessehaeve authored and pull[bot] committed Feb 22, 2022
1 parent 64f5f2a commit 1178560
Show file tree
Hide file tree
Showing 37 changed files with 1,011 additions and 231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11124,15 +11124,15 @@
"enabled": 1,
"commands": [
{
"name": "CurrentWeeklySchedule",
"name": "GetWeeklyScheduleResponse",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 0
},
{
"name": "RelayStatusLog",
"name": "GetRelayStatusLogResponse",
"code": 1,
"mfgCode": null,
"source": "server",
Expand Down
5 changes: 3 additions & 2 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "1",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -5588,5 +5588,6 @@
"endpointVersion": 1,
"deviceIdentifier": 10
}
]
],
"log": []
}
34 changes: 10 additions & 24 deletions examples/thermostat/thermostat-common/thermostat.zap
Original file line number Diff line number Diff line change
Expand Up @@ -10414,15 +10414,15 @@
"enabled": 1,
"commands": [
{
"name": "CurrentWeeklySchedule",
"name": "GetWeeklyScheduleResponse",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 1
},
{
"name": "RelayStatusLog",
"name": "GetRelayStatusLogResponse",
"code": 1,
"mfgCode": null,
"source": "server",
Expand Down Expand Up @@ -12416,7 +12416,7 @@
],
"attributes": [
{
"name": "tv channel list",
"name": "channel list",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -12431,7 +12431,7 @@
"reportableChange": 0
},
{
"name": "tv channel lineup",
"name": "channel lineup",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -12446,7 +12446,7 @@
"reportableChange": 0
},
{
"name": "current tv channel",
"name": "current channel",
"code": 2,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -13100,7 +13100,7 @@
"reportableChange": 0
},
{
"name": "supported streaming types",
"name": "supported streaming protocols",
"code": 1,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -13396,7 +13396,7 @@
"reportableChange": 0
},
{
"name": "application id",
"name": "application status",
"code": 5,
"mfgCode": null,
"side": "server",
Expand All @@ -13411,7 +13411,7 @@
"reportableChange": 0
},
{
"name": "catalog vendor id",
"name": "application version",
"code": 6,
"mfgCode": null,
"side": "server",
Expand All @@ -13425,21 +13425,6 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "application status",
"code": 7,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down Expand Up @@ -13935,5 +13920,6 @@
"endpointVersion": 1,
"deviceIdentifier": 769
}
]
],
"log": []
}
4 changes: 2 additions & 2 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -10016,15 +10016,15 @@
"enabled": 1,
"commands": [
{
"name": "CurrentWeeklySchedule",
"name": "GetWeeklyScheduleResponse",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 1
},
{
"name": "RelayStatusLog",
"name": "GetRelayStatusLogResponse",
"code": 1,
"mfgCode": null,
"source": "server",
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<xi:include href="chip/target-navigator-cluster.xml" />
<xi:include href="chip/temperature-measurement-cluster.xml" />
<xi:include href="chip/test-cluster.xml" />
<xi:include href="chip/thermostat-cluster.xml" />
<xi:include href="chip/thread-network-diagnostics-cluster.xml" />
<xi:include href="chip/time-synchronization-cluster.xml" />
<xi:include href="chip/tv-channel-cluster.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ limitations under the License.

</cluster>

<bitmap name="PowerSourceFeature" type="BITMAP32">
<cluster code="0x002F"/>
<field name="Wired" mask="0x1"/>
<field name="Battery" mask="0x2"/>
<field name="Rechargeable" mask="0x4"/>
<field name="Replaceable" mask="0x8"/>
</bitmap>

<enum name="WiredFaultType" type="ENUM8">
<item name="Unspecfied" value="0x00"/>
<item name="OverVoltage" value="0x01"/>
Expand Down
138 changes: 138 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="HVAC"/>
<cluster>
<name>Thermostat</name>
<domain>HVAC</domain>
<description>An interface for configuring and controlling the functionality of a thermostat.</description>
<code>0x0201</code>
<define>THERMOSTAT_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<globalAttribute side="either" code="0xFFFD" value="3"/>
<attribute side="server" code="0x0000" define="LOCAL_TEMPERATURE" type="INT16S" min="0x954D" max="0x7FFF" writable="false" reportable="true" optional="false">local temperature</attribute>
<attribute side="server" code="0x0001" define="OUTDOOR_TEMPERATURE" type="INT16S" min="0x954D" max="0x7FFF" writable="false" optional="true">outdoor temperature</attribute>
<attribute side="server" code="0x0002" define="THERMOSTAT_OCCUPANCY" type="BITMAP8" min="0x00" max="0x01" writable="false" default="0x01" optional="true">occupancy</attribute>
<!-- OCCUPANCY -->
<attribute side="server" code="0x0003" define="ABS_MIN_HEAT_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="false" default="0x02BC" optional="true">abs min heat setpoint limit</attribute>
<attribute side="server" code="0x0004" define="ABS_MAX_HEAT_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="false" default="0x0BB8" optional="true">abs max heat setpoint limit</attribute>
<attribute side="server" code="0x0005" define="ABS_MIN_COOL_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="false" default="0x0640" optional="true">abs min cool setpoint limit</attribute>
<attribute side="server" code="0x0006" define="ABS_MAX_COOL_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="false" default="0x0C80" optional="true">abs max cool setpoint limit</attribute>
<attribute side="server" code="0x0007" define="PI_COOLING_DEMAND" type="INT8U" min="0x00" max="0x64" writable="false" reportable="true" optional="true">pi cooling demand</attribute>
<attribute side="server" code="0x0008" define="PI_HEATING_DEMAND" type="INT8U" min="0x00" max="0x64" writable="false" reportable="true" optional="true">pi heating demand</attribute>
<attribute side="server" code="0x0009" define="HVAC_SYSTEM_TYPE_CONFIGURATION" type="BITMAP8" min="0x00" max="0xFF" writable="true" optional="true">HVAC system type configuration</attribute>
<attribute side="server" code="0x0010" define="LOCAL_TEMPERATURE_CALIBRATION" type="INT8S" min="0xE7" max="0x19" writable="true" default="0x00" optional="true">local temperature calibration</attribute>
<attribute side="server" code="0x0011" define="OCCUPIED_COOLING_SETPOINT" type="INT16S" writable="true" default="0x0A28" optional="false">occupied cooling setpoint</attribute>
<attribute side="server" code="0x0012" define="OCCUPIED_HEATING_SETPOINT" type="INT16S" writable="true" default="0x07D0" optional="false">occupied heating setpoint</attribute>
<attribute side="server" code="0x0013" define="UNOCCUPIED_COOLING_SETPOINT" type="INT16S" writable="true" default="0x0A28" optional="true">unoccupied cooling setpoint</attribute>
<attribute side="server" code="0x0014" define="UNOCCUPIED_HEATING_SETPOINT" type="INT16S" writable="true" default="0x07D0" optional="true">unoccupied heating setpoint</attribute>
<attribute side="server" code="0x0015" define="MIN_HEAT_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="true" default="0x02BC" optional="true">min heat setpoint limit</attribute>
<attribute side="server" code="0x0016" define="MAX_HEAT_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="true" default="0x0BB8" optional="true">max heat setpoint limit</attribute>
<attribute side="server" code="0x0017" define="MIN_COOL_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="true" default="0x0640" optional="true">min cool setpoint limit</attribute>
<attribute side="server" code="0x0018" define="MAX_COOL_SETPOINT_LIMIT" type="INT16S" min="0x954D" max="0x7FFF" writable="true" default="0x0C80" optional="true">max cool setpoint limit</attribute>
<attribute side="server" code="0x0019" define="MIN_SETPOINT_DEAD_BAND" type="INT8S" min="0x0A" max="0x19" writable="true" default="0x19" optional="true">min setpoint dead band</attribute>
<attribute side="server" code="0x001A" define="REMOTE_SENSING" type="BITMAP8" min="0x00" max="0x07" writable="true" default="0x00" optional="true">remote sensing</attribute>
<attribute side="server" code="0x001B" define="CONTROL_SEQUENCE_OF_OPERATION" type="ENUM8" min="0x00" max="0x05" writable="true" default="0x04" optional="false">control sequence of operation</attribute>
<attribute side="server" code="0x001C" define="SYSTEM_MODE" type="ENUM8" min="0x00" max="0x07" writable="true" default="0x01" optional="false">system mode</attribute>
<attribute side="server" code="0x001D" define="THERMOSTAT_ALARM_MASK" type="BITMAP8" min="0x00" max="0x07" writable="false" default="0x00" optional="true">alarm mask</attribute>
<!-- ALARM_MASK -->
<attribute side="server" code="0x001E" define="THERMOSTAT_RUNNING_MODE" type="ENUM8" min="0x00" max="0x04" writable="false" optional="true">thermostat running mode</attribute>
<attribute side="server" code="0x0020" define="START_OF_WEEK" type="ENUM8" min="0x00" max="0x06" writable="false" optional="true">start of week</attribute>
<attribute side="server" code="0x0021" define="NUMBER_OF_WEEKLY_TRANSITIONS" type="INT8U" min="0x00" max="0xFF" writable="false" optional="true">number of weekly transitions</attribute>
<attribute side="server" code="0x0022" define="NUMBER_OF_DAILY_TRANSITIONS" type="INT8U" min="0x00" max="0xFF" writable="false" optional="true">number of daily transitions</attribute>
<attribute side="server" code="0x0023" define="TEMPERATURE_SETPOINT_HOLD" type="ENUM8" min="0x00" max="0x01" writable="true" default="0x00" optional="true">temperature setpoint hold</attribute>
<attribute side="server" code="0x0024" define="TEMPERATURE_SETPOINT_HOLD_DURATION" type="INT16U" min="0x0000" max="0x05A0" writable="true" default="0xFFFF" optional="true">temperature setpoint hold duration</attribute>
<attribute side="server" code="0x0025" define="THERMOSTAT_PROGRAMMING_OPERATION_MODE" type="BITMAP8" min="0x00" max="0xFF" writable="true" default="0x0000" optional="true">thermostat programming operation mode</attribute>
<attribute side="server" code="0x0029" define="THERMOSTAT_RUNNING_STATE" type="BITMAP16" writable="false" optional="true">thermostat running state</attribute>
<attribute side="server" code="0x0030" define="SETPOINT_CHANGE_SOURCE" type="ENUM8" writable="false" optional="true">setpoint change source</attribute>
<attribute side="server" code="0x0031" define="SETPOINT_CHANGE_AMOUNT" type="INT16S" writable="false" default="0x8000" optional="true">setpoint change amount</attribute>
<attribute side="server" code="0x0032" define="SETPOINT_CHANGE_SOURCE_TIMESTAMP" type="epoch_s" writable="false" optional="true">setpoint change source timestamp</attribute>
<attribute side="server" code="0x0040" define="AC_TYPE" type="ENUM8" min="0x00" max="0x04" writable="true" default="0x00" optional="true">ac type</attribute>
<attribute side="server" code="0x0041" define="AC_CAPACITY" type="INT16U" min="0x0000" max="0xFFFF" writable="true" default="0x0000" optional="true">ac capacity</attribute>
<attribute side="server" code="0x0042" define="AC_REFRIGERANT_TYPE" type="ENUM8" min="0x00" max="0x03" writable="true" default="0x00" optional="true">ac refrigerant type</attribute>
<attribute side="server" code="0x0043" define="AC_COMPRESSOR" type="ENUM8" min="0x00" max="0x03" writable="true" default="0x00" optional="true">ac compressor</attribute>
<attribute side="server" code="0x0044" define="AC_ERROR_CODE" type="BITMAP32" min="0x00000000" max="0xFFFFFFFF" writable="true" default="0x00000000" optional="true">ac error code</attribute>
<attribute side="server" code="0x0045" define="AC_LOUVER_POSITION" type="ENUM8" min="0x00" max="0x05" writable="true" default="0x00" optional="true">ac louver position</attribute>
<attribute side="server" code="0x0046" define="AC_COIL_TEMPERATURE" type="INT16S" min="0x954D" max="0x7FFF" writable="false" default="0x8000" optional="true">ac coil temperature</attribute>
<attribute side="server" code="0x0047" define="AC_CAPACITY_FORMAT" type="ENUM8" min="0x00" max="0xFF" writable="true" default="0x00" optional="true">ac capacity format</attribute>
<command source="client" code="0x00" name="SetpointRaiseLower" optional="false">
<description>
Command description for SetpointRaiseLower
</description>
<arg name="mode" type="SetpointAdjustMode"/>
<arg name="amount" type="INT8S"/>
</command>
<command source="client" code="0x01" name="SetWeeklySchedule" optional="true">
<description>
Command description for SetWeeklySchedule
</description>
<arg name="numberOfTransitionsForSequence" type="ENUM8"/>
<arg name="dayOfWeekForSequence" type="DayOfWeek"/>
<arg name="modeForSequence" type="ModeForSequence"/>
<arg name="payload" type="INT8U" array="true"/>
</command>
<command source="client" code="0x02" name="GetWeeklySchedule" optional="true">
<description>
Command description for GetWeeklySchedule
</description>
<arg name="daysToReturn" type="DayOfWeek"/>
<arg name="modeToReturn" type="ModeForSequence"/>
</command>
<command source="client" code="0x03" name="ClearWeeklySchedule" optional="true">
<description>
The Clear Weekly Schedule command is used to clear the weekly schedule.
</description>
</command>
<command source="client" code="0x04" name="GetRelayStatusLog" optional="true">
<description>
The Get Relay Status Log command is used to query the thermostat internal relay status log.
</description>
</command>
<command source="server" code="0x00" name="GetWeeklyScheduleResponse" optional="true">
<description>
The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command.
</description>
<arg name="numberOfTransitionsForSequence" type="ENUM8"/>
<arg name="dayOfWeekForSequence" type="DayOfWeek"/>
<arg name="modeForSequence" type="ModeForSequence"/>
<arg name="payload" type="INT8U" array="true"/>
</command>
<command source="server" code="0x01" name="GetRelayStatusLogResponse" optional="true">
<description>
This command is sent from the thermostat cluster server in response to the Get Relay Status Log.
</description>
<arg name="timeOfDay" type="INT16U"/>
<arg name="relayStatus" type="BITMAP16"/>
<arg name="localTemperature" type="INT16S"/>
<arg name="humidityInPercentage" type="INT8U"/>
<arg name="setpoint" type="INT16S"/>
<arg name="unreadEntries" type="INT16U"/>
</command>
</cluster>

<bitmap name="ThermostatFeature" type="BITMAP32">
<cluster code="0x0201"/>
<field name="Heating" mask="0x1"/>
<field name="Cooling" mask="0x2"/>
<field name="Occupancy" mask="0x4"/>
<field name="Schedule" mask="0x8"/>
<field name="Setback" mask="0x10"/>
<field name="Automode" mask="0x20"/>
</bitmap>

</configurator>
Loading

0 comments on commit 1178560

Please sign in to comment.