LED Matrix MQTT

Did u manager now to clean up and fix this ?

Errm you know I have as it’s in your git thingy :stuck_out_tongue:

Don’t wanna make it public ?

Since it’s been taken on by someone else, it’s up to them.

By who? Do u have the repo link?

See the original thread, tho’ I think you’ve already spoken to him…

you got anywhere with this? did you manage to try the sprites effect?

what u mean with sprites effect?

check this out : https://www.youtube.com/watch?v=tfwAHx0MTxU

sound and looks awesome but i never tried it. I am not a programmer unfortunately and dunno how to implement all of this :confused:

1 Like

I started on a project similar to that a while ago. I’ve not touched the code in a long time, but it’s set up to connect and subscribe to MQTT topics and scroll messages. It combines a WS2812 LED strip as well, so you can optionally add a set of lights around the perimeter of the board.

Code is available here, and you can see a short demo of the final product at this youtube link. It has support for daylight saving (a concept I thoroughly hate, so I automated it), as well as sending the animation property and duration in the message itself.

I’ve set up a couple automations to have it display the currently playing track from my music server. This involves a template, current_track, as well as an automation. You can adjust the automation it to display anything you’d like.

sensors.yaml

- platform: template
  current_track:
      value_template: >
        {% if is_state('media_player.music_server','playing') %}
          {{ state_attr('media_player.music_server', 'media_artist') ~ ": " ~ state_attr('media_player.music_server', 'media_title') }}
        {% endif %}

automations.yaml

- id: '1545147072138'
  alias: Current Track
  trigger:
  - entity_id: sensor.current_track
    platform: state
  condition: []
  action:
  - data:
      payload_template: '{ "message": "{{states(''sensor.current_track'') }}", "repeat":
        0}'
      topic: messageboard/messages
    service: mqtt.publish
2 Likes

This sounds AWESOME!!! I’ll have a look into it very soon. Need t o think about a usecase with WAF :slight_smile:

with regards to the WS2812B LED strip which pin did you connect it on the esp8266? is it the same connection’s as BRUH’s ?

Take a look at example_config.h in the repo. It shows all the pin assignments I used. It should, in theory, allow you to use any pin configuration you’d like, but in my example, I’ve used D3 on a wemos D1 mini.

1 Like

Ok mate thanks

@ptrsnja @keithh666 i am trying to run both your systems but having little joy with both. if possible could i get some help. note im new to Arduino or this kind of thing but like the idea.

@keithh666 i have been through all the comments on this page https://community.home-assistant.io/t/led-matrix-mqtt-sign/19459/124 . when i verify and upload your sketch everything checks out but it still doesn’t connect to my network.

I am completely lost with it???

How can I help you out?

If you’re trying to use my code base, you’ll need to go through installing all the required libraries. They’re listed in the read me file, and you can find them using the library manager tool in the Arduino IDE. If you’re having trouble installing the libraries, YouTube is your friend.

Can you tell me more about your problem? E.g. answer some or all of the following:

  • Does your code compile in the Arduino IDE?
  • Can you upload it successfully to the board?
  • What board are you using?
  • Does it connect to your WiFi network?
  • Does it connect to your MQTT server?
  • Does it display anything on the LED matrix/matrices?
  • Do you see anything when connected to the device over the serial monitor?
  • Copy and paste anything you see in the console into a reply in this thread, using the code tags

I can’t help with @keithh666’s code, but I’m happy to help you troubleshoot issues with my project.

I would also be happy to help with my code, but as @ptrsnja has said I would need to know the same things, you said it compiled and uploaded OK, so that’s a good start, but what does the serial o/p show and did you correctly setup the wifi ssid and pw? The libraries need to be the latest and you haven’t told us what platform you are using and which of my code bases you are using.

Hi @ptrsnja @keithh666 i want to say thanks for your time, as i have successfully compiled Keith’s for now i will try to get this one running first.

Just to run through a few things first then Keith so…
1 - i downloaded your NewerScrollingLEDSignCode zip file extracted and placed all the MQTT, pubsub & RSS files files in the same folder as the .INO file.
2 - installed MD_parola version 3.1.1 & MD_MAX72xx version 3.1.0 libraries via the manager
3 - Once i click verify everything seems ok
4 - Im planning to run the code on a D1 mini, just to confirm i have the D1 mini board selected, and the pins are connected as follows

#define CLK_PIN   D5  // or SCK
#define DATA_PIN  D7  // or MOSI
#define CS_PIN    D8  // or SS

5 - doesnt connect to the WIFI/MQTT
6 - all 4 LED modules light up (only runing one MAX7219 module)
7 - wifi settings placed inside " "

#define WIFI_SSID              "placed my SSID here"        // wifi ssid
#define WIFI_PASS              "placeed my PW here" // wifi password
#define WIFI_CONFIG_TOOL       WIFI_WPSCONFIG // Default tool if wifi fails to connect (WIFI_SMARTCONFIG, WIFI_MANAGER or WIFI_WPSCONFIG)
#define WIFIHOSTNAME           "MQTTSign"     // HostName

8 - Serial monito reads


wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld

Hi! I am trying to xompile the sketch. I have all libraries installed but geet:

WARNUNG: Bibliothek Timezone-1.2.2 behauptet auf (avr) Architektur(en) ausgeführt werden zu können und ist möglicherweise inkompatibel mit Ihrem derzeitigen Board, welches auf (esp8266) Architektur(en) ausgeführt wird.
clock-message-board:468:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

   StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;

           ^

clock-message-board:787:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

   StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;

           ^

clock-message-board:902:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

   StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;

           ^

exit status 1
StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6