Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: "Add and connect a device to IoT Cloud"
---

> Also see [Getting Started With the Arduino IoT Cloud](https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started) in Arduino Docs.

Connecting a new device to Arduino IoT Cloud consists of three steps:

1. [Add the device to IoT Cloud](#add-the-device). Enables the device for use with IoT Cloud.
2. [Configure the device as a Thing](#create-thing). This will generate a sketch that can be uploaded to the device, allowing it to connect to IoT Cloud.
3. [Upload the sketch to the device](#upload-sketch). Upload the Thing sketch to the device.

You'll need an Arduino account and the [Arduino Create Agent](https://support.arduino.cc/hc/en-us/articles/360014869820) installed and running on your computer.

---

## Set-up instructions

<a id="add-the-device"></a>

### Step 1: Add the device

1. Go to Arduino IoT Cloud and open the [Devices tab](https://create.arduino.cc/iot/devices).

2. Click the **Add Device** button in the top-right or middle of the page.

![The two location that the "Add Device" button can appear.](img/device-add-button.png)

3. Select your device type:

* _Set up an Arduino device:_ For Arduino boards.
* _Set up a 3rd Party Device:_ ESP8266, ESP32, and more.

> Hover over the <kbd>i</kbd> for a full list of compatible devices.

4. **Proceed with the instructions to add your device.**

* _ESP32 and ESP8266:_ Make sure to save any Device ID and Secret key that's provided.
* _LoRaWAN<sup>®</sup>:_ Make sure you select the [right frequency band for your region](https://www.thethingsnetwork.org/docs/lorawan/frequencies-by-country/). When completing the setup you'll receive a registration email for your [The Things Stack Network Account](https://docs.arduino.cc/cloud/iot-cloud/tutorials/cloud-lora-getting-started#step-2-registering-the-things-stack-network-account).

5. When finished, your new device will be added to your list of devices. Note that it will have an _offline_ status at this point.

![A MKR WiFi 1010 in the Device tab.](img/iot-device-added.png)

<a id="create-thing"></a>

### Step 2: Create and configure a Thing

1. Open the [Things tab](https://create.arduino.cc/iot/things).

2. Click **Create Thing**.

![The two location that the "Create Thing" button can appear.](img/iot-thing-create.png)

3. Configure **Variables**, **Device**, and **Network** for the new Thing:

![A new, unconfigured Thing.](img/thing-setup-before.png)

1. Click **Add variable** and add one variable with any settings.

2. Click the **Device selection** button and select your device.

3. Click the **Network configure** button and enter the network credentials.

* _Wi-Fi:_ Enter your Wi-Fi name (SSID) and password (encryption key).
* _Arduino SIM:_ [Use these credentials](https://support.arduino.cc/hc/en-us/articles/360013825159-What-are-the-credentials-for-the-Arduino-SIM-card).
* _Arduino with LoRa<sup>®</sup>:_ The credentials are added automatically.
* _ESP32 and ESP8266:_ Enter the secret key that was provided when adding the device.

![A Thing with an asociated device, network configuration, and added variable.](img/thing-setup-after.png)

4. Your sketch will now be generated and can be viewed in the Sketch tab.

<a id="upload-sketch"></a>

### Step 3: Upload the Thing sketch

1. With the Thing open, open the **Sketch** tab.

2. Click the **Upload button** and wait for the process to complete.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a step should be added here about installing or starting Arduino Create Agent if it is not already running?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applies to "Add device" as well, added to introduction in 8dd0e25


![Uploading the Thing sketch.](img/iot-sketch-upload.png)

3. When the upload is finished, go back to the Thing setup tab.

4. After a short while, your device should come online. You may have to refresh the page.

![A thing in IoT Cloud. The associated device is online.](img/iot-device-online.png)

> **Note:** Device status is not supported by the LoRa protocol, see [About device status in IoT Cloud](https://support.arduino.cc/hc/en-us/articles/4407169649682-About-device-status-in-IoT-Cloud).

---

## Troubleshooting

See [If your device can't be added or won't connect to IoT Cloud](https://support.arduino.cc/hc/en-us/articles/360019355679-If-your-device-is-not-connecting-to-IoT-Cloud).

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
title: "If your device can't be added or won't connect to IoT Cloud"
---

Learn how to resolve problems adding and connecting devices to IoT Cloud.

If you haven't done so, [make sure the device is configured correctly](https://support.arduino.cc/hc/en-us/articles/360016495559), then see the sections below.

1. [Problems adding the device](#add-device). If there's a problem during the **"Add device"** set-up process, and the device doesn't appear in the Device tab.
2. [Problems uploading the sketch](#sketch-upload). If there's a problem when uploading the Thing sketch to your device.
3. [If the device doesn't come online](#device-status). If the sketch uploads but the device doesn't come online.

---

<a id="add-device"></a>

## Problems adding the device

### We could not find any Arduino device

1. Make sure you're using a [compatible device](https://support.arduino.cc/hc/en-us/articles/360016077320-What-devices-can-be-used-with-Arduino-IoT-Cloud-).

2. [Check that the Arduino Create Agent is installed and running](https://support.arduino.cc/hc/en-us/articles/4919247060124), then click **Try again**.

3. Double-press the reset button on the board, then click **Try Again**.

4. Try uploading an Example sketch (such as _Examples > Built in > 01.Basics > Blink_) in the [Web Editor](https://create.arduino.cc/editor).

* If your board isn't detected by the Web Editor, see [If your board does not appear in the port menu](https://support.arduino.cc/hc/en-us/articles/4412955149586-If-your-board-does-not-appear-in-the-port-menu).

* If you get an error message when uploading, see [Errors when uploading a sketch](https://support.arduino.cc/hc/en-us/articles/4403365313810-Errors-when-uploading-a-sketch).

### We were not able to configure your device<br>Something went wrong!

1. Close any instances Arduino IDE and other applications that may be using the port.

2. [Check if the Arduino Create Agent is installed and running](https://support.arduino.cc/hc/en-us/articles/4919247060124).

3. Reconnect the device to the computer and make sure the power LED lights up.

### Arduino Create Agent not found

1. If you haven't done so already, [install the agent](https://create.arduino.cc/getting-started/plugin/welcome).
2. [Check if the Arduino Create Agent is installed and running](https://support.arduino.cc/hc/en-us/articles/4919247060124).

### If you don't know the DevEUI for your Arduino board

Make sure to set up your Arduino board as an Arduino device.

![Setup prompt, "Set up an Arduino device" is highlighted](img/arduino-device-setup.png)

The DevEUI will be automatically added to the device.

### If you don't know the secret key for your 3rd party device

Secret keys cannot be recovered if lost. Generate a new key by [deleting the device](https://support.arduino.cc/hc/en-us/articles/360018324700-How-to-delete-a-device-from-Arduino-IoT-cloud), then adding it again.

### 'We were not able to configure...' during device set-up

These errors can occur with boards using older Wi-Fi module firmware:

* `Couldn't get the firmware info: Start command: exec: "{runtime.tools.fwupdater.path}/FirmwareUploader": file does not exist`
* `Reset before upload: 1200bps Touch: Open port COMB: Serial port not found`
* `Can't update firmware: Executing command: exit status 1`

Normally, IoT Cloud will update the firmware automatically, but this may fail on older versions (before 1.4.1). To check the firmware version on your board and update it, see [Check and update the firmware for WiFiNINA and WiFi101](https://support.arduino.cc/hc/en-us/articles/360013896579-Check-and-update-the-firmware-for-WiFiNINA-and-WiFi101).

---

<a id="sketch-upload"></a>

## Problems uploading the sketch

### If the sketch isn't generated

When opening the sketch tab for a Thing you may see this message:

```
You will be able to edit the Sketch once you have created at least one Variable and selected a Device in the Setup tab.
```

The sketch cannot be generated until a device has been associated and at least one variable created in the Thing Setup tab.

[Follow these instructions](https://support.arduino.cc/hc/en-us/articles/360016495559#create-thing) to set up your Thing so that a sketch is generated.

### No associated device found

1. Open the [Things tab](https://create.arduino.cc/iot/things) to see which device is associated with the Thing.
2. Make sure the associated device is connected to your computer. To associate a different device, open the Thing and click the **Device selection** button.

### Executing command: exit status 1

This is a generic error message indicating that a process has failed.

1. Click the **Open full editor** button. This will open the same sketch in the Web Editor.

2. Upload the sketch and observe the console output.

3. If you get an error message, see [Errors when uploading a sketch](https://support.arduino.cc/hc/en-us/articles/4403365313810-Errors-when-uploading-a-sketch).

---

<a id="device-status"></a>

## If the sketch uploads but the device isn't online

> **Note:** Device status is not supported by the LoRa protocol, see [About device status in IoT Cloud](https://support.arduino.cc/hc/en-us/articles/4407169649682-About-device-status-in-IoT-Cloud).

1. Go to the [Devices tab](https://create.arduino.cc/iot/devices) and verify that your device has a linked Thing. If not, you must either create and new Thing, or associate an existing Thing with the device.

![A linked Thing in the Devices tab.](img/arduino-cloud-device-thing-example-offline.png)

2. Go to the Things [Things tab](https://create.arduino.cc/iot/things) and open the Thing that's associated to your device. and Go to the [Devices tab](https://create.arduino.cc/iot/devices) and find your device in the list. Under **Network**, click on Change and verify that your credentials are correct.

* **Wi-Fi:** Make sure the name (also called _SSID_) and password (also called _encryption key_ or just _key_) are correct. The password can be revealed by clicking the eye symbol. If you don't know your network name or password, contact your network administrator or the manufacturer of your Wi-Fi access point. If your device has a secret key, make sure it's entered correctly (if you're unsure, remove and re-add the device to generate a new key).
* **Arduino SIM:** [Use these credentials](https://support.arduino.cc/hc/en-us/articles/360013825159). Make sure a working GSM antenna is connected to the board and that an Arduino SIM plan is activated with [your account](https://store.arduino.cc/digital/subscriptions/plans).

3. Open the Thing's **Sketch tab**. Make sure the right device is selected and re-upload the sketch.

![Uploading a sketch in IoT Cloud.](img/arduino-cloud-sketch-upload.png)

4. Fully [delete the device](https://support.arduino.cc/hc/en-us/articles/360018324700), then add it again as a new device. Associate a new Thing with at least one variable and upload the sketch. For detailed instructions, see [Add and connect a device to IoT Cloud](https://support.arduino.cc/hc/en-us/articles/360016495559).

5. Test your setup with an example from the [ArduinoIoTCloud library](https://www.arduino.cc/reference/en/libraries/arduinoiotcloud/). Upload using Arduino IDE or the [Web Editor](https://create.arduino.cc/editor).

---

## Still need help?

[Contact us](https://www.arduino.cc/en/contact-us/).

<!-- markdownlint-disable-file HC001 -->
<!-- markdownlint-disable-file MD026 -->
Loading