mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +02:00
parent
3e6693ff30
commit
96eb32ca63
2 changed files with 4 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
||||||
## 0.5.103
|
## 0.5.103
|
||||||
* merged MI improvements, thx @rejoe2 #778
|
* merged MI improvements, thx @rejoe2 #778
|
||||||
* changed display inverter online message
|
* changed display inverter online message
|
||||||
|
* merged heap improvements #772
|
||||||
|
|
||||||
## 0.5.102
|
## 0.5.102
|
||||||
* Warning: old exports are not compatible any more!
|
* Warning: old exports are not compatible any more!
|
||||||
|
|
|
@ -210,7 +210,7 @@ class PubMqtt {
|
||||||
DPRINTLN(DBG_VERBOSE, F("sendMqttDiscoveryConfig"));
|
DPRINTLN(DBG_VERBOSE, F("sendMqttDiscoveryConfig"));
|
||||||
|
|
||||||
char topic[64], name[32], uniq_id[32];
|
char topic[64], name[32], uniq_id[32];
|
||||||
StaticJsonDocument<256> doc;
|
DynamicJsonDocument doc(256);
|
||||||
|
|
||||||
uint8_t fldTotal[4] = {FLD_PAC, FLD_YT, FLD_YD, FLD_PDC};
|
uint8_t fldTotal[4] = {FLD_PAC, FLD_YT, FLD_YD, FLD_PDC};
|
||||||
const char* unitTotal[4] = {"W", "kWh", "Wh", "W"};
|
const char* unitTotal[4] = {"W", "kWh", "Wh", "W"};
|
||||||
|
@ -267,7 +267,7 @@ class PubMqtt {
|
||||||
stateCls = getFieldStateClass(fldTotal[i]);
|
stateCls = getFieldStateClass(fldTotal[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticJsonDocument<512> doc2;
|
DynamicJsonDocument doc2(512);
|
||||||
doc2[F("name")] = name;
|
doc2[F("name")] = name;
|
||||||
doc2[F("stat_t")] = String(mCfgMqtt->topic) + "/" + ((!total) ? String(iv->config->name) : "total" ) + String(topic);
|
doc2[F("stat_t")] = String(mCfgMqtt->topic) + "/" + ((!total) ? String(iv->config->name) : "total" ) + String(topic);
|
||||||
doc2[F("unit_of_meas")] = ((!total) ? (iv->getUnit(i,rec)) : (unitTotal[i]));
|
doc2[F("unit_of_meas")] = ((!total) ? (iv->getUnit(i,rec)) : (unitTotal[i]));
|
||||||
|
@ -359,7 +359,7 @@ class PubMqtt {
|
||||||
if(NULL == mSubscriptionCb)
|
if(NULL == mSubscriptionCb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StaticJsonDocument<128> json;
|
DynamicJsonDocument json(128);
|
||||||
JsonObject root = json.to<JsonObject>();
|
JsonObject root = json.to<JsonObject>();
|
||||||
|
|
||||||
bool limitAbs = false;
|
bool limitAbs = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue