MQTT dot matrix display to show information from MQTT topics

wledPixel

ESP8266 and MAX7219 dot matrix display management


img

The latest firmware version can be found in Releases

Supported key features:

  1. Home Assistant client [display sensor values]
  2. OpenWeatherMap client [display: temperature (C/F), humidity, pressure, wind speed, weather icon]
  3. MQTT client [each display zone support own topic]
  4. Wall NTP clock [NTP sync clock]
  5. Manual input
  6. Full controll through web UI
  7. Home Assistant MQTT discovery [When MQTT settings specified, device will be automatically send discovery message to HA]
  8. Initial setup through wifi AP and web UI
  9. Controll through MQTT
  10. Support 3 separated display zones
  11. Support 12 display segments in the same time
  12. Included 3 different fonts
  13. Symbols font
Ingredients:
  1. Dot matrix display MAX7219, something like this: https://aliexpress.ru/item/32618155357.html
  2. WeMos D1 Mini (esp8266), something like this: https://aliexpress.ru/item/32651747570.html
Firmware compiled with next parameters:
// Display pinout
#define DATA_PIN  D7                     // WeMos D1 mini or ESP8266 -> GPIO13
#define CS_PIN    D6                     // WeMos D1 mini or ESP8266 -> GPIO12
#define CLK_PIN   D5                     // WeMos D1 mini or ESP8266 -> GPIO14

First boot:

  • Device will boot in wifi access point mode and write the wifi name and password on the display.
  • AP wifi name: wledPixel-[short MAC address]
  • AP wifi password: 12345678
  • Connect to this AP and configure your wifi settings (connect to your wifi network)
  • When the device connects to the WIFI network, the device’s IP address will be displayed on the zone0
  • Open the browser and go to the device IP address

Icons in Wled symbol font:

1 - "X"
2 - "stop"
3 - "rain"
4 - "ip:"
8 - "full light segment"
A - "calendar"
B - "windows"
C - "clouds"
D - "door"
E - "female"
F - "snowflake"
G - "key"
H - "male"
I - "alarm"
J - "clock"
K - "garbage"
L - "info"
M - "moon"
N - "message"
O - "reminder"
P - "wifi"
R - "huge rain"
S - "sun"
T - "thunderstorm"
c - "cloud"
f - "fog"
m - "cloud and moon"
r - "rain"
s - "sun and cloud"
° - "degree symbol"

MQTT topics:

  • devicePrefix/zoneN/workMode - zone work mode
  • devicePrefix/zoneN/scrolleffectIn - scroll effect IN
  • devicePrefix/zoneN/scrolleffectOut - scroll effect Out
  • devicePrefix/zoneN/scrollspeed - scroll speed
  • devicePrefix/zoneN/scrollpause - scroll pause
  • devicePrefix/zoneN/scrollalign - scroll alignment
  • devicePrefix/zoneN/charspacing - character spacing
  • devicePrefix/intensity - brightness
  • devicePrefix/zoneN/workMode - zone work mode
  • devicePrefix/power - display power control, support on / off values

where devicePrefix = wledPixel-A071
zoneN = zone number (e.g. Zone0)

Supported workMode:

workMode supported values:

  • mqttClient - MQTT client
  • manualInput - Manual static text inputed in UI
  • wallClock - NTP sync clock
  • owmWeather - Open Weather Map client
  • haClient - Home Assistant client

Wall clock

Wall clock mode support next following display options:

  • HH:MM - Hours : Minutes [21:43]
  • HH:MM:SS - Hours : Minutes : Seconds [21:43:54]
  • HH - Hours [21]
  • MM - Minutes [43]
  • dd.mm.yyyy - Day.Month.Year [21.06.2022]
  • dd.mm - Day.Month [21.06]
  • dd.mm aa - Day.Month weekday name (e.g., Sun) [21.06 Tue] *in Cyrillic font weekday name will be in Cyrillic
  • aa - Weekday name (e.g. Sun) *in Cyrillic font weekday name will be in Cyrillic

Scroll effect list

Default effects:

  • PA_RANDOM
  • PA_PRINT
  • PA_SCAN_HORIZ
  • PA_SCROLL_LEFT
  • PA_WIPE
  • PA_SCAN_VERTX
  • PA_SCROLL_UP_LEFT
  • PA_SCROLL_UP
  • PA_FADE
  • PA_OPENING_CURSOR
  • PA_GROW_UP
  • PA_SCROLL_UP_RIGHT
  • PA_BLINDS
  • PA_CLOSING
  • PA_GROW_DOWN
  • PA_SCAN_VERT
  • PA_SCROLL_DOWN_LEFT
  • PA_WIPE_CURSOR
  • PA_SCAN_HORIZX
  • PA_DISSOLVE
  • PA_MESH
  • PA_OPENING
  • PA_CLOSING_CURSOR
  • PA_SCROLL_DOWN_RIGHT
  • PA_SCROLL_RIGHT
  • PA_SLICE
  • PA_SCROLL_DOWN

Home Assistant automation example:

Send sensor value each time when a value has been changed

