Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Parking Session Logging

The second generation of Parking Session Logging API is designed for comprehensive parking session representation.

It provides robust session integrity control and auto-correction service in the case of partial sensor message loss.

This API allows customers to focus on business applications of parking sessions instead of postprocessing of individual sensor occupancies.

This API includes sensors’ positioning, grouping and zoning attributes so that your data receiving service can be stateless.

General Info

The API can be used with all types of parking lots: marked spaces, open bays, off-street parking and garages.

Please, watch the video at the end of this document to learn how to set up RabbitMQ Endpoint in the Nwave Console.

Features

Parking session correction is the most important functionality of Parking Session Logging API 2.0. The wireless data reception is not perfect, so some messages may be lost. To minimize this effect, Nwave recommends to use at least 2 stations in the same area, but message loss is still possible. Nwave Cloud analyzes additional data from parking sensors and recovers most of the lost messages. When a message is recovered, the Nwave Cloud analyzes occupancy history and makes a correction. It may correct the session’s start or end time as well as create new parking sessions.

Another feature is the addition of error start and end time. When 2 consecutive messages are lost, the Cloud cannot make a high-quality session correction, but to minimize negative effect Nwave has added delta_time_sec field. This field represents the maximum deviation in seconds from event time. This way, our API users can have information about sessions that are definitely correct and sessions that possibly had a time error and the duration of that error. This is useful in systems which generate data for parking enforcement applications - an inspector can be directed only to parking lots where cars are parked too long.

API details

Data objects

Every parking session is described by the following data structure:

{
    "parking_session_uuid":string,
    "correction_counter":integer,
    "session_start":{
        "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
        "delta_time_sec":integer,
        "message_trace_ids":[strings]
    },
    "partial_end":{
        "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
        "delta_time_sec":integer,
        "message_trace_ids":[strings],
        "network_id":string, // unexpectedly released position
        "custom_id":string
    },
    "session_end":{
        "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
        "delta_time_sec":integer,
        "message_trace_ids":[strings]
    },
    "involved_devices":[
        {
             "serial_id":string, # deprecated
             "device_id": string,
             "hardware_type":string,
             "position":{
                 "network_id":string,
                 "custom_id":string,
                 "latitude":float,
                 "longitude":float,
                 "group":{
                     "id":int,
                     "type":string,
                     "name":string,
                     "custom_id":string,
                     "zone_id":int,
                     "level_id": int,
                     "level_name": str,
                     "floor_number": int
                 },
                 "group_inner_id":int,
            }
        },
        ...
    ],
    "auth_ble_tag": {
        "tag_id": str,
        "event_time": string
    },
    "auth_mobile": {
        "session_id": string,
        "event_time": string
    }
}

Objects description

parking_session_uuid - a unique parking session-id;

correction_counter - total number of corrections.


"session_start":{
    "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
    "delta_time_sec":integer,
    "message_trace_ids":[strings]
}

The object session_startis sent to open a parking occupancy session:

event_time - a session start timestamp;

delta_time_sec - an error of session start time in seconds;

message_trace_ids - tracing identifiers of raw device messages related to the session start


"session_end":{
    "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
    "delta_time_sec":integer,
    "message_trace_ids":[strings]
}

The object session_end is sent to close a parking occupancy session:

event_time - a session end timestamp;

delta_time_sec - an error of session end time in seconds;

message_trace_ids - tracing identifiers of raw device related to the session end.


"partial_end":{
    "event_time":string // timestamptz, yyyy-MM-dd'T'HH:mm:ss.SSSXXX (2019-06-13T16:16:51.000+00:00)
    "delta_time_sec":integer,
    "message_trace_ids":[strings],
    "network_id":string,
    "custom_id":string
}

partial_end object can be received only for Open Bay parking type

A partial end is an event where two sensors were occupied in an open bay session but only one sensor was released. This is a temporary state of parking sessions. A session_end object will always be sent when the second sensor is released in that session.

event_time - a timestamp of unexpected sensor release;

delta_time_sec - a timestamp error in seconds;

message_trace_ids - tracing identifiers of messages which describe unexpected release;

network_id - network_id of a sensor’s position that was unexpectedly released;

custom_id- a user-defined identifier of a sensor’s position that was unexpectedly released.


"involved_devices":[
  {
        "serial_id":string,, # deprecated
        "device_id": string,
        "hardware_type":string,
        "position":{
            "network_id":string,
            "custom_id":string,
            "latitude":float,
            "longitude":float,
            "group":{
                "id":int,
                "type":string,
                "name":string,
                "custom_id":string,
                "zone_id":int,
                "level_id": int,
                "level_name": str,
                "floor_number": int
            },
            "group_inner_id":int,
        }
    },
    ...
]

involved_devices - a list which contains a description of parking sensors involved in a parking session;

serial_id - a parking sensor serial ID (deprecated);

device_id - a parking sensor serial ID;

hardware_type - a parking sensor hardware model;

position.network_id - a position network_id;

position.custom_id- a position user-defined identifier;

position.latitude/longitude - a position geolocation coordinates;

position.group.id- a position group ID;

position.group.type - a position group type. Possible values: general, unmarked_parking_bay, marked_parking_bay;

position.group.name - a position group name;

position.group.custom_id - a position group user-defined ID;

position.group.zone_id - an ID of a zone which contains positions group;

position.group.level_id - an ID of level (floor) which contains positions group;

position.group.level_name - a Name of level (floor) which contains positions group;

position.group.floor_number - a floor number which contains positions group;

position.group_inner_id - an index number of a position in positions group.


"auth_ble_tag": {
    "tag_id": str,
    "event_time": string
}

The object auth_ble_tag contains user authorization information if a user authorized on parking space using Nwave’s BLE-Tag;

tag_id - ID of BLE-Tag;

event_time- a timestamp of user authorization.


"auth_mobile": {
    "session_id": string,
    "event_time": string
}

The object auth_mobilecontains user authorization information if a user authorized on a parking space using mobile application connected to the Nwave One-Click Check-in service;

one_click_session_id - an ID of One-Click Check-in session;

event_time- a timestamp of user authorization.

Endpoint & Route Setup

RMQ Endpoint & Routes Video.mp4

  • No labels