Data API

Motivation

Data API - is a bidirectional streaming interface based on WebSockets and designed for message exchange between Network Server (NS) and Application Server (AS) in realtime mode. All LoRaWAN specific operations like OTAA activation are also perfomed using this interface.

Data API designed as a realtime interface and do not provide any persistent message storage, device state storage and so on. In other words it is a pure streaming interface between AS and NS.

Data API is WebSocket based, which allows to develop serverless applications and widely used in different programming languages.

Endpoint URLs

Everynet is opearting different regions and private, including generale EU and US regions. Each region use it's own endpoint URL.

Custom regions and private networks could get endpoint URLs Everynet support.

wss://ns.eu.everynet.io/api/v1.0/data - European region 
wss://ns.us.everynet.io/api/v1.0/data - United States region

Server locations

LoRaWAN is a synchronous and real-time communication protocol. It means that overall time of message processing is limited by default value of one second. It includes all ping times, processing in NS and AS and so on. Unfortunately, downlink buffering on NS side opens a huge security flaw in a protocol and this is the reason why Everynet is not buffering downlink messages. It leads to a situation when ping time between AS and NS becomes critical. Please make sure that your AS is located at the same region as NS.

Features

Data API interface provide the following features:

  • Continuous bidirectional connection for realtime message receive and send and avoid constant NS polling for a new messages

  • Message reception in JSON format. All LoRaWAN compliant versions are supported: confirmed/unconfirmed, uplinks, join requests, MAC-commands. All metadata could be provided as well: RF parameters, duplicates and so on...

  • Downlink message transmission including MAC-commands is performed in optimal way. The following parameters are optimized: network downlink capacity, best RF channel loss, best chances to reach gateway in time (ping time).

  • Receiving of service/debug messages from NS: like MIC errors or incorrect counter handling.

  • Server based message filtering: by device identifier, gateway, device tag, application, ...

  • Backward compatibility is achieved using message versioning system.

Getting started

  1. Install ant WebSocket client, for example wscat:
    npm install -g wscat

  2. Generate Data API key in NS GUI. We got this key: 9ec85978f3fa1ab6f953406269f69a95

  3. Use this URL to connect to Data API:
    wss://ns.us.everynet.io/api/v1.0/data?access_token=9ec85978f3fa1ab6f953406269f69a95

    Using wscat you can connect to the Data API stream:

    wscat -c "wss://ns.eu.everynet.io/api/v1.0/data?access_token=9ec85978f3fa1ab6f953406269f69a95"

  4. PROFIT!!!111

results matching ""

    No results matching ""