Skip to main content

Using CCI's MQTT endpoint

MQTT is a networking protocol that uses a 'publish-subscribe' model (where some machines 'publish' data to an endpoint, and others subscribe to that data stream) to share data. It's commonly used to share networked sensor data.

We run a MQTT server at the CCI, where we publish things like the air quality data, and also allow students to publish dedicated streams for physical computing projects.

In order to follow any of the below instructions, you will first need a username and password. Ask for this on the #technical channel in Slack! The MQTT server sits at mqtt.cci.arts.ac.uk on port 1833.

Accessing MQTT Data Through a GUI

To use MQTT on your computer, download an application like MQTT Explorer. Visiting

MQTT from the Command Line

The best package for programatically interfacing to MQTT is mosquitto.

To subscribe:

To publish:

You could also use this method to connect to an MQTT endpoint via a Raspberry Pi -- you can use these instructions to get set up. (if you're interested in setting up your own MQTT endpoint, rather than using ours, you can also use a Pi to do this).

MQTT from ESP32 (for use with Arduino)

If you want to publish data using a microcontroller (the ESP32/ESP8266 are obvious candidates, as they're networked already!), the PubSubClient library provides support for microcontroller boards including the ESP32 and Arduino Ethernet.