2021-04-05 13:23:58 +02:00
|
|
|
#include "esp_system.h"
|
|
|
|
#if ESP_IDF_VERSION_MAJOR >= 4 && CONFIG_IDF_TARGET_ESP32
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
#include "RMakerNode.h"
|
|
|
|
#include "RMakerQR.h"
|
2021-04-22 11:59:27 +02:00
|
|
|
#include "RMakerUtils.h"
|
2021-04-05 13:23:58 +02:00
|
|
|
#include <esp_rmaker_standard_types.h>
|
|
|
|
|
|
|
|
class RMakerClass
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
esp_rmaker_config_t rainmaker_cfg = {false};
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
void setTimeSync(bool val);
|
|
|
|
Node initNode(const char *name, const char *type = "ESP RainMaker with Arduino");
|
|
|
|
esp_err_t deinitNode(Node node);
|
|
|
|
esp_err_t setTimeZone(const char *tz = "Asia/Shanghai");
|
|
|
|
esp_err_t enableSchedule();
|
2021-04-22 11:59:27 +02:00
|
|
|
esp_err_t enableTZService();
|
2021-04-05 13:23:58 +02:00
|
|
|
esp_err_t enableOTA(ota_type_t type, const char *cert = ESP_RMAKER_OTA_DEFAULT_SERVER_CERT);
|
|
|
|
esp_err_t start();
|
|
|
|
esp_err_t stop();
|
|
|
|
};
|
|
|
|
|
|
|
|
extern RMakerClass RMaker;
|
|
|
|
|
2021-04-22 11:59:27 +02:00
|
|
|
#endif
|