Test Case Title |
TC9.13: How to upload a local file into the platform (IOT Application and MyKPI) |
Goal |
I can load a local file from my own computer to the platform and use it as data. I can load a local file with data to my IOT application on cloud to use the data included. It can be a file of parameters as wll as a file with personal data that can processed or elaborated to be saved into the MyKPI repository. The first step shown in this TC can be used to shown data file on dashboard, published on DataGate, sent to a IOT device, etc. |
Prerequisites |
Using a PC with a web browser. You need credentials to access at the platform and thus to the IOT application. |
Expected successful result |
usage of your personal data into the Snap4City platform according to your needs. |
Steps |
|
This page is focussed on guiding the users in adding data into the platform which are in a file (for example .csv). This data would be imported on the platform.
-
- Click on the IOT Applications on the left bar and press the “Create new” button
-
- It’s possible to specify the name of the IOT Application you want to create. Please press confirm to create the IOT Application.
-
- After the IOT Application has been created, it is shown in the list of the IOT Application.
-
- Enter in the IOT Application with double click on it and start to edit. Please remember to Deploy the IOT Application to save the current flow.
-
- It is possible to load a stream already created through the "Import" button shown in the image and then on the "Import S4C" element.
- In this guide we have to insert the flow "To upload a file from your local computer into the NodeRed".
- NEW VERSION 2020 of the FLOW: https://www.snap4city.org/drupal/sites/default/files/files/CSV-Upload.txt
-
- To import the flow, you have to click on the name of the flow and once the name of the flow is underlined click on the red button import
- NEW VERSION of the FLOW: https://www.snap4city.org/drupal/sites/default/files/files/CSV-Upload.txt
-
- The flow will appear on the mouse and you can move it where you want and then click “Deploy”.
- To upload a file at this point you must link to the site https://iot-app.snap4city.org/ (this link would not work for you) adding at the end what is indicated in the nodes. Please note that nrh6q53 is the name of the IOT App that I have used for creating this example. Please use yours.
-
- If we use the first one we will connect to https://iot-app.snap4city.org/nodered/nrh6q53/simple (this link is only for demo, it is not connected to your IOT App) and you can upload the file with this interface:
-
- If we use the first one we will connect to https://iot-app.snap4city.org/nodered/nrh6q53/complex (this link is only for demo, it is not connected to your IOT App) and you can upload the file with this interface:
-
- Assuming you use the simple interface, let's see how to load a file and insert it into the KPIs.
-
- And you can access the "KPI Editor"
-
- In this editor you can see your own Kpi Data by selecting My at the top, the Public Kpi Data by selecting Public at the top and the Kpi Data delegated by another user to the logged in user by selecting Delegated. To add your own KPI you can press the button at the top with Add My KPI and fill in at least the required fields in the form that is shown.
-
- Choose Nature and SubNature according to the value you want to record, name that value in the ValueName field, indicate a unit of measure for that value in the ValueType field and select a format in DataType. In addition to these mandatory values, you can add additional information that the user wants to add to this data. An example: