Your own MQTT broker
Devices normally connect to the Thing Edges broker. If you run your own MQTT broker, a project can use it instead: your devices and app then talk on your broker. You need the MQTT brokers permission.
Before you start
Section titled “Before you start”From whoever runs the broker:
| What | Example |
|---|---|
| Host | mqtt.example.com |
| Port | 8883 (TLS) |
| Certificate | The broker’s certificate, as a .pem file. Self-signed is fine: devices trust only this certificate |
How the address is made
Section titled “How the address is made”An app joins the endpoint and the host with a dot. The form shows the result as you type; that name must resolve in DNS.
| Endpoint | The app connects to | DNS you need |
|---|---|---|
iot |
iot.mqtt.example.com |
One record for that name |
| empty | A name per project, such as partner-abc12345.mqtt.example.com |
A wildcard, *.mqtt.example.com |
The endpoint is also the first part of every MQTT topic on the broker, so decide it before devices are in use.
Adding a broker
Section titled “Adding a broker”In the menu, open System, then Add under MQTT brokers:
- Name: for the list.
- Host without
mqtts://, and Endpoint (optional). - Port.
- Certificate: upload the
.pemfile. A file with a private key is refused at once: never upload a key.
A new broker must pass a connection check before projects can use it. The list shows the result of the last check.
Using it
Section titled “Using it”Choose the broker when you create a project. A project’s broker cannot be changed later.