|
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
46 if (!(enigmaIotNode->getNode ()->getSleepy ())) {
47 sendStartAnouncement ();
50 DEBUG_DBG (
"Finish begin");
76 DEBUG_INFO (
"==== CCost Controller Configuration start ====");
81 DEBUG_INFO (
"==== CCost Controller Configuration result ====");
95 #if SUPPORT_HA_DISCOVERY
101 uint8_t* msgPackBuffer;
104 DEBUG_WARN (
"JSON object instance does not exist");
119 msgPackBuffer = (uint8_t*)malloc (bufferLen);
123 DEBUG_INFO (
"Resulting MSG pack length: %d", len);
125 if (!sendHADiscovery (msgPackBuffer, len)) {
126 DEBUG_WARN (
"Error sending HA discovery message");
134 free (msgPackBuffer);
137 #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.
constexpr auto CONFIG_FILE
Custom configuration file name.
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....