LED Matrix MQTT Sign

I use the following for speed and intensity…

#############################################################        
- alias: Send a changed speed msg to the MQTT Sign
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.mqttsignspeed
  action:
    - service: mqtt.publish
      data:
        topic: 'cmnd/MQTTSign/SPEED'
        payload_template: '{{ states.input_number.mqttsignspeed.state }}'
        
#############################################################        
- alias: Send a changed intensity msg to the MQTT Sign
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_number.mqttsignbrightness
  action:
    - service: mqtt.publish
      data:
        topic: 'cmnd/MQTTSign/INTENSITY'
        payload_template: '{{ states.input_number.mqttsignbrightness.state }}'

And it works ? I’ll adapt my config and revert …could you test also with scroll?

I don’t have the code for the scroll anymore as it doesn’t really work for a single width led strip.

That’s a pity :confused: well wth your code it works perfectly now to adjust brightness and speed. Thanks a lot! Sure you cannot add the scroll just for testing?

The reason I didn’t put it back in is that you won’t have a panel long enough to read the text if scrolling left to right and the same goes for any that use vertical scrolling. Unless your text is only a couple of words long it doesn’t work.

I see I see …thanks for the explanation

Hey @keithh666

Just wanted to know where you got the code for turning the led matrix on and off via mqtt? Is it simple to change and add ? I have a esp8266 project and have connected led strips which I would like to turn on and off (led strips) via mqtt.

Thanks

The folowing will automatically turn it off/on… you can also use the input_boolean in the front end of course…

###############################################################################################
#                                                                                             #
# MQTT Sign OFF (when bedtime)                                                                #
#                                                                                             #
###############################################################################################
- alias: MQTT Sign Off 
  initial_state: 'on'
#  hide_entity: false
  trigger:
    - platform: time
      at: '12:30:00'
    - platform: state
      entity_id: input_boolean.mqttsignon
      to: 'off'
  action:
    - service: mqtt.publish
      data:
        topic: "cmnd/MQTTSign/MQTTSign_OFF"
        payload: 'off'
###############################################################################################
#                                                                                             #
# MQTT Sign On (in the morning)                                                               #
#                                                                                             #
###############################################################################################
- alias: MQTT Sign On
 #  hide_entity: false
  initial_state: 'on'
  trigger:
    - platform: time
      at: '06:00:00'
    - platform: state
      entity_id: input_boolean.mqttsignon
      to: 'on'
  action:
    - service: mqtt.publish
      data:
        topic: "cmnd/MQTTSign/MQTTSign_ON"
        payload: 'on'

No I meant the code for esp8266. Like I said it’s for my led strips project.

Try this one https://github.com/Snipercaine/WLED-HomeAssistant

It has auto Discovery for home assistant

1 Like

The code for Arduino is in the dropbox above :slight_smile:

1 Like

Dunno if the code is the right code for a led strip …:thinking:

Thank you very much now i did it finaly :slight_smile: Damn dupont cables :(…
Can i ask someone the display now works it displays intro message for abbout 20s then stops and restarts. Is this normal behaviour?

Than one other I can dimm the display, set speed, but cannot determine effects how to display message payload send from before doesnt work?

It shouldn’t stop and restart - there is something wrong you will need to determine what is wrong - usually by adding the serial monitor and checking the output. I would guess at the WDT or a memory problem.

There aren’t any effects see my reply above, you need to create some automations of the type …

- alias: Send a templated input_text msg to the Sign Line 0
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_boolean.mqttsign_line0
      to: 'on'
    - platform: time_pattern
      minutes: '/10'
  action:
    - service: mqtt.publish 
      data:
        topic: 'cmnd/MQTTSign/MSG0'
        payload_template: 'The Current Bitcoin Price is {{ states.sensor.market_price.state }} USD'
    - service: input_text.set_value
      data_template:
        entity_id: input_text.text0
        value: 'The Current Bitcoin Price is {{ states.sensor.market_price.state }} USD'
        
- alias: Turn Off templated input_text msg to the Sign Line 0
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_boolean.mqttsign_line0
      to: 'off'
  action:
    - service: mqtt.publish
      data:
        topic: 'cmnd/MQTTSign/MSG0'
        payload: ''
#############################################################

This is serial output:

it looks like its loosing a mqtt connection and it restarts.

18:04:58.807 -> WIFI connection . . . . . . . . . . OK
18:04:58.841 -> mqtt broker connection . . . . . . . . . . LOST
18:04:58.841 -> ESP Restarting… Please Wait…
18:04:58.908 ->
18:04:58.908 -> ets Jan 8 2013,rst cause:2, boot mode:(3,7)
18:04:58.946 ->
18:04:58.946 -> load 0x4010f000, len 1384, room 16
18:04:58.946 -> tail 8
18:04:58.946 -> chksum 0x2d
18:04:58.946 -> csum 0x2d
18:04:58.946 -> v8b899c12
18:04:58.946 -> ~ld
18:04:58.982 ->
18:04:58.982 -> ESP starting… Please Wait…
18:04:58.982 -> Set MQTT Server called
18:04:58.982 -> Set MQTT callback called
18:04:59.981 -> Set WIFI hostname
18:04:59.981 -> Begin WIFI
18:04:59.981 ->
18:04:59.981 ->
18:04:59.981 -> ------------------ MQTTSign -------------------
18:04:59.981 ->

I have three display with 3 node MCU-s E12 they all work like this.

Yep that’s what it’s supposed to do as otherwise you won’t have any messages to display.

hey Keith

How did you manage to get Sky News working on this?

This is interesting project that I want to make.

thx for your great idea and I respect you to share this great project.

Is there another way to make it by ESPHOME ?

I want to make it like you : )

The following automation will send the news item (in this case the science feed)…

- alias: Send a templated input_text msg to the Sign Line9
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: input_boolean.mqttsign_line9
      to: 'on'
  action:
    - service: mqtt.publish
      data:
        topic: 'cmnd/MQTTSign/MSG9'
        payload_template: 'Sky Tech Feed 2 {{states.sensor.sky_tech_feed.attributes.entries[1].title}}'
    - service: input_text.set_value
      data_template:
        entity_id: input_text.text9
        value: Sky Tech Feed 2 {{states.sensor.sky_tech_feed.attributes.entries[1].title}}

You will also need the sensor…

- platform: feedparser
  name: Sky Tech Feed
  feed_url: 'http://feeds.skynews.com/feeds/rss/technology.xml'
  date_format: '%a, %b %d %I:%M %p'
  inclusions:
    - title
    - link
    - description
    - image
    - language
    - pubDate
  exclusions:
    - language