Pontosense Integration API (Part MQTT) v4.0.2

This document specifies the MQTT API between Pontosense and Integrator systems:

  • Sensors report events to the Pontosense MQTT broker, which forwards these events to the Integrator.
  • Integrators must subscribe to the MQTT broker using certificates obtained from the Developer Portal and follow the AWS SDK to receive event notifications. Please contact Pontosense to confirm which server your integration should connect to, as different regions use different developer portals.
  • This is a unidirectional communication channel—Integrators can only subscribe to receive messages and cannot publish to the MQTT broker.
  • As this API follows a publish-subscribe pattern for event notifications, no responses are required from subscribers.

Servers

  • secure-mqtt://iot.pontosense.com:8883/secure-mqttproduction

    Production MQTT broker endpoint. Please retrieve the correct endpoint for your region from the Developer Portal.

    Security:
    • X509:

      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.

Operations

  • RECEIVE /client/{clientId}

    Central topic for receiving all messages from Pontosense sensors and platform.

    Receive device events

    Subscribe to receive all events from devices

    Operation IDreceiveDeviceMessages

    Available only on servers:

    object
    clientId
    required
    string

    The client ID from Pontosense. Get the id from the Developer Portal.

    Accepts one of the following messages:

    • #0Last Will and Testament Report

      Device offline notification

      Message IDdevice.offline

      Report the last will and testament of a device. Regarded as an offline notification.

      object

      Examples

    • #1Event Report

      Device event notification

      Message IDdevice.events

      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 Detected
        • A fall is detected when the fall list was previously empty and now contains one or more entries.
          Each entry includes relative coordinates (x, y, z) of the fallen person in the room.
        • Example:
          fall: [] -> fall: [{id: 1, x: 154, y: 234, z: 174}]
          
      • Fall Recovered
        • A fall recovery is detected when the fall list was previously not empty and now becomes empty.
        • Example:
          fall: [{id: 1, x: 154, y: 234, z: 174}] -> fall: []
          
      • Bed In Detected
        • A bed-in event is detected when the bedin list was previously empty and now contains one or more entries.
          Each entry includes the relative position of the person in bed.
        • Example:
          bedin: [] -> bedin: [{id: 1, x: 154, y: 234, z: 174}]
          
      • Bed Exit Detected
        • A bed exit is detected when the bedin list was previously not empty and now becomes empty.
        • Example:
          bedin: [{id: 1, x: 154, y: 234, z: 174}] -> bedin: []
          
      • Couch In Detected
        • A couch-in event is detected when the couchin list was previously empty and now contains one or more entries.
          Each entry includes the relative position of the person on the couch.
        • Example:
          couchin: [] -> couchin: [{id: 1, x: 154, y: 234, z: 174}]
          
      • Door In Detected
        • A door-in event is detected when the doorin list was previously empty and now contains one or more entries.
          Each entry includes the relative position of the person entering through the door.
        • Example:
          doorin: [] -> doorin: [{id: 1, x: 154, y: 234, z: 174}]
          
      • Door Out Detected
        • A door-out event is detected when the doorout list was previously empty and now contains one or more entries.
          Each entry includes the relative position of the person exiting through the door.
        • Example:
          doorout: [] -> doorout: [{id: 1, x: 154, y: 234, z: 174}]
          
      • Radar Error
        • A radar error is detected when the radar.error value is non-zero.
        • Example:
          radar: {error: 1}
          
        • error code:
          • 1: The radar loses contact.
          • 2: angle error.
          • 3: Insufficient radar voltage
      • Radar Upgrade Result
        • The upgrade result is determined from the upgrade object:
          • state: indicates the upgrade status
          • code: indicates the result
        • Example:
          upgrade: {"state": 2, "code": 0}
          
        • State Values:
          • 1: Upgrading
          • 2: Upgrade complete
        • Result Codes:
          • 0: Success
          • 2: Power down
          • 3: Radar crash post-upgrade
          • 4: Radar switching failed
          • 6: No config received
          • 7: OTA task creation failed
          • 8: Manually canceled upgrade
          • 9: Auto-retry limit exceeded
          • 10: Wi-Fi disconnected
          • 11: HTTP connection failed
          • 12: HTTP connection closed
          • 13: HTTP data read error
          • 14: Firmware header mismatch
          • 15: Firmware MD5 verification failed
          • 16: Firmware cache partition error
          • 17: HTTP download timeout
          • 30: Radar unresponsive or timeout
          • 31: No transmission start from radar
          • 32: Radar data transmission failed
          • 33: Radar data transmission timeout
          • 34: Radar disconnected
          • 51: ESP32 OTA partition open failed
          • 52: ESP32 OTA write failed
          • 53: ESP32 firmware verification failed
          • 54: ESP32 failed to set startup partition
      object

      Examples

    • #2Event Notification

      Event notification

      Message IDevents.notifications

      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.

      object

      Examples

    • #3Sensor Configuration Report

      Device configuration notification

      Message IDdevice.config

      Report the configuration of a sensor device every 30 mins.

      object

      Examples

    • #4Location Report

      Target location notification

      Message IDdevice.location

      Report the location of targets from a sensor.

      object

      Examples

  • RECEIVE /client/{clientId}

    Central topic for receiving all messages from Pontosense sensors and platform.

    Receive platform notifications

    Subscribe to receive all notifications from platform

    Operation IDreceivePlatformMessages

    Available only on servers:

    object
    clientId
    required
    string

    The client ID from Pontosense. Get the id from the Developer Portal.

    Accepts the following message:

    Firmware Notification

    New firmware available notification

    Message IDsystem.firmware

    Notification for new firmware release. Detailed firmware info. could be retrieved with the HTTP API.

    object

    Examples

