LoRaWAN Device Automated Import Task

LoRaWAN Device Automated Import Task

Currently DataSight supports the Sense API for requesting data (i.e. a PULL operation) in an Automated Task, which requests the latest data, downloads it in JSON format, converts it to a Normalised CSV format, and then imports the data into your database.

Detailed below are the pre-requisites and step-by-step instructions for creating an automated Import Task for a LoRaWAN device using NNN Co. Australia's LoRa Network.

 

Pre-requisites

You must have an Import Template created in order to automate the ingestion of the LoRaWAN device data.

You must have your unique API Key provided to you by NNN Co. Australia.

 

Creating the Import Task

  1. Open the Task grid-view and create a new Import Task:
  2. Select your LoRaWAN Import Template.
  3. Replace the path in the File Name field with the following Web API URL string:
    1. https://api:<YOUR API KEY>@<API END POINT>/<DEVICEID>/<COMMAND><OPTIONAL ARGUMENTS>

e.g. https://api:8a0892e3aedbe2f2ade4bd727d4725e0c639d021@www.nnnco.io/v2/api/sense/devices/532FC45327658E1234/readings?fromTs=last5hours

  1. Configure the remaining settings as required for your Task.
  1. Save your Task.

Note

Without any optional arguments, the 'readings' command requests the most recent 1,000 records from the last two days (as only the last two days of data is currently available from the N2N DL Server).

As devices deliver the data in UTC +/- 00:00 time zone, DataSight will convert this to the local time zone of your database during the import process.

 

Optional Arguments

DataSight supports the following optional arguments for NNN Co. Australia's LoRa Web API, allowing you to refine the dataset being requested for the LoRaWAN device. Due to the 1,000 records / two day limit of data available from the Web API, these optional arguments may be beneficial to ensure that data is not missed depending on the frequency over which the Task has been configured to occur.

Optional Argument

Description

?fromTs=lastXmins

Requests the most recent X minutes of data.

?fromTs=lastXhours

Requests the most recent X hours of data.

?fromTs=lastXdays

Requests the most recent X days of data.

&limit=1000

Limits the requested data to 1,000 records.

Can be used on its own, or appended to one of the above optional arguments.

 

See also:

  • Import Templates
  • LoRaWAN Device Import Routine
  • Automate Your Tasks
    • Related Articles

    • Automatically Import Data

      Using saved Import Templates, an import routine can be automated as a task. From within the Tasks grid view, either double-click on a selected task row, or click on the Edit The Edit Tasks dialogue window appears. Select an Import Template (See also ...
    • Import Routine

      DataSight's Import Routine is a simple and flexible import wizard that steps you through the import process. It is simple to use and designed for non-IT personnel to set up and configure, thus allowing any DataSight user to become self-sufficient. ...
    • Automatically Import DSApp Files

      You can use DataSight to automatically import the data from your DSApp Import (DSI) files. Click the Tasks button from the Automate group on the DataSight Ribbon. Click on the New button from the Quick Access Toolbar. On the invoked New Task window, ...
    • Set Task Groups

      Create a Task Group With the Task Groups list open in the main panel, click New on the DataSight Quick Access Toolbar. A new Task Group row will be added to the Task Groups grid view. Type in a Name for the Task Group in the Task Group field. Click ...
    • View Task Log

      A log of each task undertaken by the service is automatically saved. View Logs In the Service Group on the Service Manager Ribbon, click View Logs. The View Logs window will appear in the main panel. Click View All Alternatively, select the Start and ...