asyncapi: 2.4.0
channels:
  /device/{deviceId}/alarm:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/cameraAlarm
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/cameraAlarm'
      tags:
        - name: camera
  /device/{deviceId}/counter:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/cameraCounter
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/cameraCounter'
      tags:
        - name: camera
  /device/{deviceId}/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/cameraStatus'
      tags:
        - name: camera
components:
  channelBindings:
    MQTTCommandBinding:
      mqtt:
        qos: 2
        retain: false
    MQTTStatusBinding:
      mqtt:
        qos: 1
        retain: true
  messages:
    cameraAlarm:
      description: |-
        This will be sent when a specific event happens

          **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/cameraAlarm
      tags:
        - name: camera
    cameraCounter:
      description: |-
        This will be sent periodically with the updated counter value

          **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/cameraCounter
      tags:
        - name: camera
    cameraStatus:
      description: |-
        This will be sent regularly to show the status

          **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/cameraStatus
      tags:
        - name: camera
info:
  contact:
    email: vanessa.orani@aitek.it
    name: Vanessa Orani
  description: |-
    # REXASI-PRO Camera ASynchron API
    This document is written from the Point of View from the camera controller (NVR).

    ## YAML specification

    You can find the newest openapi specification on [openapi.yaml](openapi.yaml).
    The human readable description of the openapi can be found [/openapi.html](openapi.html).

    You can find the newest asyncapi specification on [camera-asyncapi.yaml](camera-asyncapi.yaml).
    The human readable description of the asyncapi can be found [camera-asyncapi.html](camera-asyncapi.html).

    **NOTE**: Commit: c2d59e1 Date: 2024.07.03_10:54:52
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: REXASI-PRO Camera ASynchron API
  version: v0.1
servers:
  production:
    protocol: MQTTS
    url: orchestrator.rexasi-pro.spindoxlabs.com:8883
  testing:
    protocol: MQTT
    url: localhost:1883
