Skip to content
MQTT Client module for MagicMirror2
JavaScript CSS
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Update doc Feb 28, 2018
.gitignore config.js in .gitignore May 12, 2019
LICENSE First commit Feb 6, 2018
MQTT.css Add suffix Feb 28, 2018 Update Jan 7, 2019
node_helper.js Update node_helper.js Feb 14, 2019
package-lock.json Upgrade packages Oct 28, 2018
package.json Upgrade packages Oct 28, 2018


NB! New config!

In order to support multiple instances and multiple servers, the configuration is totally changed! Sorry to not be backwards compatible, but I hope this solves some of the issues I have received.

Please report issues. his is not tested very much.



Module for MagicMirror showing the payload of a message from MQTT.


Go to MagicMirror/modules and write

git clone
npm install


Here is an example configuration with description. Put it in the MagicMirror/config/config.js file:

    module: 'MMM-MQTT',
    position: 'bottom_left',
    header: 'MQTT',
    config: {
        mqttServers: [
                address: 'localhost',  // Server address or IP address
                port: '1883',          // Port number if other than default
                user: 'user',          // Leave out for no user
                password: 'password',  // Leave out for no password
                subscriptions: [
                        topic: 'smoky/1/inside/temperature', // Topic to look for
                        label: 'Temperatur', // Displayed in front of value
                        suffix: '°C',        // Displayed after the value
                        decimals: 1,         // Round numbers to this number of decimals
                        sortOrder: 10,       // Can be used to sort entries in the same table
                        maxAgeSeconds: 60    // Reduce intensity if value is older
                        topic: 'smoky/1/inside/humidity',
                        label: 'Luftfuktighet',
                        suffix: '%',
                        decimals: 0,
                        sortOrder: 20,
                        maxAgeSeconds: 60
                        topic: 'smoky/1/inside/smoke',
                        label: 'Røyk',
                        sortOrder: 30,
                        maxAgeSeconds: 60
                        topic: 'guests',
                        label: 'First guest',
                        jsonpointer: '/people/0/name'

mqttServers is an array, so you can add multiple servers to the same config. You can also use the module multiple places on the mirror/screen.


If the payload contains JSON data, use the jsonpointer configuration to get the value. See JSON Ponter specification or google an easier description.


Pull requests are welcome.


Create a timeout, so values are deleted if they are not refreshed. May be faded out...

Create a treshold so a value is flashing if outside treshold.

You can’t perform that action at this time.