31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
// #ifndef __AMQTT__
|
|
// #define __AMQTT__
|
|
// //#include <main.h>
|
|
// #include <Arduino.h>
|
|
// #include <ArduinoOTA.h>
|
|
// #include <Ticker.h>
|
|
// #include <AsyncMqttClient.h>
|
|
|
|
// const char* ssid = "wf-home";
|
|
// const char* password = "0ndthnrf";
|
|
// const char* mqtt_server = "192.168.1.250";
|
|
|
|
// AsyncMqttClient mqttClient;
|
|
// Ticker mqttReconnectTimer;
|
|
|
|
// WiFiEventHandler wifiConnectHandler;
|
|
// WiFiEventHandler wifiDisconnectHandler;
|
|
// Ticker wifiReconnectTimer;
|
|
|
|
// void connectToWifi();
|
|
// void connectToMqtt();
|
|
// void onWifiConnect(const WiFiEventStationModeGotIP& event);
|
|
// void onWifiDisconnect(const WiFiEventStationModeDisconnected& event);
|
|
// void onMqttConnect(bool sessionPresent);
|
|
// void onMqttDisconnect(AsyncMqttClientDisconnectReason reason);
|
|
// void onMqttSubscribe(uint16_t packetId, uint8_t qos);
|
|
// void onMqttUnsubscribe(uint16_t packetId);
|
|
// void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total);
|
|
// void onMqttPublish(uint16_t packetId);
|
|
// #endif
|