Browse Source

Merge branch 'development03' into new_network

pull/1549/head
lumapu 10 months ago
parent
commit
ac7c80ddea
  1. 10
      src/CHANGES.md
  2. 11
      src/app.cpp
  3. 4
      src/config/settings.h
  4. 2
      src/defines.h
  5. 2
      src/web/RestApi.h
  6. 102
      src/web/html/grid_info.json
  7. 2
      src/web/html/setup.html
  8. 2
      src/web/html/visualization.html
  9. 2
      src/web/lang.json

10
src/CHANGES.md

@ -1,5 +1,15 @@
# Development Changes
## 0.8.97 - 2024-03-22
* add support for newest generation of inverters with A-F in their serial number
* fix NTP and sunrise / sunset
* set default coordinates to the mid of Germany #1516
## 0.8.96 - 2024-03-21
* fix precision of power limit in `/live` #1517
* fix translation of `Werte ausgeben` in `settings` #1507
* add grid profile #1518
## 0.8.95 - 2024-03-17
* fix NTP issues #1440 #1497 #1499

11
src/app.cpp

@ -197,8 +197,13 @@ void app::regularTickers(void) {
#endif /*ENABLE_SIMULATOR*/
}
//-----------------------------------------------------------------------------
void app::onNtpUpdate(bool gotTime) {
mNtpReceived = true;
if ((0 == mSunrise) && (0.0 != mConfig->sun.lat) && (0.0 != mConfig->sun.lon)) {
mCalculatedTimezoneOffset = (int8_t)((mConfig->sun.lon >= 0 ? mConfig->sun.lon + 7.5 : mConfig->sun.lon - 7.5) / 15) * 3600;
tickCalcSunrise();
}
}
//-----------------------------------------------------------------------------
@ -229,10 +234,8 @@ void app::updateNtp(void) {
}
}
if ((0 == mSunrise) && (0.0 != mConfig->sun.lat) && (0.0 != mConfig->sun.lon)) {
mCalculatedTimezoneOffset = (int8_t)((mConfig->sun.lon >= 0 ? mConfig->sun.lon + 7.5 : mConfig->sun.lon - 7.5) / 15) * 3600;
tickCalcSunrise();
}
if(mNtpReceived)
onNtpUpdate(true);
mMqttReconnect = false;
}

4
src/config/settings.h

@ -452,8 +452,8 @@ class settings {
mCfg.ntp.port = DEF_NTP_PORT;
mCfg.ntp.interval = 720;
mCfg.sun.lat = 0.0;
mCfg.sun.lon = 0.0;
mCfg.sun.lat = 51.1; // mid of Germany
mCfg.sun.lon = 10.5; // mid of Germany
mCfg.sun.offsetSecMorning = 0;
mCfg.sun.offsetSecEvening = 0;

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 95
#define VERSION_PATCH 97
//-------------------------------------
typedef struct {

2
src/web/RestApi.h

@ -332,7 +332,7 @@ class RestApi {
if(-1 != i) {
i+=5;
String sn = tmp.substring(i, tmp.indexOf("\"", i)-1);
tmp.replace(sn, String(atoll(sn.c_str()), HEX));
tmp.replace(sn, String(sn) + ",\"note\":\"" + String(atoll(sn.c_str()), HEX) + "\"");
}
}
response = request->beginResponse(200, F("application/json; charset=utf-8"), tmp);

102
src/web/html/grid_info.json

@ -10,6 +10,7 @@
{"0x0908": "France_VFR2014"},
{"0x0a00": "DE NF_EN_50549-1:2019"},
{"0x0c00": "AT_TOR_Erzeuger_default"},
{"0x0c04": "AT_TOR_Erzeuger_default"},
{"0x0d00": "FR_VFR2019"},
{"0x0d04": "NF_EN_50549-1:2019"},
{"0x1000": "ES_RD1699"},
@ -252,6 +253,78 @@
}
]
},
{
"0x000b": [
{
"name": "Nominal Voltage",
"div": 10,
"def": 230,
"unit": "V"
},
{
"name": "Low Voltage 1",
"div": 10,
"min": 170,
"max": 184,
"def": 184,
"unit": "V"
},
{
"name": "LV1 Maximum Trip Time",
"div": 10,
"def": 1.5,
"unit": "s"
},
{
"name": "High Voltage 1",
"div": 10,
"min": 253,
"max": 270,
"def": 255.3,
"unit": "V"
},
{
"name": "HV1 Maximum Trip Time",
"div": 10,
"def": 0.1,
"unit": "s"
},
{
"name": "Low Voltage 2",
"div": 10,
"def": 57.5,
"unit": "V"
},
{
"name": "LV2 Maximum Trip Time",
"div": 100,
"def": 0.5,
"unit": "s"
},
{
"name": "High Voltage 2",
"div": 10,
"min": 264.5,
"max": 275,
"def": 264.5,
"unit": "V"
},
{
"name": "HV2 Maximum Trip Time",
"div": 100,
"def": 0.08,
"unit": "s"
},
{
"name": "10mins Average High Voltage",
"div": 10,
"min": 245,
"max": 255.3,
"def": 255.3,
"unit": "V"
}
]
},
{
"0x000c": [
{
@ -805,6 +878,35 @@
}
]
},
{
"0x6004": [
{
"name": "VW Function Activated",
"div": 1,
"min": 0,
"max": 1,
"def": 1
},
{
"name": "Start of Voltage Watt Droop",
"div": 10,
"def": 253,
"unit": "V"
},
{
"name": "End of Voltage Watt Droop",
"div": 10,
"def": 257.6,
"unit": "V"
},
{
"name": "VW Droop Slope",
"div": 100,
"def": 21.74,
"unit": "Pn%/V"
}
]
},
{
"0x7000": [
{

2
src/web/html/setup.html

@ -787,7 +787,7 @@
cbEn.checked = (obj.enabled);
cbDisNightCom.checked = (obj.disnightcom);
var ser = ml("input", {name: "ser", class: "text", type: "number", max: 138999999999, value: obj.serial}, null);
var ser = ml("input", {name: "ser", class: "text", type: "text", pattern: "[0-9a-fA-F]{12}", value: obj.serial}, null);
var html = ml("div", {}, [
tabs(["{#TAB_GENERAL}", "{#TAB_INPUTS}", "{#TAB_RADIO}", "{#TAB_ADVANCED}"]),
ml("div", {id: "div{#TAB_GENERAL}", class: "tab-content"}, [

2
src/web/html/visualization.html

@ -116,7 +116,7 @@
if(65535 != obj.power_limit_read) {
pwrLimit = obj.power_limit_read + " %";
if(0 != obj.max_pwr)
pwrLimit += ", " + (obj.max_pwr * obj.power_limit_read / 100) + " W";
pwrLimit += ", " + (obj.max_pwr * obj.power_limit_read / 100).toFixed(1) + " W";
}
var maxAcPwr = toIsoDateStr(new Date(obj.ts_max_ac_pwr * 1000));

2
src/web/lang.json

@ -186,7 +186,7 @@
{
"token": "LOG_PRINT_INVERTER_DATA",
"en": "print inverter data",
"de": "Livedaten ausgeben"
"de": "Inverterwerte ausgeben"
},
{
"token": "LOG_SERIAL_DEBUG",

Loading…
Cancel
Save