-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Sergiu Toporjinschi edited this page Dec 11, 2018
·
1 revision
A wrapper over Wifi and MQTT.
Dependencies:
For details using SettingsManager please see the read.me file.
ESPManager(<string spiffConfFile>, <int mqttQOS>, <boolean sendStatus>);
- Initialise MQTT;
- Reading settings from SPIFFS;
- Configure WIFI as station;
addOutputEventHandler(<string mqttTopic>, <long intervalToSubmit>, <function executeFn> )
Will execute the executeFn in interval of intervalToSubmit and submit the returned value to mqttTopic topic;
- mqttTopic a string with mqtt topic;
- intervalToSubmit time to delay until next function trigger;
- executeFn a function which returns the string that will be sent over MQTT;
addInputEventHandler(<string mqttTopic>, <function onCall>)
Creates a listener on a specific MQTT topic and will execute the onCall when something has been submitted;
- mqttTopic a string with MQTT topic;
- onCall a void function;
createConnections()
Creates connections and starts the process.