smartPOC-tx/include/mowas.h
cheetah c3e574f443
Some checks failed
build / build (push) Has been cancelled
moved files to include
2025-03-30 17:11:51 +02:00

33 lines
No EOL
686 B
C++

#if !defined(_MOWAS_H)
#define _MOWAS_H
#include <WiFiClient.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
class MoWaSClient
{
public:
WiFiClient *_client;
String currentMessage;
explicit MoWaSClient(WiFiClient *client);
void begin(int intervalMinutes, String region);
bool check();
void loop();
bool isDirty();
private:
bool _dirty;
unsigned long lastCheck = 0;
unsigned long checkInterval = 300000;
String lastMessage;
String dashboardData;
String dashboardUrl;
String warningUrl;
HTTPClient _http;
String parseDashboard(String jsonData);
String extractTagContent(String source, String tag);
};
#endif