MQTT Broker

Yggio hosts an MQTT broker. It can be used to push data to Yggio "generic" devices. It can also be used to subscribe to updates from any Yggio device.

As a data consumer

To connect to the broker, various settings need to be met.

Credentials

The username should be your applications client_id
The password should be your applications client_secret

ClientId

The clientId of the connection should also be your applications client_id

Virtual Host

Currently only vhost / is allowed.

Subscribe / Publish

Only subscriptions are allowed, applications may not publish anything.

Topics

The application may only subscribe to certain topics, more info on which topics are allowed, see Setting up a channel

As a data provider

To update a generic device in Yggio you need to create MQTT-credentials, see ProtocolCredentials for more information. Currently this is only supported through our API. There is no UI for doing this. When creating the credentials the topic needs to start with generic in order for Yggio to recognize it as a generic device.

When you have created your MQTT-credentials, a topic for errors will be created. The topic will follow this format: generic-error/[your-topic-here]. Use the same username and password but append -error to your clientId. Here, Yggio will post any errors with your push updates. E.g.: You have created your credentials and publish to

generic/company/device/xxx/temperature

If an error occurs, you will see the error on

generic-error/company/device/xxx/temperature

Note that you cannot use the same clientId for publishing and subscribing!

For a generic device to update correctly in Yggio your MQTT-payload needs to be JSON-compatible with the top keys: secret and value. E.g.:

{
  "secret": "a-uuid-for-your-device",
  "value": {
    "basically": "any",
    "json": "compatible",
    "information": [1]
    "stuff": {
      "nested": "is allowed"
    }
  }
}