forked from tbnobody/OpenDTU
-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: DPL support for smart-buffer-batteries (#1606)
* Feature: DPL support for smart-buffer-batteries Change the settings to pick a power source (battery, solar, smart-buffer) and treat smart-buffers like a mix of battery and solar. Smart-buffer-powered (Marstek B2500, Anker Solix, Zendure, etc.) inverters can always increase to the max limit without any checks, support overscaling, can be put in standby and restarted. * log uptime and inverter restart also when governing buffered inverters --------- Co-authored-by: Bernhard Kirchen <[email protected]>
- Loading branch information
1 parent
878c27c
commit 6d2d85b
Showing
19 changed files
with
388 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "PowerLimiterInverter.h" | ||
|
||
class PowerLimiterOverscalingInverter : public PowerLimiterInverter { | ||
public: | ||
PowerLimiterOverscalingInverter(bool verboseLogging, PowerLimiterInverterConfig const& config); | ||
|
||
uint16_t applyIncrease(uint16_t increase) final; | ||
|
||
protected: | ||
void setAcOutput(uint16_t expectedOutputWatts) final; | ||
|
||
private: | ||
uint16_t scaleLimit(uint16_t expectedOutputWatts); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "PowerLimiterOverscalingInverter.h" | ||
|
||
class PowerLimiterSmartBufferInverter : public PowerLimiterOverscalingInverter { | ||
public: | ||
PowerLimiterSmartBufferInverter(bool verboseLogging, PowerLimiterInverterConfig const& config); | ||
|
||
uint16_t getMaxReductionWatts(bool allowStandby) const final; | ||
uint16_t getMaxIncreaseWatts() const final; | ||
uint16_t applyReduction(uint16_t reduction, bool allowStandby) final; | ||
uint16_t standby() final; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "PowerLimiterInverter.h" | ||
#include "PowerLimiterOverscalingInverter.h" | ||
|
||
class PowerLimiterSolarInverter : public PowerLimiterInverter { | ||
class PowerLimiterSolarInverter : public PowerLimiterOverscalingInverter { | ||
public: | ||
PowerLimiterSolarInverter(bool verboseLogging, PowerLimiterInverterConfig const& config); | ||
|
||
uint16_t getMaxReductionWatts(bool allowStandby) const final; | ||
uint16_t getMaxIncreaseWatts() const final; | ||
uint16_t applyReduction(uint16_t reduction, bool allowStandby) final; | ||
uint16_t applyIncrease(uint16_t increase) final; | ||
uint16_t standby() final; | ||
bool isSolarPowered() const final { return true; } | ||
|
||
private: | ||
uint16_t scaleLimit(uint16_t expectedOutputWatts); | ||
void setAcOutput(uint16_t expectedOutputWatts) final; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.