better fix for presence detection

This commit is contained in:
technyon
2022-06-12 10:52:01 +02:00
parent 6ee529b2d9
commit 584eb031d5
6 changed files with 14 additions and 13 deletions

View File

@@ -20,5 +20,6 @@ public:
virtual bool isConnected() = 0;
protected:
const uint16_t _mqttMaxBufferSize = 16384;
const String _hostname;
};

View File

@@ -38,6 +38,7 @@ void W5500Device::initialize()
Ethernet.init(ETHERNET_CS_PIN);
_ethClient = new EthernetClient();
_mqttClient = new PubSubClient(*_ethClient);
_mqttClient->setBufferSize(_mqttMaxBufferSize);
reconnect();

View File

@@ -47,6 +47,8 @@ void WifiDevice::initialize()
Serial.print(F("WiFi connected: "));
Serial.println(WiFi.localIP().toString());
}
_mqttClient.setBufferSize(_mqttMaxBufferSize);
}
void WifiDevice::reconfigure()