This document specifies the MQTT API between Pontosense and Integrator systems:
Production MQTT broker endpoint. Please retrieve the correct endpoint for your region from the Developer Portal.
The client must use the certificates from the Developer Portal to connect to the MQTT broker. Please contact Pontosense to confirm the which server the Integrator should connect to, which will have different developer porotals.
Central topic for receiving all messages from Pontosense sensors and platform.
Receive device events
Subscribe to receive all events from devices
Available only on servers:
The client ID from Pontosense. Get the id from the Developer Portal.
Accepts one of the following messages:
Device offline notification
Report the last will and testament of a device. Regarded as an offline notification.
{
"method": "lwt.report",
"params": {
"sn": "ATR_GN_P4-250120-09527",
"orgId": 153498752
}
}
Device event notification
MQTT Event Message Format Overview
This message reports various events from a device. Multiple event types may be included in a single message.
The presence of a specific event property indicates that the corresponding event has occurred.
fall: [] -> fall: [{id: 1, x: 154, y: 234, z: 174}]
fall: [{id: 1, x: 154, y: 234, z: 174}] -> fall: []
bedin: [] -> bedin: [{id: 1, x: 154, y: 234, z: 174}]
bedin: [{id: 1, x: 154, y: 234, z: 174}] -> bedin: []
couchin: [] -> couchin: [{id: 1, x: 154, y: 234, z: 174}]
doorin: [] -> doorin: [{id: 1, x: 154, y: 234, z: 174}]
doorout: [] -> doorout: [{id: 1, x: 154, y: 234, z: 174}]
radar: {error: 1}
upgrade: {"state": 2, "code": 0}
{
"method": "event.report",
"params": {
"sn": "ATR_GN_P4-250120-09527",
"orgId": 153498752,
"online": {},
"presence": {
"bedin": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"couchin": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"doorin": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"doorout": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"pfall": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"fall": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
],
"other": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175
}
]
},
"radar": {
"error": 0
},
"angle": {
"pitch": -1,
"pitch_max": 2,
"pitch_min": -2,
"roll": 0,
"roll_max": 10,
"roll_min": -10
},
"wifi": {
"rssi": -50
},
"upgrade": {
"state": 1,
"code": 0
}
}
}
Event notification
Final notifications generated based on event.reports. This is preferred to event.reports if the integrators do not want to track the status of events.
{
"method": "event.notify",
"params": {
"sn": "ATR_GN_P4-250120-09527",
"orgId": 153498752,
"type": "online",
"data": {
"errorCode": 0,
"positions": [
{
"x": 156,
"y": 234,
"z": 175
}
]
}
}
}
Device configuration notification
Report the configuration of a sensor device every 30 mins.
{
"method": "sensor.config.report",
"params": {
"sn": "ATR_GN_P4-250120-09527",
"orgId": 153498752,
"scanArea": {
"left": 300,
"right": 300,
"height": 220
},
"fall": {
"threshold": 90
},
"firmware": {
"model": 2,
"version": "1.1.0",
"extra": "string"
}
}
}
Target location notification
Report the location of targets from a sensor.
{
"method": "location.report",
"params": {
"sn": "ATR_GN_P4-250120-09527",
"orgId": 153498752,
"positions": [
{
"id": 1,
"x": 156,
"y": 234,
"z": 175,
"state": 40,
"zoneId": 1
}
]
}
}
Central topic for receiving all messages from Pontosense sensors and platform.
Receive platform notifications
Subscribe to receive all notifications from platform
Available only on servers:
The client ID from Pontosense. Get the id from the Developer Portal.
Accepts the following message:
New firmware available notification
Notification for new firmware release. Detailed firmware info. could be retrieved with the HTTP API.
{
"method": "firmware.notify",
"params": {
"version": "1.1.0",
"model": 2
}
}
Device offline notification
Report the last will and testament of a device. Regarded as an offline notification.
Device event notification
MQTT Event Message Format Overview
This message reports various events from a device. Multiple event types may be included in a single message.
The presence of a specific event property indicates that the corresponding event has occurred.
fall: [] -> fall: [{id: 1, x: 154, y: 234, z: 174}]
fall: [{id: 1, x: 154, y: 234, z: 174}] -> fall: []
bedin: [] -> bedin: [{id: 1, x: 154, y: 234, z: 174}]
bedin: [{id: 1, x: 154, y: 234, z: 174}] -> bedin: []
couchin: [] -> couchin: [{id: 1, x: 154, y: 234, z: 174}]
doorin: [] -> doorin: [{id: 1, x: 154, y: 234, z: 174}]
doorout: [] -> doorout: [{id: 1, x: 154, y: 234, z: 174}]
radar: {error: 1}
upgrade: {"state": 2, "code": 0}
Event notification
Final notifications generated based on event.reports. This is preferred to event.reports if the integrators do not want to track the status of events.
Device configuration notification
Report the configuration of a sensor device every 30 mins.
Target location notification
Report the location of targets from a sensor.
New firmware available notification
Notification for new firmware release. Detailed firmware info. could be retrieved with the HTTP API.
The serial number of the device
The organization ID (client ID) of the sensor
The state of the target:
The ID of the zone in the sensor
Sensor models
The (firmware) version number in X.Y.Z format
The detected target object
The position of a target in 3D space (measured in centimeters)
The scan area configuration of the sensor