Astarte device SDKs

Introduction

Astarte Device SDKs are ready to use libraries that provide communication and pairing primitives. They allow to connect any device to an Astarte instance. While an SDK is not strictly required to connect an application to Astarte using MQTT, it enables rapid development and a pleasant developer experience.

Transport layer

MQTT

The traditional way for an Astarte device to connect to an Astarte cloud instance is by implementing the Astarte MQTT v1 Protocol. Using this protocol each SDK device connects directly to Astarte cloud. This is ideal when interaction with Astarte is performed by a single application contained within a single hardware device.

Astarte device direct MQTT architecture

gRPC

An additonal use case is when multiple hardware device or software services share the same network connection and should interact with Astarte in an independent manner. In this case the Astarte message hub may be used as a gateway, and each SDK will connect to Astarte through it. In this case each Astarte library will act as an independend message hub node. While the message hub will manage the connection to the cloud using MQTT.

Astarte message hub gRPC architecture

Supported languages and platforms

To make Astarte a truly cross platform service we make available a set of SDKs written in different languages and for different plaforms.

At the moment the following SDKs are available:

Language

Platform

Transport

Source code

Documentation

Guide

C

Espressif

MQTT

GitHub

API docs

Get started

C

Zephyr

MQTT

GitHub

API docs

Get started

C++

Linux/Windows

gRPC

GitHub

Get started

C++

Qt5

MQTT

GitHub

Get started

C#

MQTT

GitHub

API docs

Get started

Elixir

MQTT

GitHub

Get started

Go

MQTT

GitHub

API docs

Get started

Java

Android/Generic

MQTT

GitHub

API docs

Get started

Python

MQTT + gRPC

GitHub

API docs

Get started

Rust

std

MQTT + gRPC

GitHub

API docs

Get started

Further languages and platforms will be supported in the near future. Requests for new SDKs are welcome.

Notes

Astarte device SDKs should not be confused with Astarte clients, as they are not meant for communication with the Astarte REST APIs. If one is interested in an abstraction layer on top of the existing Astarte REST APIs instead, an optional Astarte client (such as astarte-go ) is to be used.