Skip to main content

Connect a Device

In order to register an Appliance to Clea you need to write a software agent on your device that connects and sends data to Astarte platform. You can find more information about Astarte by checking out the product documentation on this page: Astarte docs

First of all, you need to register your device to Astarte Platform, check here for more info: Astarte docs - Registering a Device
You can do it in two ways:

  • Through the online dashboard of Astarte, accessible from the Admin Console.
  • Directly from the device, through the SDKs that allow it (at the time of writing Java, C/ESP32) using the Pairing Token that can be found in the Admin Console and the Device ID generated internally, as UUIDv5, generated with the SDK’s functionality.

At the end of the registration phase, you will receive a Credential Secret that you will use with the Device ID to connect to Astarte and perform all the necessary operations. Astarte docs - Connecting a Device

Astarte SDKs

Use one of the Astarte SDKs to write the software that connects to the platform and sends the first data. Here you can find a detailed list of available Astarte SDKs:

Language / PlatformStatusLinkNote
Java / AndroidStablehttps://github.com/astarte-platform/astarte-device-sdk-javaAvailable also on Maven
C++ (Qt5)Stablehttps://github.com/astarte-platform/astarte-device-sdk-qt5
C (ESP32)Stablehttps://github.com/astarte-platform/astarte-device-sdk-esp32
ElixirStablehttps://github.com/astarte-platform/astarte-device-sdk-elixirAvailable also on hex.pm
PythonBetahttps://github.com/astarte-platform/astarte-device-sdk-pythonAvailable also on pip
RustBetahttps://github.com/astarte-platform/astarte-device-sdk-rust
GoBetahttps://github.com/astarte-platform/astarte-device-sdk-go
note

Within the SDKs repositories you can find resources and minimal examples to take your first steps with the platform.

You can find more info and details of the Astarte SDKs and their features in the Astarte Device SDKs page in the Astarte documentation.

Clea Examples

You can find some examples of complete Clea applications, including edge agent parts written using Astarte SDKs in the Clea Examples repository.

Add an Appliance to Clea Portal

Once a device is correctly connected and sends data to Astarte, it is possible to use the Astarte Device ID to add an appliance on the Clea Portal from the Add Appliance page.
The appliance now registered is associated with a device within that is connected to the system.

Thanks to the Device ID, the Clea Portal and Clea Portal Apps can interact with the appliance data, either incoming or outgoing, communicating directly with the Astarte platform.