CSV Service

CSV SERVICE

CSV files are intended for backup purposes only.

CSV file format may change after an upgrade without further notice.

Introduction

The CSV exporter has been with AdvanNet since the beginning, as the backup system for raw reads and system events.

It is available as a service since AdvanNet-2.5.1

This is an always-enabled service that exports data into embedded CSV files.

Given the potential large amounts of data being generated by the readers, the CSV Service works as follows:

    • Raw reads are stored in a file named reads.csv

    • Filtered reads & Events are stored in a file named data.csv. Filtered reads means the same EPC is just logged once each time period.

    • reads.csv and data.csv are rotated when they reach 10 MB, a 100 copies are kept.

Data structure

Downloading the CSV data results in a zip file containing:

  • data.csv: filtered read events and data events

  • reads.csv: raw reads. Will only contain data for certain CSV Service configuration

  • data.csv.x.gz: rotated file from data.csv

  • reads.csv.x.gz: rotated file from reads.csv


Event Types

The CSV data may contain different event data

  • TAG_READ: tag reads

  • GPI: input events

  • ALARM: alarm events

  • Etc.



Operation

Download data

To download CSV data use the download link in the Dashboard tab. The complete zipped CSV log directory will be downloaded.

In case the Export CSV option is not available (old FW versions), please use the direct URL
It can be done in two ways

    • Retrieve current CSV log file accessing the URL (HTTP GET request)

http://{device_ip}:3161/system/fs/retrieveFile/AdvanNetCSVS

    • Retrieve all CSV log directory accessing the URL (HTTP GET request)

http://{device_ip}:3161/system/fs/retrieveFile/AdvanNetCSVSDir

Delete data

To reset the directory with the CSV log files go to Dashboard. Then open the Reset drop-down and click on the Logs and CSVs.

Configuration options

What follow are the CSV Service options

  • Add all reads to data file
    In case we want all reads in the data.csv file.

This may generate a large amount of data. Use it with caution

  • Re-create CSV
    In case the CSV file are checked every time before adding new data. This should only be used for development purposes.

  • Tag TTL time (s)?
    This value will determine
    the period to record a repeated tag. The unit is in seconds, so 60 will be 1 minute and 600 will be equivalent to 10 minutes.

  • Enable port 3178
    Opens a TCP server at port 3178. This is a read only connection, the reader will export in real time the CSV contents into the socket

  • Enable CSV WebSocket
    Opens a TCP server at port 11985 using a WebSocket. This is a read only connection, the reader will export in real time the CSV contents into the web socket

Contents

The columns for the files are:

data.csv: ID,DEVICE_ID,EVENT_TYPE,EVENT_DETAILS,HEX_EPC,GPI_TRIGGER_LINE,GPI_LOW_TO_HIGH,ANTENNA_PORT,MUX_PORT,MUX_PORT2,READ_COUNT,RSSI,FREQ,GPI1_STATE,GPI2_STATE,UTC

reads.csv: ID,HEX_EPC,ANTENNA_PORT,MUX_PORT,MUX_PORT2,RSSI,RF_PHASE,FREQ,READ_COUNT,UTC

Typical cases

This are some cases that may be useful

How to configure the time repetition period of a tag

As explained previously not all reads are registered into the CSV files, reads from the same EPC are only registered every certain interval.

To control that time interval follow this steps.

Step 1:
Erase the older logs (optional).

Step 2:
Inside of the configuration of CSVService in Services change the value "Tag TTL time (s)?" with the desired period in seconds unit. Save the current configuration.

Step 3:
Read some tags. Download the CSV data, each unique EPC will only be registered at the defined interval.

How to filter data by event type

The CSV data contains events of different types.

It is useful to filter events by one or more event types. To filter data by TAG_READ events follow this steps:

Step 1:
Download the SCV log file, this will contain the reads and the events. Open it with the CSV editor of preference.

Step 2:
Select the filter or auto filter tool of the CSV editor.

Step 3:
Filter by TAG_READ.