pubsubclient/index.html
2015-09-07 21:31:04 +01:00

142 lines
5.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: default
title: Arduino Client for MQTT
---
<p>This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT</p>
<p>For more information about MQTT, visit <a href="http://mqtt.org">mqtt.org</a>.</p>
<section id="Download">
<h2>Download</h2>
<p>The latest version of the library can be downloaded from <a href="https://github.com/knolleary/pubsubclient/releases/latest">GitHub</a>.</p>
</section>
<section id="Documentation">
<h2>Documentation</h2>
<p>The library comes with a number of example sketches. See <code>File &gt; Examples &gt; PubSubClient</code> within the Arduino application.</p>
<p>Full <a href="api.html">API Documentation</a></p>
</section>
<section id="Hardware">
<h2>Compatible Hardware</h2>
<p>
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:
</p>
<ul>
<li>Arduino Ethernet</li>
<li>Arduino Ethernet Shield</li>
<li>Arduino YUN use the included <code>YunClient</code> in place of <code>EthernetClient</code>, and
be sure to do a <code>Bridge.begin()</code> first</li>
<li>Arduino WiFi Shield - if you want to send packets greater than 90 bytes with this shield,
enable the <a href="http://knolleary.github.io/pubsubclient/api.html#configoptions"><code>MQTT_MAX_TRANSFER_SIZE</code></code></a> option in <code>PubSubClient.h</code>.</li>
<li>Sparkfun WiFly Shield when used with <a href="https://github.com/dpslwk/WiFly">this library</a></li>
<li>Intel Galileo/Edison</li>
<li>ESP8266</li>
</ul>
<p>
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
<a href="https://github.com/njh/NanodeMQTT">alternative library</a> available.
</p>
</section>
<section id="Author">
<h2>Author</h2>
<p>Nick O'Leary - <a href="https://twitter.com/knolleary">@knolleary</a></p>
</section>
<section id="License">
<h2>License</h2>
<p>This library is released under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.</p>
</section>
<section id="ChangeHistory">
<h2>Change History</h2>
<p>The complete change history is available on <a href="https://github.com/knolleary/pubsubclient/commits/master">GitHub</a>.</p>
<dl>
<dt>2.0</dt>
<dd>
<ul>
<li>Add (and default to) MQTT 3.1.1 support</li>
<li>Fix PROGMEM handling for Intel Galileo/ESP8266</li>
<li>Add overloaded constructors for convenience</li>
<li>Add chainable setters for server/callback/client/stream</li>
<li>Add state function to return connack return code</li>
</ul>
</dd>
<dt>1.9</dt>
<dd>
<ul>
<li>Do not split MQTT packets over multiple calls to <code>_client->write()</code></li>
<li><b><i>API change</i></b>: All constructors now require an instance of Client to be passed in.</li>
<li>Fixed example to match 1.8 api changes - dpslwk</li>
<li>Added username/password support - WilHall</li>
<li>Added <code>publish_P</code> - publishes messages from <code>PROGMEM</code> - jobytaffey</li>
</ul>
</dd>
<dt>1.8</dt>
<dd>
<ul>
<li>KeepAlive interval is configurable in <code>PubSubClient.h</code></li>
<li>Maximum packet size is configurable in <code>PubSubClient.h</code></li>
<li><b><i>API change</i></b>: Return <code>boolean</code> rather than <code>int</code> from various functions</li>
<li><b><i>API change</i></b>: Length parameter in message callback changed from <code>int</code> to <code>unsigned int</code>
<li>Various internal tidy-ups around types</li>
<li>Able to specify server address by DNS name</li>
</ul>
</dd>
<dt>1.7</dt>
<dd>
<ul>
<li>Improved keepalive handling</li>
<li>Updated to the Arduino-1.0 API</li>
</ul>
</dd>
<dt>1.6</dt>
<dd>
<ul>
<li>Added ability to publish retained messages</li>
</ul>
</dd>
<dt>1.5</dt>
<dd>
<ul>
<li>Added default constructor</li>
<li>Fixed compile error when used with arduino-0021 or later</li>
</ul>
</dd>
<dt>1.4</dt>
<dd>
<ul>
<li>Fixed connection lost handling</li>
</ul>
</dd>
<dt>1.3</dt>
<dd>
<ul>
<li>Fixed packet reading bug</li>
</ul>
</dd>
<dt>1.2</dt>
<dd>
<ul>
<li>Fixed compile error when used with arduino-0016 or later</li>
</ul>
</dd>
<dt>1.1</dt>
<dd>
<ul>
<li>Reduced size of library</li>
<li>Added support for Will messages</li?
<li>Clarified licensing &#8211; see LICENSE.txt</li>
</ul>
</dd>
<dt>1.0</dt>
<dd>
<ul>
<li>Only Quality of Service (QOS) 0 messaging is supported</li>
<li>The maximum message size, including header, is 128 bytes</li>
<li>The keepalive interval is set to 30 seconds</li>
<li>No support for Will messages</li>
</ul>
</dd>
</dl>
</section>