I'm creating an MQTT to matrix sign project - home assistant

Hey there,

I am creating a project that will allow a user to connect a sign to an MQTT service to receive updates etc to publish to the sign. My use case is to publish updates from home assistant, but should be any MQTT data source.

It is here: samturner3/rpi-led-matrix-painter-mqtt (currently still under construction :construction:)

It will be sign agnostic, all the main functions should be agnostic and individual signs setup via a settings file.

I am only in the early stages, and using wesleytabaka/rpi-led-matrix-painter as a dependency. This project is based on:
[hzeller/rpi-rgb-led-matrix] → [alexeden/rpi-led-matrix] → [wesleytabaka/rpi-led-matrix-painter]

[rpi-led-matrix-painter] takes a declarative approach to drawing on the matrix. Manage sections of the board independently, draw shapes, text, images, and some simple effects. This would be a good base for my project.

I wanted to check here first that nothing else like it (MQTT pushing to a sign) exists yet so I don’t reinvent the wheel so to speak.

From a glance these are some of the things this project will need to consider:

I think I’d probably define states of the application to handle switching between modes of the display and how the user wants to configure them.

E.g., when no messages are coming in, the user can pick from one or more of date and time, weather, MOTD and how often to cycle between each one. Then when a message is received, it enters another state where it remains for some time before going back to normal.

I guess I’d follow sort of a template pattern where the entire Canvas (along with CanvasSections) is generated by functions specific to each DisplayState. Just throwing ideas out there.

  • DisplayState.DATEANDTIME

  • DisplayState.WEATHER

  • DisplayState.MOTD

  • DisplayState.MESSAGERECEIVED

  • DisplayState.OFF

  • DisplayMode.NORMAL – routine carousel of DisplayStates.

  • DisplayMode.FOCUSED – e.g., for focusing on some message or other interesting thing.

I’ve done a similar thing with Python: GitHub - jinglemansweep/wideboy: WideBoy - Ultra Wide Display System

At the moment, the “widgets” are just pygame sprites but I’d like to implement some kind of DSL for configuring the layout, positions, widget contents etc.

The screenshots on the repo are outdated, I can send some more recent photos if you are interested.