All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Introduce the
DeviceOptions
struct to expose all possible configuration options for the device. - Add
NewDeviceWithPersistency
as default constructor. - Add a
NewDeviceWithOptions
constructor to allow device configurations different from the default one. - Allow the device to send purge properties messages.
- Deprecate the
NewDevice
constructor.NewDevice
will be removed in the next version. - Allow to use a db different from SQLite for persistency. CGO is now optional, if SQLite is not used.
- Use ECDSA instead of RSA private keys.
AddInterface
does no more perform validation, as this is already done byastarte-go
. The return value ofAddInterface
is alwaysnil
.- Update Go to v1.17.
- Do not send data before all Astarte MQTTv1 initialisation messages have been sent, fixing a race condition which sometimes resulted in device disconnection.
- Allow to ignore client-side SSL errors with the
Device.IgnoreSSLErrors
field. Defaults tofalse
. - Add messages (when retention: stored) and properties persistency. This requires a SQLite db and compiling with CGO.
- Add
SetProperty
andUnsetProperty
methods for setting and unsetting properties on device side. - Add
GetProperty
,GetAllPropertiesForInterface
andGetAllProperties
methods for retrieving properties. - Handle reception of purge properties messages from Astarte.
- Do not redo all initialisation steps of Astarte MQTTv1 protocol at each device reconnection, but only if there is no session present on the broker.
- Send properties only if their value has changed.
- Replace eclipse/paho.mqtt.golang dep with ispirata/paho.mqtt.golang, which handles the sessionPresent MQTT flag correctly.
- Deprecate
SendIndividualMessageWithTimestamp
andSendIndividualMessage
methods for sending properties.
- Do not to panic when checking certificate validity.
- First Astarte Device SDK Go release.