---
description: >

  MQTT Connection Test

metadata:

  name: MQTT Connection Test

parameters:

  mqttHost:
    type: string
    description: "IP or hostname of the broker"

  mqttUsername:
    type: string
    description: "MQTT Username"

  mqttPassword:
    type: string
    description: "MQTT Password"

resources:

  mqttConnection:
    type: Cybus::Connection
    properties:
      protocol: Mqtt
      connection:
        host: !ref mqttHost
        port: 8883
        scheme: mqtts
        username: !ref mqttUsername
        password: !ref mqttPassword
        trustAllCertificates: false # choose true to allow self-signed certificates

  testEndpoint1:
    type: Cybus::Endpoint
    properties:
      protocol: Mqtt
      connection: !ref mqttConnection
      subscribe:
        topic: some/test1
