Sensorclouds Docs
MQTT Connectivity

MQTT Overview

How Sensorclouds uses MQTT for device communication

Sensorclouds uses MQTT as the primary protocol for device communication. MQTT is a lightweight publish/subscribe messaging protocol designed for constrained devices and low-bandwidth networks.

Supported Protocols

ProtocolPortUse Case
WSS (WebSocket over TLS)443Recommended — works through firewalls and proxies
MQTTS (MQTT over TLS)8883Embedded systems and IoT devices
TCP (Plain MQTT)1883Development and testing only

Plain TCP (port 1883) transmits credentials in cleartext. Use TLS-secured connections (WSS or MQTTS) for all production deployments.

Broker Details

  • Broker software: Mosquitto with dynamic security plugin
  • TLS certificates: Let's Encrypt (auto-renewed)
  • Authentication: Username/password validated via backend API
  • Authorization: Per-device ACL rules enforced by the broker

MQTT Data Flow

Telemetry (Uplink)
DeviceSensor / Gateway
PUBLISH
QoS 0/1
BrokerMosquitto
FORWARD
Internal
BackendProcess & Store
PUSH
WebSocket
DashboardReal-time UI
Commands (Downlink)
DeviceExecute CMD
DELIVER
QoS 1
BrokerRoute MSG
PUBLISH
Internal
BackendCreate CMD
REQUEST
REST API
DashboardUser Action

TLS Secured

All production connections use WSS (443) or MQTTS (8883). Per-device ACL rules ensure isolation.

How It Works

  1. You register a device on the platform and receive MQTT credentials
  2. Your device connects to the broker using those credentials
  3. The broker validates credentials through the Sensorclouds backend
  4. ACL rules ensure the device can only access its own topics
  5. The device publishes telemetry and subscribes to commands

On this page