Skip to content

[HVAC] Added Enhanced Scheduling feature for TRV app #38839

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions examples/thermostat/qpg/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ qpg_executable("thermostat") {
output_name = "chip-${qpg_target_ic}-thermostat-example.out"

sources = [
"${chip_root}/examples/thermostat/thermostat-common/src/thermostat-delegate-impl.cpp",
"${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp",
"${examples_plat_dir}/app/battery.cpp",
"${examples_plat_dir}/app/main.cpp",
"${examples_plat_dir}/ota/ota.cpp",
"src/AppTask.cpp",
Expand Down Expand Up @@ -80,6 +82,7 @@ qpg_executable("thermostat") {

include_dirs = [
"include",
"${chip_root}/examples/thermostat/thermostat-common/include",
"${examples_plat_dir}/ota",
]

Expand Down
3 changes: 3 additions & 0 deletions examples/thermostat/qpg/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

#include "AppTask.h"
#include "ThermostaticRadiatorValveManager.h"
#include "thermostat-delegate-impl.h"

#include <app-common/zap-generated/attribute-type.h>
#include <app/clusters/thermostat-server/thermostat-server.h>
#include <app/util/attribute-storage.h>

#include <app-common/zap-generated/attributes/Accessors.h>
Expand Down Expand Up @@ -54,6 +56,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &

void emberAfThermostatClusterInitCallback(EndpointId endpoint)
{
Thermostat::SetDefaultDelegate(endpoint, &Thermostat::ThermostatDelegate::GetInstance());

// Temp. code for testing purpose, need to be updated
const auto logOnFailure = [](Protocols::InteractionModel::Status status, const char * attributeName) {
Expand Down
6 changes: 4 additions & 2 deletions examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,10 @@ endpoint 1 {
ram attribute clusterRevision default = 6;

handle command SetpointRaiseLower;
handle command SetActiveScheduleRequest;
handle command SetActivePresetRequest;
handle command AtomicResponse;
handle command AtomicRequest;
}

server cluster ThermostatUserInterfaceConfiguration {
Expand All @@ -2634,5 +2638,3 @@ endpoint 1 {
ram attribute clusterRevision default = 2;
}
}


232 changes: 217 additions & 15 deletions examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,57 @@
"path": "../../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"category": "matter",
"version": "chip-v1"
"version": 1,
"description": "Matter SDK ZCL data"
}
],
"endpointTypes": [
{
"id": 1,
"name": "MA-rootdevice",
"deviceTypeRef": {
"code": 22,
"code": 18,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice",
"deviceTypeOrder": 0
"label": "MA-otarequestor",
"name": "MA-otarequestor"
},
"deviceTypes": [
{
"code": 18,
"profileId": 259,
"label": "MA-otarequestor",
"name": "MA-otarequestor"
},
{
"code": 17,
"profileId": 259,
"label": "MA-powersource",
"name": "MA-powersource"
},
{
"code": 22,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice",
"deviceTypeOrder": 0
"name": "MA-rootdevice"
}
],
"deviceVersions": [
1
],
"deviceIdentifiers": [
18,
17,
22
],
"deviceTypeName": "MA-rootdevice",
"deviceTypeCode": 22,
"deviceTypeName": "MA-otarequestor",
"deviceTypeCode": 18,
"deviceTypeProfileId": 259,
"clusters": [
{
Expand Down Expand Up @@ -3541,16 +3553,14 @@
"code": 769,
"profileId": 259,
"label": "MA-thermostat",
"name": "MA-thermostat",
"deviceTypeOrder": 0
"name": "MA-thermostat"
},
"deviceTypes": [
{
"code": 769,
"profileId": 259,
"label": "MA-thermostat",
"name": "MA-thermostat",
"deviceTypeOrder": 0
"name": "MA-thermostat"
}
],
"deviceVersions": [
Expand Down Expand Up @@ -3934,6 +3944,38 @@
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetActiveScheduleRequest",
"code": 5,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetActivePresetRequest",
"code": 6,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "AtomicResponse",
"code": 253,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "AtomicRequest",
"code": 254,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
Expand Down Expand Up @@ -4161,6 +4203,166 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "PresetTypes",
"code": 72,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ScheduleTypes",
"code": 73,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfPresets",
"code": 74,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfSchedules",
"code": 75,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfScheduleTransitions",
"code": 76,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfScheduleTransitionPerDay",
"code": 77,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActivePresetHandle",
"code": 78,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveScheduleHandle",
"code": 79,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Presets",
"code": 80,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Schedules",
"code": 81,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down
Loading
Loading