43 lines
1.0 KiB
C++
Executable File
43 lines
1.0 KiB
C++
Executable File
#ifndef Domoticz_h
|
|
#define Domoticz_h
|
|
|
|
#include <ESP8266WiFi.h>
|
|
#include "Params.h"
|
|
|
|
//IPAddress ip(192, 168, 1, 222);
|
|
|
|
class Domoticz
|
|
{
|
|
public:
|
|
Domoticz(String domoticz, String port, const char* ssid, const char* pass);
|
|
boolean connect();
|
|
void close();
|
|
void initWifi();
|
|
void initWifiStatic(IPAddress ip, IPAddress gateway, IPAddress subnet, IPAddress DNS);
|
|
void executeJson(String json, String svalue, String nvalue);
|
|
//String getIdFromDomoticz();
|
|
String generateKey();
|
|
IPAddress getIP(String macId);
|
|
String readLine();
|
|
void readResponse();
|
|
String readVcc();
|
|
void readTempDayValues(String idx);
|
|
void getIdFromDomoticz(String macID, Params * params);
|
|
int strToHex(char str[]);
|
|
|
|
static String getIndexOfString(String data, String separator, int index);
|
|
private:
|
|
|
|
const char* _ssid;
|
|
const char* _pass;
|
|
public:
|
|
WiFiClient _client;
|
|
char _domoc[];
|
|
int _iport;
|
|
String _domoticz;
|
|
String _port;
|
|
|
|
};
|
|
|
|
#endif
|