mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-26 01:53:35 +05:00
Compare commits
3 Commits
e7cae4b950
...
57f1129cee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57f1129cee | ||
|
|
0425cdc499 | ||
|
|
53ff69f03a |
@@ -197,14 +197,13 @@ protected:
|
|||||||
|
|
||||||
this->haHelper->setDevicePrefix(settings.mqtt.prefix);
|
this->haHelper->setDevicePrefix(settings.mqtt.prefix);
|
||||||
this->haHelper->updateCachedTopics();
|
this->haHelper->updateCachedTopics();
|
||||||
|
|
||||||
this->client->stop();
|
this->client->stop();
|
||||||
this->client->setId(networkSettings.hostname);
|
this->client->setId(networkSettings.hostname);
|
||||||
this->client->setUsernamePassword(settings.mqtt.user, settings.mqtt.password);
|
this->client->setUsernamePassword(settings.mqtt.user, settings.mqtt.password);
|
||||||
|
|
||||||
this->client->beginWill(this->haHelper->getDeviceTopic(F("status")).c_str(), 7, true, 1);
|
this->client->beginWill(this->haHelper->getDeviceTopic(F("status")).c_str(), 7, true, 1);
|
||||||
this->client->print(F("offline"));
|
this->client->print(F("offline"));
|
||||||
this->client->endWill();
|
this->client->endWill();
|
||||||
|
|
||||||
this->client->connect(settings.mqtt.server, settings.mqtt.port);
|
this->client->connect(settings.mqtt.server, settings.mqtt.port);
|
||||||
this->lastReconnectTime = millis();
|
this->lastReconnectTime = millis();
|
||||||
this->yield();
|
this->yield();
|
||||||
|
|||||||
@@ -602,6 +602,11 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dst.portal.auth && (!strlen(dst.portal.login) || !strlen(dst.portal.password))) {
|
||||||
|
dst.portal.auth = false;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// opentherm
|
// opentherm
|
||||||
if (!src[FPSTR(S_OPENTHERM)][FPSTR(S_UNIT_SYSTEM)].isNull()) {
|
if (!src[FPSTR(S_OPENTHERM)][FPSTR(S_UNIT_SYSTEM)].isNull()) {
|
||||||
|
|||||||
@@ -43,12 +43,12 @@
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<label>
|
<label>
|
||||||
<span data-i18n>settings.portal.login</span>
|
<span data-i18n>settings.portal.login</span>
|
||||||
<input type="text" name="portal[login]" maxlength="12" required>
|
<input type="text" name="portal[login]" maxlength="12">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<span data-i18n>settings.portal.password</span>
|
<span data-i18n>settings.portal.password</span>
|
||||||
<input type="password" name="portal[password]" maxlength="32" required>
|
<input type="password" name="portal[password]" maxlength="32">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<label>
|
<label>
|
||||||
<span data-i18n>settings.mqtt.user</span>
|
<span data-i18n>settings.mqtt.user</span>
|
||||||
<input type="text" name="mqtt[user]" maxlength="32" required>
|
<input type="text" name="mqtt[user]" maxlength="32">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
|||||||
Reference in New Issue
Block a user