|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
3 #ifndef _DS18B20CONTROLLER_h
4 #define _DS18B20CONTROLLER_h
6 #if defined(ARDUINO) && ARDUINO >= 100
19 #define CONTROLLER_CLASS_NAME ds18b20Controller
22 #if SUPPORT_HA_DISCOVERY
29 #include <DallasTemperature.h>
83 const size_t capacity = JSON_OBJECT_SIZE (10);
84 DynamicJsonDocument json (capacity);
85 json[
"status"] =
"start";
88 snprintf (version_buf, 10,
"%d.%d.%d",
90 json[
"version"] = String (version_buf);
95 #if SUPPORT_HA_DISCOVERY
void configManagerStart()
Called when wifi manager starts config portal.
nodeMessageType
Message code definition.
void loop()
This should be called periodically for module handling.
static const uint8_t ENIGMAIOT_PROT_VERS[3]
EnitmaIoT Version.
bool processRxCommand(const uint8_t *address, const uint8_t *buffer, uint8_t length, nodeMessageType_t command, nodePayloadEncoding_t payloadEncoding)
Called to process a downlink command.
bool saveConfig()
Saves output module configuration.
static const char * CONTROLLER_NAME
bool sendJson(DynamicJsonDocument &json)
Sends a JSON encoded message to lower layer.
bool sendCommandResp(const char *command, bool result)
Sends command processing response acknowledge.
Home Assistant sensor integration.
DeviceAddress insideThermometer
void connectInform()
Used to notify controller that it is registered on EnigmaIOT network.
void configManagerExit(bool status)
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 sendStartAnouncement()
Send a message to notify node has started running.
bool sendTemperature(float temp)
DallasTemperature * sensors
bool loadConfig()
Loads output module configuration.