EspHoMaTriX: A simple clock/status display

Hi,
from result they are the same.
ehmtx.set.brightness is esphome style and
id(rgb8x32)->set_brightness(brightness); is c++ style.

The c++ style is more complicated but way more flexible. So you have to decide.

Hi,

in my use case the display is mainly a clock, the state display is quite dynamic, because I don’t know when a new state is displayed. I’ve got ca. 20 automations that send data to the display. And 99,9999% percent of the day I don’t even look at the display, so I know that I miss most of the displayed informations.

For the operation:

There is a queue of states/screens that are displayed one after another. You can add screens like @codechimp showed in his sample. Each screen has a lifetime. How often and when it is displayed depends from the other states in the queue. So it’s very dynamic and configured by time settings, the live time duration per screen, the show_screen time per display slot.

I’m not good in english, even in my native language it is hard for me to describe in detail what’s the logic is.

Thanks for replying. Much appreciated. I believe I get your point.
Could you also please explain the differences in the two ways of defining services?

- service: set_brightness_rgb8x32

      variables:

        brightness: int

      then:

        lambda: |-

          id(rgb8x32)->set_brightness(brightness);

Versus

- service: set_brightness

      variables:

        brightness: int

      then:

        - ehmtx.set.brightness:

            brightness: !lambda return brightness;

See here, I think there is also a documantion on https://esphome.io

I see. Thanks for replying.

May also suggest something? Could you make the colon blinking every second in clock screen?

I tried, but this isn’t easy and universal. So, for now my answer is no.
If you need seconds use the time_format option "%H:%M:%S"

Edit: You can try the 8x32 branch, there is a show_seconds option.

what do you mean by “8x32 branch”? sorry but not very used to github stuff.

last question (at least, for today :slight_smile: )
what is the purpose of “gauge” service?

That was a “hidden” feature. It will display a gauge at the left side to display values from 0-100 scaled to 0-8 pixels. As a kind of indicator e.g. for the fuel in your car.

I never used it, so I removed it from the document.

That’s an interesting feature.

I have defined services like this but can’t show gauge by calling, as an example, set_gauge_value with an integer value of, let’s say, 85.

Please advise.

    - service: set_gauge_value
      variables:
        gauge: int
      then:
        lambda: |-
          id(rgb8x32).set_gauge_value(gauge);

    - service: set_gauge_color
      variables:
        r: int
        g: int
        b: int
      then:
        lambda: |-
          id(rgb8x32).set_gauge_color(r,g,b);

    - service: set_gauge_off
      then:
        lambda: |-
          id(rgb8x32).set_gauge_off();

in the next release the gauge will be shown also with the clock. Now its only displayed while an icon is displayed

Thanks! Looking forward to it.

You can test it with this settings:

external_components:

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

But you have to check the breaking changes also: EsphoMaTrix/CHANGELOG.md at 026e120169ed1c1fd9a4690d1f6f30eced64ba7b · lubeda/EsphoMaTrix · GitHub

working like a charm! thanks!

has “duration” been changed to “lifetime” in services like add_screen?

Are there any breaking changes in brightness?

I was able to control it with this piece of code but now its value is always zero no matter how much I move the slider.

number:
  - platform: template
    name: "$devicename Brightness"
    id: brightness_value
    min_value: 0
    max_value: 255
    step: 1
    lambda: |-
      return id(rgb8x32)->get_brightness();
    set_action:
      lambda: |-
        id(rgb8x32)->set_brightness(x);

Moreover, I believe now “brightness” is a default service so no need to include in my yaml such a code like this:

- service: set_brightness

      variables:

        brightness: int

      then:

        lambda: |-

          id(rgb8x32)->set_brightness(brightness);

EDITED:
Solved the brightness issue after removing “ref: 8x32” in

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

and compiling again, but gauge is not working anymore and I have to define again in my YAML code status, indicator… default services again

@lubeda I love EspHoMaTrix - it’s working perfectly on my 8x32 RGB LED matrix.

My problem is finding a case. The 3-d models on thingiverse are far too large for my home printer, and commercial printers want hundreds of dollars to print one for me. Any ideas where I could buy a premade case?

try this one. it is cut in two pieces:

2 Likes

Hi
Which are the difference between main code and 8x32 branch?
Thanks!

The 8x32 ist the preparation for the next main. So, what’s now in 8x32 will be released in the next days as version 2023.3.5. For details see the Changelog.md in the 8x32 branch