Browse Source

0.5.100

fix add inverter `setup.html` #766
fix MQTT retained flag for total values #726
renamed buttons for import and export `setup.html`
added serial message `settings saved`
pull/769/head
lumapu 2 years ago
parent
commit
6da58e3505
  1. 6
      src/CHANGES.md
  2. 1
      src/app.h
  3. 1
      src/config/settings.h
  4. 2
      src/defines.h
  5. 6
      src/publisher/pubMqtt.h
  6. 6
      src/web/html/setup.html

6
src/CHANGES.md

@ -2,6 +2,12 @@
(starting from release version `0.5.66`)
## 0.5.100
* fix add inverter `setup.html` #766
* fix MQTT retained flag for total values #726
* renamed buttons for import and export `setup.html`
* added serial message `settings saved`
## 0.5.99
* fix limit in [User_Manual.md](../User_Manual.md)
* changed `contrast` to `luminance` in `setup.html`

1
src/app.h

@ -210,6 +210,7 @@ class app : public IApp, public ah::Scheduler {
onWifi(false);
ah::Scheduler::resetTicker();
WiFi.disconnect();
delay(200);
ESP.restart();
}

1
src/config/settings.h

@ -273,6 +273,7 @@ class settings {
}
fp.close();
DPRINTLN(DBG_INFO, F("settings saved"));
if(stopFs)
stop();

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 99
#define VERSION_PATCH 100
//-------------------------------------
typedef struct {

6
src/publisher/pubMqtt.h

@ -59,7 +59,7 @@ class PubMqtt {
if((strlen(mCfgMqtt->user) > 0) && (strlen(mCfgMqtt->pwd) > 0))
mClient.setCredentials(mCfgMqtt->user, mCfgMqtt->pwd);
snprintf(mClientId, 26, "%s-", mDevName);
snprintf(mClientId, 24, "%s-", mDevName);
uint8_t pos = strlen(mClientId);
mClientId[pos++] = WiFi.macAddress().substring( 9, 10).c_str()[0];
mClientId[pos++] = WiFi.macAddress().substring(10, 11).c_str()[0];
@ -582,8 +582,8 @@ class PubMqtt {
if (sendTotals) {
uint8_t fieldId;
bool retained = true;
for (uint8_t i = 0; i < 4; i++) {
bool retained = true;
switch (i) {
default:
case 0:
@ -635,7 +635,7 @@ class PubMqtt {
// last will topic and payload must be available trough lifetime of 'espMqttClient'
char mLwtTopic[MQTT_TOPIC_LEN+5];
const char *mDevName, *mVersion;
char mClientId[26]; // number of chars is limited to 23 up to v3.1 of MQTT
char mClientId[24]; // number of chars is limited to 23 up to v3.1 of MQTT
};
#endif /*__PUB_MQTT_H__*/

6
src/web/html/setup.html

@ -295,14 +295,14 @@
<div class="col-4 col-sm-9">
<form id="form" method="POST" action="/upload" enctype="multipart/form-data" accept-charset="utf-8">
<input type="file" name="upload">
<input type="button" class="btn" value="Upload" onclick="hide()">
<input type="button" class="btn" value="Import" onclick="hide()">
</form>
</div>
</div>
<div class="row mb-4 mt-4">
<div class="col-8 col-sm-3">Export</div>
<div class="col-4 col-sm-9">
<a class="btn" href="/get_setup" target="_blank">Download settings (JSON file)</a><span> (only values, passwords will be removed!)</span>
<a class="btn" href="/get_setup" target="_blank">Export settings (JSON file)</a><span> (only values, passwords will be removed!)</span>
</div>
</div>
</fieldset>
@ -368,7 +368,7 @@
document.getElementById("btnAdd").addEventListener("click", function() {
if(highestId <= (maxInv-1)) {
ivHtml(JSON.parse('{"enabled":true,"name":"","serial":"","channels":4,"ch_max_power":[0,0,0,0],"ch_name":["","","",""],"ch_yield_cor":[0,0,0,0]}'), highestId);
ivHtml(JSON.parse('{"enabled":true,"name":"","serial":"","channels":4,"ch_max_pwr":[0,0,0,0],"ch_name":["","","",""],"ch_yield_cor":[0,0,0,0]}'), highestId);
}
});

Loading…
Cancel
Save