Standard Templates (Direct & Smart)
Direct vs Smart message types
Direct Message Types are actually raw messages received from sensors, which are formatted into JSON. You are able to configure a message of this types of processing scenario and set up your own HTTP-body format.
Smart message types have a pre-defined template body that cannot be changed. These messages are the results of the Nwave Parking Analytics system. They support the following features:
Automatic parking session correction and parking session integrity in the event of message loss
Occupancy event deduplication in the event of two occupancies (unmarked bays only)
Filtering of extremely short parking sessions (unmarked bays only)
Advanced handling of unmarked bay occupancies
Easy transition to RabbitMQ protocols (RTA & Parking Sessions) due to identical structure
Smart message types are recommended for payment applications
Category | Message Type | Description |
---|---|---|
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 Occupancy | 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 |
Â
Preset Templates for Direct Message Types (Editable format)
These are template bodies of the template presets available at your console. You can create custom templates for each direct message type and the templates below can be used as a starting point.
Message Type | Template Body |
---|---|
Status Change | {
"device_id": "{device_id}",
"position":{
"network_id": "{network_id}",
"custom_id": "{custom_id}",
"latitude": {latitude},
"longitude": {longitude},
"group_inner_id": {group_inner_id},
"group":{
"id": {group_id},
"name": "{group_name}",
"zone_id": {zone_id}
}
},
"message_type": "status_change",
"occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}",
"previous_occupancy_status_duration_min": {parsed["previous_occupancy_status_duration_min"]},
"voltage_V": {parsed["voltage_V"]}
} |
{
"device_id": "10000",
"position":{
"network_id": "908db095-e113-4248-998b-694c33850bbe",
"custom_id": "B03",
"latitude": 1.01,
"longitude": -3.732,
"group_inner_id": 1,
"group":{
"id": 1,
"name": "Group Name",
"zone_id": 1
}
},
"message_type": "status_change",
"occupied": "occupied",
"previous_occupancy_status_duration_min": 15,
"voltage_V": 3.1
} | |
User Registration | {
"device_id": "{device_id}",
"position":{
"network_id": "{network_id}",
"custom_id": "{custom_id}",
"latitude": {latitude},
"longitude": {longitude},
"group_inner_id": {group_inner_id},
"group":{
"id": {group_id},
"name": "{group_name}",
"zone_id": {zone_id}
}
},
"message_type": "user_registration",
"occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}",
"voltage_V": {parsed["voltage_V"]},
"auth_ble_tag": {
"tag_id": "{parsed["user_ID"]}",
"event_time": "{message_time}"
}
} |
| |
Heartbeat | |
 |
Â
Preset Templates for Smart Message Types (Fixed format)
These are examples of HTTP request bodies produced by smart templates. They cannot be modified but you can use the example requests as reference.
Message Type | Example Request Body |
---|---|
Group Availability | |
Parking Session |
Â