Files
WLED_MM_Infinity/wled00/src/dependencies/alexa-multiple/Switch.h
cschwinne 60530a2931 Created dependency subfolder
(this eases compilation since all libraries are included except the ESP8266 core and NeoPixelBus)
Disabled serial debug output of Alexa library, may be re-enabled in .h-Files ifneedbe
Added &SR= to set random hue
Added &ST= to manually set time without NTP
Secondary color buttons now functional
Shifted effect by 1, range is now 1-25
Effect 0 is now the default boot setting
Fixed preset function not calling GIO() in js, which caused a delayed action
2017-12-11 23:59:12 +01:00

37 lines
920 B
C++

#ifndef SWITCH_H
#define SWITCH_H
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiUDP.h>
#include "CallbackFunction.h"
class Switch {
private:
ESP8266WebServer *server = NULL;
WiFiUDP UDP;
String serial;
String persistent_uuid;
String device_name;
unsigned int localPort;
CallbackFunction onCallback;
CallbackFunction offCallback;
void startWebServer();
void handleEventservice();
void handleUpnpControl();
void handleRoot();
void handleSetupXml();
public:
Switch();
Switch(String alexaInvokeName, unsigned int port, CallbackFunction onCallback, CallbackFunction offCallback);
~Switch();
String getAlexaInvokeName();
void serverLoop();
void respondToSearch(IPAddress& senderIP, unsigned int senderPort);
};
#endif