rework mqtt api
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Torma Kristóf 2020-07-26 17:51:21 +02:00
parent 4e6901d13a
commit 82a28e3eed
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -1,7 +1,7 @@
asyncapi: 2.0.0
info:
title: Birbnetes API
version: '2.0.0'
version: '2.0.1'
description: |
Async messages sent between major components of the Birbnetes system.
contact:
@ -105,7 +105,7 @@ channels:
operationId: sendprobability
message:
$ref: '#/components/messages/output'
device/sensor:
device/sensor/{deviceID}/{sensorID}:
bindings:
mqt:
qos: 1
@ -124,7 +124,7 @@ channels:
operationId: sendSensorData
message:
$ref: '#/components/messages/sensor'
device/control:
device/control/{deviceID}:
bindings:
mqt:
qos: 2
@ -132,18 +132,37 @@ channels:
bindingVersion: 0.1.0
description: Command messages sent by the cloud
subscribe:
summary: Recieve control messages
description: Shutdown and powerof messages sent by cloud
operationId: recieveCommand
summary: Recieve control messages of device
description: Shutdown and powerof messages sent by cloud to a particular device
operationId: recieveDeviceCommand
message:
$ref: '#/components/messages/controlmessage'
publish:
summary: Send control messages
description: Send shutdown and poweron commands to a device or sensor.
operationId: sendCommand
summary: Send control messages to device
description: Send shutdown and poweron commands to a device.
operationId: sendDeviceCommand
message:
$ref: '#/components/messages/controlmessage'
device/status:
device/control/{deviceID}/{sensorID}:
bindings:
mqt:
qos: 2
retain: true
bindingVersion: 0.1.0
description: Command messages sent by the cloud
subscribe:
summary: Recieve control messages of sensor
description: Shutdown and powerof messages sent by cloud to a sensor
operationId: recieveSensorCommand
message:
$ref: '#/components/messages/controlmessage'
publish:
summary: Send control messages to sensor
description: Send shutdown and poweron commands to a sensor.
operationId: sendSensorCommand
message:
$ref: '#/components/messages/controlmessage'
device/status/{deviceID}:
bindings:
mqt:
qos: 0
@ -151,18 +170,36 @@ channels:
bindingVersion: 0.1.0
description: Status messages of a device
subscribe:
summary: Recieve device status messages
summary: Recieve device status messages of device
description: Operation faliure or device status information
operationId: recieveStatusMessage
message:
$ref: '#/components/messages/statusmessage'
publish:
summary: Send status messages
description: Send operational messages to interested parties
summary: Send status messages of device
description: Send operational messages of a device to interested parties
operationId: sendStatusMessage
message:
$ref: '#/components/messages/statusmessage'
device/status/{deviceID}/{sensorID}:
bindings:
mqt:
qos: 0
retain: true
bindingVersion: 0.1.0
description: Status messages of a device
subscribe:
summary: Recieve device status messages of sensor
description: Operation faliure or sensor status information
operationId: recieveStatusMessage
message:
$ref: '#/components/messages/statusmessage'
publish:
summary: Send status messages of sensor
description: Send operational messages of a sensor to interested parties
operationId: sendStatusMessage
message:
$ref: '#/components/messages/statusmessage'
components:
securitySchemes:
user_pass:
@ -242,41 +279,17 @@ components:
samplePayload:
type: object
properties:
deviceID:
type: string
format: uuid
summary: Unique ID used to identify a particular device in the system.
sensorID:
type: string
format: uuid
summary: Unique ID used to identify a particular sensor on a device.
measurement:
type: string
summary: Measurement data
controlPayload:
type: object
properties:
deviceID:
type: string
format: uuid
summary: Unique ID used to identify a particular device in the system.
sensorID:
type: string
format: uuid
summary: Unique ID used to identify a particular sensor on a device. (May be wildcard or empty)
command:
type: string
enum: ["online", "offline", "doAlert"]
statusPayload:
type: object
properties:
deviceID:
type: string
format: uuid
summary: Unique ID used to identify a particular device in the system.
sensorID:
type: string
format: uuid
summary: Unique ID used to identify a particular sensor on a device. (May be wildcard or empty)
status:
type: string