The Accuware CSV service logs every 5 seconds the locations of all the devices seen by all the nodes of your site. Basically, this service makes use of the Accuware synchronous API and allows to download a CSV file every day, without having to use a script that calls the Synchronous API every 5 seconds to get the real-time data.

Activation of the CSV service: the CSV service is activated upon your explicit request and NOT by default when activating Wi-Fi Location Monitor. In order to activate the CSV service please submit a support request using this form and let us know:

  • the TYPE of CSV file that suits your needs among the three TYPES described in the next paragraphs.
  • the model of OM2P nodes used in your sites (OM2P or OM2P-HS).
  • the list of sites for which you want to activate the CSV service.

The CSV service will be activated within 24 hours from your request. The CSV service can’t be activated retroactively, meaning that it is not possible to retrieve data related to the period when the CSV service was not active.

Benefits

The use of the Accuware Synchronous API requires constantly querying the server, so it is more suited for real-time analysis. Instead the locations contained in the CSV files are generally more accurate than the locations fetched in real-time. In fact, by processing the data offline we are able to use filters that are more effective in reducing the noise in the measurements. Also, downloading a single large file is much more efficient than constantly pulling the data from our server. The CSV files contain all the data available for all the Wi-Fi devices detected without duplicates.

Data structure

Data inside the CSV files are grouped by station MAC address and the records for each MAC address are ordered by Unix epoch time stamp.

We can provide 3 types of CSV files with different fields. During the activation of the CSV service you need to let us know which one fits your needs. Without any specific request we will activate by default TYPE 1.

PLEASE READ – European GDPR: in order to comply with the EU GDPR that regulates the collection and storing of personal data​ inside the European Union, starting from May ​25, 2018 , all the MAC addresses detected by Accuware WiFi Location Monitor (made available through the API​ and the CSV daily reports)​ will ​be converted by default into anonymous IDs using a one-way ​hashingMore information at this link.

TYPE 1 (default)

Where the fields are:

  1. Unix Epoch time-stamp (see below for details).
  2. Station MAC address.
  3. Level ID.
  4. Latitude.
  5. Longitude.
TYPE 2

Where the fields are:

  1. Unix Epoch time-stamp (see below for details).
  2. Station MAC address.
  3. Level ID.
  4. Latitude.
  5. Longitude.
  6. MAC address of the node that detected the highest RSS from the station.
  7. RSS detected by the node.
TYPE 3

Where the fields are:

  1. Unix Epoch time-stamp (see below for details).
  2. Station MAC address.
  3. Level ID.
  4. Latitude.
  5. Longitude.

In addition to the five fields above the 3rd TYPE of CSV file contains the MAC addresses (and related RSS) of the 10 nodes (not more than 10) that detected the highest RSS from the station.

Unix epoch timestamp: the Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z):

  • More information about the Unix epoch timestamp can be found in this page.
  • More information about how to convert epoch to human readable date and vice versa can be found in this page

Information about the timezone

At present, we are not generating daily files keeping into account the specific time zone of the site. So, a CSV file for day YYYY/MM/DD, contains data from YYYY/MM/DD at 00:00 AM UTC to YYYY/MM/DD at 11:59 PM UTC regardless the physical location of the site/nodes. Anyway if Wi-Fi Location Monitor will be deployed in several production sites, we will consider creating the CSV files with the data of an entire day of a specific time zone.

Example

The CSV file downloaded from the following URL contains data from March 23rd, 2014 at 00:00 AM UTC to March 23rd, 2014 at 11:59 PM UTC

Since site 1001 is the Accuware demo site in San Diego (timezone PDT = UTC – 7), the CSV file contains data from March 22nd at 5:00 PM PDT to March 23rd at 4:59 PM PDT. This means that in the example above, the last 7 hours of data of a specific day, became available only the day after.

Download

The daily CSV files can be downloaded (compressed in GZIP) by calling an URL with the following structure:

where SiteID is the ID of your site and the other fields are four digits for the year, two digits for the month, and two digits for the day.

Access level: you have to use your Accuware FULL ACCESS credentials to access the URL above and download files.

Availability

CSV files become available approximately around 01:30 AM UTC every night.

Retention

Currently, the retention of the CSV files is unlimited. Anyway, since this might change in the near future, we suggest to download the CSV files on a regular base using a simple script, and store them in your local repository.

How to solve the HTTPS redirect issue

When a GET call is issued to the URL just described, the Accuware server verifies your credentials and responds with an HTTPS REDIRECT pointing to the URL of the actual file. Most browsers automatically follow redirects and this is why it is possible to download easily the CSV files using a browser.

If you are writing a piece of code in order to download automatically the CSV files and your libraries do not support the HTTPS redirects you have to take a two step approach:

STEP 1 – Issue a GET all to an URL with this structure:

The result of this call will be a JSON object like this:
The URL returned is already authenticated, so there is no need to do any authentication. In fact you can paste the URL in your browser and download the file. The URL returned will expire after 10 minutes, so you have to use it right after calling.

STEP 2 – Take the URL you received in STEP 1 and download the file