Automated or Manual File Import


 

Back to Product Wiki

Overview

This article will go over the two methods of uploading data for a File Import profile. 

For an article on creating and configuring a File Import profile, please navigate to the Creating and Configuring a File Import profile article.

Automatic FTP upload

The automated import feature allows the user to configure an FTP (file transfer protocol) to enable file transfer from a 3rd party sensor or the users computer (FTP Client) over to iTwin IoT's FTP server. This will enable you to have your File Import run automatically every time your sensor sends a new file to the FTP folder that was created once you created a File Import profile.

 

In order for the FTP-powered automated import tool to function, please ensure that Ports 20, 21, and 22 are open to transfer.iiot-services.bentley.com on the local network.

Manual upload

This method is for uploading data manually, this is useful for example manual measurements in the field, uploading historical data, fixing data gaps and etc.

 

Automatic File Import (FTP)

FTP Setup

There are two workflows for importing data via FTP, the process on iTwin IoT (FTP server) is the same but the configuration of the FTP client is different. 

Workflow 1 - upload from users PC

In order to utilize the FTP, an FTP client that supports FTPS must be installed on the user's computer. iTwin IoT recommends the use of Filezilla, but many other FTP clients may be used. This help article will illustrate the workflow within the Filezilla FTP client. If you would like to use another FTP client, please reach out to the iTwin IoT support team for confirmation of whether your FTP client of choice is compatible with the FTPS requirements of the iTwin IoT platform. 

This workflow isn't necessarily only for automating an import, you can use this for manual measurements that you can upload via Filezilla if you do not want to log into iTwin IoT every time you want to upload your readings manually. 

Start by downloading the Filezilla FTP client (download link: https://filezilla-project.org/). After downloading and completing the initial setup of Filezilla, open up the application. You will navigate back to the application shortly.

Workflow 2 - upload from 3rd party sensor/logger/gateway

This workflow is useful for when you have a 3rd party sensor that is not directly supported in iTwin IoT. What this enables you to do is to have that sensor or gateway send any new data automatically to the FTP folder that is created for your File Import. 

The process of creating the File Import itself is the exact same, but instead of using Filezilla to upload the files you configure the sensor/logger/gateway to send the data via FTP or FTPS to your relevant FTP folder in iTwin IoT.

Accessing FTP Information

Once you have created a file import as shown in the Creating and Configuring a File Import article you will be able to upload data automatically to the FTP folder that was created for that File Import. In the image below you can see the FTP host/server URL, the username, password and directory for this particular File Import Profile. This is the FTP information used for sending data via FTP to your File Import profile. 

Filezilla FTP setup (Workflow 1)

1. Host, Username, Password Inputs- The FTP credential inputs will be at the top of the page. Input the data collected from iTwin IoT above into the corresponding inputs labelled alphabetically. A, b, and c will only be used in this initial configuration step. You can match the host (a), username (b), and password (c) with the information collected above. A port number does not need to be input.

 


 

An example of this information entered into the QuickConnect bar of Filezilla is displayed below.

 

 

Once the FTP is configured, click the "Quickconnect" button. A status message should appear at the top saying the connection is successful, and you will see a list of directories appear on the right hand, Remote site", side of the Filezilla page. Proceed to the next section if the connection succeeds.

 If the connection fails, check the input information from above and ensure there are no firewall settings on your network or computer that prohibit FTP usage. This information can be found at the top of the page or in this support article. If you've checked all of these possible issues, please contact our support team for assistance.

 FTP Connection and File Transfer

After clicking the "Quickconnect" button, Filezilla will then attempt to connect between the iTwin IoT remote host and the user's computer. 

 

 

1. Status Bar- The Status Bar provides a log of operations for the FTP. If the connection procedure above was followed correctly, the Status notes bar will end with the note "Status: Directory listing of "/" successful". Sections 2, 3, 4, and 5 will populate once the connection is successful.

2. Local Host Folders- The user's computer drives and folders will be displayed on the upper-left window. Navigating through drives and folders within this window will change the sub-folders and files displayed in the lower-left window.

3. Remote Host Folders- The iTwin IoT file directory for the FTP documents module will be displayed in the upper-right corner. The selected file should be the file with the Username displayed as the folder name, typically an alphanumeric string. Clicking on this username will display the sub-folders within, also called the directories, which are the randomly generated folder names from the Import profile creation step earlier. Note: The username and password will be shared for all Import Profiles created within a given project. All Import Profiles created within an iTwin IoT project will be visible as a folder under the username in this window.

4. Local Host Sub-Folders and Files- The user's computer sub-folders and files, as selected in window 2, will be displayed on the lower-left window. Folders and files from this window can be dragged and dropped to the right into the Remote Host folders, but a Directory must be created first in Step 5. When dragging and dropping, confirm that a green "+" box appears on the Remote Host Directory folder you are transferring the file into to ensure success.

5. Remote Host Sub-Folders and Files- Sub-folders, or directories, are automatically generated when creating an Import Profile in iTwin IoT. To ensure that data is going into the correct directory for the File Import profile, please reference the Automation tab in iTwin IoT. The image below highlights the location of the auto-generated directory name. Note: All Import Profiles created within an iTwin IoT project will be visible as a folder under the username in this window.

 

 

 

Files can be uploaded into the directory to make them visible in the Import Profile by drag and drop or by highlighting the directory and file/files then clicking upload. When dragging and dropping, confirm that a green "+" box appears on the Local Host folder you are transferring the file into to ensure success. The screenshot below is a highlighted example screenshot illustrating where the directory is located in Filezilla.

 

 


Datalogger FTP setup (Workflow 2)

This method is useful for when you have a datalogger that supports transferring its datafiles via FTP to an FTP server.

You start with manually uploading the first datafile of your data period for this datalogger and configuring the import as shown in the Creating and Configuring a File Import article. 

A Loadsensing datalogger will be shown in this example, this is useful for when a new Loadsensing node type has been released but not implemented yet in iTwin IoT. The general method is the same for other manufacturers that support the FTP transfer protocol.

In general the steps are:

  1. Create the File Import profile in iTwin Iot with a datafile from the datalogger
  2. Gather the FTP information for that File Import
  3. Configure the datalogger to send data to that particular folder that is created for your File Import

For Loadsensing you click "configuration", "FTP client" and then you fill out the relevant information. Take care to have each node go to the specific folder for your import. For Campbell Scientific loggers please read their help article on using the FTPClient command.

Manual File Import

This method is mainly useful for uploading manual measurements into the system. The first step is the same as with the automatic import but instead of having a datalogger or process send the data automatically to an FTP location you can either upload the data manually via iTwin IoT or send the data manually via FTP using Filezilla or comparable program, as is shown in this chapter of this article.

You start with configuring the import as shown in the Creating and Configuring a File Import article. 

You create your import:

If you want to add a manual measurement you navigate to the File Import profile and click "edit import"

Then you upload your new readings and click "Save and Import"