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

Add WaterHeater support to Silabs energy management app #35563

Closed
Closed
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
1 change: 1 addition & 0 deletions examples/energy-management-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ declare_args() {
# Dump memory usage at link time.
chip_print_memory_usage = false


# Enable test event triggers by default: Disable these in production devices
sl_enable_energy_evse_trigger = true
sl_enable_energy_reporting_trigger = true
Expand Down
5 changes: 5 additions & 0 deletions examples/energy-management-app/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "AppConfig.h"
#include "AppEvent.h"
#include "LEDWidget.h"

#if SL_MATTER_CONFIG_ENABLE_EXAMPLE_EVSE_DEVICE
#include <EnergyEvseMain.h>
#endif
Expand Down Expand Up @@ -153,6 +154,7 @@ void ApplicationInit()
void ApplicationShutdown()
{
chip::DeviceLayer::PlatformMgr().LockChipStack();

#if SL_MATTER_CONFIG_ENABLE_EXAMPLE_EVSE_DEVICE
EvseApplicationShutdown();
#endif // CONFIG_ENABLE_EXAMPLE_EVSE_DEVICE
Expand All @@ -169,6 +171,7 @@ CHIP_ERROR AppTask::Init()
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler);

#ifdef DISPLAY_ENABLED

#if SL_MATTER_CONFIG_ENABLE_EXAMPLE_EVSE_DEVICE
GetLCD().Init((uint8_t *) "energy-management-App (EVSE)");
#elif SL_CONFIG_ENABLE_EXAMPLE_WATER_HEATER_DEVICE
Expand All @@ -185,6 +188,7 @@ CHIP_ERROR AppTask::Init()

ApplicationInit();


#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
TestEventTriggerDelegate * pTestEventDelegate = Server::GetInstance().GetTestEventTriggerDelegate();

Expand Down Expand Up @@ -212,6 +216,7 @@ CHIP_ERROR AppTask::Init()
VerifyOrDie(pTestEventDelegate->AddHandler(&sWaterHeaterManagementTestEventTriggerHandler) == CHIP_NO_ERROR);
}
#endif

#if SL_MATTER_CONFIG_ENABLE_DEVICE_ENERGY_MANAGEMENT_TRIGGER
static DeviceEnergyManagementTestEventTriggerHandler sDeviceEnergyManagementTestEventTriggerHandler;
if (pTestEventDelegate != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/esp32/common/Esp32AppServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <app/TestEventTriggerDelegate.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
#include <app/clusters/water-heater-management-server/WaterHeaterManagementTestEventTriggerHandler.h>

#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <platform/ESP32/NetworkCommissioningDriver.h>
Expand Down
Loading