MQTT enabled led sign


just a quick look at what i’m working on at the moment.
A led sign with 12 max7219 displays hookup up to a esp8266 running homie-esp8266.

It subscribes to a mqtt topic and displays the messages published to that topic.
I pllan on using this together with the HASS MQTT notification service (and on my to do list: when not showing notifications show a time and date)

using the MQTT service option in developer options:

LED Matrix MQTT Sign

Nice. I like the LED display casing etc. Did you design it or is it some sort of kit?


the casing is my own design and lasercut by
it’s a simple box design made with


Again Nice… Simple is the best :smiley:


i’m feeding the display with following automation. This way the display is fed with changes rather then pulling them in.

alias: 'mqtt test'
  platform: state
  entity_id: climate.thermostaat,sensor.netatmo_binnen2_co2, sensor.netatmo_binnen_co2, sensor.netatmo_binnen2_temperature, sensor.netatmo_binnen_temperature, sensor.slaapkamer_eva_temperature, sensor.netatmo_buiten_temperature
  service: mqtt.publish
    topic: "devices/5ccf7fc3b1c6/text/on/set"
    payload: "{{ }} is {{ trigger.to_state.state }} "


Will you be sharing code for this at some stage? I like it.


i’m using this:
3x FC16 display (search aliexpress for ‘4 in one dot matrix max7219’)
Wemos D1 Mini
MD_Parola arduino lib (
MAX7219 arduino lib (
esp8266 ntpclient (
homie-esp8266 (
homie-eps8266 is excellent because you can setup the esp8266 via a web configpage, no more wifi credentials in your source code!

i’m using this sketch at the moment. Can use some serious help with this as the esp watchdog is giving me headaches when scrolling long lines of text. I tried to resolve this by adding a lot of ‘ESP.wdtFeed();’ all over the place…had to disable serial to make it usable…

#include <Homie.h>
#include <SPI.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <TimeLib.h>
#include <NtpClientLib.h>

#define  MAX_DEVICES 12
#define CLK_PIN   14
#define DATA_PIN  13
#define CS_PIN    15
//MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

HomieNode textNode("text", "sign");

bool textOnHandler(const HomieRange& range, const String& value) {
  String text = "   +++++ " + value + " +++++   ";
  int value_len = text.length() + 1 ;
  char txtbuffer[value_len] ;
  text.toCharArray(txtbuffer, value_len );
  P.displayText(txtbuffer , PA_CENTER, 20, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT );
  while (!P.displayAnimate()) {
  Homie.getLogger() << "text is " << value << endl;
  return true;

void setup() {
  Serial << endl << endl;
  Homie_setFirmware("awesome-sign", "1.0.0");
  P.displayText("Initialising ...", PA_CENTER, 1, 2000, PA_PRINT, PA_PRINT );
  while (!P.displayAnimate());
  NTP.onNTPSyncEvent([](NTPSyncEvent_t error) {
    if (error) {
      Serial.print("Time Sync error: ");
      if (error == noResponse)
        Serial.println("NTP server not reachable");
      else if (error == invalidAddress)
        Serial.println("Invalid NTP server address");
    else {
      Serial.print("Got NTP time: ");
  NTP.begin("", 1, true);

void loop() {
  char charBuf[100];
  sprintf(charBuf, "%02u : %02u", hour(), minute());
  P.displayText(charBuf, PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT );
  while (!P.displayAnimate())


This sounds like fun. OK well I’m going to order some modules and add this on the “Must Play With” list :smiley:

I’ll be back at you at some stage.



OK ordered :smiley: Not bad, $13USD delivered for 3 modules.


you can save memory by putting literal strings in memspace like:
Serial.print(F(“Hello World”))
your problem looks like a short of RAM .


@koen01 Have you got any further with this. Am about to start looking at it and get it going.


No sorry. My wife decided it was to big and ugly to have in the living room so it ended up disused in the junk closet…the code I posted worked reasonably well by the way


What a shame. Stick it in your office at least :smiley: or the man cave if you have one. OK well I will play with this next. Thanks and I may have a few questions down the line.


This is a very interesting one, you can use this as HASS notification and display on the LED.
Do you have a detailed instruction how can it be done? Thanks!


Would you mind posting an install routine …just bought 3 units to play with


What exactly do you mean with install routine?


I mean step by step tutorial :wink:


A step by step tutorial would be awesome! I built this LED scrolling sign, but I want to redo the code to make an MQTT connected version for displaying text messages sent to an MQTT broker. Here’s my project: