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

energy-management-app: refactor WH and EVSE into separate endpoints and fix conformance issues #36201

Merged
merged 28 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7e192ae
Add missing Water Heater device to matter-devices.xml
soares-sergio Oct 17, 2024
e43ff67
zap regen
soares-sergio Oct 17, 2024
ea06d89
energy-management-app: Split WH and EVSE into 2 endpoints
soares-sergio Oct 22, 2024
ac11559
Use anon namespace instead of static.
soares-sergio Oct 22, 2024
f05afff
disable enpoint on esp32 and silabs
soares-sergio Oct 22, 2024
f827e4a
address Tennessee's PR feedback
soares-sergio Oct 24, 2024
6f3f6dc
Review suggestion: move GetMainAppEndpointId to another file
soares-sergio Oct 24, 2024
8d9d66f
Merge branch 'master' into fix-energy-man-app-comp
soares-sergio Oct 24, 2024
9dee3de
zap regen
soares-sergio Oct 24, 2024
e2f7990
fix matter-devices white space diffs
soares-sergio Oct 28, 2024
1371752
App now builds on all-clusters app
soares-sergio Oct 29, 2024
4143090
Fix typo on init
soares-sergio Oct 29, 2024
b63a9d0
fix all-clusters breakage on esp32
soares-sergio Oct 30, 2024
50fb815
fix misuse of namespace in header
soares-sergio Oct 30, 2024
2f140ea
Fix breakage for silabs water heater
soares-sergio Oct 31, 2024
18fd4df
Merge branch 'master' into fix-energy-man-app-comp
soares-sergio Nov 4, 2024
97ced72
Update WaterHeater endpoint for CI tests
soares-sergio Nov 4, 2024
a4936c2
Update WaterHeater tests to endpoint 2
soares-sergio Nov 5, 2024
d52ca43
Bumped ClusterRevisions
soares-sergio Nov 5, 2024
09476fd
Update AccessControl featureMap to enable Extension attribute
soares-sergio Nov 5, 2024
d8e2764
Remove AccessControl extension attribute
soares-sergio Nov 6, 2024
24f6e7d
Remove kStateForecastReporting from the default feature map
soares-sergio Nov 6, 2024
ffab349
Update TC_WHM_1_2 endpoint to 2
soares-sergio Nov 7, 2024
b9d229f
Merge branch 'master' into fix-energy-man-app-comp
soares-sergio Nov 20, 2024
1164357
Fix various conformance issues
soares-sergio Nov 20, 2024
c0d14a2
Merge branch 'master' into fix-energy-man-app-comp
soares-sergio Nov 20, 2024
2d92654
TC_WHM_1_2: Use endpoint id passed as argument instead of hardcoded
soares-sergio Nov 21, 2024
d2f26a1
Merge branch 'master' into fix-energy-man-app-comp
soares-sergio Nov 27, 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 @@ -26,6 +26,11 @@ static std::unique_ptr<EnergyEvseDelegate> gDelegate;
static std::unique_ptr<EvseTargetsDelegate> gEvseTargetsDelegate;
static std::unique_ptr<EnergyEvseManager> gInstance;

EndpointId GetEnergyDeviceEndpointId()
{
return chip::EndpointId(1);
}

void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpointId)
{
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp3TagList[] = { {
.tag = kTagSwitchesUp } };
const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp4TagList[] = { { .namespaceID = kNamespaceSwitches,
.tag = kTagSwitchesDown } };

} // namespace

#ifdef MATTER_DM_PLUGIN_DISHWASHER_ALARM_SERVER
Expand Down Expand Up @@ -256,7 +257,7 @@ void ApplicationInit()
Clusters::ValveConfigurationAndControl::SetDefaultDelegate(chip::EndpointId(1), &sValveDelegate);
Clusters::TimeSynchronization::SetDefaultDelegate(&sTimeSyncDelegate);

Clusters::WaterHeaterManagement::WhmApplicationInit();
Clusters::WaterHeaterManagement::WhmApplicationInit(chip::EndpointId(1));

SetTagList(/* endpoint= */ 0, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp0TagList));
SetTagList(/* endpoint= */ 1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp1TagList));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,21 @@
#pragma once

#include <DeviceEnergyManagementDelegateImpl.h>
#include <DeviceEnergyManagementManager.h>
#include <ElectricalPowerMeasurementDelegate.h>
#include <PowerTopologyDelegate.h>
#include <lib/core/CHIPError.h>

// This app is configured by default with EP1 for EVSE and EP2 for WaterHeater, with only one endpoint
// enabled. On linux, there's a command line argument (--application) to dynamically enable
// "evse|water-heater", i.e. EP1 or EP2. On other platforms, it's a build time definition (#define).
chip::EndpointId GetEnergyDeviceEndpointId();

// The DEM Delegate is used for the TestEventTriggers
chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate();

void EvseApplicationInit();
void EvseApplicationShutdown();

void WaterHeaterApplicationInit();
void WaterHeaterApplicationShutdown();
Loading
Loading