LED Matrix MQTT Sign

I’ve been playing around with these …

https://www.aliexpress.com/item/Free-Shipping-MAX7219-Dot-Matrix-Module-For-Arduino-Microcontroller-4-In-One-Display-with-5P-Line/32683197112.html

after seeing MQTT enabled led sign

So mine is based on 3 modules connected together, currently without a box but hopefully I will get round to building one :slight_smile: The controller is a Wemos D1 Mini, which is small enough to fit in the back of the box and I can add some sensors if I want. I may add a temperature/humidity sensor, a smoke sensor and a lux sensor to set the brightness automatically. However for now it will output the following mostly via HA publishing to MQTT :-

[0] = Date/Time (Grabbed from NTP)

[1] = Good Morning/Good Afternoon/Good Evening (Done internally based on time)

[2] = My Bitcoin Value (Published by HA)

[3] = Livingroom Temperature (Published by HA)

[4] = Livingroom Humidity (Published by HA)

[5] = Todays Weather (yweather current) (Published by HA)

[6] = Tomorrows Weather (yweatyher day1 condition) (Published by HA)

[7] = Any plant needs attention (Published by HA)

[8] = Alarm set for xx:xx (not done atm)

[9] = Message from the web I/F or if connected from serial I/F

On HA I’ve added a group card to control the speed of scrolling, the brightness, the text effects and whether it’s displayed or not.

I’m using the MD_Parola software (Parola for Arduino: Main Page) to animate the sign.

I’m very pleased with it and am already thinking of other uses for it (messages and perhaps alarms for smoke/fire or windows/doors left open)

I would like to thank Kmanoz Profile - KmanOz - Home Assistant Community for his work on OTA updates, which I’ve shamelessly copied :slight_smile: and Koen01 Profile - koen01 - Home Assistant Community for his idea :slight_smile:

When I finally put it in a box I’ll post an image here.

Added Sky News RSS feed gathered by the Wemos - seems to work pretty well
Added Evacuate/Panic sign for smoke/fire etc - not completely working yet
Added option to turn off/on individual lines

22 Likes

Haha that looks very nice.
Care to share your arduido sketch and hass config?
Maybe I can convince my wife to let my sign stay in the living room instead of the junk closet :grin:

Yep can do :), WAF is not high for these kind of things tho’ :stuck_out_tongue: Maybe if you put it in a sleek polished aluminium container it might help :D, or paint it pink :stuck_out_tongue_winking_eye:

Hmm too much code, forum won’t let me post it :frowning: Sketch is over 32000 chars :stuck_out_tongue: I’ll have to think of something else.

 HA code...
All in separate yaml files

Group

    mqqtsigngrp:
      name: MQTTSign
      entities:
        - input_select.mqttsignscrolling
        - input_slider.mqttsignspeed
        - input_slider.mqttsignbrightness
        - input_boolean.mqttsign

Input select
mqttsignscrolling:
  name: MQTTSignScrolling
  options:
    - PA_PRINT
    - PA_SCROLL_LEFT
    - PA_SCROLL_RIGHT
    - PA_SCROLL_UP
    - PA_SCROLL_DOWN
    - PA_SLICE
    - PA_MESH
    - PA_FADE
    - PA_DISSOLVE
    - PA_BLINDS
    - PA_RANDOM
    - PA_WIPE
    - PA_WIPE_CURSOR
    - PA_SCAN_HORIZ
    - PA_SCAN_VERT
    - PA_OPENING
    - PA_OPENING_CURSOR
    - PA_CLOSING
    - PA_CLOSING_CURSOR
    - PA_GROW_UP
    - PA_GROW_DOWN
  initial: PA_SCROLL_LEFT
  icon: mdi:settings

Input sliders

mqttsignbrightness:
  name: MQTTSign Brightness
  initial: 0
  min: 0
  max: 15
  step: 1
  
mqttsignspeed:
  name: MQTTSign Speed
  initial: 25
  min: 10
  max: 75
  step: 1
  
Input bool
  mqttsign:
    name: MQTT Sign
    initial: on
    icon: mdi:eye

