Skip to content

Commit

Permalink
0.8.40
Browse files Browse the repository at this point in the history
* fix display of sunrise and sunset in `/system` #1308
* fix MqTT set power limit #1313
  • Loading branch information
lumapu committed Jan 2, 2024
1 parent 40097ab commit 3dd4997
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Development Changes

## 0.8.40 - 2024-01-02
* fix display of sunrise and sunset in `/system` #1308
* fix MqTT set power limit #1313

## 0.8.39 - 2024-01-01
* fix MqTT dis_night_comm in the morning #1309 #1286
* seperated offset for sunrise and sunset #1308
* **BREAKING CHANGE**: powerlimit (active power control) now has one decimal place (MqTT / API) #1199
* powerlimit (active power control) now has one decimal place (MqTT / API) #1199
* merge Prometheus metrics fix #1310
* merge MI grid profile request #1306
* merge update documentation / readme #1305
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 39
#define VERSION_PATCH 40

//-------------------------------------
typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/hm/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class Communication : public CommQueue<> {
DBGPRINT(F("has "));
if(!accepted) DBGPRINT(F("not "));
DBGPRINT(F("accepted power limit set point "));
DBGPRINT(String(q->iv->powerLimit[0]/10));
DBGPRINT(String((float)q->iv->powerLimit[0]/10.0));
DBGPRINT(F(" with PowerLimitControl "));
DBGPRINTLN(String(q->iv->powerLimit[1]));
q->iv->actPowerLimit = 0xffff; // unknown, readback current value
Expand Down
2 changes: 1 addition & 1 deletion src/hm/hmInverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ class Inverter {
bool mDevControlRequest; // true if change needed
uint8_t mGridLen = 0;
uint8_t mGridProfile[MAX_GRID_LENGTH];
uint8_t mGetLossInterval; // request iv every AHOY_GET_LOSS_INTERVAL RealTimeRunData_Debug
uint8_t mGetLossInterval; // request iv every AHOY_GET_LOSS_INTERVAL RealTimeRunData_Debug
};

template <class REC_TYP>
Expand Down
12 changes: 7 additions & 5 deletions src/publisher/pubMqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,18 @@ class PubMqtt {
char *pyld = new char[len + 1];
strncpy(pyld, (const char*)payload, len);
pyld[len] = '\0';
root[F("val")] = atoi(pyld);
if(NULL == strstr(topic, "limit"))
root[F("val")] = atoi(pyld);
else
root[F("val")] = (int)(atof(pyld) * 10.0f);

if(pyld[len-1] == 'W')
limitAbs = true;
delete[] pyld;
}

const char *p = topic + strlen(mCfgMqtt->topic);
uint8_t pos = 0;
uint8_t elm = 0;
uint8_t pos = 0, elm = 0;
char tmp[30];

while(1) {
Expand All @@ -333,8 +336,7 @@ class PubMqtt {
root[F("cmd")] = F("limit_nonpersistent_absolute");
else
root[F("cmd")] = F("limit_nonpersistent_relative");
}
else
} else
root[F("cmd")] = String(tmp);
break;
case 3: root[F("id")] = atoi(tmp); break;
Expand Down
4 changes: 2 additions & 2 deletions src/web/html/system.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
ml("tbody", {}, [
tr("Sunrise", new Date(obj.ts_sunrise * 1000).toLocaleString('de-DE')),
tr("Sunset", new Date(obj.ts_sunset * 1000).toLocaleString('de-DE')),
tr("Communication start", new Date((obj.ts_sunrise - obj.ts_offset) * 1000).toLocaleString('de-DE')),
tr("Communication stop", new Date((obj.ts_sunset + obj.ts_offset) * 1000).toLocaleString('de-DE')),
tr("Communication start", new Date((obj.ts_sunrise - obj.ts_offsSr) * 1000).toLocaleString('de-DE')),
tr("Communication stop", new Date((obj.ts_sunset + obj.ts_offsSs) * 1000).toLocaleString('de-DE')),
tr("Night behaviour", badge(obj.disNightComm, ((obj.disNightComm) ? "not" : "") + " communicating", "warning"))
])
)
Expand Down

0 comments on commit 3dd4997

Please sign in to comment.