Skip to content

Commit

Permalink
Merge upstream tag 'v24.8.1' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Aug 1, 2024
2 parents cb5e7e5 + e85001b commit 77af085
Show file tree
Hide file tree
Showing 78 changed files with 2,571 additions and 1,637 deletions.
30 changes: 29 additions & 1 deletion docs/DeviceProfiles/wt32-eth01.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,34 @@
"clk_mode": 0
}
},
{
"name": "WT32-ETH01 with SH1106",
"links": [
{"name": "Datasheet", "url": "http://www.wireless-tag.com/portfolio/wt32-eth01/"}
],
"nrf24": {
"miso": 4,
"mosi": 2,
"clk": 32,
"irq": 33,
"en": 14,
"cs": 15
},
"eth": {
"enabled": true,
"phy_addr": 1,
"power": 16,
"mdc": 23,
"mdio": 18,
"type": 0,
"clk_mode": 0
},
"display": {
"type": 3,
"data": 5,
"clk": 17
}
},
{
"name": "WT32-ETH01 with SSD1306",
"links": [
Expand Down Expand Up @@ -78,4 +106,4 @@
"clk": 17
}
}
]
]
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMS_2CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool HMS_2CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x114400000000 && serial <= 0x1144ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1144;
return preSerial == 0x1144 || preSerial == 0x1143;
}

String HMS_2CH::typeName() const
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| HM_4CH | HM-1000/1200/1500-4T | 1161 |
| HMS_1CH | HMS-300/350/400/450/500-1T | 1124 |
| HMS_1CHv2 | HMS-500-1T v2 | 1125 |
| HMS_2CH | HMS-600/700/800/900/1000-2T | 1144 |
| HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144 |
| HMS_4CH | HMS-1600/1800/2000-4T | 1164 |
| HMT_4CH | HMT-1600/1800/2000-4T | 1361 |
| HMT_6CH | HMT-1800/2250-6T | 1382 |
Expand Down
12 changes: 6 additions & 6 deletions lib/Hoymiles/src/parser/AlarmLogParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ ID Source Addr Target Addr Idx ? wcode ? Start End ?

