23 if (res->
argc() == 1) {
28 Serial.println(
"WIFI CONNECTED");
30 Serial.print(
"WIFI NOT READY: ");
40 Serial.println(
"MQTT connected!");
41 mqtt.subscribe(
"/esp-link/1");
42 mqtt.subscribe(
"/hello/world/#");
50 Serial.println(
"MQTT disconnected");
58 Serial.print(
"Received: topic=");
68 Serial.println(
"MQTT published");
73 Serial.println(
"EL-Client starting!");
82 if (!ok)
Serial.println(
"EL-Client sync failed!");
84 Serial.println(
"EL-Client synced!");
96 Serial.println(
"EL-MQTT ready");
105 if (
connected && (millis()-last) > 4000) {
106 Serial.println(
"publishing");
109 itoa(count++, buf, 10);
110 mqtt.publish(
"/esp-link/1", buf);
112 itoa(count+99, buf, 10);
113 mqtt.publish(
"/hello/world/arduino", buf);
115 uint32_t t = cmd.GetTime();
Definitions for ELClientCmd.
Definitions for ELClientMqtt.
Definitions for ELClient.
String popString()
Extract a string from the response packet.
int16_t popArg(void *data, uint16_t maxLen)
Extract an argument from the response packet.
void mqttConnected(void *response)
void wifiCb(void *response)
void mqttData(void *response)
void mqttPublished(void *response)
void mqttDisconnected(void *response)