Added HTTP REST API.
This commit is contained in:
@ -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
11
include/http_server.h
Normal 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
|
Reference in New Issue
Block a user