const std::array<const AlarmMessage_t, ALARM_MSG_COUNT> AlarmLogParser::_alarmMessages = { {
{ AlarmMessageType_t::ALL, 1, "Inverter start", "Wechselrichter gestartet", "L'onduleur a démarré" },
{ AlarmMessageType_t::ALL, 2, "Time calibration", "", "" },
{ AlarmMessageType_t::ALL, 2, "Time calibration", "Zeitabgleich", "" },
{ AlarmMessageType_t::ALL, 3, "EEPROM reading and writing error during operation", "", "" },
{ AlarmMessageType_t::ALL, 4, "Offline", "Offline", "Non connecté" },

{ AlarmMessageType_t::ALL, 11, "Grid voltage surge", "", "" },
{ AlarmMessageType_t::ALL, 12, "Grid voltage sharp drop", "", "" },
{ AlarmMessageType_t::ALL, 13, "Grid frequency mutation", "", "" },
{ AlarmMessageType_t::ALL, 14, "Grid phase mutation", "", "" },
{ AlarmMessageType_t::ALL, 15, "Grid transient fluctuation", "", "" },
{ AlarmMessageType_t::ALL, 11, "Grid voltage surge", "Netz: Überspannungsimpuls", "" },
{ AlarmMessageType_t::ALL, 12, "Grid voltage sharp drop", "Netz: Spannungseinbruch", "" },
{ AlarmMessageType_t::ALL, 13, "Grid frequency mutation", "Netz: Frequenzänderung", "" },
{ AlarmMessageType_t::ALL, 14, "Grid phase mutation", "Netz: Phasenänderung", "" },
{ AlarmMessageType_t::ALL, 15, "Grid transient fluctuation", "Netz: vorübergehende Schwankung", "" },

{ AlarmMessageType_t::ALL, 36, "INV overvoltage or overcurrent", "", "" },

Expand Down
1 change: 1 addition & 0 deletions lib/Hoymiles/src/parser/DevInfoParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const devInfo_t devInfo[] = {
{ { 0x10, 0x20, 0x71, ALL }, 500, "HMS-500-1T v2" }, // 02
{ { 0x10, 0x21, 0x11, ALL }, 600, "HMS-600-2T" }, // 01
{ { 0x10, 0x21, 0x41, ALL }, 800, "HMS-800-2T" }, // 00
{ { 0x10, 0x11, 0x41, ALL }, 800, "HMS-800-2T-LV" }, // 00
{ { 0x10, 0x11, 0x51, ALL }, 900, "HMS-900-2T" }, // 01
{ { 0x10, 0x21, 0x51, ALL }, 900, "HMS-900-2T" }, // 03
{ { 0x10, 0x21, 0x71, ALL }, 1000, "HMS-1000-2T" }, // 05
Expand Down
9 changes: 5 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ extra_configs =
custom_ci_action = generic_esp32_4mb_no_ota,generic_esp32_8mb,generic_esp32s3,generic_esp32s3_usb

framework = arduino
platform = espressif32@6.7.0
platform = espressif32@6.8.1

build_flags =
-DPIOENV=\"$PIOENV\"
-D_TASK_STD_FUNCTION=1
-D_TASK_THREAD_SAFE=1
-DCONFIG_ASYNC_TCP_EVENT_QUEUE_SIZE=128
-DCONFIG_ASYNC_TCP_QUEUE_SIZE=128
-DEMC_TASK_STACK_SIZE=6400
-Wall -Wextra -Wunused -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wnull-dereference
; Have to remove -Werror because of
; https://github.com/espressif/arduino-esp32/issues/9044 and
Expand All @@ -38,10 +39,10 @@ build_unflags =
-std=gnu++11

lib_deps =
mathieucarbou/ESP Async WebServer @ 2.10.8
bblanchon/ArduinoJson @ 7.0.4
mathieucarbou/ESPAsyncWebServer @ 3.1.2
bblanchon/ArduinoJson @ 7.1.0
https://github.com/bertmelis/espMqttClient.git#v1.7.0
nrf24/RF24 @ 1.4.8
nrf24/RF24 @ 1.4.9
olikraus/U8g2 @ 2.35.19
buelowp/sunset @ 1.1.7
https://github.com/arkhipenko/TaskScheduler#testing
Expand Down
3 changes: 3 additions & 0 deletions src/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ void NetworkSettingsClass::init(Scheduler& scheduler)
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);

WiFi.disconnect(true, true);

WiFi.onEvent(std::bind(&NetworkSettingsClass::NetworkEvent, this, _1));
setupMode();

Expand Down Expand Up @@ -77,6 +79,7 @@ void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event)
MessageOutput.println("WiFi disconnected");
if (_networkMode == network_mode::WiFi) {
MessageOutput.println("Try reconnecting");
WiFi.disconnect(true, true);
WiFi.reconnect();
raiseEvent(network_event::NETWORK_DISCONNECTED);
}
Expand Down
2 changes: 1 addition & 1 deletion src/WebApi_webapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void WebApiWebappClass::responseBinaryDataWithETagCache(AsyncWebServerRequest *r
if (eTagMatch) {
response = request->beginResponse(304);
} else {
response = request->beginResponse_P(200, contentType, content, len);
response = request->beginResponse(200, contentType, content, len);
if (contentEncoding.length() > 0) {
response->addHeader("Content-Encoding", contentEncoding);
}
Expand Down
8 changes: 8 additions & 0 deletions webapp/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": true,
"tabWidth": 4,
"singleQuote": true,
"printWidth": 120,
"trailingComma": "es5"
}
8 changes: 8 additions & 0 deletions webapp/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/// <reference types="vite/client" />

import { Router, Route } from 'vue-router'
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$router: Router
$route: Route
}
}
24 changes: 13 additions & 11 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"preview": "vite preview --port 4173",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit",
"lint": "eslint ."
"lint": "eslint .",
"format": "prettier --write src/"
},
"dependencies": {
"@popperjs/core": "^2.11.8",
Expand All @@ -18,31 +19,32 @@
"mitt": "^3.0.1",
"sortablejs": "^1.15.2",
"spark-md5": "^3.0.2",
"vue": "^3.4.31",
"vue": "^3.4.35",
"vue-i18n": "^9.13.1",
"vue-router": "^4.4.0"
"vue-router": "^4.4.2"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@tsconfig/node18": "^18.2.4",
"@types/bootstrap": "^5.2.10",
"@types/node": "^20.14.9",
"@types/node": "^22.0.2",
"@types/pulltorefreshjs": "^0.1.7",
"@types/sortablejs": "^1.15.8",
"@types/spark-md5": "^3.0.4",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue": "^5.1.2",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^9.6.0",
"eslint-plugin-vue": "^9.26.0",
"eslint": "^9.8.0",
"eslint-plugin-vue": "^9.27.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"pulltorefreshjs": "^0.1.22",
"sass": "^1.77.6",
"terser": "^5.31.1",
"typescript": "^5.5.2",
"vite": "^5.3.2",
"terser": "^5.31.3",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-css-injected-by-js": "^3.5.1",
"vue-tsc": "^2.0.22"
"vue-tsc": "^2.0.29"
}
}
4 changes: 2 additions & 2 deletions webapp/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