Automation
#sensor.alarm_time
# may have to trigger this based on time as it won't change it's self
# may have to do the same thing for the weather update, try without time first

###############################################################################################
#                                                                                             #
# Publish Plant Data to MQTT Sign                                                             #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign Plant Data Update
#   hide_entity: false
   trigger:
     - platform: numeric_state
       entity_id: sensor.miflora_bird_of_paradise_moisture, sensor.miflora_trailing_plant_bathroom_moisture, sensor.miflora_volcano_fern_moisture, sensor.miflora_flowering_fern_moisture
       below: 15
     - platform: numeric_state
       entity_id: sensor.miflora_bird_of_paradise_battery, sensor.miflora_trailing_plant_bathroom_battery, sensor.miflora_volcano_fern_battery, sensor.miflora_flowering_fern_battery
       below: 5
       above: 1
     - platform: numeric_state
       entity_id: sensor.miflora_bird_of_paradise_conductivity, sensor.miflora_trailing_plant_bathroom_conductivity, sensor.miflora_volcano_fern_conductivity, sensor.miflora_flowering_fern_conductivity
       below: 25
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/PLANT"
         payload_template: '{{ trigger.from_state.attributes.friendly_name }} NEEDS Attention!'
         
###############################################################################################
#                                                                                             #
# Publish Todays Weather to MQTT Sign                                                         #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign Todays Weather Update
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: sensor.todays_yweather_condition
     - platform: state
       entity_id: sensor.todays_yweather_current
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/TODAYW"
         payload_template: '{{states.sensor.todays_yweather_condition.state + " " + states.sensor.todays_yweather_current.state}}'
         
###############################################################################################
#                                                                                             #
# Publish Tomorrows Weather to MQTT Sign                                                      #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign Tomorrows Weather Update
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: sensor.day1_condition
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/TOMORROWW"
         payload_template: '{{states.sensor.day1_condition.state}}'
         
###############################################################################################
#                                                                                             #
# Publish Livingroom Temp to MQTT Sign                                                        #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign Temp Update
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: sensor.pressure_sensor_temp
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/TEMP"
         payload_template: '{{trigger.to_state.state | float}}'
         
###############################################################################################
#                                                                                             #
# Publish Livingroom Humidity to MQTT Sign                                                    #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign Humidity Update
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: sensor.pressure_sensor_humidity
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/HUMID"
         payload_template: '{{trigger.to_state.state | float}}'
         
###############################################################################################
#                                                                                             #
# Publish Bitcion value to MQTT Sign                                                          #
#                                                                                             #
###############################################################################################

 - alias: MQTT Sign BitCoin Update
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: sensor.valofmybtc
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/BITC"
         payload_template: '{{trigger.to_state.state | float}}'
         
###############################################################################################
#                                                                                             #
# MQTT Sign Scroll                                                                            #
#                                                                                             #
###############################################################################################
 - alias: MQTT Sign Scroll
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: input_select.mqttsignscrolling
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign"
         payload_template: '{{states.input_select.mqttsignscrolling.state}}'
         
###############################################################################################
#                                                                                             #
# MQTT Sign Brightness                                                                        #
#                                                                                             #
###############################################################################################
 - alias: MQTT Sign Brightness
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: input_slider.mqttsignbrightness
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/INTENSITY"
         payload_template: '{{states.input_slider.mqttsignbrightness.state | int}}'
         
###############################################################################################
#                                                                                             #
# MQTT Sign Speed                                                                             #
#                                                                                             #
###############################################################################################
 - alias: MQTT Sign Speed
#   hide_entity: false
   trigger:
     - platform: state
       entity_id: input_slider.mqttsignspeed
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign/SPEED"
         payload_template: '{{states.input_slider.mqttsignspeed.state | int}}'
         
###############################################################################################
#                                                                                             #
# MQTT Sign OFF (when bedtime)                                                                #
#                                                                                             #
###############################################################################################
 - alias: MQTT Sign Off
