EspHoMaTriX: A simple clock/status display

Perhaps there is help :slight_smile:

Try:

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EsphoMaTrix
      ref: 2023.3.0
    refresh: 60s 
    components: [ ehmtx ]   

i added a parameter for the ehmtx section.

clock_interval: 15 => the clock will be shown ~15 seconds

I have finally realized that I was trying to use esphomatrix as it wasn´t intended to. So following the instructions about using automations works fine. Now, time for petitions :sweat_smile:
Would it be possible to show a screen for less than one minute? 15 or 30 seconds would be perfect!

I am having problems with gif animations as pepe59 told you in this post

Was he able to solve it finally? Not moving gifs is weird!

Suggestions? Help? Magic? hahaha

This is mi yaml

ehmtx:
  id: rgb8x32
  show_clock: 4
  show_screen: 6
  display8x32: ehmtx_display
  time: ehmtx_time
  week_start_monday: true
  duration: 7
  font_id: ehmtx_font
  clock_interval: 15 #seconds
  on_next_screen:
    - homeassistant.event:
        event: esphome.next_screen
        data_template:
            iconname: !lambda "return x.c_str();"
            text: !lambda "return y.c_str();"  
    - homeassistant.event:
        event: esphome.next_screen
        data_template:
            iconname: rainbow_icon
            text: "prueba" 

  icons: 
    - file: _icons/computer.gif
      id: computer_icon
      #pingpong: true
      duration: 500
    - file: _icons/varios.gif
      id: varios_icon
      #pingpong: true
      duration: 500
    - file: _icons/house.gif
      id: house_icon
      #pingpong: true
      duration: 500    

When downloading a gif, there is an option to adjust the size.
I set the download gif to be 8x8px

Thank you. I will try that

By the way, were you able to see the animations moving on the led matrix? As you said, the animations can move on my pc, but the dont in the matrix.

I can’t see any Information about the automation on the compiled file, either

I have 8x8px gif images compiled into esp and this size if the animation can be seen on the PC also works on the matrix. I don’t really understand your automation question, but I do all the automation for this device in HA.

Along with @jacamayo, I would love being able to show screens for less than a minute. If I understood correctly from code, the duration is set as an integer (0-65535), interpreted as minutes.

Still waiting for my TC001 to arrive before I try esphomatrix, but I’m starting to wonder if I can get notifications to be cycled along with clock, along with a screen duration (< a minute).

Imagine the following:

Clock (x seconds)
Notification 1 (y seconds)
Notification 2 (z seconds)
Clock (x seconds)
Notification 1 (y seconds)
Notification 2 (z seconds)
                          <-- HA stops Notification 1
Clock (x seconds)
Notification 2 (z seconds)
                          <-- HA stops Notification 2
Clock (forever until a new screen is added)

In my awtrix (which I mean to replace by esphomatrix), I have notifications which are being displayed in a cycle along with clock, until HA stops updating it. Is this something somehow doable in esphomatrix?

Not sure if I could explained myself properly in my question.

1 Like

I mean the compiled code that can be found in this route /config/esphome/.esphome\build\ehmtx8266\src\main.cpp

https://community.home-assistant.io/t/a-simple-diy-status-display-with-an-8x32-rgb-led/379051/33?u=jacamayo

Yes it’s there /config/esphome/.esphome/build/ehmtx8266/src/main.cpp
if we have everything the same, it is on line 1339.
Otherwise, use ctrl+f and type Animation in the search box.
Mine on this line
test = new display::Animation(uint8_t_5, 8, 8, 5, display::IMAGE_TYPE_RGB24);

The settings for how the display should behave are in the documentation.
The setting of individual times is set in the yaml code esp.

ehmtx:
  id: rgb8x32
  show_clock: 10
  show_screen: 15
  show_date: true
  display8x32: ehmtx_display
  time: ehmtx_time
  week_start_monday: true
  duration: 1
  scroll_intervall: 72
  anim_intervall: 256

Thank you very much

I will try to solve it following your instructions later and keep you up to date

Ok, I think I have found the problem following your indications

You have this in your main.ccp
test = new display::Animation(uint8_t_5, 8, 8, 5, display::IMAGE_TYPE_RGB24);

But I have this
computer_icon = new esphome::EHMTX_Icon(uint8_t_3, 8, 8, 1, display::IMAGE_TYPE_RGB565, "computer_icon", false, 500);

The 4th number, which sets the number of frames per animation, is 5 in your main.ccp and 1 in mine, and that is why mi animations don’t move as they “have only 1 frame instead of 5”

This is the same problem you were speaking about here

Were you able to solve it?

Yes, the solution is to resize the gif to 8x8px without losing the animation. I used the website to edit online but unfortunately the website is no longer working.
The Gimp editing program was recommended to me, but I haven’t tried it.

Yessssssssssssss! That made the trick!!
:raised_hands:

I followed your advices:
Gimp software
Image/scale image
8 x 8 px
Export as gif (it only lets me save as xcf file)

Thanks a lot @pepe59 @lubeda

1 Like

New release 2023.3.0 :tada:
Big thanks to the growing community!

New features:

  • action to disable the display
  • set the interval for the clock display

Also some fixes.

If you like it, sponsor my work or give me a github star⭐.

Have fun!

3 Likes

Guide on making it work with Ulanzi pixel clock and a link to a good pixel font resource

5 Likes

Great work! Thanks for sharing!

Hi, I have a couple of questions:

  1. which is the difference (and benefits) of defining services like this:
- service: set_brightness_rgb8x32

      variables:

        brightness: int

      then:

        lambda: |-

          id(rgb8x32)->set_brightness(brightness);

Or like this?

- service: set_brightness

      variables:

        brightness: int

      then:

        - ehmtx.set.brightness:

            brightness: !lambda return brightness;
  1. I must be missing something fundamental, but how can I implement a simple endless loop that shows clock/date for “x” seconds, then a screen during “y” seconds with icon “01” and text “test 01”, then a second screen during “z” seconds with icon “03” and text “03”, and then start again with clock/date?

Thanks!

For your second question you will need to create an automation to regularly push the screens you want, by default they expire after 5 minutes.
Here’s a link to my automations for inspiration, it pushes the screens I want every minute along with some other state changes, a force screen for an important state change, presence detection to turn the display on/off and finally handles the Ulanzi buttons.

1 Like

Thanks for sharing!
Will have a look.
Best regards

@lubeda Any advice on this? Thanks in advance for your help.