Overview

Introduction

To send data over HTTP, device messages have to be transformed into an HTTP request. The blueprint for transforming a device message into an HTTP request is known as a template. Sensors send different types of messages with different sets of fields, therefore a Template has to be defined for each message type. Templates are grouped together into Template Suites and in order for messages to be sent, template suites have to be connected to zones.

Template Suites

Template suites:

  • Store a collection of templates

  • Connect to zones with devices

  • Used for monitoring HTTP calls

Template 

A template is a blueprint for building an HTTP request for a single message type.

Each template has the following fields:

Field

Description

Field

Description

Name

A unique reference for a template in a template suite

Message Type

Type of message that this template will be applied to.

Method

HTTP method that will be used for in a request

URL

URL to which a request is made

Header

Request headers, typically used for authorization

Body

Request body defined as a JSON string

Authorization Methods

  1. Basic HTTP(s) Authentication using authorization header in the format of "Basic " + Base64 (username: password)

  2. API-Key

Message Types

Different message types have a set of common and distinct attributes that can be used in the template.

Message types have two main categories – Direct and Smart.

The main difference between these two categories is that Smart message types have a pre-defined template body that cannot be changed. The resulting message structure is identical to RabbitMQ protocols (RTA & Parking Sessions) and supports Parking Session messages that are crucial for unmarked parking bays and useful for payment applications. It also allows for an easier transition to RabbitMQ.

Category

Message Type

 

Category

Message Type

 

Direct

Status Change

status change message is sent from a sensor when its value has been changed (occupancy state for parking sensor or number of detected cars for car counters

Heartbeat

heartbeat message is sent after every constant time period of unchanging sensor state

User Registration

user registration message is sent when a user is authorized on the sensor using a Bluetooth-tag

Smart

Group Availability

status change message in a group format with group summary

Parking Sessions

smart parking session messages formed by Nwave’s backend, with auto-correction for lost messages

Â