Arduino Core 3 (#407)
* Add and remove libs and components for Arduino Core 3 * Arduino Core 3 * Add back Solo1 * Change ESP32-S3 to 4MB build * Update README.md * Fix retain and number of retries * Fix rolling log * Fix defaults * Fix BleScanner on Solo1 * Export settings * Import settings * Fix HA Battery voltage * Change submodule * Update espMqttClient and AsyncTCP * Webserial and MQTT/Network reconnecting * Update nuki_ble --------- Co-authored-by: iranl <iranl@github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ void NetworkDevice::printError()
|
||||
Log->println(ESP.getFreeHeap());
|
||||
}
|
||||
|
||||
#ifndef NUKI_HUB_UPDATER
|
||||
void NetworkDevice::update()
|
||||
{
|
||||
if (_mqttEnabled)
|
||||
@@ -40,6 +41,18 @@ void NetworkDevice::mqttSetCleanSession(bool cleanSession)
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkDevice::mqttSetKeepAlive(uint16_t keepAlive)
|
||||
{
|
||||
if (_useEncryption)
|
||||
{
|
||||
_mqttClientSecure->setKeepAlive(keepAlive);
|
||||
}
|
||||
else
|
||||
{
|
||||
_mqttClient->setKeepAlive(keepAlive);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t NetworkDevice::mqttPublish(const char *topic, uint8_t qos, bool retain, const char *payload)
|
||||
{
|
||||
return getMqttClient()->publish(topic, qos, retain, payload);
|
||||
@@ -158,4 +171,9 @@ MqttClient *NetworkDevice::getMqttClient() const
|
||||
{
|
||||
return _mqttClient;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void NetworkDevice::update()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user