Skip to content

Commit

Permalink
Prepare Release 2025.01.23
Browse files Browse the repository at this point in the history
Merges branch development into master.
  • Loading branch information
schlimmchen authored Jan 23, 2025
2 parents 137b6d7 + 587f8ca commit ac14ce5
Show file tree
Hide file tree
Showing 115 changed files with 3,256 additions and 2,378 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ko_fi: tbnobody
ko_fi: schlimmchen
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ body:
- type: markdown
attributes:
value: |
#### Have a question? 👉 [Start a new discussion](https://github.com/helgeerbe/OpenDTU-OnBattery/discussions/new/choose) or [ask in chat](https://discord.gg/WzhxEY62mB).
#### Have a question? 👉 [Start a new discussion](https://github.com/hoylabs/OpenDTU-OnBattery/discussions/new/choose) or [ask in chat](https://discord.gg/WzhxEY62mB).
#### Before opening an issue, please double check:
- [Documentation](https://opendtu-onbattery.net)
- [The FAQs](https://opendtu-onbattery.net/firmware/faq/)
- [Existing issues and discussions](https://github.com/helgeerbe/OpenDTU-OnBattery/search?q=&type=issues)
- [Existing issues and discussions](https://github.com/hoylabs/OpenDTU-OnBattery/search?q=&type=issues)
- type: textarea
id: what-happened
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://discord.gg/WzhxEY62mB
about: Discuss with us on Discord
- name: 🤔 Have questions or need support?
url: https://github.com/helgeerbe/OpenDTU-OnBattery/discussions
about: Use the GitHub Discussions feature
url: https://github.com/hoylabs/OpenDTU-OnBattery/discussions
about: Use the GitHub Discussions feature
25 changes: 11 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get tags
run: git fetch --force --tags origin
- name: Get openDTU core tags
run: git fetch --force --tags https://github.com/tbnobody/OpenDTU.git

- name: Get openDTU core release
run: |
echo "OPEN_DTU_CORE_RELEASE=$(git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags | grep 'refs/tags/v' | tail -1 | sed 's#.*/##' | sed 's/ .*//')" >> $GITHUB_ENV
# disabled as uploading the changed gist failed repeatedly.
# maybe the token in secrets.GIST_SECRET has expired?
# need help from repo owner @helgeerbe to fix this.
# - name: Create openDTU-core-release-Badge
# uses: schneegans/[email protected]
# with:
# auth: ${{ secrets.GIST_SECRET }}
# gistID: 68b47cc8c8994d04ab3a4fa9d8aee5e6
# filename: openDTUcoreRelease.json
# label: based on original OpenDTU
# message: ${{ env.OPEN_DTU_CORE_RELEASE }}
# color: lightblue
- name: Create openDTU-core-release-Badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # version 1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 856dda48c1cadac6ea495213340c612b
filename: openDTUcoreRelease.json
label: based on upstream OpenDTU
message: ${{ env.OPEN_DTU_CORE_RELEASE }}
color: lightblue

- name: Build Changelog
id: github_release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config/release-notes-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
],
"template": "${{CHANGELOG}}",
"pr_template": "- [${{TITLE}}](https://github.com/helgeerbe/OpenDTU-OnBattery/commit/${{MERGE_SHA}})",
"pr_template": "- [${{TITLE}}](https://github.com/hoylabs/OpenDTU-OnBattery/commit/${{MERGE_SHA}})",
"empty_template": "- no changes",
"label_extractor": [
{
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[![OpenDTU-OnBattery Build](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/build.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/build.yml)
[![cpplint](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/cpplint.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/cpplint.yml)
[![Yarn Linting](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/yarnlint.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/yarnlint.yml)
<!---
disabled while "create release badge" action is broken, see .github/build.yml
![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json)
--->
![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/AndreasBoehm/856dda48c1cadac6ea495213340c612b/raw/openDTUcoreRelease.json)

- [OpenDTU-OnBattery](#opendtu-onbattery)
- [Getting Started](#getting-started)
Expand Down
2 changes: 0 additions & 2 deletions include/BatteryStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,5 @@ class MqttBatteryStats : public BatteryStats {
// we do NOT publish the same data under a different topic.
void mqttPublish() const final { }

void getLiveViewData(JsonVariant& root) const final;

bool supportsAlarmsAndWarnings() const final { return false; }
};
40 changes: 31 additions & 9 deletions include/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define MQTT_MAX_TOPIC_STRLEN 256
#define MQTT_MAX_LWTVALUE_STRLEN 20
#define MQTT_MAX_CERT_STRLEN 2560
#define MQTT_MAX_JSON_PATH_STRLEN 256

#define INV_MAX_NAME_STRLEN 31
#define INV_MAX_COUNT 10
Expand All @@ -47,8 +48,6 @@

#define POWERMETER_MQTT_MAX_VALUES 3
#define POWERMETER_HTTP_JSON_MAX_VALUES 3
#define POWERMETER_HTTP_JSON_MAX_PATH_STRLEN 256
#define BATTERY_JSON_MAX_PATH_STRLEN 128

struct CHANNEL_CONFIG_T {
uint16_t MaxChannelPower;
Expand Down Expand Up @@ -88,7 +87,7 @@ using HttpRequestConfig = struct HTTP_REQUEST_CONFIG_T;

struct POWERMETER_MQTT_VALUE_T {
char Topic[MQTT_MAX_TOPIC_STRLEN + 1];
char JsonPath[POWERMETER_HTTP_JSON_MAX_PATH_STRLEN + 1];
char JsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];

enum Unit { Watts = 0, MilliWatts = 1, KiloWatts = 2 };
Unit PowerUnit;
Expand All @@ -111,7 +110,7 @@ using PowerMeterSerialSdmConfig = struct POWERMETER_SERIAL_SDM_CONFIG_T;
struct POWERMETER_HTTP_JSON_VALUE_T {
HttpRequestConfig HttpRequest;
bool Enabled;
char JsonPath[POWERMETER_HTTP_JSON_MAX_PATH_STRLEN + 1];
char JsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];

enum Unit { Watts = 0, MilliWatts = 1, KiloWatts = 2 };
Unit PowerUnit;
Expand Down Expand Up @@ -182,17 +181,17 @@ struct BATTERY_CONFIG_T {
uint8_t JkBmsInterface;
uint8_t JkBmsPollingInterval;
char MqttSocTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char MqttSocJsonPath[BATTERY_JSON_MAX_PATH_STRLEN + 1];
char MqttSocJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
char MqttVoltageTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char MqttVoltageJsonPath[BATTERY_JSON_MAX_PATH_STRLEN + 1];
char MqttVoltageJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
BatteryVoltageUnit MqttVoltageUnit;
bool EnableDischargeCurrentLimit;
float DischargeCurrentLimit;
float DischargeCurrentLimitBelowSoc;
float DischargeCurrentLimitBelowVoltage;
bool UseBatteryReportedDischargeCurrentLimit;
char MqttDischargeCurrentTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char MqttDischargeCurrentJsonPath[BATTERY_JSON_MAX_PATH_STRLEN + 1];
char MqttDischargeCurrentJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
BatteryAmperageUnit MqttAmperageUnit;
};
using BatteryConfig = struct BATTERY_CONFIG_T;
Expand All @@ -216,13 +215,34 @@ struct GRID_CHARGER_CONFIG_T {
};
using GridChargerConfig = struct GRID_CHARGER_CONFIG_T;

enum SolarChargerProviderType { VEDIRECT = 0 };
enum SolarChargerProviderType { VEDIRECT = 0, MQTT = 1 };

struct SOLARCHARGER_MQTT_CONFIG_T {
bool CalculateOutputPower;

enum WattageUnit { KiloWatts = 0, Watts = 1, MilliWatts = 2 };
char PowerTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char PowerJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
WattageUnit PowerUnit;

enum VoltageUnit { Volts = 0, DeciVolts = 1, CentiVolts = 2, MilliVolts = 3 };
char VoltageTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char VoltageJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
VoltageUnit VoltageTopicUnit;

enum AmperageUnit { Amps = 0, MilliAmps = 1 };
char CurrentTopic[MQTT_MAX_TOPIC_STRLEN + 1];
char CurrentJsonPath[MQTT_MAX_JSON_PATH_STRLEN + 1];
AmperageUnit CurrentUnit;
};
using SolarChargerMqttConfig = struct SOLARCHARGER_MQTT_CONFIG_T;

struct SOLAR_CHARGER_CONFIG_T {
bool Enabled;
bool VerboseLogging;
SolarChargerProviderType Provider;
bool PublishUpdatesOnly;
SolarChargerProviderType Provider;
SolarChargerMqttConfig Mqtt;
};
using SolarChargerConfig = struct SOLAR_CHARGER_CONFIG_T;

Expand Down Expand Up @@ -386,6 +406,7 @@ class ConfigurationClass {

static void serializeHttpRequestConfig(HttpRequestConfig const& source, JsonObject& target);
static void serializeSolarChargerConfig(SolarChargerConfig const& source, JsonObject& target);
static void serializeSolarChargerMqttConfig(SolarChargerMqttConfig const& source, JsonObject& target);
static void serializePowerMeterMqttConfig(PowerMeterMqttConfig const& source, JsonObject& target);
static void serializePowerMeterSerialSdmConfig(PowerMeterSerialSdmConfig const& source, JsonObject& target);
static void serializePowerMeterHttpJsonConfig(PowerMeterHttpJsonConfig const& source, JsonObject& target);
Expand All @@ -396,6 +417,7 @@ class ConfigurationClass {

static void deserializeHttpRequestConfig(JsonObject const& source_http_config, HttpRequestConfig& target);
static void deserializeSolarChargerConfig(JsonObject const& source, SolarChargerConfig& target);
static void deserializeSolarChargerMqttConfig(JsonObject const& source, SolarChargerMqttConfig& target);
static void deserializePowerMeterMqttConfig(JsonObject const& source, PowerMeterMqttConfig& target);
static void deserializePowerMeterSerialSdmConfig(JsonObject const& source, PowerMeterSerialSdmConfig& target);
static void deserializePowerMeterHttpJsonConfig(JsonObject const& source, PowerMeterHttpJsonConfig& target);
Expand Down
32 changes: 0 additions & 32 deletions include/MqttHandleVedirect.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/MqttSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MqttSettingsClass {
void unsubscribe(const String& topic);

String getPrefix() const;
String getClientId();
String getClientId() const;

private:
void NetworkEvent(network_event event);
Expand Down
3 changes: 2 additions & 1 deletion include/PowerLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ class PowerLimiterClass {
std::pair<bool, uint32_t> _nextInverterRestart = { false, 0 };
bool _fullSolarPassThroughEnabled = false;
bool _verboseLogging = true;
bool _shutdownComplete = false;

frozen::string const& getStatusText(Status status);
void announceStatus(Status status);
bool shutdown(Status status);
bool isDisabled();
void reloadConfig();
std::pair<float, char const*> getInverterDcVoltage();
float getBatteryVoltage(bool log = false);
Expand Down
48 changes: 0 additions & 48 deletions include/SolarCharger.h

This file was deleted.

36 changes: 0 additions & 36 deletions include/SolarChargerProvider.h

This file was deleted.

Loading

0 comments on commit ac14ce5

Please sign in to comment.