<script lang="ts">
import { defineComponent } from 'vue';
import NavBar from "./components/NavBar.vue";
import NavBar from './components/NavBar.vue';
export default defineComponent({
name: "App",
name: 'App',
components: {
NavBar,
},
Expand Down
40 changes: 26 additions & 14 deletions webapp/src/components/BasePage.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<template>
<div :class="{'container-xxl': !isWideScreen,
'container-fluid': isWideScreen}" role="main">
<div :class="{ 'container-xxl': !isWideScreen, 'container-fluid': isWideScreen }" role="main">
<div class="page-header">
<div class="row">
<div class="col-sm-11">
<h1>{{ title }}
<span v-if="showWebSocket" :class="{
'onlineMarker': isWebsocketConnected,
'offlineMarker': !isWebsocketConnected,
}"></span>
<h1>
{{ title }}
<span
v-if="showWebSocket"
:class="{
onlineMarker: isWebsocketConnected,
offlineMarker: !isWebsocketConnected,
}"
></span>
</h1>
</div>
<div class="col-sm-1" v-if="showReload">
<button type="button" class="float-end btn btn-outline-primary"
@click="$emit('reload')" v-tooltip :title="$t('base.Reload')" ><BIconArrowClockwise /></button>
<button
type="button"
class="float-end btn btn-outline-primary"
@click="$emit('reload')"
v-tooltip
:title="$t('base.Reload')"
>
<BIconArrowClockwise />
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -48,19 +58,19 @@ export default defineComponent({
showReload: { type: Boolean, required: false, default: false },
},
mounted() {
console.log("init");
console.log('init');
PullToRefresh.init({
mainElement: 'body', // above which element?
instructionsPullToRefresh: this.$t('base.Pull'),
instructionsReleaseToRefresh: this.$t('base.Release'),
instructionsRefreshing: this.$t('base.Refreshing'),
onRefresh: () => {
this.$emit('reload');
}
},
});
},
unmounted() {
console.log("destroy");
console.log('destroy');
PullToRefresh.destroyAll();
},
});
Expand Down Expand Up @@ -100,13 +110,15 @@ export default defineComponent({
margin: -12px 0 0 -12px;
border: 1px solid #00bb00;
border-radius: 50%;
box-shadow: 0 0 4px #00bb00, inset 0 0 4px rgb(56, 111, 169);
box-shadow:
0 0 4px #00bb00,
inset 0 0 4px rgb(56, 111, 169);
transform: scale(0);
animation: online 2.5s ease-in-out infinite;
}
@keyframes online {
0% {
transform: scale(.1);
transform: scale(0.1);
opacity: 1;
}
Expand Down
Loading

0 comments on commit 77af085

Please sign in to comment.