Skip to main content
All CollectionsUser Guides
Devices Types: Bulk device creation using a CSV file
Devices Types: Bulk device creation using a CSV file

Create devices in bulk simply with a CSV file containing device names, API labels, and properties.

David Sepúlveda avatar
Written by David Sepúlveda
Updated over 6 months ago

Device Types are a great way to streamline large-scale deployments by quickly onboarding hundreds or thousands of Devices in Ubidots. Device Types not only preconfigure the properties, variable names, icons and synthetic expressions of newly detected devices, but they also allow you to upload multiple devices with nothing more than a CSV file.

As an example, imagine you need to onboard 500 new devices for a service button application across 500 different locations. Using Device Types you can create these 500 devices in one fell swoop using a CSV file containing some parameters:

  • Device Name (required)

  • Device Label (required)

  • Restaurant name (property entry)

  • Restaurant address (property entry)

  • Phone number (property entry)

1. Creating devices in bulk with a CSV upload

To create devices in bulk using a CSV upload, simply follow these steps:

  • Step 1: Create a new Device Type or locate a preexisting one.

  • Step 2: Click on the device type's settings and select the “bulk upload devices” option.

  • Step 3: Click on "download the CSV file template" and proceed to configure the CSV file. This file will contain the following empty columns for you to fill:

  1. Device name (required): The name you wish to assign to your device.

  2. Device Label (required): The device API label — a unique identifier for your device (ensure that no two device labels are the same).

  3. Description (optional): A description for your device.

  4. Tags (optional): A comma-separated list of tags for your device. For example, "button, restaurant, iot".

  5. "_lat" and "_lng" (optional): For stationary devices (i.e., a fixed-location smart button or weather station) you can provide latitude and longitude in degrees. The accepted range for latitude is between -90 and 90. For longitude it's between -180 and 180.

  6. Properties (optional): The properties defined in your device type, so you can fill them at will according to your needs. Learn more about device properties.

  • Step 4: Configure your CSV file with the required inputs. Following our example, let's use the CSV file to create ten smart buttons, each with predefined configurations.

  • Step 5: After configuring the CSV file, use the "drop a file here, or click to select one" field to upload it. You have the option to run device tasks configured during the creation.

  • Step 6: An optional step is to activate the "run device type tasks" button to execute the tasks defined in the device type.

  • Step 7: Click on the "save" button to create the devices stipulated in the uploaded CSV file.

2. Results 

A device will be created according to the parameters defined in each valid row of your CSV file:

IMPORTANT NOTE: In your physical devices' firmware, make sure to use the corresponding device API label to send data to the right Ubidots device.

Once created, your devices will contain the name, API label, location and properties specified in the CSV file:

Did this answer your question?