mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-13 11:19:52 +03:00
Merge pull request #2806 from MichaelDvP/dev
small fixes,update changelog
This commit is contained in:
@@ -38,6 +38,7 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
|
||||
- added LWT (Last Will and Testament) to MQTT entities in Home Assistant
|
||||
- added api/metrics endpoint for prometheus integration by @gr3enk
|
||||
[#2774](https://github.com/emsesp/EMS-ESP32/pull/2774)
|
||||
- add RTL8201 to eth phy list [#2800](https://github.com/emsesp/EMS-ESP32/issues/2800)
|
||||
|
||||
## Fixed
|
||||
|
||||
@@ -77,3 +78,6 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
|
||||
- entities with no values are greyed out in the Web UI in the Customization page
|
||||
- added System Status to Web Status page
|
||||
- show number on entities and supported languages in log on boot
|
||||
- on tx read fail delay the 3rd. retry 2 sec
|
||||
- move vectors and lists to PSRAM
|
||||
-remove unused last topic/payload echo-check
|
||||
|
||||
@@ -29,13 +29,8 @@ static_assert(uuid::console::thread_safe, "uuid-console must be thread-safe");
|
||||
namespace emsesp {
|
||||
|
||||
// Static member definitions
|
||||
#ifndef EMSESP_STANDALONE
|
||||
std::vector<std::unique_ptr<EMSdevice>, AllocatorPSRAM<std::unique_ptr<EMSdevice>>> EMSESP::emsdevices{};
|
||||
std::vector<EMSESP::Device_record, AllocatorPSRAM<EMSESP::Device_record>> EMSESP::device_library_;
|
||||
#else
|
||||
std::vector<std::unique_ptr<EMSdevice>> EMSESP::emsdevices{};
|
||||
std::vector<EMSESP::Device_record> EMSESP::device_library_;
|
||||
#endif
|
||||
|
||||
uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN};
|
||||
uint16_t EMSESP::watch_id_ = WATCH_ID_NONE;
|
||||
|
||||
@@ -58,8 +58,6 @@ uint8_t Mqtt::connectcount_ = 0;
|
||||
uint32_t Mqtt::mqtt_message_id_ = 0;
|
||||
char will_topic_[Mqtt::MQTT_TOPIC_MAX_SIZE]; // because MQTT library keeps only char pointer
|
||||
|
||||
std::string Mqtt::lasttopic_ = "";
|
||||
std::string Mqtt::lastpayload_ = "";
|
||||
std::string Mqtt::lastresponse_ = "";
|
||||
|
||||
// Home Assistant specific
|
||||
@@ -244,12 +242,6 @@ void Mqtt::on_message(const char * topic, const uint8_t * payload, size_t len) {
|
||||
return;
|
||||
}
|
||||
|
||||
// for misconfigured mqtt servers and publish2command ignore echos
|
||||
if (publish_single_ && publish_single2cmd_ && lasttopic_ == topic && lastpayload_ == message) {
|
||||
LOG_DEBUG("Received echo message %s: %s", topic, message);
|
||||
return;
|
||||
}
|
||||
|
||||
// check first against any of our subscribed topics
|
||||
for (const auto & mf : mqtt_subfunctions_) {
|
||||
// add the base back
|
||||
|
||||
@@ -310,8 +310,6 @@ class Mqtt {
|
||||
static uint8_t connectcount_;
|
||||
static bool ha_climate_reset_;
|
||||
|
||||
static std::string lasttopic_;
|
||||
static std::string lastpayload_;
|
||||
static std::string lastresponse_;
|
||||
|
||||
// settings, copied over
|
||||
|
||||
@@ -64,7 +64,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject root) {
|
||||
si["time"] = scheduleItem.flags != SCHEDULEFLAG_SCHEDULE_IMMEDIATE ? scheduleItem.time : "";
|
||||
si["cmd"] = scheduleItem.cmd;
|
||||
si["value"] = scheduleItem.value;
|
||||
si["name"] = scheduleItem.name;
|
||||
si["name"] = (const char *)scheduleItem.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ void WebSchedulerService::publish(const bool force) {
|
||||
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name);
|
||||
|
||||
config["uniq_id"] = uniq_s;
|
||||
config["name"] = scheduleItem.name;
|
||||
config["name"] = (const char *)scheduleItem.name;
|
||||
config["def_ent_id"] = std::string("switch.") + uniq_s;
|
||||
|
||||
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user