MQTT Broker
The Collectu hub provides a managed MQTT broker. The service can be used to exchange data between Collectu core instances, to monitor data or to remotely control a Collectu core.
Security
The managed MQTT broker is hosted between a remote proxy that supports Transport Layer Security (TLS). This means that data sent and received by the broker is encrypted and cannot be accessed by unknown third parties.
MQTT Topics and Access Control
In MQTT, data is exchanged using topics, which act like channels where messages are published and subscribed to. Each client can publish messages to specific topics, and other clients can subscribe to those topics to receive the data.
To ensure privacy and access control, every topic used within the Collectu MQTT broker must be prefixed with the username of the publishing client.
Clients can only publish and subscribe to topics that begin with their assigned username, preventing unauthorized access to other users’ data.
For example, if a user named user123
wants to send a message, they must use topics such as: user123/sensor/temperature
Other users will not be able to see, subscribe to, or publish messages to topics that do not belong to them. This restriction ensures that data remains secure and isolated between different clients.
Usage
Collectu offers predefined modules to subscribe (inputs.mqtt.collectu_client_1
) and
publish (outputs.mqtt.collectu_client_1
) to the managed Collectu MQTT broker.
The general login information are as follows:
For TLS (TCP)
- Host: mqtt.collectu.de
- Port: 8883
- Username: <your-api-access-token>
- TLS: has to be enabled, e.g.
tls://mqtt.collectu.de
- Password: is not used, but should not be empty
For Websocket
- Host: mqtt.collectu.de
- Port: 443
- Username: <your-api-access-token>
- TLS: has to be enabled, e.g.
ws://mqtt.collectu.de
- Password: is not used, but should not be empty