---
- alias: Outside temp change - send new temp to wled panel mqtt
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: sensor.outside_thp_sensor_3
  action:
    - service: mqtt.publish
      data:
        topic: wledPixel-A071/zone0_text
        payload_template: "{{ states('sensor.outside_thp_sensor_3') }} C"

Change wledPixel-A071 to device name with your prefix

12 Likes

Awesome ! I was looking for something like this BUT i have to admit that your reaadme on your repo is a bit short. We would need the links for the libraries as well as a short write up how ti compile that. I don’t mean the general way but the libraries needed for this project.

Thank you for your comment, I added dependencies libraries in Readme.
To compile this project you need to install the next libraries in Arduino IDE:

  • PubSubClient
  • MD_MAX72XX
  • MD_Parola (with dependencies)

And also do not forget to choose your type of ESP board in Board Manager. I had compiled with Wemos D1 mini.

Let me know if I can help you more.

Thanks man…that works awesome great …just 9ne question…the icon …do we have a Wiki which icons are possible? I already payed a bit and found some nice …fitting also to messages shown on the matrix

Myour project is one of the smartest projects ever …I now can write with my XMPP Messenger messages to the led matrix as well as showing all kind of information based on events . Thanks so much dude !

Good question! For icons, I created a font with several icons to override the regular alphabet. This font applied just only for zone1. You can find a mapping card in wLedFont.h.
You can paint icons whatever you want using this online tool: https://pjrp.github.io/MDParolaFontEditor

Feel free to add new icons and update the existing wLedFont.h in the repository.

I also updated github with this information.

I saw this info in the GitHub repo and will create some nice icons .I’ll watch into it tonight and make some pull requests. Is it possible to add all icon on the right ? Just ideas but as I am fascinated by your project I wanna push it :wink:

I also saw some nice animations like pqcman somewhere …do you think it’s possible in include those or even planned …don’t abondon this project please I think there’s much more we can do with it

I’ll appreciate any pull requests. Feel free to contribute to this project.

To move icons to the right you need to change zone config like this (for 8 segments display as an example):

void setup() {
  setup_serial();

  P.begin(2);
  // Icons zone in the right
  P.setZone(0, 1, 7);                     // P.setZone(zone_number,start_segmet,end_segment)
  P.setZone(1, 0, 0);                     // P.setZone(zone_number,start_segmet,end_segment)

^^^ I tested this changes:

IMG_9968

I meant more like having icons on both sides

I added 13 new custom animations included pacman. Video with new animations

  • PACMAN
  • WAVE
  • ROLL
  • LINES
  • ARROW
  • SAILBOAT
  • STEAMBOAT
  • HEART
  • INVADER
  • ROCKET
  • FBALL
  • CHEVRON
  • WALKER

Also I a little bit updated logic of work, now you need to send name of scroll effect rather number of effect.

Absolutely great ! Thanks a lot !

I would like to try this project but I have this LED matrix (32x16 outdoor RGB p10 indoor led module):

Module Resolution: 32 X 16 (dots)

How should I configure the segments and display?

Thanks!

Based on the limitation of supporting hardware types I’m not sure if it’s possible to use this display library with an RGB matrix. Your matrix has many more features than this one.
Unfortunately, I didn’t find your display in the supporting hardware list of display library: https://majicdesigns.github.io/MD_MAX72XX/page_hardware.html

But you can add a new display in the library by this manual: https://arduinoplusplus.wordpress.com/2017/04/14/parola-a-to-z-adapting-for-different-hardware/

Ok,
I found this library,

Maybe that can be used instead?

To use this library needs to re-write half of the current project to change logic of communication with the display. I think it should be a new project. Unfortunately, I don’t have this display and I can’t help you with it. You can do it by your self and take from this repo all the logic of working with MQTT for example.

Thank you for sharing a link to aliexpress with this interesting matrix.

1 Like

Super project :slight_smile:

How do I on display the time from the home assistant on my Matrix display so I can go there for seconds? Is it possible to give an example of automation?
Thanks

I have a problem, client MQTT is still connect and immidietly disconnect again again, reset esp again. Please help me

Show one message and diconnect and reset ESP

MQTT hasn’t guaranteed delivery time. It means we can’t use this protocol for sending time each second. In this case, seconds will be changed with different delay each time.
But for display time with hours and minutes why not. In this case delay for 2 seconds doesn’t change anything.

I wrote and tested automation with 2 different time format: EU and US (with AM/PM)

---
- alias: wLed MQTT clock
  initial_state: 'on'
  trigger:
    platform: time_pattern
    minutes: "/1"               # run each 1 minute
  action:
    - service: mqtt.publish
      data:
        topic: wled/scrolleffect_without_exit
        payload_template: "PA_MESH"                     # change time effect
    - service: mqtt.publish
      data:
        topic: wled/zone0_text
        payload_template: "{{ as_timestamp(now()) | timestamp_custom('%H:%M') }}"            # EU time format 23:45
#        payload_template: "{{ as_timestamp(now()) | timestamp_custom('%-I:%M %p') }}"       # US time format 11:45 PM

Also, it would be nice to once send a clock icon to zone1: publish mqtt to topic wled/zone1_text message c

as a result, you will have this kind of wLed clock:

Image