Releases: GoogleCloudPlatform/google-cloud-iot-arduino
Release 1.1.11
Cumulative update verified in Arduino 1.8.13 / ESP8266 Community 2.7.4 / ESP32 1.0.4 / Arduino SAMD 1.8.3.
Features
- Adds support for advanced MQTT callback implementation that includes C-native primitives
- Switch ESP8266 to DER certificates
- Use Google NTP servers
- Support binary private key
Fixes
- Improves ESP8266 connection code and fault tolerance
- Logs correct host
- Improved Base64 implementation
Thank you @amarkevich, @galz10, and @alvarowolfx for your contributions to the library!
v1.1.10
Release 1.1.10
Cumulative update verified in Arduino 1.8.10 / ESP8266 Community 2.7.1 / esp32 1.0.4 / SAMD 1.8.4.
- Adds non-blocking (asynchronous) connect
To use this, replace calls to mqttConnect
with mqttConnectAsync
. Thank you @kevinlutzer, @nuclearcat, and @ahmadSum1 for code, review, and bug fixes!
- Adds BLE Gateway example.
See examples > complex > esp32 > Gateway - thank you @galz10 for your contribution!
v1.1.9
This release:
- Updates the ESP8266 example to be more stable
- Adds pre-emptive JWT refresh to avoid errors in stackdriver logging
- Corrects the return type for sending telemetry (thanks @ahmadSum1 for this!)
- Enhances error logging, especially with SSL issues
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
This release refactors the initial parts of the MQTT code into an external class, CloudIoTCoreMqtt:
class CloudIoTCoreMqtt {
// ...
MQTTClient *mqttClient;
Client *netClient;
CloudIoTCoreDevice *device;
public:
CloudIoTCoreMqtt(MQTTClient *&mqttClient, Client *&netClient, CloudIoTCoreDevice *&device);
void startMQTT();
void publishTelemetry(String data);
void publishTelemetry(String subtopic, String data);
void publishState(String data);
void onConnect();
void setLogConnect(boolean enabled);
void logError();
void logReturnCode();
void mqttConnect();
As a result, this refactor greatly reduces the amount of code that is copied between device examples and is progress towards having an example that works on multiple devices.
The caller is required for allocating the objects used with the wrapper to simplify the object management and allow the caller to manage / control what has context.
There are still some device-specific parts like connectivity / JWT generation that are defined globally within the examples.
Additional changes include:
- Minor documentation updates
- Enhanced reconnect logic
- Subtopic support for sending telemetry, ex:
mqttDevice->publishTelemetry("/subfolder", "data")
In future releases, we'll be looking to further unify the examples and further reduce the code made visible to the developer. For now, some of this is left visible in the example code to be tweaked.