ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
InputAlexa.h
Go to the documentation of this file.
1#pragma once
2/*
3* InputAlexa.h
4*
5* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6* Copyright (c) 2021, 2025 Shelby Merrick
7* http://www.forkineye.com
8*
9* This program is provided free for you to use in any way that you wish,
10* subject to the laws and regulations where you are using it. Due diligence
11* is strongly suggested before using this code. Please give credit where due.
12*
13* The Author makes no warranty of any kind, express or implied, with regard
14* to this program or the documentation contained in this document. The
15* Author shall not be liable in any event for incidental or consequential
16* damages in connection with, or arising out of, the furnishing, performance
17* or use of these programs.
18*
19*/
20
21#include "InputCommon.hpp"
22#include "WebMgr.hpp"
23
25{
26 public:
27
29 c_InputMgr::e_InputChannelIds NewInputChannelId,
30 c_InputMgr::e_InputType NewChannelType,
31 uint32_t BufferSize);
32
33 virtual ~c_InputAlexa ();
34
35 // functions to be provided by the derived class
36 void Begin ();
37 bool SetConfig (JsonObject& jsonConfig);
38 void GetConfig (JsonObject& jsonConfig);
39 void GetStatus (JsonObject& jsonStatus);
40 void Process ();
41 void GetDriverName (String& sDriverName) { sDriverName = "Alexa"; }
42 void SetBufferInfo (uint32_t BufferSize);
43
44private:
45
46 Ticker mqttTicker; // Ticker to handle MQTT
48
50 void onMessage (EspalexaDevice* pDevice);
51
52 void load ();
53 void save ();
54
55 const char* ON = "ON";
56 const char* OFF = "OFF";
57
58 bool stateOn = false;
59
60};
Definition InputAlexa.h:25
void save()
Save configuration to File System.
Ticker mqttTicker
Definition InputAlexa.h:46
void load()
Load configuration from File System.
void Process()
Call from loop(), renders Input data.
Definition InputAlexa.cpp:103
void SetBufferInfo(uint32_t BufferSize)
Definition InputAlexa.cpp:116
bool SetConfig(JsonObject &jsonConfig)
Set a new config in the driver.
Definition InputAlexa.cpp:131
const char * ON
Definition InputAlexa.h:55
void GetConfig(JsonObject &jsonConfig)
Get the current config used by the driver.
Definition InputAlexa.cpp:85
c_InputCommon * pEffectsEngine
Definition InputAlexa.h:47
c_InputAlexa(c_InputMgr::e_InputChannelIds NewInputChannelId, c_InputMgr::e_InputType NewChannelType, uint32_t BufferSize)
Definition InputAlexa.cpp:31
void Begin()
set up the operating environment based on the current config (or defaults)
Definition InputAlexa.cpp:62
const char * OFF
Definition InputAlexa.h:56
void GetStatus(JsonObject &jsonStatus)
Definition InputAlexa.cpp:95
virtual ~c_InputAlexa()
Definition InputAlexa.cpp:44
void onMessage(EspalexaDevice *pDevice)
Definition InputAlexa.cpp:155
void GetDriverName(String &sDriverName)
get the name for the instantiated driver
Definition InputAlexa.h:41
void validateConfiguration()
Definition InputAlexa.cpp:141
bool stateOn
Definition InputAlexa.h:58
Definition InputCommon.hpp:27
e_InputType
Definition InputMgr.hpp:71
e_InputChannelIds
Definition InputMgr.hpp:40