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
e.g. https://api:8a0892e3aedbe2f2ade4bd727d4725e0c639d021@www.nnnco.io/v2/api/sense/devices/532FC45327658E1234/readings?fromTs=last5hours
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: