Objective Device API 2.0.0

This documents describes the async api for device communication through mqtt.

Servers

  • tcp://brokerIp:1883mqtt 3.1.1mqtt

Operations

  • SUB objt/device/${tenant}/${site}/${device}/command

    The topic on which can be subscribed to receive device commands for a certain device

    Subscribe to Device Command

    Operation IDdeviceCommand
    tenant
    required
    string
    uid: tenant

    Tenant

    site
    required
    string
    uid: site

    Site

    device
    required
    string
    uid: device

    Device name

    Accepts the following message:

    Device CommanddeviceCommandMessage
    Correlation ID$message.payload#/headers/correlationData
    object
    uid: deviceCommandPayload

    Examples

  • PUB objt/device/${tenant}/${site}/${device}/event

    The topic on which device events can be published for a certain device

    Publish Device Event

    Operation IDdeviceEvent
    tenant
    required
    string
    uid: tenant

    Tenant

    site
    required
    string
    uid: site

    Site

    device
    required
    string
    uid: device

    Device name

    Accepts the following message:

    Device EventdeviceEventMessage
    object
    uid: deviceEventPayload

    Payload for the device event.

    Examples

Messages

  • #1Device EventdeviceEventMessage
    object
    uid: deviceEventPayload

    Payload for the device event.

  • #2Device CommanddeviceCommandMessage
    Correlation ID$message.payload#/headers/correlationData
    object
    uid: deviceCommandPayload

Schemas

  • object
    uid: deviceEventPayload

    Payload for the device event.

  • object
    uid: deviceCommandPayload
  • object
    uid: messageHeader
  • object
    uid: responseMessageHeader
  • object
    uid: deviceCommandResponse

    The response which must be posted on the responseTopic

  • object
    uid: deviceEventResponse

    The result of the processing of the device event which will be posted on the responseTopic if both responseTopic and correlationData are provided through the headers. Omit these headers if no result is required.