fix opener rssi publish interval, add further check to make sure commands aren't executed after reconnect

This commit is contained in:
technyon
2023-01-23 21:44:03 +01:00
parent 22d365d1db
commit 899cfc026f
8 changed files with 27 additions and 16 deletions

View File

@@ -44,7 +44,7 @@ public:
void publishPresenceDetection(char* csv);
MqttClient* mqttClient();
bool isMqttConnected();
int mqttConnectionState(); // 0 = not connected; 1 = connected; 2 = connected and mqtt processed
const NetworkDeviceType networkDeviceType();
@@ -60,7 +60,7 @@ private:
Preferences* _preferences;
String _hostname;
NetworkDevice* _device = nullptr;
bool _mqttConnected = false;
int _mqttConnectionState = 0;
unsigned long _nextReconnect = 0;
char _mqttBrokerAddr[101] = {0};