mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-10 18:31:01 +00:00
Automatic reboot when MQTT is lost (#1058)
* Fixing board type overwrite, zmartcharge default issues and disabling entsoe * Fixed Zmartcharge configuration issue * Option to auto reboot if MQTT connection is lost
This commit is contained in:
@@ -383,7 +383,7 @@ bool RawMqttHandler::publishRaw(String data) {
|
||||
}
|
||||
|
||||
void RawMqttHandler::onMessage(String &topic, String &payload) {
|
||||
if(strncmp(topic.c_str(), mqttConfig.subscribeTopic, 12) == 0) {
|
||||
if(topic.equals(subTopic)) {
|
||||
if(payload.equals("fwupgrade")) {
|
||||
if(strcmp(updater->getNextVersion(), FirmwareVersion::VersionString) != 0) {
|
||||
updater->setTargetVersion(updater->getNextVersion());
|
||||
|
||||
Reference in New Issue
Block a user