23 #include "AdafruitIO_Group.h" 25 #include "Adafruit_MQTT.h" 27 #include "ArduinoHttpClient.h" 28 #include "util/AdafruitIO_Board.h" 30 #ifndef ADAFRUIT_MQTT_VERSION_MAJOR 32 "This sketch requires Adafruit MQTT Library v1.0.0 or higher. Please install or upgrade using the Library Manager." 35 #if ADAFRUIT_MQTT_VERSION_MAJOR == 1 && ADAFRUIT_MQTT_VERSION_MINOR < 0 37 "This sketch requires Adafruit MQTT Library v1.0.0 or higher. Please install or upgrade using the Library Manager." 149 const char *
_host =
"io.adafruit.com";
165 Adafruit_MQTT_Subscribe
167 Adafruit_MQTT_Subscribe
174 #endif // ADAFRUITIO_H void wifi_disconnect()
Disconnects from WiFi.
Definition: AdafruitIO.cpp:176
virtual void _connect()=0
Establishes a connection with the Adafruit IO MQTT broker.
Class for interacting with Adafruit IO.
Definition: AdafruitIO.h:45
uint16_t _mqtt_port
Definition: AdafruitIO.h:150
const char * _username
Definition: AdafruitIO.h:158
AdafruitIO_Dashboard * dashboard(const char *name)
Create a new AIO dashboard.
Definition: AdafruitIO.cpp:242
aio_status_t _status
Definition: AdafruitIO.h:138
uint16_t _http_port
Definition: AdafruitIO.h:153
virtual void _disconnect()=0
Disconnects from the Adafruit IO MQTT broker.
void connect()
Connects to AIO, setting up using parameters set when the class is instantiated.
Definition: AdafruitIO.cpp:146
uint16_t _mqtt_eth_port
Definition: AdafruitIO.h:151
aio_status_t status()
Status check.
Definition: AdafruitIO.cpp:356
Class for interacting with Adafruit IO Dashboards. https://io.adafruit.com/api/docs/#dashboards.
Definition: AdafruitIO_Dashboard.h:41
char * _throttle_topic
Definition: AdafruitIO.h:162
aio_time_format_t format
Definition: AdafruitIO_Time.h:44
aio_status_t run(uint16_t busywait_ms=0, bool fail_fast=false)
Must be called frequently to keep AIO connections alive. When called with no arguments run() will try...
Definition: AdafruitIO.cpp:309
aio_time_format_t
Definition: AdafruitIO_Definitions.h:165
AdafruitIO_Group * group(const char *name)
Create a new AIO group.
Definition: AdafruitIO.cpp:230
Class that provides methods for interfacing with Adafruit IO feed topics. https://io.adafruit.com/api/docs/mqtt.html#mqtt-topics.
Definition: AdafruitIO_Feed.h:34
char * _user_agent
Definition: AdafruitIO.h:163
aio_status_t mqttStatus(bool fail_fast=false)
Returns MQTT connection status.
Definition: AdafruitIO.cpp:428
char * userAgent()
Identify the user agent.
Definition: AdafruitIO.cpp:404
AdafruitIO(const char *user, const char *key)
Instantiate the AIO object.
Definition: AdafruitIO.cpp:47
Adafruit_MQTT * _mqtt
Definition: AdafruitIO.h:144
uint32_t _last_mqtt_connect
Definition: AdafruitIO.h:141
uint16_t _packetread_timeout
Definition: AdafruitIO.h:155
Class that contains functions for interacting with the Adafruit IO Time Service.
Definition: AdafruitIO_Time.h:36
char _version[10]
Definition: AdafruitIO.h:147
friend class AdafruitIO_Block
AdafruitIO_Block addition.
Definition: AdafruitIO.h:68
const char * boardType()
Identify the board type.
Definition: AdafruitIO.cpp:384
uint32_t _last_ping
Definition: AdafruitIO.h:139
char * _err_topic
Definition: AdafruitIO.h:161
AdafruitIO_Time * time(aio_time_format_t format)
Create a new AIO time.
Definition: AdafruitIO.cpp:218
AdafruitIO_Feed * feed(const char *name)
Create a new AIO feed.
Definition: AdafruitIO.cpp:191
virtual const char * connectionType()=0
Returns the Adafruit IO network module connection type.
virtual aio_status_t networkStatus()=0
Returns network module status.
const __FlashStringHelper * statusText()
Provide status explanation strings.
Definition: AdafruitIO.cpp:253
Class for interacting with Adafruit IO Grouped Feeds https://io.adafruit.com/api/docs/mqtt.html#group-topics.
Definition: AdafruitIO_Group.h:30
const char * _host
Definition: AdafruitIO.h:149
char * boardID()
Identify the board.
Definition: AdafruitIO.cpp:376
aio_status_t
Definition: AdafruitIO_Definitions.h:142
const char * _key
Definition: AdafruitIO.h:159
HttpClient * _http
Definition: AdafruitIO.h:145
Adafruit_MQTT_Subscribe * _err_sub
Definition: AdafruitIO.h:166
Adafruit_MQTT_Subscribe * _throttle_sub
Definition: AdafruitIO.h:168
char * version()
Identify the software version.
Definition: AdafruitIO.cpp:392
virtual ~AdafruitIO()
Destructor to end the AIO object.
Definition: AdafruitIO.cpp:110