User Manual

111
111
112
112
113
113
113
114
114
115
115
115
116
116
116
117
117
122
122
122
122
123
123
124
124
124
125
130
130
130
130
131
131
132
132
132
133
133
138
138
bool connect ( IPAddress ip, uint16_t port = 1883, bool cleanSession = true, uint16_t keepalive_sec =
MQTT_KEEPALIVE_DEFAULT);
bool connect ( const char* host, uint16_t port = 1883, bool cleanSession = true, uint16_t keepalive_sec =
MQTT_KEEPALIVE_DEFAULT);
bool connectSSL ( IPAddress ip, uint16_t port = 8883, bool cleanSession = true, uint16_t keepalive_sec =
MQTT_KEEPALIVE_DEFAULT)
bool connectSSL ( const char* host, uint16_t port = 8883, bool cleanSession = true, uint16_t keepalive_sec =
MQTT_KEEPALIVE_DEFAULT)
bool disconnect (void)
Messaging
bool publish ( UTF8String topic, UTF8String message, uint8_t qos = MQTT_QOS_AT_MOST_ONCE, bool
retained = false );
bool subscribe ( const char* topicFilter, uint8_t qos, messageHandler mh);
Subscribe Callback Handler(s)
Callback Handler Parameters
bool unsubscribe( const char* topicFilter );
Last Will
void will ( const char* topic, UTF8String message, uint8_t qos = MQTT_QOS_AT_MOST_ONCE, uint8_t
retained = 0);
Client ID
void clientID(const char* client)
Disconnect Callback
AdafruitMQTT Example
AdafruitMQTTTopic
Constructor
Functions
void retain (bool on)
Subscribe Callbacks
bool subscribe (messageHandler_t mh)
bool unsubscribe (void)
bool subscribed (void)
Publishing Data via 'Print'
Example
AdafruitAIO
Constructor
Functions
Connecting
bool connect (bool cleanSession = true, uint16_t keepalive_sec = MQTT_KEEPALIVE_DEFAULT)
bool connectSSL (bool cleanSession = true, uint16_t keepalive_sec = MQTT_KEEPALIVE_DEFAULT)
Feed Management
bool updateFeed ( const char* feed, UTF8String message, uint8_t qos=MQTT_QOS_AT_MOST_ONCE, bool
retain=true )
bool followFeed ( const char* feed, uint8_t qos, messageHandler_t mh )
bool unfollowFeed ( const char* feed )
Example
AdafruitAIOFeed
Constructor
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 7 of 202