|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
3 #ifndef _BUTTONCONTROLLER_h
4 #define _BUTTONCONTROLLER_h
6 #if defined(ARDUINO) && ARDUINO >= 100
24 #define CONTROLLER_CLASS_NAME ButtonController
40 void loop ()
override;
74 const size_t capacity = JSON_OBJECT_SIZE (10);
75 DynamicJsonDocument json (capacity);
76 json[
"status"] =
"start";
79 snprintf (version_buf, 10,
"%d.%d.%d",
81 json[
"version"] = String (version_buf);
nodeMessageType
Message code definition.
void loop() override
This should be called periodically for module handling.
static const uint8_t ENIGMAIOT_PROT_VERS[3]
EnitmaIoT Version.
bool sendJson(DynamicJsonDocument &json)
Sends a JSON encoded message to lower layer.
void configManagerStart() override
Called when wifi manager starts config portal.
bool sendStartAnouncement() override
Send a message to notify node has started running.
bool saveConfig() override
Saves output module configuration.
Home Assistant trigger integration.
void connectInform()
Used to notify controller that it is registered on EnigmaIOT network.
bool sendCommandResp(const char *command, bool result) override
Sends command processing response acknowledge.
void configManagerExit(bool status) override
Called when wifi manager exits config portal.
Main node class. Manages communication with gateway and allows sending and receiving user data.
void setup(EnigmaIOTNodeClass *node, void *data=NULL)
Initialize data structures.
Prototype for JSON/MSGPACK based controller node.
bool processRxCommand(const uint8_t *address, const uint8_t *buffer, uint8_t length, nodeMessageType_t command, nodePayloadEncoding_t payloadEncoding) override
Called to process a downlink command.
bool loadConfig() override
Loads output module configuration.