mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-30 02:36:20 +02:00
0.7.26 release
fix MqTT `last_success`
This commit is contained in:
parent
bab700c069
commit
cbdb15050f
4 changed files with 10 additions and 27 deletions
|
@ -1,17 +1,3 @@
|
||||||
Changelog v0.7.25
|
Changelog v0.7.26
|
||||||
|
|
||||||
* ✨ added 'HMS' and 'HMT' support with 'CMT2300A' radio module and `ESP32`
|
* fix MqTT `last_success`
|
||||||
* improved MqTT
|
|
||||||
* added more display types
|
|
||||||
* changed maximum number of inverters: ESP32: `16`, ESP8266: `4`
|
|
||||||
* added option to connect to hidden SSID WiFi
|
|
||||||
* AP password is configurable now
|
|
||||||
* add option to communicate with inverters even if no time sync is possible
|
|
||||||
* add option to reboot Ahoy perodically at midnight
|
|
||||||
* add time, date and Ahoy-Version number to JSON export
|
|
||||||
* changed date-time format to ISO format in web UI
|
|
||||||
* added inverter state machine to archive better its state
|
|
||||||
* added for NTP sync more info to web UI about the sync itself
|
|
||||||
* increased to latest library versions (MqTT, RF24 and JSON)
|
|
||||||
* minor UI improvements
|
|
||||||
* several bug fixes
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 7
|
#define VERSION_MINOR 7
|
||||||
#define VERSION_PATCH 25
|
#define VERSION_PATCH 26
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -471,7 +471,6 @@ class PubMqtt {
|
||||||
bool anyAvail = false; // shows if at least one enabled inverter is available
|
bool anyAvail = false; // shows if at least one enabled inverter is available
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
Inverter<> *iv;
|
Inverter<> *iv;
|
||||||
record_t<> *rec;
|
|
||||||
|
|
||||||
for (uint8_t id = 0; id < mSys->getNumInverters(); id++) {
|
for (uint8_t id = 0; id < mSys->getNumInverters(); id++) {
|
||||||
iv = mSys->getInverterByPos(id);
|
iv = mSys->getInverterByPos(id);
|
||||||
|
@ -480,17 +479,10 @@ class PubMqtt {
|
||||||
if (!iv->config->enabled)
|
if (!iv->config->enabled)
|
||||||
continue; // skip to next inverter
|
continue; // skip to next inverter
|
||||||
|
|
||||||
rec = iv->getRecordStruct(RealTimeRunData_Debug);
|
|
||||||
|
|
||||||
// inverter status
|
// inverter status
|
||||||
iv->isProducing(); // recalculate status
|
iv->isProducing(); // recalculate status
|
||||||
if (InverterStatus::OFF < iv->status) {
|
if (InverterStatus::OFF < iv->status)
|
||||||
anyAvail = true;
|
anyAvail = true;
|
||||||
|
|
||||||
snprintf(mSubTopic, 32 + MAX_NAME_LENGTH, "%s/last_success", iv->config->name);
|
|
||||||
snprintf(mVal, 40, "%d", iv->getLastTs(rec));
|
|
||||||
publish(mSubTopic, mVal, true);
|
|
||||||
}
|
|
||||||
else // inverter is enabled but not available
|
else // inverter is enabled but not available
|
||||||
allAvail = false;
|
allAvail = false;
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,11 @@ class PubMqttIvData {
|
||||||
|
|
||||||
mPos = 0;
|
mPos = 0;
|
||||||
if(found) {
|
if(found) {
|
||||||
|
record_t<> *rec = mIv->getRecordStruct(mCmd);
|
||||||
|
snprintf(mSubTopic, 32 + MAX_NAME_LENGTH, "%s/last_success", mIv->config->name);
|
||||||
|
snprintf(mVal, 40, "%d", mIv->getLastTs(rec));
|
||||||
|
mPublish(mSubTopic, mVal, true);
|
||||||
|
|
||||||
mIv->isProducing(); // recalculate status
|
mIv->isProducing(); // recalculate status
|
||||||
mState = SEND_DATA;
|
mState = SEND_DATA;
|
||||||
} else if(mSendTotals && mTotalFound)
|
} else if(mSendTotals && mTotalFound)
|
||||||
|
|
Loading…
Add table
Reference in a new issue