Messages

  • #1Last Will and Testament Report

    Device offline notification

    Message IDLwtReport

    Report the last will and testament of a device. Regarded as an offline notification.

    object
  • #2Event Report

    Device event notification

    Message IDEventReport

    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 Detected
      • A fall is detected when the fall list was previously empty and now contains one or more entries.
        Each entry includes relative coordinates (x, y, z) of the fallen person in the room.
      • Example:
        fall: [] -> fall: [{id: 1, x: 154, y: 234, z: 174}]
        
    • Fall Recovered
      • A fall recovery is detected when the fall list was previously not empty and now becomes empty.
      • Example:
        fall: [{id: 1, x: 154, y: 234, z: 174}] -> fall: []
        
    • Bed In Detected
      • A bed-in event is detected when the bedin list was previously empty and now contains one or more entries.
        Each entry includes the relative position of the person in bed.
      • Example:
        bedin: [] -> bedin: [{id: 1, x: 154, y: 234, z: 174}]
        
    • Bed Exit Detected
      • A bed exit is detected when the bedin list was previously not empty and now becomes empty.
      • Example:
        bedin: [{id: 1, x: 154, y: 234, z: 174}] -> bedin: []
        
    • Couch In Detected
      • A couch-in event is detected when the couchin list was previously empty and now contains one or more entries.
        Each entry includes the relative position of the person on the couch.
      • Example:
        couchin: [] -> couchin: [{id: 1, x: 154, y: 234, z: 174}]
        
    • Door In Detected
      • A door-in event is detected when the doorin list was previously empty and now contains one or more entries.
        Each entry includes the relative position of the person entering through the door.
      • Example:
        doorin: [] -> doorin: [{id: 1, x: 154, y: 234, z: 174}]
        
    • Door Out Detected
      • A door-out event is detected when the doorout list was previously empty and now contains one or more entries.
        Each entry includes the relative position of the person exiting through the door.
      • Example:
        doorout: [] -> doorout: [{id: 1, x: 154, y: 234, z: 174}]
        
    • Radar Error
      • A radar error is detected when the radar.error value is non-zero.
      • Example:
        radar: {error: 1}
        
      • error code:
        • 1: The radar loses contact.
        • 2: angle error.
        • 3: Insufficient radar voltage
    • Radar Upgrade Result
      • The upgrade result is determined from the upgrade object:
        • state: indicates the upgrade status
        • code: indicates the result
      • Example:
        upgrade: {"state": 2, "code": 0}
        
      • State Values:
        • 1: Upgrading
        • 2: Upgrade complete
      • Result Codes:
        • 0: Success
        • 2: Power down
        • 3: Radar crash post-upgrade
        • 4: Radar switching failed
        • 6: No config received
        • 7: OTA task creation failed
        • 8: Manually canceled upgrade
        • 9: Auto-retry limit exceeded
        • 10: Wi-Fi disconnected
        • 11: HTTP connection failed
        • 12: HTTP connection closed
        • 13: HTTP data read error
        • 14: Firmware header mismatch
        • 15: Firmware MD5 verification failed
        • 16: Firmware cache partition error
        • 17: HTTP download timeout
        • 30: Radar unresponsive or timeout
        • 31: No transmission start from radar
        • 32: Radar data transmission failed
        • 33: Radar data transmission timeout
        • 34: Radar disconnected
        • 51: ESP32 OTA partition open failed
        • 52: ESP32 OTA write failed
        • 53: ESP32 firmware verification failed
        • 54: ESP32 failed to set startup partition
    object
  • #3Event Notification

    Event notification

    Message IDEventNotification

    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.

    object
  • #4Sensor Configuration Report

    Device configuration notification

    Message IDSensorConfigReport

    Report the configuration of a sensor device every 30 mins.

    object
  • #5Location Report

    Target location notification

    Message IDLocationReport

    Report the location of targets from a sensor.

    object
  • #6Firmware Notification

    New firmware available notification

    Message IDFirmwareNotify

    Notification for new firmware release. Detailed firmware info. could be retrieved with the HTTP API.

    object

Schemas

  • sn
    string

    The serial number of the device

  • orgId
    integer
    format: int64

    The organization ID (client ID) of the sensor

  • targetState
    integer

    The state of the target:

    • 40: occupied
    • 80: on couch
    • 90: in bed
    • 99: suspected fall
    • 100: fall
      Allowed values:
    • 40
    • 80
    • 90
    • 99
    • 100
  • zoneId
    integer
    format: int32[ 1 .. 255 ]

    The ID of the zone in the sensor

  • model
    integer
    format: int32

    Sensor models

    • 2: P2
    • 4: P4
      Allowed values:
    • 2
    • 4
  • version
    string
    must match: ^(\d+)\.(\d+)\.(\d+)$

    The (firmware) version number in X.Y.Z format

  • object allOf

    The detected target object

  • object

    The position of a target in 3D space (measured in centimeters)

  • object

    The scan area configuration of the sensor