Skip to content

Commit

Permalink
Merge pull request #836 from helgeerbe/merge-v24.3.31
Browse files Browse the repository at this point in the history
Merges v24.3.31 from upstream
  • Loading branch information
schlimmchen authored Apr 3, 2024
2 parents 21cdc69 + ff44267 commit 3934906
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 106 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/repo-maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Repository Maintenance'

on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write
discussions: write

concurrency:
group: lock

jobs:
stale:
name: 'Stale'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-stale: 14
days-before-close: 60
any-of-labels: 'cant-reproduce,not a bug'
stale-issue-label: stale
stale-pr-label: stale
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
lock-threads:
name: 'Lock Old Threads'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
issue-inactive-days: '30'
pr-inactive-days: '30'
discussion-inactive-days: '30'
log-output: true
issue-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new discussion or issue for related concerns.
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new discussion or issue for related concerns.
discussion-comment: >
This discussion has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new discussion for related concerns.
2 changes: 1 addition & 1 deletion include/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdint>

#define CONFIG_FILENAME "/config.json"
#define CONFIG_VERSION 0x00011b00 // 0.1.27 // make sure to clean all after change
#define CONFIG_VERSION 0x00011c00 // 0.1.28 // make sure to clean all after change

#define WIFI_MAX_SSID_STRLEN 32
#define WIFI_MAX_PASSWORD_STRLEN 64
Expand Down
3 changes: 2 additions & 1 deletion include/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

#define MDNS_ENABLED false

#define NTP_SERVER "pool.ntp.org"
#define NTP_SERVER_OLD "pool.ntp.org"
#define NTP_SERVER "opendtu.pool.ntp.org"
#define NTP_TIMEZONE "CET-1CEST,M3.5.0,M10.5.0/3"
#define NTP_TIMEZONEDESCR "Europe/Berlin"
#define NTP_LONGITUDE 10.4515f
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/Hoymiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void HoymilesClass::loop()
}

// Fetch grid profile
if (iv->Statistics()->getLastUpdate() > 0 && iv->GridProfile()->getLastUpdate() == 0) {
if (iv->Statistics()->getLastUpdate() > 0 && (iv->GridProfile()->getLastUpdate() == 0 || !iv->GridProfile()->containsValidData())) {
iv->sendGridOnProFileParaRequest();
}

Expand Down
7 changes: 6 additions & 1 deletion lib/Hoymiles/src/parser/GridProfileParser.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2023 Thomas Basler and others
* Copyright (C) 2023 - 2024 Thomas Basler and others
*/
#include "GridProfileParser.h"
#include "../Hoymiles.h"
Expand Down Expand Up @@ -446,6 +446,11 @@ std::list<GridProfileSection_t> GridProfileParser::getProfile() const
return l;
}

bool GridProfileParser::containsValidData() const
{
return _gridProfileLength > 6;
}

uint8_t GridProfileParser::getSectionSize(const uint8_t section_id, const uint8_t section_version)
{
uint8_t count = 0;
Expand Down
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/parser/GridProfileParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class GridProfileParser : public Parser {

std::list<GridProfileSection_t> getProfile() const;

bool containsValidData() const;

private:
static uint8_t getSectionSize(const uint8_t section_id, const uint8_t section_version);
static int16_t getSectionStart(const uint8_t section_id, const uint8_t section_version);
Expand All @@ -52,4 +54,4 @@ class GridProfileParser : public Parser {

static const std::array<const ProfileType_t, PROFILE_TYPE_COUNT> _profileTypes;
static const std::array<const GridProfileValue_t, SECTION_VALUE_COUNT> _profileValues;
};
};
6 changes: 6 additions & 0 deletions src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,12 @@ void ConfigurationClass::migrate()
config.Dtu.Cmt.Frequency *= 1000;
}

if (config.Cfg.Version < 0x00011c00) {
if (!strcmp(config.Ntp.Server, NTP_SERVER_OLD)) {
strlcpy(config.Ntp.Server, NTP_SERVER, sizeof(config.Ntp.Server));
}
}

f.close();

config.Cfg.Version = CONFIG_VERSION;
Expand Down
14 changes: 7 additions & 7 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
"vue-router": "^4.3.0"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^3.0.1",
"@rushstack/eslint-patch": "^1.8.0",
"@tsconfig/node18": "^18.2.2",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@rushstack/eslint-patch": "^1.10.1",
"@tsconfig/node18": "^18.2.4",
"@types/bootstrap": "^5.2.10",
"@types/node": "^20.11.30",
"@types/node": "^20.12.2",
"@types/pulltorefreshjs": "^0.1.7",
"@types/sortablejs": "^1.15.8",
"@types/spark-md5": "^3.0.4",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.23.0",
"eslint-plugin-vue": "^9.24.0",
"npm-run-all": "^4.1.5",
"pulltorefreshjs": "^0.1.22",
"sass": "^1.72.0",
"terser": "^5.29.2",
"terser": "^5.30.0",
"typescript": "^5.4.3",
"vite": "^5.2.3",
"vite": "^5.2.7",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-css-injected-by-js": "^3.5.0",
"vue-tsc": "^2.0.7"
Expand Down
16 changes: 11 additions & 5 deletions webapp/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
<div class="row gy-3">
<div class="col-sm-3 col-md-2" :style="[inverterData.length == 1 ? { 'display': 'none' } : {}]">
<div class="nav nav-pills row-cols-sm-1" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<button v-for="inverter in inverterData" :key="inverter.serial" class="nav-link"
<button v-for="inverter in inverterData" :key="inverter.serial" class="nav-link border border-primary text-break"
:id="'v-pills-' + inverter.serial + '-tab'" data-bs-toggle="pill"
:data-bs-target="'#v-pills-' + inverter.serial" type="button" role="tab"
aria-controls="'v-pills-' + inverter.serial" aria-selected="true">
<BIconXCircleFill class="fs-4" v-if="!inverter.reachable" />
<BIconExclamationCircleFill class="fs-4" v-if="inverter.reachable && !inverter.producing" />
<BIconCheckCircleFill class="fs-4" v-if="inverter.reachable && inverter.producing" />
{{ inverter.name }}
<div class="row">
<div class="col-auto col-sm-2">
<BIconXCircleFill class="fs-4" v-if="!inverter.reachable" />
<BIconExclamationCircleFill class="fs-4" v-if="inverter.reachable && !inverter.producing" />
<BIconCheckCircleFill class="fs-4" v-if="inverter.reachable && inverter.producing" />
</div>
<div class="col-sm-9">
{{ inverter.name }}
</div>
</div>
</button>
</div>
</div>
Expand Down
Loading

0 comments on commit 3934906

Please sign in to comment.