#   hide_entity: false
   trigger:
     - platform: time
       after: '12:30:00'
     - platform: state
       entity_id: input_boolean.mqttsign
       state: 'off'
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign"
         payload: 'OFF'

###############################################################################################
#                                                                                             #
# MQTT Sign On (in the morning)                                                               #
#                                                                                             #
###############################################################################################
 - alias: MQTT Sign On
#   hide_entity: false
   trigger:
     - platform: time
       after: '06:00:00'
     - platform: state
       entity_id: input_boolean.mqttsign
       state: 'on'
   action:
     - service: mqtt.publish
       data_template:
         topic: "cmnd/MQTTSign"
         payload: 'ON'

What does everyone else do with large files, I tried zip but can’t upload and the file is too big to paste?

Link to OneDrive file…
https://1drv.ms/u/s!AmTLZpPsxi58gRmXKN8u_07rgehw

1 Like

Interesting project.

If you have a github account, it would be great to share your project there.

You could then show your instructions, hass config and arduino code.

Like kmanoz does for his sonoff files.

cat you put all libs you used i cant compile it :frowning:
thx alot

OK, they are there, put the MD_***** dir under the libraries dir in arduino dir, the rest put in the sketch dir for myparola_scrolling.

https://1drv.ms/f/s!AmTLZpPsxi58gRg0uZviFltnm5NS

WARNING: Category ‘Sensor Control’ in library MD_REncoder is not valid. Setting to ‘Uncategorized’
C:\Users\defen\Desktop\OneDrive-2017-06-19\MyParola_Scrolling\MyParola_Scrolling.ino:23:20: fatal error: Switch.h: No such file or directory

#include < Switch.h >

can u help ?

i put Switch.h in in the sketch dir but nothing changed

I would just comment it out it’s not used.

i cant comipe it i need switch.h library and cant find it :frowning:

I would google it, I don’t use it so it compiles fine for me. The UI stuff is old code I don’t use but left it in if anyone want’s to build the hardware to control the sign that way, I use HA to control it so USE_UI_CONTROL is set to 0. I’m not sure if that’s what’s causing your problem, but just set it to 0 and it shouldn’t need the switch.h. BTW the <> round the switch.h means it should be in the library dir of arduino not the sketch dir.

I have Transit Software and am looking for a way have my software display the name of the upcoming stop. We can send messages from our software using Java script. Any guidance on how to send the messages and which signs to use would be helpful. Our software is running on a tablet that can connect to a sign either by bluetooth or wired USB. We really need a partner to provide a low cost solution to this problem - we will provide the customer base. https://www.unitegps.com/town-transit

H! got it running … very very cool… but it is not clear for me how to send messages… webinterface just does nt work… the text wont be shown on the LED. Could u help me here ?

Could be a lot of things :stuck_out_tongue: If you have setup the code to use your router and mqtt broker then once you get to the web page and type the message in it will appear if you haven’t set bool mqttsignMsgstatus = true; to false.

a bit weird for me … what exactly has to be in the code to be able to write messages? and how to send it to the LED. I see the webpage… but when i enter the text it wont show on the LED display :frowning:

What does the serial output say?

do u mean: mqttsignstatus under payload string bla bla ould u paste the part of the sketch where and what i have to set please. the code is huge :slight_smile:

it’s on wifi already :slight_smile: i see the standard texts. do i have to change “mqttsignstatus” in "textEffect_t to false? it is to “true” atm

does this mean i have to recompile it after setting those to “false” ?

The default is to print everything out except the panic status. However if you haven’t set up all the mqtt messages in HA then you will only get the default messages and the news rss. The webpage output is output as the 10th message line after the alarm time. Everything is controlled by HA using MQTT, so you should only need to provide the MQTT parts in HA after flashing the code with your broker settings etc.

and then i add your mentionedcode right? let me try :slight_smile: thanks so far … can i send then text to the display? and not for the 10th message .but right afzter publidhing?

If you haven’t changed it don’t do anything I mentioned it just incase you had changed it to false - then it wouldn’t display - you do the config in HA.