34 lines
683 B
C++
34 lines
683 B
C++
#ifndef Domoticz_h
|
|
#define Domoticz_h
|
|
|
|
//#include <Arduino.h>
|
|
#include <WiFi.h>
|
|
#include "Params.h"
|
|
#include "Arduino_JSON.h"
|
|
|
|
#define WL_MAC_ADDR_LENGTH 8
|
|
class Domoticz
|
|
{
|
|
public:
|
|
Domoticz(String domoticz, String port, const char* ssid, const char* pass);
|
|
boolean connect();
|
|
void close();
|
|
void initWifi();
|
|
void executeJson(String json, String svalue, String nvalue);
|
|
String generateKey();
|
|
static String getIndexOfString(String data, String separator, int index);
|
|
private:
|
|
|
|
const char* _ssid;
|
|
const char* _pass;
|
|
public:
|
|
WiFiClient _client;
|
|
int _iport;
|
|
String _domoticz;
|
|
String _port;
|
|
char _domoc[];
|
|
|
|
};
|
|
|
|
#endif
|