Skip to content

Commit

Permalink
adding option to disable power limiter via mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteSchm committed Apr 12, 2023
1 parent 71128e5 commit 4bff31e
Show file tree
Hide file tree
Showing 6 changed files with 673 additions and 571 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ Topics for 3 phases of a power meter is configurable. Given is an example for th
| huawei/output_temp | R | Output air temperature | °C |
| huawei/efficiency | R | Efficiency | Percentage |

## Power Limiter topics
| Topic | R / W | Description | Value / Unit |
| --------------------------------------- | ----- | ---------------------------------------------------- | -------------------------- |
| powerlimiter/cmd/disable | W | Power Limiter disable override for external PL control | 0 / 1 |
| powerlimiter/status/disabled | R | Power Limiter disable override status | 0 / 1 |

## Currently supported Inverters
* Hoymiles HM-300
* Hoymiles HM-350
Expand Down
3 changes: 3 additions & 0 deletions include/PowerLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ class PowerLimiterClass {
void loop();
plStates getPowerLimiterState();
int32_t getLastRequestedPowewrLimit();
void setDisable(bool disable);
bool getDisable();

private:
uint32_t _lastCommandSent = 0;
uint32_t _lastLoop = 0;
int32_t _lastRequestedPowerLimit = 0;
uint32_t _lastLimitSetTime = 0;
plStates _plState = STATE_DISCOVER;
bool _disabled = false;

float _powerMeter1Power;
float _powerMeter2Power;
Expand Down
Loading

0 comments on commit 4bff31e

Please sign in to comment.