Skip to content

Releases: pubnub/arduino

Adding New Boards and Platforms with Bug Fixes

12 Jul 15:41
7cad1a2
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.2.2...3.3.0

Bugfix release

07 Apr 20:46
Compare
Choose a tag to compare

Arduino CI is enabled on Github, each PR and commit to master branch is checked (examples built for several platforms and an unit test suite ran).

Some minor bugs fixed (discovered with the unit tests).

Bugfix release

11 Mar 21:49
Compare
Choose a tag to compare

Fix Message Crackers - cracking JSON objects and numbers.

Bugfix/improvement release

03 Mar 12:03
Compare
Choose a tag to compare

There was a bug in PubSubClient::stop() - a surplus call to
input_state(). Also, it now waits for data shorter, not the usual
"full (default) time" . This time is not yet user settable.

Since ESP8266 can, in some weird and as-of-yet-unexplained situations,
take a long time (hours, even) to change the state of the
WiFiClient to "not connected" after a stop(), we no longer await
this disconnection "forever". There is now a timeout (for now, not
user-settable) and we give up after a short while. This might lead to
some (probably temporary) leaks, but, we haven't run into problems in
our testing.

Minor bugfix/improvement release

28 Feb 10:28
Compare
Choose a tag to compare

Don't wait for disconnection in a tight loop, but do a short delay() in each iteration.

If delay() is implemented well, this should allow other "parts" to do their "maintenance". For example, this should provide for "kicking the WDT", or, in some RTOS(-like) environments, for other tasks to run.

Minor feature release

27 Feb 13:50
Compare
Choose a tag to compare
  • Removed retries. Retries were not limited (we would retry until success or error),
    making it possible to have a long blocking call, which is not a nice thing in
    Arduino loop(). Limiting would only partially fix the problem. Removing them
    altogether works much better and user can retry at her own convenience. It was
    also not consistent with other SDKs (mainly C-core).

  • Support for setting the TCP/IP port was added (PubNub.set_port()), which is needed
    when using a TLS/SSL (network) client class (i.e. to use HTTPS). Before, we always used
    HTTP port, which would not work for TLS (Pubnub will not accept a TLS connect on
    HTTP port (80)).

Bugfix and docs improve release

13 Jan 11:42
Compare
Choose a tag to compare
  • Documentation improved (typos fixed, improved explanations...)
  • Fixed typos in some examples

Major feature release

25 Dec 21:54
Compare
Choose a tag to compare

Christmas 2018 release

The slightly breaking change is the type of the result that publish() and history() return. This is to support ESP32, which, at the time of this writing, had a slightly incompatible implementation, as it would drop available() to 0 when the TCP/IP connection is lost, even if you could still read() what was in its buffer. So, we had to introduce a "middle man" to keep track of the actual number of available octets.

In general, this is not a breaking change, because old code will work with all boards that it currently works with. Only if you want to use ESP32 do you need to update your code, but since ESP32 doesn't work with earlier versions, this is not a functionally breaking change.

But, still, the interface of the library did change, it is a formally breaking change, so we deemed it worthy of taking a major version bump.

The other major change is the addition of "message crackers", lightweight parsers of PubNub responses, which make the client code easier to develop. They are even easier to use then some "generic" JSON library. This is not breaking at all, it simply "builds" on the existing interface. You can still use the "low level" interface of previous versions.

Examples are updated to use message crackers (with some left to use the old - low level - interface to illustrate that usage), but also to use the de-facto standard ArduinoJson library and in some other ways.

Version 2.1.1 - improved debug logging

28 Jun 00:19
Compare
Choose a tag to compare

Prints the error code returned from connect()

Version 2.1.0 - improved HTTP status handling

25 Apr 13:32
Compare
Choose a tag to compare

If Pubnub responds with a HTTP status code indicating a
failure, publish will not return NULL any more.
Of course, NULL will still be returned for other errors, like,
DNS failure, network failure, etc.

This is useful because user can read the whole HTTP
response body, which contains the reason for failure
(like "Quota exceeded").

If you care, you should check the HTTP status code class, like:

if (PubNub.get_last_http_status_code_class() != PubNub::http_scc_success) {
    Serial.print("Got HTTP status code error from PubNub, class: ");
    Serial.print((int)PubNub.get_last_http_status_code_class(), DEC);
}