|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
9 using namespace placeholders;
32 #if SUPPORT_HA_DISCOVERY
47 DEBUG_DBG (
"Finish begin");
58 if (!buttonPressSent && enigmaIotNode->isRegistered ()) {
59 const size_t capacity = JSON_OBJECT_SIZE (2);
60 DynamicJsonDocument json (capacity);
63 if (sendJson (json)) {
64 DEBUG_WARN (
"Button press sent");
65 buttonPressSent =
true;
67 DEBUG_WARN (
"Error sending message");
86 DEBUG_INFO (
"==== CCost Controller Configuration start ====");
91 DEBUG_INFO (
"==== CCost Controller Configuration result ====");
105 #if SUPPORT_HA_DISCOVERY
111 uint8_t* msgPackBuffer;
114 DEBUG_WARN (
"JSON object instance does not exist");
129 msgPackBuffer = (uint8_t*)malloc (bufferLen);
133 DEBUG_DBG (
"Resulting MSG pack length: %d", len);
135 if (!sendHADiscovery (msgPackBuffer, len)) {
136 DEBUG_WARN (
"Error sending HA discovery message");
144 free (msgPackBuffer);
147 #endif // SUPPORT_HA_DISCOVERY
size_t measureMessage()
Gets needed buffer size for discovery message.
nodeMessageType
Message code definition.
size_t getAnounceMessage(int bufferlen, uint8_t *buffer)
Gets entity anounce message to be sent over EnigmaIOT message.
void setSubtype(ha_triggerSubtype_t subtype)
Set trigger subtype as ha_triggerSubtype_t https://www.home-assistant.io/integrations/device_trigger....
virtual void connectInform()
Used to notify controller that it is registered on EnigmaIOT network.
void loop() override
This should be called periodically for module handling.
void configManagerStart() override
Called when wifi manager starts config portal.
bool saveConfig() override
Saves output module configuration.
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.
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.
void setType(ha_triggerType_t type)
Set trigger type as ha_triggerType_t https://www.home-assistant.io/integrations/device_trigger....