How does my device connect over MQTT?

A direct MQTT device connects to our broker with the username and password issued once when you create it, and publishes JSON under its topic:

tenants/{tenantId}/devices/{deviceId}/data

Use a TLS connection where available. Keep your publish rate under your plan's limits or messages are dropped. Gateway-mediated devices don't need their own MQTT setup — the gateway handles the connection for them.