Blog Home

Mass scale with the new Arduino Cloud CLI

Arduino TeamSeptember 6th, 2022

The Arduino IoT Cloud enables makers, IoT enthusiasts, and professionals to build easily connected projects based on a wide range of Arduino, ESP32, and ESP8266 boards.

Following Arduino’s vision, it has been carefully designed to provide the most user-friendly and intuitive experience, abstracting the complex tasks that create barriers for users who are not familiar with coding. Some of the features include:

  • Easy onboarding that will automatically generate a sketch layout when setting up a new device so you can edit it right away and quickly go from unboxing to building your project.
  • Building rich and customizable dashboards to visualize your device’s status and data, accessible remotely via a native mobile App and your web space
  • Keeping your devices up-to-date with secure remote OTA updates
  • Storing historical data
  • Automagically” syncing variables between multiple devices
  • Integration with 3rd party platforms like Alexa or IFTTT

The intuitive and user-friendly web interface is a major factor of Arduino IoT Cloud’s popularity. It simply makes it easy to get started for a great variety of users, from the ones with no prior coding experience to those who are expert Arduino users.

Introducing a new alternative IoT Cloud experience

Alternatively, it is possible to interact with the Cloud via the API. This method is mainly used for integration with other platforms, applications or web pages.

The interaction with the cloud is now complemented with a new Cloud CLI that provides a tool to execute scripted operations on Arduino Cloud, and satisfy use cases like massive device provisioning. As it empowers users to access the major features of Arduino IoT Cloud from a terminal, it is also a long-time demanded feature for skilled users.

With the new Cloud CLI, the Arduino IoT Cloud has a full suite of tools available for every kind of user.

All your favorite IoT Cloud actions available on your terminal

With the new Cloud CLI tool it is possible to perform most of the tasks that can be done using the web interface.

The Cloud CLI needs a credentials file containing an Arduino IoT Cloud client ID and its corresponding secret. Credentials can also include an optional organisation ID that specifies the organisation to use. These credentials can be retrieved from the cloud by creating a new API key.

Devices and things can be created, deleted and listed. Things can be bound to devices. In a very similar way it is possible to manage the dashboards.

OTA firmware updates can also be performed with the ability to defer the update up to one week. It is also possible to perform a mass OTA upload through a specific command.

One of the key features is the ability to download in different text formats (JSON, YAML, …) the templates of the dashboards, devices and things, so that you can keep them for future use. It is very useful to modify them to create copies of the entities with some properties changed and upload the new templates to the Cloud.

Mass scale provisioning journey

The Cloud CLI is a tool that can be integrated easily in scripts and so, it is well-suited for scenarios where mass scale and automated actions are needed.

The typical journey would consist of the following phases.

Phase 1: Prototyping

The user journey starts creating a first prototype of a Thing and a Sketch code that resolves the use case. This activity can be done using IoT Cloud web application, or even editing the Sketch in online Editor or offline Arduino IDE.:

Phase 2: Factory provisioning

At this point, the user can replicate the entire configuration of the “prototype” thing on many other devices, going through provisioning and connecting all of those to the cloud. In this phase, using Cloud CLI it’s possible to streamline the provisioning process and even to hook it to automation scripts. 

Phase 3: Production update

During the normal life of a thing on the field, it is very typical to need to update the firmware remotely. With Cloud CLI, it is possible to update devices individually, but also many devices with a single  command. Updates can be deferred if needed.

Phase 4: Dashboards (optional)

Dashboard creation would be the last optional step. The goal is to create custom dashboards that help us manage and monitor the deployed devices. Once the first dashboard is created in phase 1, it’s easy to replicate it for multiple devices with Cloud CLI.

Try it now

Download and get started with the Cloud CLI and associated documentation.

Leave a Reply

You must be logged in with your Arduino account to post a comment.