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#include "InputEffectEngine.hpp"
24
26{
27 public:
28
30 c_InputMgr::e_InputChannelIds NewInputChannelId,
31 c_InputMgr::e_InputType NewChannelType,
32 uint32_t BufferSize);
33
34 virtual ~c_InputAlexa ();
35
36 // functions to be provided by the derived class
37 void Begin ();
38 bool SetConfig (JsonObject& jsonConfig);
39 void GetConfig (JsonObject& jsonConfig);
40 void GetStatus (JsonObject& jsonStatus);
41 void Process ();
42 void GetDriverName (String& sDriverName) { sDriverName = "Alexa"; }
43 void SetBufferInfo (uint32_t BufferSize);
44
45private:
46
47 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;
61
62};
Definition InputAlexa.h:26
void save()
Save configuration to File System.
Ticker mqttTicker
Definition InputAlexa.h:47
void load()
Load configuration from File System.
void Process()
Call from loop(), renders Input data.
Definition InputAlexa.cpp:104
void SetBufferInfo(uint32_t BufferSize)
Definition InputAlexa.cpp:117
bool SetConfig(JsonObject &jsonConfig)
Set a new config in the driver.
Definition InputAlexa.cpp:132
const char * ON
Definition InputAlexa.h:55
void GetConfig(JsonObject &jsonConfig)
Get the current config used by the driver.
Definition InputAlexa.cpp:86
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:96
char InputEffectEngine[sizeof(c_InputEffectEngine)]
Definition InputAlexa.h:59
virtual ~c_InputAlexa()
Definition InputAlexa.cpp:44
c_InputEffectEngine * pEffectsEngine
Definition InputAlexa.h:60
void onMessage(EspalexaDevice *pDevice)
Definition InputAlexa.cpp:156
void GetDriverName(String &sDriverName)
get the name for the instantiated driver
Definition InputAlexa.h:42
void validateConfiguration()
Definition InputAlexa.cpp:142
bool stateOn
Definition InputAlexa.h:58
Definition InputCommon.hpp:27
Definition InputEffectEngine.hpp:25
e_InputType
Definition InputMgr.hpp:72
e_InputChannelIds
Definition InputMgr.hpp:40