Added HTTP REST API.

This commit is contained in:
2019-06-12 20:57:31 +02:00
parent 308196d185
commit bfe46220ca
5 changed files with 108 additions and 6 deletions

View File

@ -24,6 +24,9 @@
#define NTP_INTERVAL 300000 // Interval in ms to update the time from the NTP server. 300000 ms = 5 minutes
#define NTP_OFFSET 7200 // Offset of your local time from UTC in seconds. Germany, daylight savings time = 2 hours = 7200 seconds
#define HTTP_SERVER_ENABLE
#define HTTP_SERVER_PORT 80
#define MQTT_ENABLE // Use MQTT. Add slashes to the start of the line to disable MQTT completely.
#define MQTT_SERVER "..." // Data for connecting to the MQTT server
#define MQTT_PORT 1883

11
include/http_server.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#include "config.h"
#ifdef HTTP_SERVER_ENABLE
#include <ESP8266WebServer.h>
extern ESP8266WebServer http_server;
void http_server_setup();
void http_server_loop();
#endif