Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/presets #30454

Closed
wants to merge 102 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
9eec4a2
first pass at XML for presets and schedules
drempelg Nov 7, 2023
bc52259
Merge branch 'project-chip:master' into feature/presets
drempelg Nov 7, 2023
4f81853
fix xml for codegen
drempelg Nov 7, 2023
b554ba3
Fixed a few more issues with the xml and used the zap gui tool to add…
drempelg Nov 8, 2023
d2a012c
Thermostat example app compiles now
drempelg Nov 8, 2023
66cbae2
Merge branch 'project-chip:master' into feature/presets
drempelg Nov 13, 2023
1c2907e
ran codegen
drempelg Nov 13, 2023
2a9c73a
Restyled by prettier-json
restyled-commits Nov 13, 2023
e539e2f
Added editor logic for presets and schedules commands.
drempelg Nov 14, 2023
8489932
Added setting the active preset/schedule command. Changed the editor to
drempelg Nov 14, 2023
2ba3a89
Added read support for the new list attributes
drempelg Nov 14, 2023
e354611
Added list writes for the two writable lists.
drempelg Nov 15, 2023
d80f5df
Merge branch 'project-chip:master' into feature/presets
drempelg Nov 15, 2023
4d3660d
started implementing a manager in the thermostat example app.
drempelg Nov 15, 2023
39a624c
Added validation for presets
drempelg Nov 17, 2023
a4baa77
Merge branch 'master' into feature/presets
drempelg Nov 18, 2023
41a542e
Fixed typo in XML, regenerated code. got most of the schedule
drempelg Nov 18, 2023
98fb82b
Merge branch 'master' into feature/presets
drempelg Nov 20, 2023
151ca40
New presets get a handle now
drempelg Nov 20, 2023
073e630
Merge branch 'master' into feature/presets
drempelg Nov 20, 2023
0edfa51
Made mods to the XML to match current version of spec.
drempelg Nov 21, 2023
1e09d3c
removed the using directive in the thermostat server header
drempelg Nov 21, 2023
3bf57a9
Fixed Temperature Hold policy bitmap definition.
drempelg Nov 21, 2023
7f6ea5e
Restyled by whitespace
restyled-commits Nov 21, 2023
036721a
Restyled by clang-format
restyled-commits Nov 21, 2023
667cb69
Fixed unitialized variable
drempelg Nov 21, 2023
011e23e
Make darwin build happy
drempelg Nov 22, 2023
6d9ffa4
foo
drempelg Nov 27, 2023
4bd98d4
XML only commit for 1.3 Thermostat spec changes. Cluster xml file
drempelg Nov 27, 2023
e1645ba
Fixed Types (going blind here since I'm not sure how to compile these)
drempelg Nov 27, 2023
135ce2d
Restyled by whitespace
restyled-commits Nov 27, 2023
39556b8
Restyled by clang-format
restyled-commits Nov 27, 2023
f84e0cc
manually adjust to the two's compliment since bad code gen was happening
drempelg Nov 27, 2023
bfc140a
fixed copypaste typo
drempelg Nov 27, 2023
259f45b
fixing esp build
drempelg Nov 27, 2023
4e76e34
didn't fix the build after all, reverted, and fixed another typo.
drempelg Nov 28, 2023
6e96a68
Think last commit fixed telink build, lets see if this fixes the rest
drempelg Nov 28, 2023
087be73
more blind changes using pull requests as a compiler...
drempelg Nov 28, 2023
aabebf5
switch is probably better
drempelg Nov 28, 2023
ad15e5f
would help if I used the right variable...
drempelg Nov 28, 2023
874a24f
more type safety to make it build (not doing all of it, since I can't
drempelg Nov 28, 2023
9c4be40
more type fixes
drempelg Nov 28, 2023
0b8ea58
and some more
drempelg Nov 28, 2023
e706f3c
and more
drempelg Nov 28, 2023
a17527b
last one?
drempelg Nov 28, 2023
3cdc17e
on to minimal...
drempelg Nov 28, 2023
7393dd6
regenerated with a new JRE, hopefully will pass the codegen check
drempelg Nov 28, 2023
de94361
Restyled by clang-format
restyled-commits Nov 28, 2023
67613e6
new xml, new regen.
drempelg Nov 28, 2023
94f4565
Merge branch 'master' into feature/presets-xml
drempelg Nov 28, 2023
c628e94
Merge branch 'master' into feature/presets-xml
drempelg Nov 29, 2023
fe50b76
apparently we need a reg after this merge :)
drempelg Nov 29, 2023
2a2cd03
Lets see if this is good enough to get through the chip-repl tests
drempelg Nov 29, 2023
1252807
Added the queued preset encoding
drempelg Nov 29, 2023
f59c140
Set a sane minimum value for LocalTemperatureCalibration
drempelg Nov 29, 2023
29f761e
Restyled by clang-format
restyled-commits Nov 29, 2023
f9cd237
Merge branch 'master' into feature/presets-xml
drempelg Nov 29, 2023
1c5bc94
turned off the new commands for now since the test suite can't handle
drempelg Nov 29, 2023
8b93263
passing all the TSTAT unit tests now locally, lets see if the remote
drempelg Nov 29, 2023
b219209
Fixing ameba target
drempelg Nov 30, 2023
d3ec9d7
Merge branch 'master' into feature/presets-xml
drempelg Dec 8, 2023
5c264fa
missed these in the merge
drempelg Dec 9, 2023
2892b06
After inspecting the bits of the xml that didn't conflict, found some
drempelg Dec 9, 2023
4c311d1
Revert this change back since it was decided in the great renaming to
drempelg Dec 9, 2023
0fe71a7
This should get us past the backward incompat test
drempelg Dec 11, 2023
474a51e
Merge branch 'master' into feature/presets-xml
drempelg Dec 11, 2023
1134093
Fix the bad merge I did using github directly
drempelg Dec 11, 2023
154ee2b
Merge branch 'master' into feature/presets-xml
drempelg Dec 11, 2023
bace8a4
Merge branch 'master' into feature/presets-xml
drempelg Dec 11, 2023
bbf0ec1
XML changes as requested
drempelg Dec 12, 2023
d57c654
Merge branch 'master' into feature/presets-xml
drempelg Dec 12, 2023
9859baa
Merge branch 'master' into feature/presets-xml
drempelg Dec 12, 2023
3950029
Blew away the zap generated dirs and regenerated again.
drempelg Dec 12, 2023
49479b0
missed changing the default response field here
drempelg Dec 12, 2023
3cc1427
Update src/app/clusters/thermostat-server/thermostat-server.cpp
drempelg Dec 13, 2023
c391e39
Update src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml
drempelg Dec 13, 2023
8c2abef
Fixed up the order of the commands and improved the comments.
drempelg Dec 13, 2023
a658907
Merge branch 'master' into feature/presets-xml
drempelg Dec 13, 2023
6ecc15b
Merge branch 'feature/presets-xml' into feature/presets
drempelg Dec 14, 2023
cb9611a
Builds, but not sure if correct at all at the moment. Will need to
drempelg Dec 14, 2023
339a5b4
Merge branch 'master' into feature/presets
drempelg Jan 8, 2024
09272f3
Merge branch 'master' into feature/presets
drempelg Jan 8, 2024
2470a7d
Moving Schedules Manager test impl to thermostat common and including it
drempelg Jan 9, 2024
0d8281c
Merge branch 'project-chip:master' into feature/presets
drempelg Jan 11, 2024
245b8fe
merged presets-xml into presets
drempelg Jan 11, 2024
81f10e0
Merge branch 'master' into feature/presets
drempelg Jan 17, 2024
a1ec85f
Committing work before merge
drempelg Jan 22, 2024
53c385b
Merge branch 'master' into feature/presets
drempelg Jan 22, 2024
a4d3060
Merge branch 'master' into feature/presets
drempelg Feb 7, 2024
613fb95
XML Change from new spec revision
drempelg Feb 12, 2024
a224248
Merge branch 'master' into feature/presets
drempelg Feb 12, 2024
405d5b0
Added the propsed xml changes, regeneerated and got things compiling
drempelg Feb 13, 2024
2750119
Merge branch 'master' into feature/presets
drempelg Feb 20, 2024
4ec1ed6
checking what I have for the merge.
drempelg Jul 24, 2024
31e1b05
Merge branch 'master' into feature/presets
drempelg Jul 25, 2024
551e396
Merge branch 'master' into feature/presets
drempelg Jul 25, 2024
bd643a3
refactoring and including the new atomic write stuff
drempelg Jul 29, 2024
b7ed98f
Merge branch 'master' into feature/presets
drempelg Jul 29, 2024
f794925
Refactored and compiling again.
drempelg Jul 30, 2024
77e4042
Got transitions appending compiling.
drempelg Jul 31, 2024
c08a13b
Added checking to see if the session is allowed to write.
drempelg Aug 1, 2024
e2b887e
updating what with have I have...since shenanigans...
drempelg Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 {

/** An interface for configuring and controlling the functionality of a thermostat. */
cluster Thermostat = 513 {
revision 6;
revision 7;

enum ACCapacityFormatEnum : enum8 {
kBTUh = 0;
Expand Down Expand Up @@ -1278,6 +1278,12 @@ cluster Thermostat = 513 {
kHeatPumpInverter = 4;
}

enum AtomicRequestTypeEnum : enum8 {
kBeginWrite = 0;
kCommitWrite = 1;
kRollbackWrite = 2;
}

enum ControlSequenceOfOperationEnum : enum8 {
kCoolingOnly = 0;
kCoolingWithReheat = 1;
Expand All @@ -1288,13 +1294,13 @@ cluster Thermostat = 513 {
}

enum PresetScenarioEnum : enum8 {
kUnspecified = 0;
kOccupied = 1;
kUnoccupied = 2;
kSleep = 3;
kWake = 4;
kVacation = 5;
kUserDefined = 6;
kGoingToSleep = 6;
kUserDefined = 254;
}

enum SetpointChangeSourceEnum : enum8 {
Expand Down Expand Up @@ -1360,7 +1366,6 @@ cluster Thermostat = 513 {
kLocalTemperatureNotExposed = 0x40;
kMatterScheduleConfiguration = 0x80;
kPresets = 0x100;
kSetpoints = 0x200;
}

bitmap HVACSystemTypeBitmap : bitmap8 {
Expand All @@ -1370,6 +1375,10 @@ cluster Thermostat = 513 {
kHeatingUsesFuel = 0x20;
}

bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}

bitmap PresetTypeFeaturesBitmap : bitmap16 {
kAutomatic = 0x1;
kSupportsNames = 0x2;
Expand Down Expand Up @@ -1420,11 +1429,6 @@ cluster Thermostat = 513 {
kSupportsOff = 0x8;
}

bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 {
kHoldDurationElapsed = 0x1;
kHoldDurationElapsedOrPresetChanged = 0x2;
}

struct ScheduleTransitionStruct {
ScheduleDayOfWeekBitmap dayOfWeek = 0;
int16u transitionTime = 1;
Expand All @@ -1440,7 +1444,12 @@ cluster Thermostat = 513 {
optional char_string<64> name = 2;
optional octet_string<16> presetHandle = 3;
ScheduleTransitionStruct transitions[] = 4;
optional nullable boolean builtIn = 5;
nullable boolean builtIn = 5;
}

struct AtomicAttributeStatusStruct {
optional attrib_id attributeID = 0;
optional status statusCode = 1;
}

struct PresetStruct {
Expand Down Expand Up @@ -1472,23 +1481,23 @@ cluster Thermostat = 513 {

readonly attribute nullable temperature localTemperature = 0;
readonly attribute optional nullable temperature outdoorTemperature = 1;
readonly attribute optional bitmap8 occupancy = 2;
readonly attribute optional OccupancyBitmap occupancy = 2;
readonly attribute optional temperature absMinHeatSetpointLimit = 3;
readonly attribute optional temperature absMaxHeatSetpointLimit = 4;
readonly attribute optional temperature absMinCoolSetpointLimit = 5;
readonly attribute optional temperature absMaxCoolSetpointLimit = 6;
readonly attribute optional int8u PICoolingDemand = 7;
readonly attribute optional int8u PIHeatingDemand = 8;
attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9;
attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9;
attribute access(write: manage) optional int8s localTemperatureCalibration = 16;
attribute optional int16s occupiedCoolingSetpoint = 17;
attribute optional int16s occupiedHeatingSetpoint = 18;
attribute optional int16s unoccupiedCoolingSetpoint = 19;
attribute optional int16s unoccupiedHeatingSetpoint = 20;
attribute access(write: manage) optional int16s minHeatSetpointLimit = 21;
attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22;
attribute access(write: manage) optional int16s minCoolSetpointLimit = 23;
attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24;
attribute optional temperature occupiedCoolingSetpoint = 17;
attribute optional temperature occupiedHeatingSetpoint = 18;
attribute optional temperature unoccupiedCoolingSetpoint = 19;
attribute optional temperature unoccupiedHeatingSetpoint = 20;
attribute access(write: manage) optional temperature minHeatSetpointLimit = 21;
attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22;
attribute access(write: manage) optional temperature minCoolSetpointLimit = 23;
attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24;
attribute access(write: manage) optional int8s minSetpointDeadBand = 25;
attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26;
attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27;
Expand Down Expand Up @@ -1518,7 +1527,7 @@ cluster Thermostat = 513 {
attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68;
attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69;
readonly attribute optional nullable temperature ACCoilTemperature = 70;
attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71;
attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityFormat = 71;
readonly attribute optional PresetTypeStruct presetTypes[] = 72;
readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73;
readonly attribute optional int8u numberOfPresets = 74;
Expand All @@ -1529,9 +1538,7 @@ cluster Thermostat = 513 {
readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79;
attribute access(write: manage) optional PresetStruct presets[] = 80;
attribute access(write: manage) optional ScheduleStruct schedules[] = 81;
readonly attribute optional boolean presetsSchedulesEditable = 82;
readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83;
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84;
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1571,34 +1578,32 @@ cluster Thermostat = 513 {
octet_string<16> presetHandle = 0;
}

request struct StartPresetsSchedulesEditRequestRequest {
int16u timeoutSeconds = 0;
response struct AtomicResponse = 253 {
status statusCode = 0;
AtomicAttributeStatusStruct attributeStatus[] = 1;
optional int16u timeout = 2;
}

request struct SetTemperatureSetpointHoldPolicyRequest {
TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0;
request struct AtomicRequestRequest {
AtomicRequestTypeEnum requestType = 0;
attrib_id attributeRequests[] = 1;
optional int16u timeout = 2;
}

/** Command description for SetpointRaiseLower */
/** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */
command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0;
/** Command description for SetWeeklySchedule */
/** Upon receipt, the weekly schedule for updating setpoints SHALL be stored in the */
command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1;
/** Command description for GetWeeklySchedule */
/** Upon receipt, the unit SHOULD send in return the Get */
command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2;
/** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */
/** This command is used to clear the weekly schedule. */
command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3;
/** This command is used to set the active schedule. */
/** Upon receipt, if the */
command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5;
/** This command is used to set the active preset. */
/** ID */
command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6;
/** This command is used to start editing the presets and schedules. */
command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7;
/** This command is used to cancel editing presets and schedules. */
command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8;
/** This command is used to notify the server that all edits are done and should be committed. */
command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9;
/** This command sets the set point hold policy. */
command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11;
/** Begins, Commits or Cancels an atomic write */
command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254;
}

/** An interface for controlling a fan in a heating/cooling system. */
Expand Down
Loading