mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 03:01:40 +02:00
0.8.88
* fix MqTT statistic data overflow #1458 * add HMS-400-1T support (serial number 1125...) #1460 * removed `yield efficiency` because the inverter already calculates correct #1243
This commit is contained in:
parent
4f71ac014c
commit
3b58522fd5
11 changed files with 17 additions and 31 deletions
|
@ -1,5 +1,10 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.88 - 2024-02-28
|
||||
* fix MqTT statistic data overflow #1458
|
||||
* add HMS-400-1T support (serial number 1125...) #1460
|
||||
* removed `yield efficiency` because the inverter already calculates correct #1243
|
||||
|
||||
## 0.8.87 - 2024-02-25
|
||||
* fix translations #1455 #1442
|
||||
|
||||
|
|
|
@ -161,7 +161,6 @@ typedef struct {
|
|||
bool rstValsCommStop;
|
||||
bool rstMaxValsMidNight;
|
||||
bool startWithoutTime;
|
||||
float yieldEffiency;
|
||||
bool readGrid;
|
||||
} cfgInst_t;
|
||||
|
||||
|
@ -452,7 +451,6 @@ class settings {
|
|||
mCfg.inst.rstValsCommStop = false;
|
||||
mCfg.inst.startWithoutTime = false;
|
||||
mCfg.inst.rstMaxValsMidNight = false;
|
||||
mCfg.inst.yieldEffiency = 1.0f;
|
||||
mCfg.inst.readGrid = true;
|
||||
|
||||
for(uint8_t i = 0; i < MAX_NUM_INVERTERS; i++) {
|
||||
|
@ -763,7 +761,6 @@ class settings {
|
|||
obj[F("rstComStop")] = (bool)mCfg.inst.rstValsCommStop;
|
||||
obj[F("strtWthtTime")] = (bool)mCfg.inst.startWithoutTime;
|
||||
obj[F("rstMaxMidNight")] = (bool)mCfg.inst.rstMaxValsMidNight;
|
||||
obj[F("yldEff")] = mCfg.inst.yieldEffiency;
|
||||
obj[F("rdGrid")] = (bool)mCfg.inst.readGrid;
|
||||
}
|
||||
else {
|
||||
|
@ -774,13 +771,7 @@ class settings {
|
|||
getVal<bool>(obj, F("rstComStop"), &mCfg.inst.rstValsCommStop);
|
||||
getVal<bool>(obj, F("strtWthtTime"), &mCfg.inst.startWithoutTime);
|
||||
getVal<bool>(obj, F("rstMaxMidNight"), &mCfg.inst.rstMaxValsMidNight);
|
||||
getVal<float>(obj, F("yldEff"), &mCfg.inst.yieldEffiency);
|
||||
getVal<bool>(obj, F("rdGrid"), &mCfg.inst.readGrid);
|
||||
|
||||
if(mCfg.inst.yieldEffiency < 0.5)
|
||||
mCfg.inst.yieldEffiency = 1.0f;
|
||||
else if(mCfg.inst.yieldEffiency > 1.0f)
|
||||
mCfg.inst.yieldEffiency = 1.0f;
|
||||
}
|
||||
|
||||
JsonArray ivArr;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 87
|
||||
#define VERSION_PATCH 88
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -300,9 +300,9 @@ class Inverter {
|
|||
// temperature, Qvar, and power factor are a signed values
|
||||
rec->record[pos] = ((REC_TYP)((int16_t)val)) / (REC_TYP)(div);
|
||||
} else if (FLD_YT == rec->assign[pos].fieldId) {
|
||||
rec->record[pos] = ((REC_TYP)(val) / (REC_TYP)(div) * generalConfig->yieldEffiency) + ((REC_TYP)config->yieldCor[rec->assign[pos].ch-1]);
|
||||
rec->record[pos] = ((REC_TYP)(val) / (REC_TYP)(div)) + ((REC_TYP)config->yieldCor[rec->assign[pos].ch-1]);
|
||||
} else if (FLD_YD == rec->assign[pos].fieldId) {
|
||||
float actYD = (REC_TYP)(val) / (REC_TYP)(div) * generalConfig->yieldEffiency;
|
||||
float actYD = (REC_TYP)(val) / (REC_TYP)(div);
|
||||
uint8_t idx = rec->assign[pos].ch - 1;
|
||||
if (mLastYD[idx] > actYD)
|
||||
mOffYD[idx] += mLastYD[idx];
|
||||
|
|
|
@ -31,6 +31,7 @@ class HmSystem {
|
|||
if((iv->config->serial.b[5] == 0x11) || (iv->config->serial.b[5] == 0x10)) {
|
||||
switch(iv->config->serial.b[4]) {
|
||||
case 0x24: // HMS-500
|
||||
case 0x25: // HMS-400
|
||||
case 0x22:
|
||||
case 0x21: iv->type = INV_TYPE_1CH;
|
||||
break;
|
||||
|
@ -51,15 +52,14 @@ class HmSystem {
|
|||
}
|
||||
|
||||
if(iv->config->serial.b[5] == 0x11) {
|
||||
if((iv->config->serial.b[4] & 0x0f) == 0x04) {
|
||||
if(((iv->config->serial.b[4] & 0x0f) == 0x04) || ((iv->config->serial.b[4] & 0x0f) == 0x05)) {
|
||||
iv->ivGen = IV_HMS;
|
||||
iv->ivRadioType = INV_RADIO_TYPE_CMT;
|
||||
} else {
|
||||
iv->ivGen = IV_HM;
|
||||
iv->ivRadioType = INV_RADIO_TYPE_NRF;
|
||||
}
|
||||
}
|
||||
else if((iv->config->serial.b[4] & 0x03) == 0x02) { // MI 3rd Gen -> same as HM
|
||||
} else if((iv->config->serial.b[4] & 0x03) == 0x02) { // MI 3rd Gen -> same as HM
|
||||
iv->ivGen = IV_HM;
|
||||
iv->ivRadioType = INV_RADIO_TYPE_NRF;
|
||||
} else { // MI 2nd Gen
|
||||
|
@ -82,7 +82,7 @@ class HmSystem {
|
|||
|
||||
DPRINT(DBG_INFO, "added inverter ");
|
||||
if(iv->config->serial.b[5] == 0x11) {
|
||||
if((iv->config->serial.b[4] & 0x0f) == 0x04)
|
||||
if(((iv->config->serial.b[4] & 0x0f) == 0x04) || ((iv->config->serial.b[4] & 0x0f) == 0x05))
|
||||
DBGPRINT("HMS");
|
||||
else
|
||||
DBGPRINT("HM");
|
||||
|
|
|
@ -350,7 +350,7 @@ build_flags = ${env.build_flags}
|
|||
-DDEF_LED1=17
|
||||
-DLED_ACTIVE_HIGH
|
||||
-DARDUINO_USB_MODE=1
|
||||
#-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
monitor_filters =
|
||||
esp32_exception_decoder, colorize
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ class PubMqttIvData {
|
|||
bool mRTRDataHasBeenSent = false;
|
||||
|
||||
std::array<char, (32 + MAX_NAME_LENGTH + 1)> mSubTopic;
|
||||
std::array<char, 140> mVal;
|
||||
std::array<char, 160> mVal;
|
||||
|
||||
std::queue<sendListCmdIv> *mSendList = nullptr;
|
||||
};
|
||||
|
|
|
@ -484,7 +484,6 @@ class RestApi {
|
|||
obj[F("strtWthtTm")] = (bool)mConfig->inst.startWithoutTime;
|
||||
obj[F("rdGrid")] = (bool)mConfig->inst.readGrid;
|
||||
obj[F("rstMaxMid")] = (bool)mConfig->inst.rstMaxValsMidNight;
|
||||
obj[F("yldEff")] = mConfig->inst.yieldEffiency;
|
||||
}
|
||||
|
||||
void getInverter(JsonObject obj, uint8_t id) {
|
||||
|
|
|
@ -157,10 +157,6 @@
|
|||
<div class="col-8">{#INV_READ_GRID_PROFILE}</div>
|
||||
<div class="col-4"><input type="checkbox" name="rdGrid"/></div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-8">{#INV_YIELD_EFF}</div>
|
||||
<div class="col-4"><input type="number" name="yldEff" step="any"/></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
@ -605,7 +601,7 @@
|
|||
}
|
||||
|
||||
function ivGlob(obj) {
|
||||
for(var i of [["invInterval", "interval"], ["yldEff", "yldEff"]])
|
||||
for(var i of [["invInterval", "interval"]])
|
||||
document.getElementsByName(i[0])[0].value = obj[i[1]];
|
||||
for(var i of ["Mid", "ComStop", "NotAvail", "MaxMid"])
|
||||
document.getElementsByName("invRst"+i)[0].checked = obj["rst" + i];
|
||||
|
@ -786,7 +782,8 @@
|
|||
case 0x1000: nrf = true; break;
|
||||
case 0x1100:
|
||||
switch(sn & 0x000f) {
|
||||
case 0x0004: nrf = false; break;
|
||||
case 0x0004:
|
||||
case 0x0005: nrf = false; break;
|
||||
default: nrf = true; break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -323,11 +323,6 @@
|
|||
"en": "Read Grid Profile",
|
||||
"de": "Grid-Profil auslesen"
|
||||
},
|
||||
{
|
||||
"token": "INV_YIELD_EFF",
|
||||
"en": "Yield Efficiency (default 1.0)",
|
||||
"de": "Ertragseffizienz (Standard 1.0)"
|
||||
},
|
||||
{
|
||||
"token": "NTP_INTERVAL",
|
||||
"en": "NTP Interval (in minutes, min. 5 minutes)",
|
||||
|
|
|
@ -483,7 +483,6 @@ class Web {
|
|||
mConfig->inst.startWithoutTime = (request->arg("strtWthtTm") == "on");
|
||||
mConfig->inst.readGrid = (request->arg("rdGrid") == "on");
|
||||
mConfig->inst.rstMaxValsMidNight = (request->arg("invRstMaxMid") == "on");
|
||||
mConfig->inst.yieldEffiency = (request->arg("yldEff")).toFloat();
|
||||
|
||||
|
||||
// pinout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue