You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can only publish QoS 0 messages. It can subscribe at QoS 0 or QoS 1.
The maximum message size, including header, is 256 bytes by default. This
is configurable via MQTT_MAX_PACKET_SIZE in PubSubClient.h or can be changed
by calling PubSubClient::setBufferSize(size).
The keepalive interval is set to 15 seconds by default. This is configurable
via MQTT_KEEPALIVE in PubSubClient.h or can be changed by calling
PubSubClient::setKeepAlive(keepAlive).
The client uses MQTT 3.1.1 by default. It can be changed to use MQTT 3.1 by
changing value of MQTT_VERSION in PubSubClient.h.
Compatible Hardware
The library uses the Arduino Ethernet Client api for interacting with the
underlying network hardware. This means it Just Works with a growing number of
boards and shields, including:
Arduino Ethernet
Arduino Ethernet Shield
Arduino YUN – use the included YunClient in place of EthernetClient, and
be sure to do a Bridge.begin() first
Arduino WiFi Shield - if you want to send packets > 90 bytes with this shield,
enable the MQTT_MAX_TRANSFER_SIZE define in PubSubClient.h.
The library cannot currently be used with hardware based on the ENC28J60 chip –
such as the Nanode or the Nuelectronics Ethernet Shield. For those, there is an
alternative library available.
License
This code is released under the MIT License.
About
A client library for the Arduino Ethernet Shield that provides support for MQTT.