"asyncapi: 2.5.0\ninfo:\n  title: Reduxi Gateway MQTT specification\n  version: '1.0'\n  description: \n    Generated on <a href=\"https://studio.asyncapi.com/\">studio.asyncapi.com</a> with <a href=\"https://mqtt-gateway.support.reduxi.eu/asyncapi.yml\">YAML file<a/>.\ndefaultContentType: application/json\n\n\nchannels:\n  gateways/{gatewayId}/status:\n    description:\n      Information about gateway\n    parameters:\n      gatewayId:\n        - $ref: '#/components/parameters/gatewayId'\n    publish:\n      operationId: publishStatus\n      traits:\n        - $ref: '#/components/operationTraits/mqtt'\n      message:\n        $ref: '#/components/messages/status'\n\n  gateways/{gatewayId}/data:\n    description:\n      Readout from gateway\n    parameters:\n      gatewayId:\n        - $ref: '#/components/parameters/gatewayId'\n    publish:\n      operationId: publishData\n      traits:\n        - $ref: '#/components/operationTraits/mqtt'\n      message:\n        $ref: '#/components/messages/data'\n\n  gateways/{gatewayId}/cmd:\n    description:\n      Control gateway\n    parameters:\n      gatewayId:\n        - $ref: '#/components/parameters/gatewayId'\n    subscribe:\n      operationId: subscribeCommand\n      traits:\n        - $ref: '#/components/operationTraits/mqtt'\n      message:\n        $ref: '#/components/messages/cmd'\n\n\ncomponents:\n  messages:\n    status:\n      name: status\n      title: Gateway status\n      contentType: application/json\n      payload:\n        $ref: '#/components/schemas/status'\n\n    data:\n      name: data\n      title: Readouts from gateway\n      contentType: application/json\n      payload:\n        $ref: '#/components/schemas/data'\n\n    cmd:\n      name: cmd\n      title: Control gateway\n      contentType: application/json\n      payload:\n        $ref: '#/components/schemas/cmd'\n\n    \n  schemas:\n\n    status:\n      type: object\n      properties:\n        unitId:\n          type: string\n          example: \"GW123456\"        \n\n    data:\n      type: object\n      properties:\n        currentL1:\n          type: number\n          example: 123\n        currentL2:\n          type: number\n          example: 123\n        currentL3:\n          type: number\n          example: 123\n        voltageL1:\n          type: number\n          example: 230\n        voltageL2:\n          type: number\n          example: 230\n        voltageL3:\n          type: number\n          example: 230\n        relay1:\n          type: integer\n          example: 0\n        relay2:\n          type: integer\n          example: 1\n        powerFactorL1:\n          type: number\n          example: 0.9\n        powerFactorL2:\n          type: number\n          example: 0.9\n        powerFactorL3:\n          type: number\n          example: 0.9\n\n    cmd:\n      type: object\n      properties:        \n        voltageL1:\n          type: number\n          example: 123\n        voltageL2:\n          type: number\n          example: 123\n        voltageL3:\n          type: number\n          example: 123\n        relay1:\n          type: integer\n          example: 1\n        relay2:\n          type: integer\n          example: 1\n        powerFactorL1:\n          type: number\n          example: 0.9\n        powerFactorL2:\n          type: number\n          example: 0.9\n        powerFactorL3:\n          type: number\n          example: 0.9  \n\n  parameters:\n    gatewayId:\n      schema:\n        type: string\n        example: \"BPH6-VH9L-R18I-VUBC\"\n\n  operationTraits:\n    mqtt:\n      bindings:\n        mqtt:\n          qos: 1\n"