Giter VIP home page Giter VIP logo

esphomatrixv2's Introduction

EspHoMaTriX version 2 (EHMTXv2)

Home Assistant GitHub Donate Publish wiki Build

Important

With the ulanzi-hardware and esphome 2024.2.0 you have to remove all the rtttl stuff to make things work!!!

The hardware design of the ulanzi isn't perfect. If your ulanzi makes a crazy beeping noise after removinf the rtttl-component you may use this setting to make it silent again.

output:
  - platform: gpio
    pin:
      number: GPIO15
      ignore_strapping_warning: true
    id: buzzer_pin

Attention

Some updates of esphome will interfere with EspHoMaTriXv2, like the update of esphome to 2023.7.0. It made a change to all YAML files necessary.

You have to add this to your YAML

image:
   - file: 1pixel.gif
     id: breaking20237

animation:
  - file: 1pixel.gif
    id: breaking202371

You have also to copy the file 1pixel.gif from the copy2esphome folder to the directory with your yaml.

Also there might be breaking changes due to a redesign of EspHoMaTriXv2.

Important information

If you like this project, please donate a star on GitHub and consider sponsoring me!

Introduction

An easy to setup and extensible DIY LED Matrix status display built with a 8x32 RGB LED panel, (Example: ULANZI TC001) all implemented with esphome.io

sample image

If you like to customize and tinker you can use this custom component as a satellite voice control microphone for home assistant. Youtube

For additional tips and tricks be sure to check out the WIKI

Background

There are some “RGB-matrices” status displays/clocks out there, the commercial ones from LaMetric and Ulanzi, and also some excellent DIY alternatives.

  • LaMetric commercial ~ €199
  • Ulanzi TC001 commercial ~ €50
  • AWTRIX (project has been discontinued after more than 4 years in August 2022)
  • Pixel It (the project is under active development)
  • AWTRIX-Light From the developer of AWTRIX, optimized for the Ulanzi TC001 hardware

All of the various solutions have their pros and cons. I tried some and used AWTRIX for a long time, but I found it lacking in a lot of ways (in my opinion,) so I started work on an esphome.io variant. Targeted for an optimized and extensible Home Assistant integration without paid blueprints, MQTT broker requirement, or the need to upload files to the ESP board.

Features

Based on a 8x32 RGB matrix, it displays a clock, the date and up to 24 other 'screens' provided by Home Assistant. Each screen (value/text) can be associated with a 8x8 bit RGB icon or GIF animation (see installation). The values/text can be updated or deleted from the display queue. Each screen has a lifetime, if not refreshed in its lifetime, it will disappear. Even 8x32 GIF animations are possible. You can control nearly everything of the component.

State

After the v1 component became popular and received additional feature requests it became clear that yhe v1 v1code was a bit of a mess. I reworked all of the code and restructured it to hopefully be much more extensible. This software is still heavily in development, before updating please check the Breaking Changes

Advice

It is highly recommended to use an ESP32 device. There are conditions where the RAM size is too limited in a ESP8266 device so some of the features had to be removed for these boards (Example: bitmap_screen).

How to use

The easy way

There is a little hype around the Ulanzi TC001 pixel clock. The easy way works with the Ulanzi TC001 hardware. For more customization and other hardware, look here.

In easy mode you'll have a clock with auto brightness control and after step 3 you can send states to the display and toggle on or off additional screen elements.

Step 1

Copy these files from the source folder copy2esphome:

  • ulanzi-simple.yaml
  • Optional: 1pixel.gif See: Attention

to your esphome directory (usually /config/esphome).

Grab the font files, that are used in ulanzi-simple.yaml from https://github.com/trip5/Matrix-Fonts and save them in /config/esphome/fonts.

In your esphome dashboard, you will find a new device named ulanzi-easy.

Step 2

Connect your Ulanzi device to your host with USB-C and flash the firmware.

Step 3

Copy the blueprints EHMTX_easy_*.yaml to your blueprint path (usually /config/blueprints/automation/) in a subfolder named ehmtxv2.

Reload your automations and have fun after configuring some automations with this blueprint.

Result

The device should boot

boot

and after a while (~30 seconds) it should display the correct time.

clock screen.

If not, check the esphome logs for further investigations.

The advanced way

This is for the more advanced users. If you understand the concept of esphome, you can display nearly everything with this component. You can also create your own customized esphome based display with multiple sensors, or even use it as a microphone for the new voice assist feature from home assistant.

Concept

You can add screens to a queue and all these screens are displayed one after another. timing Each screen can display different information or animation or text, even in rainbow color. They all have a lifetime, if a screen isn't refreshed during its lifetime it will be removed from the queue. If there is nothing left in the queue, the date and time screens are displayed. Some screens can show additional features like an alarm or rindicator see elements. You can add screens from home assistant with service-calls or from esphome via lambdas in your YAML.

Screen types a.k.a. what is possible

Date/Time screen

clock screen

Service via API

You can call this from, e.g., the developer tools service

clock_screen => {"lifetime", "screen_time", "default_font", "r", "g", "b"}
rainbow_clock_screen => {"lifetime", "screen_time", "default_font"}
date_screen => {"lifetime", "screen_time", "default_font", "r", "g", "b"}
rainbow_date_screen => {"lifetime", "screen_time", "default_font"}

The rainbow_* variants don't display the day of week bar.

Lambda

You can use these in lambdas in your esphome YAML.

all parameters have a default value.

void clock_screen(int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME,bool default_font=true,int r=C_RED, int g=C_GREEN, int b=C_BLUE);
void rainbow_clock_screen(int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME, bool default_font=true);
void date_screen(int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME,bool default_font=true, int r=C_RED, int g=C_GREEN, int b=C_BLUE);     
icon screen

icon screen

Service via API
icon_screen => {"icon_name", "text", "lifetime", "screen_time", "default_font", "r", "g", "b"}
rainbow_icon_screen => {"icon_name", "text", "lifetime", "screen_time", "default_font"}
Lambda
void icon_screen(std::string icon, std::string text, int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME,bool default_font=true,int r=C_RED, int g=C_GREEN, int b=C_BLUE);
void rainbow_icon_screen(std::string icon, std::string text, int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME,bool default_font=true);
full_screen

For 8x32 icons or animations

full_screen

service via API
full_screen => {"icon_name", "lifetime", "screen_time"}
Lambda
void full_screen(string iconname, int =D_LIFETIME, int screen_time=D_SCREEN_TIME);
bitmap screen

This feature is only available on ESP32 platform!!!!!

For 8x32 images as text. You can generate these images with, e.g., Pixel Bitmap Creator (8x32)

service via API
bitmap_screen => {"[0,4523,0,2342,0,..... (256 values 16bit values rgb565)]", "lifetime", "screen_time"}
Lambda
void bitmap_screen(string text, int =D_LIFETIME, int screen_time=D_SCREEN_TIME);

Display Elements

elements

alarm

The alarm is displayed in the upper-right corner on all screen types! You can set its color and its size.

service
show_alarm => { "r", "g", "b","size"}
API
void EHMTX::show_alarm(int r, int g, int b, int size=2);

r, g, b: 0-255 color components size: 0-3 (zero turns it off)

To remove it, call:

Service
hide_alarm => no parameter
Lambda
void hide_alarm();
rindicator

The rindicator is in the lower-left corner, but not displayed in full screen 8x32 animations. You can set its color.

Service
show_rindicator => { "r", "g", "b","size"}
API
void show_rindicator(int r, int g, int ,int size=3);

r, g, b: 0-255 color components size: 0-3 (zero turns it off)

To remove it, call:

Service
hide_rindicator => no parameter
Lambda
void hide_rindicator();
lindicator

Same as above but in the lower-left corner, this is not visible while icons are displayed.

gauge

The gauge is displayed in the leftmost column. You can set its color and its value from 0-100, the resolution is limited to 8 pixels, so it is not a precision gauge.

service
show_gauge => {"value","r", "g", "b","bg_r", "bg_g", "bg_b"}
API
void show_gauge(int percent, int r, int g, int b, int bg_r, int bg_g, int bg_b);

percent: 0-100 (resolution: one pixel per 12.5%) r, g, b: 0-255 foreground color components bg_r, bg_g, bg_b: 0-255 background color components

To remove it, call:

service
hide_gauge => no parameter
API
void hide_gauge();

Installation of EspHoMaTriXv2 custom component

EspHoMaTriXv2 is a custom component, you have to include it in your YAML configuration. To always use the newest features, you should use the repo, to use a stable version, you copy a working version to your esphome installation.

use of local copy

If you download the components-folder from the repo and install it in your esphome you have a stable installation. But if there are new features, you won't see them. If needed, customize the YAML to your folder structure.

external_components:
   - source:
       type: local
       path: components # e.g. /config/esphome/components
use from repo

Use the GitHub repo as a component. Esphome refreshes the external components “only” once a day, perhaps you have to refresh it manually. In this mode, there may be breaking changes, so read the changelog and check the logs while installing the firmware.

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: stable # optional select a special branch or tag

Addressable_light component

The EspHoMaTriXv2 component requires a 8x32 pixel addressable_light, it is referenced by the ID matrix_component.

See the default options

There are some different matrices-types on the market, to adapt them to EspHoMaTriXv2 you have to find the proper pixel mapper. If there is garbage on your display, try the other pixel_mapper. Here are the most common types for flexible 8x32 matrices:

Type 1

Common for 8x32 RGB flexible matrices.

Under the display tag, specify this pixel mapper:

display:
  - platform: addressable_light
    .....
    pixel_mapper: |-
      if (x % 2 == 0) {
        return (x * 8) + y;
      }
      return (x * 8) + (7 - y);
    .....
Type 2 (e.g., Ulanzi TC001)

Under the display tag, specify this pixel mapper:

display:
  - platform: addressable_light
    .....
    pixel_mapper: |-
      if (y % 2 == 0) {
        return (y * 32) + x;
      }
      return (y * 32) + (31 - x);
    .....
Type 3 (daisy-chained 8x8 panels)
display:
  - platform: addressable_light
    .....
    pixel_mapper: |-
      return ((int) (x/8 * 64)) + x % 8 + y * 8;
    .....
How to configure the pixel_mapper

You have to configure this lambda under the display: section to use the EspHoMaTriXv2 component

display:
  - platform: addressable_light
    id: ehmtx_display
    .....
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

Light component

The light component is used by the addressable_light component and referenced by ID under addressable_light_id:.

To use the light component directly from home assistant, add the sample lambdason_turn_on and on_turn_off to the light component.

Sample

light:
  - platform: neopixelbus
    id: ehmtx_light
    ....
    on_turn_on:
      lambda: |-
         id(ehmtx_display)->set_enabled(false);
    on_turn_off:
       lambda: |-
         id(ehmtx_display)->set_enabled(true);

To hide the light component in home assistant use: internal: true

light:
  - platform: neopixelbus
    id: ehmtx_light
    internal: true
    ...

Time component

Since it is a clock, you need a time component, e.g., home assistant. It is referenced by its ID under time_component: The display shows !t! until the time source is synchronized and valid.

Font

In the easy configuration is a TTF-font included, it is based on this font. Or you can search for a font you like more.

Not all fonts are suitable for this minimalistic display. There are public domain fonts which work well on the display, e.g., DMDSmall, details on alternative fonts are here.

You can configure two fonts if you like.

Trip5 is also providing special fonts for 8x32 matrices in his repo

dbuezas has also contributed tow optimized fonts with umlauts for this kind of display mateine.ttf and mateineThin.ttf. They are included in the copy2esphome folder

font:
  - file: mateine.ttf
    id: default_font
    size: 16
    glyphs:  |
      !"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@

Icons and Animations

Download and install all needed icons (.jpg/.png) and animations (.GIF) under the ehmtxv2: key. All icons have to be 8x8 or 8x32 pixels in size. If necessary, scale them with gimp, check “as animation” for GIFs.

You can also specify a URL to directly download the image file. The URLs will only be downloaded once at compile time, so there is no additional traffic on the hosting website.

The icons and animations from the AWTRIX and AWTRIX-light could be used, but have to be scaled down to 8x32 or 8x8 pixels. Check the license before using them!

There are maximum 90 icons possible.

Sample

emhtx:
  icons: 
    - id: boot 
      file: icons/rocket.GIF
      duration: 75     
    - id: temp 
      file: temperature.png
    - id: yoga
      file: icons/yoga-bridge.GIF
      pingpong: true
    - id: jackshome
      url: https://awtrix.blueforcer.de/animations/JackHomePage
      resize: 32x8
    - id: garage
      lameid: 1234
      duration: 100
    - id: homeassistant
      url: https://github.com/home-assistant/assets/raw/master/logo/logo-special.png      

The ID of the icons is used later to configure the screens to display. So, you should name them wisely. If you like to group icons, you should prefix them, e.g., with “weather_” (see Service del_screen)

The first defined icon will be used as a fallback icon, in case of an error, e.g., if you use a non-existing icon ID.

GIFs are limited to 110 frames to limit the used amount of flash space.

All other solutions provide ready-made icons, especially Lametric has a big database of icons. Please check the copyright of the icons you use. The maximum number of icons is limited to 90 in the code and also by the flash space and the RAM of your board.

See also icon parameter

Configuration

ehmtxv2 component

This component is highly customizable.

Example

ehmtxv2:
  id: rgb8x32
  show_seconds: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  icons2html: true
  default_font_id: default_font
  default_font_yoffset: 6
  special_font_id: special_font
  special_font_yoffset: 7
  brightness: 80 # percent
  time_format: "%H:%M"
  date_format: "%d.%m."
  rtl: false # write vom left to right
  week_start_monday: true # false equals sunday
  scroll_count: 2 # scroll long text at least two times
  scroll_interval: 80 # milliseconds
  rainbow_interval: 32 # milliseconds
  icons: 
  .....

Parameters

id (required, ID): Manually specify the ID used for code generation and in service definitions.

date_format (optional, string): formats the date display with strftime syntax, defaults "%d.%m." (use "%m.%d." for the US)

show_seconds (optional, boolean): toggle/blink an indicator-pixel each seconds while the clock is displayed (default: false)

time_format (optional, string): formats the date display with strftime syntax, defaults "%H:%M" (use "%I:%M%p" for the US)

default_font_yoffset (optional, pixel): yoffset the text is aligned BASELINE_LEFT, the baseline defaults to 6

default_font_xoffset (optional, pixel): xoffset the text is aligned BASELINE_LEFT, the left defaults to 1

special_font_yoffset (optional, pixel): yoffset the text is aligned BASELINE_LEFT, the baseline defaults to 6

special_font_xoffset (optional, pixel): xoffset the text is aligned BASELINE_LEFT, the left defaults to 1

scroll_small_text (optional, bool): normally small text is centered on the display if possible, with this set to true even small text is scrolled in text_screen and rainbow_text_screen (default: false)

allow_empty_screen (optional, bool): When the queue for messages to be displayed is empty and the time screen has been removed, the time screen is normally reactivated. This option can be used to disable this behavior by setting allow_empty_screen to true. (default: false)

rtl (optional, boolean): if true write text (but only the scroll direction, the words and numbers aren't changed!) from right to left (Arabic, Hebrew etc.). Default is false

matrix_component (required, ID): ID of the addressable display

show_date (optional, bool): show the date in the loop (rainbow and normal), defaults to true.

show_dow (optional, bool): draw the day of week rindicator on the bottom of the clock screen. Disable, e.g., if you want larger fonts, defaults to true.

blend_steps (optional, int): on screen transition you can blend in the new screen, a value of 16 works nice, defaults 0.

time_component (required, ID): ID of the time component. The display shows !t! until the time source is valid.

default_font (required, ID): ID of the default font

special_font (required, ID): ID of the special font, you can reuse your default font, but occasionally, it's nice to have a special font to minimize scrolling

week_start_monday (optional, bool): default Monday is first day of week, false => Sunday

default_clock_font (optional, boolean): If true, use the default font for clock and date otherwise use the special font. (default = true)

scroll_interval (optional, ms): the interval in ms to scroll the text (default=80), should be a multiple of the update_interval of the display

clock_interval (optional, s): the interval in seconds to force the clock display. By default, the clock screen, if any, will be displayed according to the position in the queue. If you set the clock_interval close to the screen_time of the clock, you will only see the clock! (default=0)

boot_logo (optional, string , only on ESP32): Display a fullscreen logo defined as rgb565 array.

  boot_logo: "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,63519,63519,63519,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,0,0,0,0,2016,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,63488,0,63488,0,0,0,63519,0,0,0,0,2016,2016,0,0,0,65514,0,65514,0,0,0,31,0,0,0,64512,0,0,64512,0,63488,63488,0,63488,63488,0,0,63519,63519,63519,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,31,31,31,0,0,0,64512,64512,0,0,63488,63488,63488,63488,63488,0,0,63519,0,0,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,31,0,0,0,0,64512,64512,0,0,0,63488,63488,63488,0,0,0,63519,63519,63519,63519,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,0,31,31,0,64512,0,0,64512,0,0,0,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]" 

If defined you can use the services display_boot_logo and display_version to display the defined logo or the version of ehmtx.

icons2html (optional, boolean): If true, generate the HTML-file (filename.html) to show all included icons.  (default = false)

always_show_rl_indicators (optional, boolean): If true, always show the r/l indicators on all screens. Default is to not show either on clock, date, full, and bitmap screens, left on icon, or if display gauge displayed. (default = false)

Example output: icon preview

icons

Parameters See icon details

  • frame_duration (optional, ms): in the case of a GIF-file, the component tries to read the default interval for each frame. The default/fallback interval is 192 ms. In case you need to override the default value, set the duration per icon.

  • pingpong (optional, boolean): in the case of a GIF-file, you can reverse the frames instead of starting from the first frame.

  • file (Exclusive, filename): a local filename

  • url (Exclusive, url): a URL to download the icon

  • lameid (Exclusive, number): the ID from the LaMetric icon database

  • resize (Optional, "8x8" or "32x8"): If the source file hasn't the right dimensions.

Example

    - id: jackshome
      url: https://awtrix.blueforcer.de/animations/JackHomePage
      resize: 32x8

Control your display

Numerous features are accessible with services from home assistant and lambdas that you can use in your YAML.

Public functions/services

 

service parameter result
get_status none write some status information to the esphome logs
display_on none turn display off
display_off none turn display on
hold_screen none show the screen that is currently displayed for the number of seconds longer
hide_rindicator none hides the rindicator
hide_gauge none hides the gauge
hide_alarm none hides the alarm
show_gauge" "percent", "r", "g", "b" set the height of the gauge according to the percentage in the given color
show_alarm "r", "g", "b", "size" shows the color with the given size in the upper-right corner
show_rindicator "r", "g", "b", "size" shows the color with the given size in the lower-right corner
set_today_color "r", "g", "b" set the special color for today in the day of week line
set_weekday_color "r", "g", "b" set the default color in the day of week line
set_clock_color "r", "g", "b" set the default color of clock and date display
del_screen "icon_name", “mode” deletes the specified icon screen from the queue, the mode is a filter
force_screen "icon_name", “mode” displays the selected the specified icon screen from the queue, the mode is a filter
full_screen "icon_name", "lifetime", "screen_time" show the specified 8x32 icon as full screen
icon_screen "icon_name", "text", "lifetime", "screen_time", "default_font", "r", "g", "b" show the specified icon with text
rainbow_icon_screen "icon_name", "text", "lifetime", "screen_time", "default_font" show the specified icon with text in rainbow color
text_screen "text", "lifetime", "screen_time", "default_font", "r", "g", "b" show the specified text
rainbow_text_screen "text", "lifetime", "screen_time", "default_font" show the specified text in rainbow colors
clock_screen "lifetime", "screen_time", "default_font", "r", "g", "b" show the clock
rainbow_clock_screen "lifetime", "screen_time", "default_font" show the clock in rainbow color
blank_screen "lifetime", "screen_time" "show" an empty screen
date_screen "lifetime", "screen_time", "default_font", "r", "g", "b" show the date
brightness "value" set the display brightness

Parameter description

"r", "g", "b": Color components for red, green, and blue 0..255 "size": The size of the rindicator or alarm, 1-3 "percent": values from 0..100 "icon_name": the id of the icon to show, as defined in the YAML file "text": a text message to display "lifetime": how long does this screen stay in the queue (minutes) "screen_time": how long is this screen display in the loop (seconds). For short text without scrolling it is shown the defined time, longer text is scrolled at least scroll_count times. "default_font": use the default font (true) or the special font (false) "value": the brightness 0..255

Local lambdas

Add screen to your display queue

You can add screens locally and display data directly from any local sensor. See this sample:

Lambda

Take care that the char text[30]; has enough space to store the formatted text.

sensor:
  - platform: bh1750
    id: sensorlx
    ...
    on_value:
      then:
        lambda: |-
          char text[30];
          sprintf(text,"Light: %2.1f lx", id(sensorlx).state);
          // 5 Minutes,each time at least 11 seconds,no alarm
           id(rgb8x32)->icon_screen("sun", text); // uses default values for color etc.
Force screen

Force the selected icon_screen icon_name to be displayed next. Afterward, the loop continues from this screen. e.g., helpful for alarms. Or after an update of the value/text.

    id(rgb8x32)->force_screen("homeassistant");
Change configuration during runtime

Configuration variables/functions:

Experienced programmers can use these public methods:

Local triggers

To use the display without home assistant automations, you may use the advanced functionality with triggers. The triggers can be fired by sensors, time or by the ehmtxv2 component.

on_add_screen

There is a trigger available to do some local magic. The trigger on_add_screen is triggered every time a new screen with an icon is added to the queue. In lambda's you can use two local variables:

icon (Name of the icon, std::string): value to use in lambda

mode (mode of the screen, uint8_t): value to use in lambda

See the examples:

Write information to esphome log
ehmtxv2:
  ....
    on_add_screen:
    then:  
      - logger.log:
          format: 'add screen: %s, mode: %d'
          tag: "EHMTXv2 sample"
          args:
            - icon.c_str()
            - mode

on_start_running

The trigger on_start_running is triggered when the display starts. It is triggered when time sync is done, and initial clock / date / version screens are loaded. This is to allow you to customize the default screens (for instance set colours for the clock).

on_icon_error

The trigger on_icon_error is triggered if you try to add a screen with a non defined icon. In lambda's you can use one local string variable:

icon (Name of the icon, std::string): value to use in lambda

See the examples:

ehmtxv2:
  ....
  on_next_screen:
    lambda: |-
        ESP_LOGD("Check CONFIG","Iconname: %s",icon.c_str());

on_next_screen

The trigger on_next_screen is triggered every time a new screen is displayed (it doesn't trigger on the clock/date display!!). In lambda's you can use two local string variables:

icon (Name of the icon, std::string): value to use in lambda

text (displayed text, std::string): value to use in lambda

See the examples:

Write information to esphome log
ehmtxv2:
  ....
  on_next_screen:
    lambda: |-
        ESP_LOGD("TriggerTest","Iconname: %s",icon.c_str());
        ESP_LOGI("TriggerTest","Text: %s",text.c_str());
Send an event to Home Assistant

To send data back to home assistant, you can use events.

ehmtxv2:
  ....
  on_next_screen:
    - homeassistant.event:
        event: esphome.next_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

Result

events

on_next_clock

The trigger on_next_clock is triggered every time a new clock display circle starts. See the examples:

Change something for each clock circle
ehmtxv2:
  ....
  on_next_clock:
    lambda: |-
      id(rgb8x32)->.......

(D) Service brightness

Sets the overall brightness of the display (0..255)

parameters:

  • brightness: from dark to bright (0..255) (default = 80) as set in the light component by color_correct: [30%, 30%, 30%]

There's an easier way, by using a number component:

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

(D) Service del_screen

Removes a screen from the display by icon name. If this screen is actually displayed while sending this command, the screen will be displayed until its "show_screen"-time has ended.

Optionally, you can suffix a * to the icon name to perform a wildcard delete, which will delete all screens beginning with the icon_name specified.

For example, if you have multiple icons named weather_sunny, weather_rain & weather_cloudy, you can issue a del_screen weather_* to remove whichever screen is currently in a slot and replace it with a new weather screen.

Parameters:

  • icon_name: Icon id defined in the YAML (see installation)
  • mode: The mode is a filter to select different screen types e. g. use 5for icon_screen
modes
mode value
MODE_BLANK 1
MODE_CLOCK 2
MODE_DATE 3
MODE_FULL_SCREEN 4
MODE_ICON_SCREEN 5
MODE_TEXT_SCREEN 6
MODE_RAINBOW_ICON 7
MODE_RAINBOW_TEXT 8
MODE_RAINBOW_CLOCK 9
MODE_RAINBOW_DATE 10
MODE_BITMAP_SCREEN 11
MODE_BITMAP_SMALL 12

(D) Service display_on / display_off

Turns the display on or off

There's an easier way in using a switch component:

Sample

switch:
  - platform: template
    name: "$devicename Display"
    icon: "mdi:power"
    restore_mode: ALWAYS_ON
    lambda: |-
      return id(rgb8x32)->show_display;
    turn_on_action:
      lambda: |-
        id(rgb8x32)->set_display_on();
    turn_off_action:
      lambda: |-
        id(rgb8x32)->set_display_off();

Service skip_screen

If there is more than one screen in the queue, it skips the actual displayed screen to the next screen.

e.g., on the Ulanzi TC001

binary_sensor:
  - platform: gpio
    pin:
      number: $left_button_pin
      inverted: true
    on_press:
      lambda:
        id(rgb8x32)->skip_screen();

Service hold_screen

Displays the current screen for a configured amount (default=30) seconds longer.

e.g., on the Ulanzi TC001

binary_sensor:
  - platform: gpio
    pin:
      number: $right_button_pin
      inverted: true
    on_press:
      lambda:
        id(rgb8x32)->hold_screen(120);

(D) Service get_status

This service displays the running queue and a list of icons in the logs

[13:10:10][I][EHMTX:175]: status status: 1  as: 1
[13:10:10][I][EHMTX:176]: status screen count: 3
[13:10:10][I][EHMTX:181]: status slot: 0 icon: 36  text: 47.9°C end: 400
[13:10:10][I][EHMTX:181]: status slot: 1 icon: 23  text: Supa langer Text end: 310
[13:10:10][I][EHMTX:181]: status slot: 2 icon: 1  text: 10.3°C end: 363
[13:10:10][I][EHMTX:186]: status icon: 0 name: boot
[13:10:10][I][EHMTX:186]: status icon: 1 name: temp
[13:10:10][I][EHMTX:186]: status icon: 2 name: garage
[13:10:10][I][EHMTX:186]: status icon: 3 name: wind
[13:10:10][I][EHMTX:186]: status icon: 4 name: rain

Integration in Home Assistant

To control your display, it has to be integrated in Home Assistant. Then it provides several services, all prefixed with the configured devicename e.g.,, "ehmtx". See the default services marked as (D) above, but you can add your own (see alarm and screen).

Services

All communication with Home Assistant use the homeasistant-api. The services can be provided by default or also defined additionally in the YAML. To define the additional services, you need the id of the ehmtx-component e.g. id(rgb8x32).

Use in Home Assistant automations

The easiest way to use ehmtx as a status display is to use the icon names as trigger id. In my example, I have an icon named “wind” when the sensor.wind_speed has a new state, this automation sends the new data to the screen with the icon named “wind” and so on.

alias: EHMTX 8266 Test
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.wind_speed
    id: wind
  - platform: state
    entity_id: sensor.actual_temperature
    id: temp
  - platform: state
    entity_id: sensor.wg_cover_device
    id: cover
condition: []
action:
  - service: esphome.ehmtx8266_icon_screen
    data:
      icon_name: '{{trigger.id}}'
      text: >-
        {{trigger.to_state.state}}{{trigger.to_state.attributes.unit_of_measurement}}
mode: queued
max: 10

Tips

Display sensor precision after home assistant 2023.3.0

See templating for possibilities to optimize the output e.g. {{ states(sensor.solarpower, rounded=True) }} kWh

Specific icons per condition

Add an icon per weather condition to the ehmtxv2 component

  - id: weather_clear_night
      lameid: 52163
    - id: weather_cloudy
      lameid: 25991
    - id: weather_fog
      lameid: 52167
    ......

Sample automation to show the weather with local temperature

alias: EHMTX weather
description: weather with icon per condition
trigger:
  - platform: state
    entity_id: weather.metno
action:
  - service: esphome.ulanzi_del_screen
    data:
      icon_name: weather_*
      mode: 5
  - service: esphome.ulanzi_icon_screen
    data:
      icon_name: weather_{{ trigger.to_state.state }}
      text: >-
        {{ states("sensor.external_actual_temperature") }}°C
      ....

or another sample automation for the trashcan type

alias: "EHMTX Müllanzeige"
description: Anzeige welche Tonne raus muss. iconnamen gekürzt
trigger:
  - platform: time
    at:
      - "06:30"
      - "08:30"
      - "10:30"
      - "15:00"
      - "17:00"
      - "19:00"
condition:
  - condition: numeric_state
    entity_id: sensor.mulltrigger
    below: "3"
action:
  - service: esphome.ulanzi_del_screen
    data:
      icon_name: trash_*
      mode: 5
  - service: esphome.ulanzi_icon_screen
    data:
      icon_name: >-
        trash_{{ states("sensor.mulldetails") | replace("Biotonne",   "brow")|
        replace("Papiertonne","blue")| replace("Restmüll",   "grey")|
        replace("gelbe Tonne","yell|") | truncate(4,true,"")  }}     
      text: >-
        {{ states("sensor.mulldetails")|replace(" in","")|replace(" days","
        Tagen") | replace ("0 Tagen","heute") | replace ("1 Tagen","morgen")}}
      lifetime: 120
      ...

Integrate into Home Assistant UI

Add entities to the Home Assistant UI for interactive control of the display

Brightness

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

Display switch

switch:
  - platform: template
    name: "$devicename Display"
    icon: "mdi:power"
    restore_mode: ALWAYS_ON
    lambda: |-
      return id(rgb8x32)->show_display;
    turn_on_action:
      lambda: |-
        id(rgb8x32)->set_display_on();
    turn_off_action:
      lambda: |-
        id(rgb8x32)->set_display_off();

automatic brightness

Awtrix and PixelIt have hard-coded functionality. EHMTX is also capable of building something like that with lambdas. Feel free to expierement as you see fit. See the Ulanzi simple YAML as a guide.

Example: automatic brightness control with a bh1570 sensor

sensor:
  - platform: bh1570
    # ...
    on_value:
      then:
         lambda: |-  
            if (x > 200)
            {
               id(rgb8x32)->set_brightness(50);
            } else {
               id(rgb8x32)->set_brightness(250);
            }

Breaking changes

2023.7.0

  • removed automatic boot logo display
  • removed set_clock_color since clock_screen and date_screen will set color anyway

2023.6.3

Due to this change, these values are fixed, e.g. you can not change the date or time format during runtime anymore!!

  • changed *_interval to be set only on compile time
  • change scroll_count to be set only on compile time
  • change font_offsets to be set only on compile time
  • change date/time_format to be set only on compile time

2023.5.0

  • renamed indicator to rindicator because there is now also a lindicator

EspHoMaTriX in the media

See this German tutorial video with information on setting up your display RGB-LED Status Display für Home Assistant mit ESPHome | ESPHoMaTrix.

Another german tutorial video focused on the Ulanzi Smarte Pixel Clock über Home Assistant steuern - Entitäten / Icons und mehr in der Ulanzi

See this nice article about EsphoMaTrix on a Ulanzi TC001 from blakadder.

Short video on Instagram @blak_adder

See these english discussions: Share your projects ESPHOME

It was also mentioned in the blog Building the Open Home and in the home assistant livestream

Or in German: Showroom

Disclaimer

THE SOFTWARE IS PROVIDED “AS IS”, use at your own risk!

Thanks

  • blakadder for his contribution (cleanup README.md, fixed sample)
  • dbuezas for his fonts infos
  • jfurtner for his the on_start_running trigger and a new parameter
  • andrew-codechimp for his contribution (display on/off & del_screen "*" & show_clock with 0) and improved blueprint slelection
  • jd1 for his contributions
  • aptonline for his work on the Ulanzi hardware
  • wsbtak for the work on the Ulanzi hardware
  • ofirsnb for his contributions
  • trip5 for his work on optimized fonts and user support and work on the wiki
  • pplucky for his 8x32 GIF animation
  • dennisse Auto brightness for the Ulanzi
  • hco fixing documentation
  • geekofweek fixed sample YAML, cleanup documentation
  • joncar fixed scroll small text
  • Everybody who found bugs/issues and reported them!

Special thanks to all the sponsors

esphomatrixv2's People

Contributors

andrew-codechimp avatar bogdanr avatar dbuezas avatar firewolf1337 avatar frittes avatar geekofweek avatar hco avatar joncar avatar lubeda avatar lukasleitsch avatar n3rdix avatar tbratfisch avatar thegroundzero avatar trip5 avatar trvrnrth avatar vorlon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphomatrixv2's Issues

[BUG] Bootloop

Bug report

Describe the bug

I flashed a Ulanzi Pixel clock that used to run the v1 code with the latest YAML version of this v2 and now it enters a bootloop.

Additional information

  • used Hardware:
    • ESP32 (Ulanzi TC001 Pixel Clock)
    • EspHoMaTriXv2 version: 2023.7.0
    • ESPHome version: 2023.7.1

To Reproduce

Steps to reproduce the behavior:

Copy YAML example and files according to documentation and flash device.

Expected behavior

Clockface to display time and date like it used to in older versions

Configuration

Based on https://github.com/lubeda/EspHoMaTriXv2/blob/main/copy2esphome/ulanzi-easy.yaml (with fixed font name)

substitutions:
  devicename: ulanzi-tc001-d67068
  comment: "Ulanzi TC001 d6:70:68"
  board: esp32dev
  # Pin definition from https://github.com/aptonline/PixelIt_Ulanzi
  battery_pin: GPIO34
  buzzer_pin: GPIO15
  ldr_pin: GPIO35
  matrix_pin: GPIO32
  left_button_pin: GPIO26
  mid_button_pin: GPIO27
  right_button_pin: GPIO14
  scl_pin: GPIO22
  sda_pin: GPIO21

esp32:
  board: esp32dev

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main
    refresh: 60s 
    components: [ ehmtxv2 ]   

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: !secret not_domain
  use_address: 192.168.70.67

esphome:
  comment: $comment
  name: $devicename 
  project:
    name: "Ulanzi.EHMTXv2"
    version: "2.0.0"
  on_boot:
    then:
      - ds1307.read_time:

ota:

logger:
  level: WARN

api:
  encryption:
    key: !secret api_encryption_key
  services:
    - service: tune
      variables:
        tune: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return tune;'

web_server:

globals:
  # aab = auto-adjustable brightness
  - id: aab_enable
    type: "bool"
    restore_value: true
    initial_value: "true"
  - id: aab_add
    type: int
    initial_value: '10'
  - id: aab_max
    type: int
    initial_value: '220'
  - id: aab_min
    type: int
    initial_value: '20'

i2c:
  sda: $sda_pin
  scl: $scl_pin
  scan: true
  id: i2cbus
    
time:
  - platform: homeassistant
    timezone: Europe/Brussels
    on_time_sync:
      then:
        ds1307.write_time:
  - platform: ds1307
    update_interval: never
    id: ehmtx_time

image:
   - file: images/1pixel.gif
     id: breaking20237

animation:
  - file: images/1pixel.gif
    id: breaking202371

output:
  - platform: ledc
    pin: $buzzer_pin
    id: rtttl_out

rtttl:
  output: rtttl_out

font:
  - file: fonts/mateine.ttf
    size: 16
    id: default_font
    glyphs:  |
      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: ehmtx_light
    width: 32
    height: 8
    pixel_mapper: |-
      if (y % 2 == 0) {
        return (y * 32) + x;
      }
      return (y * 32) + (31 - x);
    rotation: 
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();
      
ehmtxv2:
  id: rgb8x32
  icons2html: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  time_format: "%H:%M"
  date_format: "%d.%m."
  show_seconds: false
  default_font_id: default_font
  special_font_id: default_font 
  boot_logo: "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,63519,63519,63519,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,0,0,0,0,2016,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,63488,0,63488,0,0,0,63519,0,0,0,0,2016,2016,0,0,0,65514,0,65514,0,0,0,31,0,0,0,64512,0,0,64512,0,63488,63488,0,63488,63488,0,0,63519,63519,63519,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,31,31,31,0,0,0,64512,64512,0,0,63488,63488,63488,63488,63488,0,0,63519,0,0,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,31,0,0,0,0,64512,64512,0,0,0,63488,63488,63488,0,0,0,63519,63519,63519,63519,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,0,31,31,0,64512,0,0,64512,0,0,0,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
  icons: 
    - id: error
      lameid: 40530
    - id: home_assistant
      lameid: 47693
    - id: temperature
      lameid: 2056
    - id: lightbulb
      lameid: 1762
    - id: music
      lameid: 45625
    - id: phone
      lameid: 1232
    - id: car
      lameid: 2819
    - id: sleep8x32
      url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif 
  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    internal: true
    variant: WS2812
    pin: $matrix_pin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    gamma_correct: 2.0
    name: "$devicename Light"
    restore_mode: ALWAYS_OFF
  
binary_sensor:
  - platform: status
    name: "$devicename Status"
  - platform: gpio
    pin:
      number: $left_button_pin
      inverted: true
    name: "Left button"
  - platform: gpio
    pin: 
      inverted: true
      number: $mid_button_pin
      mode: INPUT_PULLUP
    name: "Middle button"
  - platform: gpio
    pin: 
      number: $right_button_pin
      inverted: true
    name: "Right button"

sensor:
  - platform: sht3xd
    temperature:
      name: "$devicename Temperature"
    humidity:
      name: "$devicename Relative Humidity"
    update_interval: 60s
  - platform: adc
    pin: $battery_pin
    name: "$devicename Battery"
    id: battery_voltage
    update_interval: 10s
    device_class: battery
    accuracy_decimals: 0
    attenuation: auto
    filters:
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15
          send_first_at: 1
      - multiply: 1.6
      - lambda: |-
          auto r = ((x - 3) / 0.69 * 100.00);
          if (r >= 100) return 100;
          if (r > 0) return r;
          if (r <= 0) return 1;
          return 0;
    unit_of_measurement: '%'
  - platform: adc
    id: light_sensor
    name: "$devicename Illuminance"
    pin: $ldr_pin
    update_interval: 10s
    attenuation: auto
    unit_of_measurement: lx
    device_class: illuminance
    accuracy_decimals: 0
    filters:
      - lambda: |-
          return (x / 10000.0) * 2000000.0 - 15 ;
    on_value:
      then:
        - lambda: |-
            if ( id(aab_enable) ) {
              int n = x / 4 + id(aab_add); // new_value
              if (n > id(aab_max)) n = id(aab_max);
              if (n < id(aab_min)) n = id(aab_min);
              int c = id(rgb8x32)->get_brightness(); // current value
              c = c>0?c:1 ; 
              int d = (n - c) * 100 / c; // diff in %
              if ( abs(d) > 2 ) id(rgb8x32)->set_brightness(n);
            }

switch:
  - platform: template
    name: "Auto-Adjust Brightness"
    id: switch_autobrightness
    icon: mdi:brightness-auto
    restore_mode: RESTORE_DEFAULT_ON
    lambda: |-
      if (id(aab_enable)) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      lambda: |-
        id(aab_enable) = true;
    turn_off_action:
      lambda: |-
        id(aab_enable) = false;

Screenshots

image

Logs

fbF�acB!�B	a�aB�B�R�!!)a
cc��c7�Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
[E][ota:476]: Boot loop detected. Proceeding to safe mode.
[W][wifi:609]: WiFi Unknown connection status 0
[W][wifi:552]: Incomplete connection.
[W][wifi_esp32:504]: Event: Disconnected ssid='***' bssid=[redacted] reason='Association Leave'
[W][wifi_esp32:504]: Event: Disconnected ssid='***' bssid=[redacted] reason='Association Leave'
[W][wifi:609]: WiFi Unknown connection status 0
[W][ota:103]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts
[W][ota:103]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts
[E][ota:481]: No OTA attempt made, restarting.
[W][wifi_esp32:504]: Event: Disconnected ssid='***' bssid=[redacted] reason='Association Leave'
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060830  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da44c  PS      : 0x00060a30  A0      : 0x800efa13  A1      : 0x3ffb26d0  
A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x00000020  A5      : 0x00000008  
A6      : 0x00000010  A7      : 0x00000082  A8      : 0x00000200  A9      : 0x3ffb26b0  
A10     : 0x00000050  A11     : 0x437f0000  A12     : 0x3ffb44d9  A13     : 0x3ffb44d0  
A14     : 0x00000010  A15     : 0x00000003  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000218  LBEG    : 0x40089e98  LEND    : 0x40089eae  LCOUNT  : 0xffffffff  


Backtrace:0x400da449:0x3ffb26d00x400efa10:0x3ffb26f0 0x400fdfce:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
[E][ota:476]: Boot loop detected. Proceeding to safe mode.
[W][ota:103]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts
[W][ota:103]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts

Services calls

(optional) The YAML of your service calls

rainbow_icon_screen service shows wrong icon

I'm calling the service as follows and it is showing the first icon that I have configured (ha) and not the calendar one:

service: esphome.pixel_clock_rainbow_icon_screen
data:
  default_font: false
  icon_name: calendar
  text: test
  lifetime: 1
  screen_time: 1

However icon_screen service works correctly:

service: esphome.pixel_clock_icon_screen
data:
  default_font: false
  icon_name: calendar
  text: test
  lifetime: 1
  screen_time: 1
  r: 200
  g: 200
  b: 200

My icons:

  icons:
    - id: ha
      lameid: 7956
    - id: tempc
      lameid: 2422
    - id: plug
      lameid: 403
    - id: humidity
      lameid: 51764
    - id: co2
      lameid: 30662
    - id: calendar
      lameid: 12345

Calling skip_screen repeatedly brings back deleted screens

Bug report

Calling skip_screen repeatedly brings back deleted screens

Describe the bug

By adding id(rgb8x32)->skip_screen(); to the on_press of the right button, I can call it in rapid succession.
It looks like doing it more than once before there is an automatic screen change makes it pick up broken/deleted screens.

[FEATURE REQUEST] Add a graph display screen

Feature Request

Describe the solution / feature you'd like

Add a graph display screen, in the configuration we specify the graph, pass the graph ID to the EspHoMaTriXv2 component, and when needed, the user will call the graph screen display service, indicating its lifecycle and indicating the rebound time, perhaps another color.
The graph will be displayed on the screen from time to time.

Additional context

graph:
  - id: single_temperature_graph
    sensor: temp_outside
    duration: 64h
    border: false
    width: 32
    height: 8
    line_thickness: 1
ehmtxv2:
  id: rgb8x32
  graph_component: single_temperature_graph
  ...

API:

show_graph => => {"lifetime", "screen_time"}
show_graph_color => => {"lifetime", "screen_time", "rgb"}

Service

void show_graph (int =D_LIFETIME, int screen_time=D_SCREEN_TIME);
void show_graph_color (int =D_LIFETIME, int screen_time=D_SCREEN_TIME, RGB);

image

[FEATURE REQUEST] Add a screen identifier (not by icon name, but unique)

Feature Request

Is your feature request related to a problem?

Failure to display two screens with different meanings but the same icons, for example current weather and weather forecast.
We have a limited number of icons, so sharing icons with different name is not feasible.

Describe the solution / feature you'd like

Add screen_name to icon_screen, rainbow_icon_screen services, if screen_name is specified it is used for screen identification, if not specified it takes the value of icon_name field.
In the services del_screen, force_screen replace the icon_name parameter with screen_name (or leave it as it is, but search for screen by the screen_name parameter), to accurately identification the screen.

If make these changes, then it will be possible to display different data with the same icons, for example, the current weather, and the weather forecast for tomorrow.

Issues with ESPHome 2023.07 update

Bug report

Describe the bug

Cannot update after ESPHome 2023.07. It seems that the new version brought changes that prevents updates (to Ulanzi). This seems to evolve around the font-handling.

Logs

In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX_icons.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:95:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *default_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:96:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:150:36: error: 'esphome::display::Font' has not been declared
     void set_default_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:151:36: error: 'esphome::display::Font' has not been declared
     void set_special_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:267:3: error: expected class-name before '{' token
   {
   ^
src/esphome/components/ehmtxv2/EHMTX.h:272:107: error: 'esphome::display::ImageType' has not been declared
     EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration);
                                                                                                           ^~~~~~~~~
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:95:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *default_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:96:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:150:36: error: 'esphome::display::Font' has not been declared
     void set_default_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:151:36: error: 'esphome::display::Font' has not been declared
     void set_special_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:267:3: error: expected class-name before '{' token
   {
   ^
src/esphome/components/ehmtxv2/EHMTX.h:272:107: error: 'esphome::display::ImageType' has not been declared
     EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration);
                                                                                                           ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:6:117: error: 'esphome::display::ImageType' has not been declared
   EHMTX_Icon::EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration)
                                                                                                                     ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp: In constructor 'esphome::EHMTX_Icon::EHMTX_Icon(const uint8_t*, int, int, uint32_t, int, std::__cxx11::string, bool, uint16_t)':
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:7:9: error: class 'esphome::EHMTX_Icon' does not have any field named 'Animation'
       : Animation(data_start, width, height, animation_frame_count, type)
         ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp: In member function 'void esphome::EHMTX_Icon::next_frame()':
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:17:15: error: 'class esphome::EHMTX_Icon' has no member named 'get_animation_frame_count'
     if (this->get_animation_frame_count() > 1)
               ^~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:21:37: error: 'class esphome::EHMTX_Icon' has no member named 'get_current_frame'
         if (this->reverse && (this->get_current_frame() == this->get_animation_frame_count() - 2))
                                     ^~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:21:66: error: 'class esphome::EHMTX_Icon' has no member named 'get_animation_frame_count'
         if (this->reverse && (this->get_current_frame() == this->get_animation_frame_count() - 2))
                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:25:9: error: 'Animation' has not been declared
         Animation::next_frame();
         ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:29:19: error: 'class esphome::EHMTX_Icon' has no member named 'get_current_frame'
         if (this->get_current_frame() == 1) // this->get_animation_frame_count())
                   ^~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:33:9: error: 'Animation' has not been declared
         Animation::prev_frame();
         ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::tick()':
src/esphome/components/ehmtxv2/EHMTX.cpp:581:67: error: 'class esphome::EHMTX_Icon' has no member named 'set_frame'; did you mean 'next_frame'?
             this->icons[this->queue[this->screen_pointer]->icon]->set_frame(0);
                                                                   ^~~~~~~~~
                                                                   next_frame
src/esphome/components/ehmtxv2/EHMTX.cpp: At global scope:
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: error: variable or field 'set_default_font' declared void
   void EHMTX::set_default_font(display::Font *font)
                                         ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: error: 'Font' is not a member of 'esphome::display'
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: note: suggested alternative:
In file included from src/esphome.h:28,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/font/font.h:41:7: note:   'esphome::font::Font'
 class Font : public display::BaseFont {
       ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:677:51: error: expected primary-expression before ')' token
   void EHMTX::set_default_font(display::Font *font)
                                                   ^
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: error: variable or field 'set_special_font' declared void
   void EHMTX::set_special_font(display::Font *font)
                                         ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: error: 'Font' is not a member of 'esphome::display'
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: note: suggested alternative:
In file included from src/esphome.h:28,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/font/font.h:41:7: note:   'esphome::font::Font'
 class Font : public display::BaseFont {
       ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:682:51: error: expected primary-expression before ')' token
   void EHMTX::set_special_font(display::Font *font)
                                                   ^
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o] Error 1
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1

Thanks!

[BUG] The on_empty_queue event did not work

Bug report

Describe the bug

Yesterday started preparatory work to modify the source code to create Pull Request, flashed for the correct config 2023.9, specified as in the documentation:

  on_empty_queue:
    then:
      lambda: |-
        id(rgb8x32)->clock_screen(10,10);
        id(rgb8x32)->date_screen(10,5);

  on_start_running:
     then:
       lambda: |-
          id(rgb8x32)->clock_screen(10,10);
          id(rgb8x32)->date_screen(10,5);

Also from HA, the weather is constantly displayed on the screen. I.e. constant 3 screens, clock, date, weather (updated often because it is tied not only to the weather, but also to the temperature).
But this morning, there was only weather on the screen, no clock or date. It seems that the on_empty_queue event did not happen.

Additional information

  • used Hardware:
    • ESP32
    • EspHoMaTriXv2 version: 2023.9.0

Cannot install [BUG]

Bug report

Describe the bug

Attempted to install on new Ulanzi clock today.

Additional information

Ulanzi TC001

To Reproduce

Followed documentation attempting to install ulanzi-easy.yaml onto TC001.

Expected behavior

A clear and concise description of what you expected to happen. Could not get it to compile with following error.

Compiling /data/ulanzi/.pioenvs/ulanzi/src/main.cpp.o
/config/esphome/ulanzi-easy.yaml: In lambda function:
/config/esphome/ulanzi-easy.yaml:256:14: error: 'x' was not declared in this scope
iconname: !lambda "return x.c_str();"
^
/config/esphome/ulanzi-easy.yaml: In lambda function:
/config/esphome/ulanzi-easy.yaml:257:14: error: 'y' was not declared in this scope
text: !lambda "return y.c_str();"
logs_ulanzi-easy_compile.txt

          ^

/config/esphome/ulanzi-easy.yaml:257:14: note: suggested alternative: 'yn'
text: !lambda "return y.c_str();"

Log file attached

[BUG] no longer building with 2023.7.0-dev

Bug report

Describe the bug

esphome no longer building ulanzi-easy

Additional information

  • used Hardware:
    • ulanzi

To Reproduce

Steps to reproduce the behavior: compile on esphome 2023.7.0-dev

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

(optional) The YAML you used in epshome without any password

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

INFO ESPHome 2023.7.0-dev
INFO Reading configuration /config/esphome/ulanzi-easy.yaml...
WARNING 
WARNING Please check the documentation and wiki https://github.com/lubeda/EspHoMaTriXv2
WARNING 
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Detected timezone 'Pacific/Auckland'
INFO Detected timezone 'Pacific/Auckland'
INFO Generating C++ source...
INFO Preparing icons, this may take some seconds.
INFO EsphoMaTrix: wrote html-file with icon preview: /config/esphome/ulanzi-easy.html
INFO List of icons for e.g. blueprint:

["error","home_assistant","temperature","lightbulb","music","phone","car","sleep8x32",]

INFO Compiling app...
Processing ulanzi (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5
INFO Installing bblanchon/ArduinoJson @ 6.18.5
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing makuna/NeoPixelBus @ 2.7.3
INFO Installing makuna/NeoPixelBus @ 2.7.3
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|-- ESPmDNS @ 2.0.0
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- NeoPixelBus @ 2.7.3
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/adc/adc_sensor.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/addressable_light/addressable_light_display.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/api_connection.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/api_server.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/list_entities.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/proto.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/subscribe_state.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/api/user_services.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/binary_sensor/automation.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/binary_sensor/filter.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/display/display.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/display/display_buffer.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/display/rect.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ds1307/ds1307.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_queue.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/esp32/core.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/esp32/gpio.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/esp32/preferences.cpp.o
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:95:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *default_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:96:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:150:36: error: 'esphome::display::Font' has not been declared
     void set_default_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:151:36: error: 'esphome::display::Font' has not been declared
     void set_special_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:267:3: error: expected class-name before '{' token
   {
   ^
src/esphome/components/ehmtxv2/EHMTX.h:272:107: error: 'esphome::display::ImageType' has not been declared
     EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration);
                                                                                                           ^~~~~~~~~
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:95:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *default_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:96:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:150:36: error: 'esphome::display::Font' has not been declared
     void set_default_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:151:36: error: 'esphome::display::Font' has not been declared
     void set_special_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:267:3: error: expected class-name before '{' token
   {
   ^
src/esphome/components/ehmtxv2/EHMTX.h:272:107: error: 'esphome::display::ImageType' has not been declared
     EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration);
                                                                                                           ^~~~~~~~~
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX_icons.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:95:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *default_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:96:14: error: 'Font' in namespace 'esphome::display' does not name a type
     display::Font *special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:150:36: error: 'esphome::display::Font' has not been declared
     void set_default_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:151:36: error: 'esphome::display::Font' has not been declared
     void set_special_font(display::Font *font);
                                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:267:3: error: expected class-name before '{' token
   {
   ^
src/esphome/components/ehmtxv2/EHMTX.h:272:107: error: 'esphome::display::ImageType' has not been declared
     EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration);
                                                                                                           ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp: In member function 'void esphome::EHMTX_queue::draw()':
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:148:14: error: 'Font' is not a member of 'esphome::display'
     display::Font *font = this->default_font ? this->config_->default_font : this->config_->special_font;
              ^~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:148:14: note: suggested alternative:
In file included from src/esphome.h:28,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/font/font.h:41:7: note:   'esphome::font::Font'
 class Font : public display::BaseFont {
       ^~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:148:25: error: expected primary-expression before '=' token
     display::Font *font = this->default_font ? this->config_->default_font : this->config_->special_font;
                         ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:148:63: error: 'class esphome::EHMTX' has no member named 'default_font'; did you mean 'set_default_font'?
     display::Font *font = this->default_font ? this->config_->default_font : this->config_->special_font;
                                                               ^~~~~~~~~~~~
                                                               set_default_font
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:148:93: error: 'class esphome::EHMTX' has no member named 'special_font'; did you mean 'set_special_font'?
     display::Font *font = this->default_font ? this->config_->default_font : this->config_->special_font;
                                                                                             ^~~~~~~~~~~~
                                                                                             set_special_font
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:177:76: error: expected primary-expression before ',' token
         this->config_->display->print(this->xpos() + xoffset, yoffset, font, color_, esphome::display::TextAlign::BASELINE_LEFT,
                                                                            ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:211:71: error: expected primary-expression before ',' token
           this->config_->display->strftime(xoffset + 15, yoffset, font, color_, display::TextAlign::BASELINE_CENTER, EHMTXv2_TIME_FORMAT,
                                                                       ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:224:68: error: expected primary-expression before ',' token
           this->config_->display->print(15 + xoffset, yoffset, font, this->config_->alarm_color, display::TextAlign::BASELINE_CENTER, "!t!");
                                                                    ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:233:71: error: expected primary-expression before ',' token
           this->config_->display->strftime(xoffset + 15, yoffset, font, color_, display::TextAlign::BASELINE_CENTER, EHMTXv2_DATE_FORMAT,
                                                                       ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:246:68: error: expected primary-expression before ',' token
           this->config_->display->print(xoffset + 15, yoffset, font, this->config_->alarm_color, display::TextAlign::BASELINE_CENTER, "!d!");
                                                                    ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:250:77: error: no matching function for call to 'esphome::addressable_light::AddressableLightDisplay::image(int, int, esphome::EHMTX_Icon*&)'
         this->config_->display->image(0, 0, this->config_->icons[this->icon]);
                                                                             ^
In file included from src/esphome/components/display/display_buffer.h:6,
                 from src/esphome/components/addressable_light/addressable_light_display.h:5,
                 from src/esphome.h:4,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/display/display.h:349:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:349:8: note:   no known conversion for argument 3 from 'esphome::EHMTX_Icon*' to 'esphome::display::BaseImage*'
src/esphome/components/display/display.h:360:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::display::ImageAlign, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, ImageAlign align, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:360:8: note:   candidate expects 6 arguments, 3 provided
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:260:76: error: expected primary-expression before ',' token
         this->config_->display->print(this->xpos() + xoffset, yoffset, font, color_, esphome::display::TextAlign::BASELINE_LEFT,
                                                                            ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:265:79: error: no matching function for call to 'esphome::addressable_light::AddressableLightDisplay::image(int, int, esphome::EHMTX_Icon*&)'
           this->config_->display->image(2, 0, this->config_->icons[this->icon]);
                                                                               ^
In file included from src/esphome/components/display/display_buffer.h:6,
                 from src/esphome/components/addressable_light/addressable_light_display.h:5,
                 from src/esphome.h:4,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/display/display.h:349:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:349:8: note:   no known conversion for argument 3 from 'esphome::EHMTX_Icon*' to 'esphome::display::BaseImage*'
src/esphome/components/display/display.h:360:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::display::ImageAlign, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, ImageAlign align, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:360:8: note:   candidate expects 6 arguments, 3 provided
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:271:79: error: no matching function for call to 'esphome::addressable_light::AddressableLightDisplay::image(int, int, esphome::EHMTX_Icon*&)'
           this->config_->display->image(0, 0, this->config_->icons[this->icon]);
                                                                               ^
In file included from src/esphome/components/display/display_buffer.h:6,
                 from src/esphome/components/addressable_light/addressable_light_display.h:5,
                 from src/esphome.h:4,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/display/display.h:349:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:349:8: note:   no known conversion for argument 3 from 'esphome::EHMTX_Icon*' to 'esphome::display::BaseImage*'
src/esphome/components/display/display.h:360:8: note: candidate: 'void esphome::display::Display::image(int, int, esphome::display::BaseImage*, esphome::display::ImageAlign, esphome::Color, esphome::Color)'
   void image(int x, int y, BaseImage *image, ImageAlign align, Color color_on = COLOR_ON, Color color_off = COLOR_OFF);
        ^~~~~
src/esphome/components/display/display.h:360:8: note:   candidate expects 6 arguments, 3 provided
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:282:76: error: expected primary-expression before ',' token
         this->config_->display->print(this->xpos() + xoffset, yoffset, font, color_, esphome::display::TextAlign::BASELINE_LEFT,
                                                                            ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp: In member function 'void esphome::EHMTX_queue::calc_scroll_time(std::__cxx11::string, uint16_t)':
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:312:82: error: 'class esphome::EHMTX' has no member named 'default_font'; did you mean 'set_default_font'?
       this->config_->display->get_text_bounds(0, 0, text.c_str(), this->config_->default_font, display::TextAlign::LEFT, &x, &y, &w, &h);
                                                                                  ^~~~~~~~~~~~
                                                                                  set_default_font
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:316:82: error: 'class esphome::EHMTX' has no member named 'special_font'; did you mean 'set_special_font'?
       this->config_->display->get_text_bounds(0, 0, text.c_str(), this->config_->special_font, display::TextAlign::LEFT, &x, &y, &w, &h);
                                                                                  ^~~~~~~~~~~~
                                                                                  set_special_font
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::tick()':
src/esphome/components/ehmtxv2/EHMTX.cpp:581:67: error: 'class esphome::EHMTX_Icon' has no member named 'set_frame'; did you mean 'next_frame'?
             this->icons[this->queue[this->screen_pointer]->icon]->set_frame(0);
                                                                   ^~~~~~~~~
                                                                   next_frame
src/esphome/components/ehmtxv2/EHMTX.cpp: At global scope:
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: error: variable or field 'set_default_font' declared void
   void EHMTX::set_default_font(display::Font *font)
                                         ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: error: 'Font' is not a member of 'esphome::display'
src/esphome/components/ehmtxv2/EHMTX.cpp:677:41: note: suggested alternative:
In file included from src/esphome.h:28,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/font/font.h:41:7: note:   'esphome::font::Font'
 class Font : public display::BaseFont {
       ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:677:51: error: expected primary-expression before ')' token
   void EHMTX::set_default_font(display::Font *font)
                                                   ^
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: error: variable or field 'set_special_font' declared void
   void EHMTX::set_special_font(display::Font *font)
                                         ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: error: 'Font' is not a member of 'esphome::display'
src/esphome/components/ehmtxv2/EHMTX.cpp:682:41: note: suggested alternative:
In file included from src/esphome.h:28,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/font/font.h:41:7: note:   'esphome::font::Font'
 class Font : public display::BaseFont {
       ^~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:682:51: error: expected primary-expression before ')' token
   void EHMTX::set_special_font(display::Font *font)
                                                   ^
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:6:117: error: 'esphome::display::ImageType' has not been declared
   EHMTX_Icon::EHMTX_Icon(const uint8_t *data_start, int width, int height, uint32_t animation_frame_count, display::ImageType type, std::string icon_name, bool revers, uint16_t frame_duration)
                                                                                                                     ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp: In constructor 'esphome::EHMTX_Icon::EHMTX_Icon(const uint8_t*, int, int, uint32_t, int, std::__cxx11::string, bool, uint16_t)':
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:7:9: error: class 'esphome::EHMTX_Icon' does not have any field named 'Animation'
       : Animation(data_start, width, height, animation_frame_count, type)
         ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp: In member function 'void esphome::EHMTX_Icon::next_frame()':
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:17:15: error: 'class esphome::EHMTX_Icon' has no member named 'get_animation_frame_count'
     if (this->get_animation_frame_count() > 1)
               ^~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:21:37: error: 'class esphome::EHMTX_Icon' has no member named 'get_current_frame'
         if (this->reverse && (this->get_current_frame() == this->get_animation_frame_count() - 2))
                                     ^~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:21:66: error: 'class esphome::EHMTX_Icon' has no member named 'get_animation_frame_count'
         if (this->reverse && (this->get_current_frame() == this->get_animation_frame_count() - 2))
                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:25:9: error: 'Animation' has not been declared
         Animation::next_frame();
         ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:29:19: error: 'class esphome::EHMTX_Icon' has no member named 'get_current_frame'
         if (this->get_current_frame() == 1) // this->get_animation_frame_count())
                   ^~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX_icons.cpp:33:9: error: 'Animation' has not been declared
         Animation::prev_frame();
         ^~~~~~~~~
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/font/font.cpp.o
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o] Error 1
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_queue.cpp.o] Error 1
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1
========================= [FAILED] Took 47.84 seconds =========================

Services calls

Hyphen in device name an issue?

Just dealt with an issue with a device that had a hyphen/dash in the device name.

Was not calling correct service in HA services due to conflict

scroll_small_text: false does not work

Bug report

Describe the bug

The flag scroll_small_text does not work correctly. Setting it to false small text still scrolls

Additional information

I attempted to fix it as did @joncar, see links below but neither quite get's it right

andrew-codechimp@bdf69aa
https://github.com/joncar/EspHoMaTriXv2/tree/user/joncar/01-fix-scroll

  • used Hardware:
    • ESP32
    • EspHoMaTriXv2 version: [e.g. 2023.6.5]

To Reproduce

Steps to reproduce the behavior:
Set scroll_small_text: false and add a screen with small text

Expected behavior

A clear and concise description of what you expected to happen.
Small text will not scroll when set to false

Configuration

(optional) The YAML you used in epshome without any password

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

(optional) Add relevant logs which could help tackle the problem.

Services calls

(optional) The YAML of your service calls

[BUG] infinite reboot

Bug report

Describe the bug

Altleast since the introduction of bitmap_screen there are some unwanted reboots. Especially on a planed reboot the display stays in a boot loop.

There is no clear cause visible. Possible this is related to the network interface.

Additional information

  • used Hardware:
    • ESP32 or ESP8266
    • EspHoMaTriXv2 version: [e.g. 2023.5.0]

To Reproduce

Steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

(optional) The YAML you used in epshome without any password

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

(optional) Add relevant logs which could help tackle the problem.

Services calls

(optional) The YAML of your service calls

[BUG] YAML-Files not loaded in Blueprint

The EHMTX_easy*.yaml are not loaded as Blueprints. All generate the same error.

Failed to load blueprint: mapping values are not allowed here in "/config/blueprints/automation/ehmtxv2/EHMTX_easy_color_gauge.yaml", line 198, column 74

In Home Assistant, the File Editor states:
"end of the stream or a document separator is expected (198:74)"

YAML files uploaded in /config/blueprints/automation/ehmtxv2/

Home Assistant 2023.7.1
Supervisor 2023.07.1
Operating System 10.3

To Reproduce

Upload YAML-files in folder and restart Home Assistant

Thanks!

[FEATURE REQUEST] A screen with an icon and data displayed on it.

Feature Request

Describe the solution / feature you'd like

I've already displayed the concept in another Issue, but I'll move it here.

Add a family of screens that could display some limited data like day of the week, day of the month, on an icon that works as a carpet pad.

For example:

  • icon_time - display: icon and time, like weather and time
  • icon_time_data - display: icon and time, like calendar icon, day or weekday on icon and time
  • icon_date - display: icon and date, like weather and time
  • icon_date_data - display: icon and date, like calendar icon, day or weekday on icon and time

Generate a window identifier for each screen, then you can have identical sets displaying different information, like:

  • weather - time
  • day - time
  • weekday - data
  • weather - temperature

Also add the ability to specify a starting set of screens), e.g. icon_time with day icon_date_with_weekday`

Additional context

Сoncept:
#85 (comment)

My two custom fonts

I wanted to use the full height of the display and maximize the number of chars in the screen so I made these two fonts.

I am really happy with the result, so dropping them here in case they can help someone else too :)

Kapture 2023-07-20 at 10 54 13

CalciumSuperThinTall.ttf.zip
CalciumThinTall.ttf.zip

ehmtxv2:
   ...
  default_font_yoffset: 8
  default_font_id: default_font
  special_font_yoffset: 8
  special_font_id: special_font
font:
  - file: rgb-clock/CalciumThinTall.ttf
    size: 16
    id: default_font
    glyphs: |
      !?"%‰()+*=,-_.:°µ²³0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz€$@<>/
  - file: rgb-clock/CalciumSuperThinTall.ttf
    size: 16
    id: special_font
    glyphs: |
      !?"%‰()+*=,-_.:°µ²³0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz€$@<>/

Allow removing Ehmtx logo and version screens

Feature Request

Allow for removing those screens via yaml. Together they take ~1kb of flash and they are a bit intrusive.

e.g:

disable_logo_at_boot: true
disable_version_screen_at_boot: true

Workaround

For now, this seems to be working:

esphome:
  [...]
  on_boot:
    priority: -100
    then:
      - ds1307.read_time:
      - delay: 1ms
      - lambda: |-
          // delete all pre-defined screens
          id(rgb8x32)->del_screen("*", MODE_CLOCK);
          id(rgb8x32)->del_screen("*", MODE_DATE);
          id(rgb8x32)->del_screen("*", MODE_FULL_SCREEN);
          id(rgb8x32)->del_screen("*", MODE_ICON_SCREEN);
          id(rgb8x32)->del_screen("*", MODE_TEXT_SCREEN);
          id(rgb8x32)->del_screen("*", MODE_RAINBOW_ICON);
          id(rgb8x32)->del_screen("*", MODE_RAINBOW_TEXT);
          id(rgb8x32)->del_screen("*", MODE_RAINBOW_CLOCK);
          id(rgb8x32)->del_screen("*", MODE_RAINBOW_DATE);
          id(rgb8x32)->del_screen("*", MODE_BITMAP_SCREEN);
          id(rgb8x32)->del_screen("*", MODE_BITMAP_SMALL);
          
          // recreate clock screens with shorter screen_time
          int lifetime = 24*60*365*10; // 10 years should be enough
          int screen_time = 1;
          bool default_font = true;
          id(rgb8x32)->clock_screen(lifetime, screen_time, default_font, 240, 240, 240);
          id(rgb8x32)->date_screen(lifetime, screen_time, default_font, 240, 240, 240);

[FEATURE REQUEST] Add alert_screen to display instant messages

Feature Request

Describe the solution / feature you'd like

Add alert_screen to display instant messages:
alert_screen or info_screen with parameters ("icon_name", "text", "screen_time", "default_font", "r", "g", "b")

screen_time - how long is this screen display in the loop (seconds), also lifetime is set automatically to screen_time. And immediately force_screen is called for this screen.
Each next call to alert_screen or info_screen replaces the previous one (while the previous one lives on), and sets the new passed values for screen_time and lifetime.
This will be convenient for displaying instant messages, especially if they need to be displayed once, say within 15sec, and will replace the inconvenient co in the form:

  • del_screen
  • icon_screen (You can't set the lifetime less than a minute, so you'll have to wait and delete it, if you want to show a message, like 15 seconds)
  • force_screen
  • delay
  • del_screen

Describe alternatives you've considered

  • del_screen
  • icon_screen (You can't set the lifetime less than a minute, so you'll have to wait and delete it, if you want to show a message, like 15 seconds)
  • force_screen
  • delay
  • del_screen

[FEATURE REQUEST] Add display icon + text + status bar

Describe the solution / feature you'd like

The idea of a new version of the display is "icon_status_bar", an icon with text and a bar status bar at the bottom, which is set by the parameter "percent_status_bar" and is counted as 4% per 1 pixel, the brightness of the next pixel is done incrementally, or completely fill the remaining ones with dim, the parameter "fill_rem". The color of the status bar is also configurable, but if not specified, then we take the text color (rgb).

New parameters:

percent_status_bar - the bar under the text, % of 100
fill_rem - fill the remaining part with dim
r_sb, g_sb, b_sb - colors of the status bar

API:

icon_status_bar => {"icon_name", "text", "percent_status_bar", "lifetime", "screen_time", "default_font", "fill_rem", "r", "g", "b", "r_sb", "g_sb", "b_sb"}

Service:

void icon_status_bar(std::string icon, std::string text, int percent_status_bar, int lifetime=D_LIFETIME, int screen_time=D_SCREEN_TIME,bool default_font=true, bool fill_rem=false, int r=C_RED, int g=C_GREEN, int b=C_BLUE,int r_sb=?, int g_sb=?, int b_sb=?);

Additional context

As an example of use, you can display the status of printing with a 3d printer and in the status bar % completed, and the text of the remaining time. For a timer that would clearly show the time ratio. Show completed cases and % of cases from all.
Снимок экрана 2023-10-01 в 13 23 47
Снимок экрана 2023-10-01 в 13 25 06
Снимок экрана 2023-10-01 в 13 24 12
Снимок экрана 2023-10-01 в 13 24 21

[BUG] - Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled

Bug report

Describe the bug

Wanted to use my Awtrix with EspHoMaTriXv2, but the esp crashes on boot with or without the connected awtrix.
I've tried different settings in the yml file, but it keeps crashing.
Additional components have already been deactivated.

The esp is working with other firmwares.

[01:14:32][I][EHMTXv2:983]: set_brightness 80 => 31.37 %
[01:14:32]Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Add a description of the bug. Detail the expected behavior in contrast with the behavior you're observing.

Additional information

To Reproduce

Steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

awtrix.yml

substitutions:
  devicename: awtrix
  friendly_name: Awtrix LED Matrix
  board: wemos_d1_mini32
#  ldr_pin: GPIO36
  matrix_pin: GPIO21
#  left_button_pin: GPIO26
#  mid_button_pin: GPIO16
#  right_button_pin: GPIO5
#  scl_pin: GPIO22 
#  sda_pin: GPIO17


esphome:
  name: $devicename
  friendly_name: $friendly_name

esp32:
  board: $board

logger:

api:

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Awtrix Fallback Hotspot"
    password: !secret wifi_fallback_pass

time:
  - platform: homeassistant
    id: homeassistant_time


external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main

font: 
  - file: fonts/MatrixClock-Chunky6.bdf
    id: special_font
    #size: 16
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:APMTapmt
  - file: fonts/MatrixClock-Light8.bdf
    id: default_font
    #size: 16
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz°
#  - file: 'fonts/EHMTXv2.ttf'
#    size: 16
#    id: default_font
#    glyphs:  |
#      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: ehmtx_light
    width: 32
    height: 8
    pixel_mapper: |-
      if (x % 2 == 0) {
        return (x * 8) + y;
      }
      return (x * 8) + (7 - y);
    rotation: 0°
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    internal: true
    variant: WS2812
    pin: $matrix_pin
    num_leds: 256
#    color_correct: [30%, 30%, 30%]
#    gamma_correct: 2.0
    name: "Awtrix Light"
    restore_mode: ALWAYS_OFF
    on_turn_on:
      lambda: |-
         id(ehmtx_display)->set_enabled(false);
    on_turn_off:
       lambda: |-
         id(ehmtx_display)->set_enabled(true);

ehmtxv2:
  id: rgb8x32
  icons2html: true
  matrix_component: ehmtx_display
  time_component: homeassistant_time
  time_format: "%H:%M"
  date_format: "%d.%m.%Y"
  show_seconds: false
  default_font_id: default_font
  special_font_id: special_font
  icons: 
    - id: error
      lameid: 40530
#  on_next_screen:
#    - homeassistant.event:
#        event: esphome.new_screen
#        data_template:
#          iconname: !lambda "return icon.c_str();"
#          text: !lambda "return text.c_str();"

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

...
[01:14:32]Rebooting...
[01:14:32]ets Jul 29 2019 12:21:46
[01:14:32]
[01:14:32]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[01:14:32]configsip: 0, SPIWP:0xee
[01:14:32]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[01:14:32]mode:DIO, clock div:2
[01:14:32]load:0x3fff0018,len:4
[01:14:32]load:0x3fff001c,len:1044
[01:14:32]load:0x40078000,len:8896
[01:14:32]load:0x40080400,len:5828
[01:14:32]entry 0x400806ac
[01:14:32][I][logger:262]: Log initialized
[01:14:32][C][ota:469]: There have been 7 suspected unsuccessful boot attempts.
[01:14:32][D][esp32.preferences:114]: Saving 1 preferences to flash...
[01:14:32][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[01:14:32][D][EHMTXv2:007]: Constructor start
[01:14:32][D][EHMTXv2:032]: Constructor finish
[01:14:32][D][EHMTXv2:1063]: add_icon no.: 0 name: error frame_duration: 500 ms
[01:14:32][D][EHMTXv2:1002]: set_display
[01:14:32][D][EHMTXv2:1008]: set_clock
[01:14:32][I][EHMTXv2:983]: set_brightness 80 => 31.37 %
[01:14:32]Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.
[01:14:32]
[01:14:32]Core  1 register dump:
[01:14:32]PC      : 0x400d8a6a  PS      : 0x00060c30  A0      : 0x800e8b16  A1      : 0x3ffb2700  
[01:14:32]A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x42c80000  A5      : 0x00000008  
[01:14:32]A6      : 0x00000002  A7      : 0x000001f4  A8      : 0x00000200  A9      : 0x3ffb26e0  
[01:14:32]A10     : 0x00000050  A11     : 0x3f400d48  A12     : 0x000003d7  A13     : 0x3f400f64  
[01:14:32]A14     : 0x00000050  A15     : 0x3ffb4efc  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
[01:14:32]EXCVADDR: 0x00000218  LBEG    : 0x4008ab2d  LEND    : 0x4008ab3d  LCOUNT  : 0xfffffff1  
[01:14:32]
[01:14:32]
[01:14:32]Backtrace:0x400d8a67:0x3ffb27000x400e8b13:0x3ffb2740 0x400ed46a:0x3ffb2820 
[01:14:32]
[01:14:32]
[01:14:32]
[01:14:32]
[01:14:32]ELF file SHA256: 0000000000000000
[01:14:32]
[01:14:32]Rebooting...
[01:14:32]ets Jul 29 2019 12:21:46
[01:14:32]
[01:14:32]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[01:14:32]configsip: 0, SPIWP:0xee
[01:14:32]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[01:14:32]mode:DIO, clock div:2
[01:14:32]load:0x3fff0018,len:4
[01:14:32]load:0x3fff001c,len:1044
[01:14:32]load:0x40078000,len:8896
[01:14:32]load:0x40080400,len:5828
[01:14:32]entry 0x400806ac
[01:14:33][I][logger:262]: Log initialized
[01:14:33][C][ota:469]: There have been 8 suspected unsuccessful boot attempts.
[01:14:33][D][esp32.preferences:114]: Saving 1 preferences to flash...
[01:14:33][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[01:14:33][D][EHMTXv2:007]: Constructor start
[01:14:33][D][EHMTXv2:032]: Constructor finish
[01:14:33][D][EHMTXv2:1063]: add_icon no.: 0 name: error frame_duration: 500 ms
[01:14:33][D][EHMTXv2:1002]: set_display
[01:14:33][D][EHMTXv2:1008]: set_clock
[01:14:33][I][EHMTXv2:983]: set_brightness 80 => 31.37 %
[01:14:33]Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.
[01:14:33]
[01:14:33]Core  1 register dump:
[01:14:33]PC      : 0x400d8a6a  PS      : 0x00060c30  A0      : 0x800e8b16  A1      : 0x3ffb2700  
[01:14:33]A2      : 0xffffffff  A3      : 0x437f0000  A4      : 0x42c80000  A5      : 0x00000008  
[01:14:33]A6      : 0x00000002  A7      : 0x000001f4  A8      : 0x00000200  A9      : 0x3ffb26e0  
[01:14:33]A10     : 0x00000050  A11     : 0x3f400d48  A12     : 0x000003d7  A13     : 0x3f400f64  
[01:14:33]A14     : 0x00000050  A15     : 0x3ffb4efc  SAR     : 0x00000006  EXCCAUSE: 0x0000001d  
[01:14:33]EXCVADDR: 0x00000218  LBEG    : 0x4008ab2d  LEND    : 0x4008ab3d  LCOUNT  : 0xfffffff1  
[01:14:33]
[01:14:33]
[01:14:33]Backtrace:0x400d8a67:0x3ffb27000x400e8b13:0x3ffb2740 0x400ed46a:0x3ffb2820
...

Services calls

(optional) The YAML of your service calls

Installation with ESPHome 2023.8.2 and default fonts from ulanzi-easy.xaml not possible

Bug report

Describe the bug

When I try to install the config from the current ulanzi-easy.yaml file with ESPHome 2023.8.2, the installations aborts with the following error message when trying to convert the MatrixClock-Light8.bdf and MatrixClock-Chunky6.bdf fonts to Pillow format

INFO Generating C++ source...
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
  File "/esphome/esphome/__main__.py", line 1023, in main
    return run_esphome(sys.argv)
  File "/esphome/esphome/__main__.py", line 1010, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "/esphome/esphome/__main__.py", line 441, in command_run
    exit_code = write_cpp(config)
  File "/esphome/esphome/__main__.py", line 185, in write_cpp
    generate_cpp_contents(config)
  File "/esphome/esphome/__main__.py", line 197, in generate_cpp_contents
    CORE.flush_tasks()
  File "/esphome/esphome/core/__init__.py", line 626, in flush_tasks
    self.event_loop.flush_tasks()
  File "/esphome/esphome/coroutine.py", line 246, in flush_tasks
    next(task.iterator)
  File "/esphome/esphome/__main__.py", line 177, in wrapped
    await coro(conf)
  File "/esphome/esphome/components/font/__init__.py", line 360, in to_code
    font = load_bitmap_font(CORE.relative_config_path(conf[CONF_PATH]))
  File "/esphome/esphome/components/font/__init__.py", line 334, in load_bitmap_font
    pil_font_path = convert_bitmap_to_pillow_font(filepath)
  File "/esphome/esphome/components/font/__init__.py", line 327, in convert_bitmap_to_pillow_font
    return cv.file_(local_pil_font_file)
  File "/esphome/esphome/config_validation.py", line 1397, in file_
    raise Invalid(
voluptuous.error.Invalid: Could not find file 'config/config/.esphome/font/31010cf8/MatrixClock-Light8.pil'. Please make sure it exists (full path: /config/config/config/.esphome/font/31010cf8/MatrixClock-Light8.pil).

Additional information

  • used Hardware:
    • Ulanz LED Clock

To Reproduce

Steps to reproduce the behavior:
Try to install current ulanzi-easy.yaml Config with ESPHome 2023.8.2

Expected behavior

ESPHome sould install without any error

Configuration

# https://github.com/lubeda/EspHoMaTriXv2
substitutions:
  devicename: "ulanzi-led-matrix"
  friendly_name: "Ulanzi LED Matrix"
  # Pin definition from https://github.com/aptonline/PixelIt_Ulanzi 
  battery_pin: GPIO34 
  buzzer_pin: GPIO15 
  ldr_pin: GPIO35 
  matrix_pin: GPIO32 
  left_button_pin: GPIO26 
  mid_button_pin: GPIO27 
  right_button_pin: GPIO14 
  scl_pin: GPIO22 
  sda_pin: GPIO21 

esphome:
  name: ${devicename}
  platform: ESP32
  board: esp32dev
  comment: "Ulanzi LED Matrix"
  project:
    name: "Ulanzi.EHMTXv2"
    version: "2.0.0"
  on_boot:
    then:
      - ds1307.read_time:
      
logger:
  level: WARN

api:
  encryption:
    key: !secret api_key
  reboot_timeout: 8hours
  services:
    - service: tune
      variables:
        tune: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return tune;'

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 8hours
  ap:
    ssid: "${devicename}"
    password: !secret fallback_password
  manual_ip:
    static_ip: 192.168.178.209
    gateway: 192.168.178.1
    subnet: 255.255.255.0
  use_address: 192.168.178.209

web_server:
  port: 80
  auth:
    username: admin
    password: !secret web_server_password

time:
  - platform: homeassistant
    timezone: "Europe/Berlin"
    id: homeassistant_time
    on_time_sync:
      then:
        ds1307.write_time:
  - platform: ds1307
    update_interval: never
    id: ehmtx_time

captive_portal:

output:
  - platform: ledc
    pin: $buzzer_pin
    id: rtttl_out

rtttl:
  output: rtttl_out

switch:
  - platform: template
    name: "Auto-Adjust Brightness"
    id: switch_autobrightness
    icon: mdi:brightness-auto
    restore_mode: RESTORE_DEFAULT_ON
    lambda: |-
      if (id(aab_enable)) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      lambda: |-
        id(aab_enable) = true;
    turn_off_action:
      lambda: |-
        id(aab_enable) = false;

globals:
  # aab = auto-adjustable brightness
  - id: aab_enable
    type: "bool"
    restore_value: true
    initial_value: "true"
  - id: aab_add
    type: int
    initial_value: '10'
  - id: aab_max
    type: int
    initial_value: '220'
  - id: aab_min
    type: int
    initial_value: '20'

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main
    refresh: 60s 
    components: [ ehmtxv2 ]  

font:
  # Matrix Clock Fonts
  # Grab these from https://github.com/trip5/MatrixClockFonts
  # See https://github.com/lubeda/EspHoMaTriXv2#font
  # Store in a "fonts" subfolder of your ESPHome config folder or change paths below
  - file: fonts/MatrixClock-Light8.bdf
    id: default_font
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz°
  - file: fonts/MatrixClock-Chunky6.bdf
    id: special_font
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:APMTapmt

#animation:
#  - id: animation_black
#    file: "1pixel.gif"

#image:
#  - id: image_black
#    file: "1pixel.gif"
  
binary_sensor:
  - platform: status
    name: "$devicename Status"
  - platform: gpio
    pin:
      number: $left_button_pin
      inverted: true
    name: "Left button"
  - platform: gpio
    pin: 
      inverted: true
      number: $mid_button_pin
      mode: INPUT_PULLUP
    name: "Middle button"
  - platform: gpio
    pin: 
      number: $right_button_pin
      inverted: true
    name: "Right button"

sensor:
  - platform: wifi_signal
    name: "${devicename} WiFi Signal"
    device_class: signal_strength
    update_interval: 60s
  - platform: uptime
    name: "${devicename} Uptime"
    device_class: duration

  - platform: sht3xd
    temperature:
      name: "${devicename} Temperature"
      filters:
        - offset: -10.0
    humidity:
      name: "$devicename Relative Humidity"
    update_interval: 60s

  - platform: adc
    pin: $battery_pin
    name: "$devicename Battery"
    id: battery_voltage
    update_interval: 10s
    device_class: battery
    accuracy_decimals: 0
    attenuation: auto
    filters:
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15
          send_first_at: 1
      - multiply: 1.6
      - lambda: |-
          auto r = ((x - 3) / 0.69 * 100.00);
          if (r >= 100) return 100;
          if (r > 0) return r;
          if (r <= 0) return 1;
          return 0;
    unit_of_measurement: '%'
  - platform: adc
    id: light_sensor
    name: "$devicename Illuminance"
    pin: $ldr_pin
    update_interval: 10s
    attenuation: auto
    unit_of_measurement: lx
    device_class: illuminance
    accuracy_decimals: 0
    filters:
      - lambda: |-
          return (x / 10000.0) * 2000000.0 - 15 ;
    on_value:
      then:
        - lambda: |-
            if ( id(aab_enable) ) {
              int n = x / 4 + id(aab_add); // new_value
              if (n > id(aab_max)) n = id(aab_max);
              if (n < id(aab_min)) n = id(aab_min);
              int c = id(rgb8x32)->get_brightness(); // current value
              c = c>0?c:1 ; 
              int d = (n - c) * 100 / c; // diff in %
              if ( abs(d) > 2 ) id(rgb8x32)->set_brightness(n);
            }

i2c:
  sda: $sda_pin
  scl: $scl_pin
  scan: true
  id: i2cbus

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    internal: true
    variant: WS2812
    pin: $matrix_pin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    gamma_correct: 2.0
    name: "$devicename Light"
    restore_mode: ALWAYS_OFF

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: ehmtx_light
    width: 32
    height: 8
    pixel_mapper: |-
      if (y % 2 == 0) {
        return (y * 32) + x;
      }
      return (y * 32) + (31 - x);
    rotation: 
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();
      
ehmtxv2:
  id: rgb8x32
  icons2html: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  time_format: "%H:%M"
  date_format: "%d.%m."
  show_seconds: false
  show_dow: false
  # Uncomment below if using the mateine font
  # default_font_id: default_font
  # special_font_id: default_font
  # Comment out below if using mateine font
  default_font_id: default_font
  default_font_yoffset: 8
  special_font_id: special_font
  special_font_yoffset: 6
  # until here
  boot_logo: "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,63519,63519,63519,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63519,0,0,0,0,2016,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,63488,0,63488,0,0,0,63519,0,0,0,0,2016,2016,0,0,0,65514,0,65514,0,0,0,31,0,0,0,64512,0,0,64512,0,63488,63488,0,63488,63488,0,0,63519,63519,63519,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,31,31,31,0,0,0,64512,64512,0,0,63488,63488,63488,63488,63488,0,0,63519,0,0,0,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,31,0,0,0,0,64512,64512,0,0,0,63488,63488,63488,0,0,0,63519,63519,63519,63519,0,2016,0,2016,0,65514,0,65514,0,65514,0,0,0,31,31,0,64512,0,0,64512,0,0,0,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
  icons: 
    - id: error
      lameid: 40530
    - id: home_assistant
      lameid: 47693
    - id: temperature
      lameid: 2355
    - id: lightbulb
      lameid: 1762
    - id: music
      lameid: 45625
    - id: phone
      lameid: 1232
    - id: car
      lameid: 2819
    - id: weather_clear_night
      lameid: 52163
    - id: weather_cloudy
      lameid: 25991
    - id: weather_fog
      lameid: 52167
    - id: weather_sunny
      lameid: 52156
    - id: sleep8x32
      url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif 
  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "${devicename} IP Address"
    ssid:
      name: "${devicename} SSID"
    bssid:
      name: "${devicename} BSSID"
    mac_address:
      name: "${devicename} Mac Address"

[FEATURE REQUEST] Add a screen with an icon and a time with the day of the week.

Feature Request

Describe the solution / feature you'd like

It would be great if you added an additional display option similar to icon_screen, but instead of text that would display the time and day of the week. The name of the new function could be selected icon_time,
parameters to run: "icon_name", "lifetime", "screen_time", "default_font", "r", "g", "b"

Additional context

As an example of a screens, displaying the weather and time icons with the day of the week.
Снимок экрана 2023-09-20 в 22 05 13

service set_clock_color don't change clock color

Bug report

Describe the bug

when calling service set_clock_color from ha clock color don't change on display

Additional information

  • used Hardware:
    • ESP8266
    • EspHoMaTriXv2 version: [last main branch]

To Reproduce

fire a esphomatrix_set_clock_color with 3 values from homeassistant developer tools service

Expected behavior

a change for clock color, but only got a log entry says "[D][EHMTXv2:086]: default clock color r: 255 g: 127 b: 0
" but no color change

Configuration

substitutions:
  devicename: esphomatrix

esphome:
  name: $devicename
  friendly_name: EspHoMaTriX

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "********************************************"

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphomatrix Fallback Hotspot"

captive_portal:

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main 

time:
  - platform: homeassistant
    id: ehmtx_time

binary_sensor:
  - platform: status
    name: "$devicename Status"

button:
  - platform: restart
    name : "restart $devicename"

light:
  - platform: neopixelbus
    pin: GPIO2
    num_leds: 256
    type: GRB
    variant: WS2812
    name: "led_matrix"
    id: matrix_component
    method:
      type: esp8266_uart
      bus: 1
      async: false
    default_transition_length: 0s

font:
  - file: EHMTXv2.ttf
    id: default_font
    size: 16
    glyphs:  |
      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: matrix_component
    width: 32
    height: 8
    pixel_mapper: |-
      if (x % 2 == 0) {
        return (x * 8) + y;
      }
      return (x * 8) + (7 - y);
    rotation: 0
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

ehmtxv2:
  id: rgb8x32
  show_seconds: false
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  icons2html: true
  default_font_id: default_font
  default_font_yoffset: 6
  special_font_id: default_font
  special_font_yoffset: 7
  brightness: 80 # percent
  time_format: "%H:%M"
  date_format: "%d.%m."
  week_start_monday: true # false equals sunday
  scroll_count: 2 # scroll long text at least two times
  scroll_interval: 80 # milliseconds
  rainbow_interval: 32 # milliseconds
  frame_interval: 192 # milliseconds
  icons:
    - id: error
      lameid: 40530
    - id: home_assistant
      lameid: 47693
    - id: temperature
      lameid: 2056
    - id: lightbulb
      lameid: 1762
    - id: music
      lameid: 45625
    - id: phone
      lameid: 1232
    - id: car
      lameid: 2819
    - id: sleep8x32
      url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif
  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

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

switch:
  - platform: template
    name: "$devicename Display"
    icon: "mdi:power"
    lambda: |-
      return id(rgb8x32)->show_display;
    turn_on_action:
      lambda: |-
        id(rgb8x32)->set_display_on();
    turn_off_action:
      lambda: |-
        id(rgb8x32)->set_display_off();

Logs

[15:41:38][D][EHMTXv2:032]: queue: clock for 10 sec
[15:41:49][D][EHMTXv2:035]: queue: date for 5 sec
[15:41:54][D][EHMTXv2:086]: default clock color r: 255 g: 127 b: 0
[15:41:55][D][EHMTXv2:032]: queue: clock for 10 sec

Services calls

service: esphome.esphomatrix_set_clock_color
data:
  r: 255
  g: 127
  b: 0

Hold screen doesn't respect parameter

Bug report

Describe the bug

hold_screen adds the default hold_time to the next action and then changes that default. Instead, I'd expect it to set the next_action_time to this->clock->now().timestamp + time.

Current implementation:

void EHMTX::hold_screen(int time)
  {
    this->next_action_time += this->hold_time;
    this->hold_time = time;
  }

Suggested change:

void EHMTX::hold_screen(int time)
  {
    this->next_action_time = this->clock->now().timestamp + time;
  }

[BUG] can't compile

Bug report

Describe the bug

can't compile the simple code exemple.
seem to be related to commit 1036509, at least part of code how generate error comme from this commit

here is the log

Compiling .pioenvs/esphomatrix/src/esphome/components/ehmtxv2/EHMTX.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/homeassistant/time/homeassistant_time.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/addressable_light.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/automation.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/esp_color_correction.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/esp_hsv_color.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/esp_range_view.cpp.o
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::bitmap_screen(std::string, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:109:29: error: 'JSON_ARRAY_SIZE' was not declared in this scope; did you mean 'LWIP_ARRAYSIZE'?
  109 |     const size_t CAPACITY = JSON_ARRAY_SIZE(256);
      |                             ^~~~~~~~~~~~~~~
      |                             LWIP_ARRAYSIZE
src/esphome/components/ehmtxv2/EHMTX.cpp:110:5: error: 'StaticJsonDocument' was not declared in this scope
  110 |     StaticJsonDocument<CAPACITY> doc;
      |     ^~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:110:34: error: 'doc' was not declared in this scope
  110 |     StaticJsonDocument<CAPACITY> doc;
      |                                  ^~~
src/esphome/components/ehmtxv2/EHMTX.cpp:111:5: error: 'deserializeJson' was not declared in this scope
  111 |     deserializeJson(doc, text);
      |     ^~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:112:5: error: 'JsonArray' was not declared in this scope
  112 |     JsonArray array = doc.as<JsonArray>();
      |     ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:115:10: error: 'JsonVariant' was not declared in this scope
  115 |     for (JsonVariant v : array)
      |          ^~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:129:22: error: expected ')' before ';' token
  129 |     screen->text = "";
      |                      ^
      |                      )
src/esphome/components/ehmtxv2/EHMTX.cpp:115:9: note: to match this '('
  115 |     for (JsonVariant v : array)
      |         ^
src/esphome/components/ehmtxv2/EHMTX.cpp:130:5: error: 'screen' was not declared in this scope; did you mean 'strlen'?
  130 |     screen->endtime = this->clock->now().timestamp + lifetime * 60;
      |     ^~~~~~
      |     strlen
Compiling .pioenvs/esphomatrix/src/esphome/components/light/light_call.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/light_json_schema.cpp.o
Compiling .pioenvs/esphomatrix/src/esphome/components/light/light_output.cpp.o
*** [.pioenvs/esphomatrix/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1

[BUG] Blueprints not working

Bug report

Thanks for this repo but the Blueprints I’ve tried all show me this error.

image

image

Additional information

  • used Hardware:
    • ESP32
    • EspHoMaTriXv2 version: latest master code from 7 May 2023

To Reproduce

Steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

(optional) The YAML you used in epshome without any password

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

(optional) Add relevant logs which could help tackle the problem.

Services calls

(optional) The YAML of your service calls

[BUG] Icon Screens, Screen Time... not honored?

Bug report

Calling various icon screens from Home Assistant, it would appear that the screen times are not being honored. I'd like to keep my icon screens short but I can see in the code that the default is 5 seconds and shortening the time in Home Assistant doesn't change that...

      - service: esphome.pixelclock_yellow_icon_screen
        data:
          default_font: true
          icon_name: >-
            weather_{{ states('sensor.openweathermap_condition')|replace("-",
            "_") }}
          text: "{{ states('sensor.openweathermap_temperature')|round(1) }}°"
          lifetime: 5
          screen_time: 3
          r: 192
          g: 192
          b: 192

I also tried this in my YAML and it doesn't lengthen the default clock screen:

esphome:
  comment: "EHMTXv2 from LuBeDa"
  name: $devicename 
  on_boot:
    then:      
      - ds1307.read_time:
      - delay: 30s
      - lambda: |-
          id(rgb8x32)->set_clock_time(30);

So far, I fixed this by simply doing this in my Home Assistant (deleting the default clock screen and inserting my own):

  - service: esphome.pixelclock_yellow_del_screen
    data:
      icon_name: "*"
      mode: 2
  - service: esphome.pixelclock_yellow_clock_screen
    data:
      default_font: false
      lifetime: 5
      screen_time: 20
      r: 64
      g: 128
      b: 255

Sidenote that I miss one of the old features of clock intervals from v1... that the default clock screen would display a minimum of every x seconds (that was clock intervals)... this made it easier for me to force every 2nd screen to be the clock (ie. Clock, Weather, Clock, Inside Temperature, Clock, Humidity, etc.) You know what I mean? It easy enough just to change the clock interval to 5 seconds, info screens 5 seconds, forcing my preferred behavior... I can ignore losing that if I can speed through all my info screens...

Issues with HA 2023.08.1

Automation triggers an error for 'unknown service' after update to 2023.08.1

"Error executing script. Service not found for call_service at pos 1: Unable to find service esphome.ulanzi_eg_icon_screen"

Edit: Hold it, I am having general ESPHome issues since the update. Doesn't seem to be related directly to EspHoMaTriXv2

[BUG] del_screen with wildcard not working

Bug report

Describe the bug

When calling the del_screen service through home assistant with a icon_name wildcard (i.e. weather_*) it doesn't actually delete any screens. When calling the same service with a fully specified icon_name, screen (i.e. weather_partlycloudy is deleted as expected.

Additional information

  • Ulanzi TC001
  • 2023.6.4
  • ESPHome 2023.5.5

To Reproduce

Configure an icon such as weather_partlycloudy. Add an icon_screen to the queue with with esphome.<DEVICENAME>_icon_screen service. Attempt to delete it via the esphome.<DEVICENAME>_del_screen service using a wildcard that should match such as weather_*.

  - service: esphome.ulanzi_icon_screen
    data:
      icon_name: weather_partlycloudy
      text: some text
      default_font: true
      lifetime: 180
      screen_time: 2
      r: 255
      g: 255
      b: 255
    enabled: true
  - service: esphome.ulanzi_del_screen
    data:
      icon_name: weather_*
      mode: 5

Expected behavior

Screen should be removed from queue.

Configuration

Full esphome.yaml
---
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 10.0.0.227
    gateway: !secret gateway
    subnet: !secret subnet
  ap:
    ssid: "$devicename Fallback Hotspot"
    password: !secret ap_password

captive_portal:
logger:
ota:
  password: !secret ota_password

substitutions:
  devicename: ulanzi
  matrix_pin: GPIO32
  buzzer_pin: GPIO15
  battery_pin: GPIO34
  ldr_pin: GPIO35
  left_button_pin: GPIO26
  mid_button_pin: GPIO27
  right_button_pin: GPIO14
  scl_pin: GPIO22
  sda_pin: GPIO21
external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: "2023.6.4"
    components: [ehmtxv2]

esphome:
  comment: "EHMTXv2 from LuBeDa"
  name: $devicename
  on_boot:
    then:
      - ds1307.read_time:

switch:
  - platform: template
    name: "Auto-Adjust Brightness"
    id: switch_autobrightness
    icon: mdi:brightness-auto
    restore_mode: RESTORE_DEFAULT_ON
    lambda: |-
      if (id(aab_enable)) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      lambda: |-
        id(aab_enable) = true;
    turn_off_action:
      lambda: |-
        id(aab_enable) = false;
  - platform: template
    name: "$devicename Display"
    icon: "mdi:power"
    restore_mode: ALWAYS_ON
    lambda: |-
      return id(rgb8x32)->show_display;
    turn_on_action:
      lambda: |-
        id(rgb8x32)->set_display_on();
    turn_off_action:
      lambda: |-
        id(rgb8x32)->set_display_off();

globals:
  # aab = auto-adjustable brightness
  - id: aab_enable
    type: "bool"
    restore_value: true
    initial_value: "true"
  - id: aab_add
    type: int
    initial_value: '10'
  - id: aab_max
    type: int
    initial_value: '220'
  - id: aab_min
    type: int
    initial_value: '20'

output:
  - platform: ledc
    pin: $buzzer_pin
    id: rtttl_out

rtttl:
  output: rtttl_out

esp32:
  board: esp32dev

font:
  - file: fonts/EHMTXv2.ttf
    size: 16
    id: default_font
    glyphs: |
      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/

binary_sensor:
  - platform: status
    name: "$devicename Status"
  - platform: gpio
    pin:
      number: $left_button_pin
      inverted: true
    name: "Left button"
  - platform: gpio
    pin:
      inverted: true
      number: $mid_button_pin
      mode: INPUT_PULLUP
    name: "Middle button"
  - platform: gpio
    pin:
      number: $right_button_pin
      inverted: true
    name: "Right button"

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

api:
  encryption:
    key: !secret encryption_key
  services:
    - service: tune
      variables:
        tune: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return tune;'

sensor:
  - platform: sht3xd
    temperature:
      name: "$devicename Temperature"
    humidity:
      name: "$devicename Relative Humidity"
    update_interval: 60s
  - platform: adc
    pin: $battery_pin
    name: "$devicename Battery"
    id: battery_voltage
    update_interval: 10s
    device_class: battery
    accuracy_decimals: 0
    attenuation: auto
    filters:
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15
          send_first_at: 1
      - multiply: 1.6
      - lambda: |-
          auto r = ((x - 3) / 0.69 * 100.00);
          if (r >= 100) return 100;
          if (r > 0) return r;
          if (r <= 0) return 1;
          return 0;
    unit_of_measurement: '%'
  - platform: adc
    id: light_sensor
    name: "$devicename Illuminance"
    pin: $ldr_pin
    update_interval: 10s
    attenuation: auto
    unit_of_measurement: lx
    device_class: illuminance
    accuracy_decimals: 0
    filters:
      - lambda: |-
          return (x / 10000.0) * 2000000.0 - 15 ;
    on_value:
      then:
        - lambda: |-
            if ( id(aab_enable) ) {
              int n = x / 4 + id(aab_add); // new_value
              if (n > id(aab_max)) n = id(aab_max);
              if (n < id(aab_min)) n = id(aab_min);
              int c = id(rgb8x32)->get_brightness(); // current value
              c = c>0?c:1 ;
              int d = (n - c) * 100 / c; // diff in %
              if ( abs(d) > 2 ) id(rgb8x32)->set_brightness(n);
            }

i2c:
  sda: $sda_pin
  scl: $scl_pin
  scan: true
  id: i2cbus

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    internal: true
    variant: WS2812
    pin: $matrix_pin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    gamma_correct: 2.0
    name: "$devicename Light"
    restore_mode: ALWAYS_OFF

time:
  - platform: homeassistant
    timezone: !secret timezone
    on_time_sync:
      then:
        ds1307.write_time:
  - platform: ds1307
    timezone: !secret timezone
    update_interval: never
    id: ehmtx_time

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: ehmtx_light
    width: 32
    height: 8
    pixel_mapper: |-
      if (y % 2 == 0) {
        return (y * 32) + x;
      }
      return (y * 32) + (31 - x);
    rotation: 
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

ehmtxv2:
  id: rgb8x32
  icons2html: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  time_format: "%I:%M"
  date_format: "%m.%d"
  show_seconds: false
  default_font_id: default_font
  special_font_id: default_font
  icons:
    - id: home_assistant
      file: icons/47693_home_assistant.gif
    - id: error
      file: icons/40530_error.gif
    - id: temperature
      file: icons/2056_temp.png

    # https://developers.home-assistant.io/docs/core/entity/weather/#recommended-values-for-state-and-condition
    - id: weather_cloudy
      file: icons/52159_cloudy.png
    - id: weather_partlycloudy
      file: icons/52173_partly_cloudy.png
    - id: weather_fog
      file: icons/52167_fog.png
    - id: weather_sunny
      file: icons/52156_sunny.png
    - id: weather_rainy
      file: icons/52160_rainy.png
    - id: weather_snowy
      file: icons/52168_snowy.png
    - id: weather_hail
      file: icons/52158_hail.png
    - id: weather_clear_night
      file: icons/52163_clear_night.png
    - id: weather_pouring
      file: icons/52161_pouring.png
    - id: weather_snowy_rainy
      file: icons/52166_snowy_rainy.png
    - id: weather_windy
      file: icons/52169_windy.png
    - id: weather_windy_variant
      file: icons/52169_windy.png
    - id: weather_lightning
      file: icons/52170_lightning.png
    - id: weather_lightning_rainy
      file: icons/52171_lightning_rainy.png
    - id: weather_exceptional
      file: icons/52172_weather_warning.png
  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"
Full Home Assistant Automation yaml
alias: Ulanzi Weather
description: Ulanzi clock weather
trigger:
  - platform: state
    entity_id:
      - sensor.openweathermap_condition
  - platform: state
    entity_id:
      - sensor.openweathermap_temperature
condition: []
action:
  - service: esphome.ulanzi_del_screen
    data:
      icon_name: weather_*
      mode: 5
  - service: esphome.ulanzi_icon_screen
    data:
      icon_name: >-
        weather_{{ states('sensor.openweathermap_condition') | replace('-',
        '_')}}
      text: >-
        {{ states('sensor.openweathermap_temperature', rounded=True,
        with_unit=True) }}
      default_font: true
      lifetime: 180
      screen_time: 2
      r: 255
      g: 255
      b: 255
    enabled: true
mode: single

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

Esphome Logs
INFO ESPHome 2023.5.5
INFO Reading configuration ulanzi.yaml...
WARNING 
WARNING Please check the documentation and wiki https://github.com/lubeda/EspHoMaTriXv2
WARNING 
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 10.0.0.227 using esphome API
INFO Successfully connected to 10.0.0.227
[02:44:45][I][app:102]: ESPHome version 2023.5.5 compiled on Jun 14 2023, 02:36:05
[02:44:45][C][wifi:505]: WiFi:
[02:44:45][C][wifi:363]:   Local MAC: XX
[02:44:45][C][wifi:364]:   SSID: 'iot'
[02:44:45][C][wifi:365]:   IP Address: 10.0.0.227
[02:44:45][C][wifi:367]:   BSSID: XXX
[02:44:45][C][wifi:368]:   Hostname: 'ulanzi'
[02:44:45][C][wifi:370]:   Signal strength: -65 dB ▂▄▆█
[02:44:45][C][wifi:374]:   Channel: 11
[02:44:45][C][wifi:375]:   Subnet: 255.255.255.0
[02:44:45][C][wifi:376]:   Gateway: 10.0.0.1
[02:44:45][C][wifi:377]:   DNS1: 0.0.0.0
[02:44:45][C][wifi:378]:   DNS2: 0.0.0.0
[02:44:45][C][logger:301]: Logger:
[02:44:45][C][logger:302]:   Level: DEBUG
[02:44:45][C][logger:303]:   Log Baud Rate: 115200
[02:44:45][C][logger:305]:   Hardware UART: UART0
[02:44:45][C][i2c.arduino:053]: I2C Bus:
[02:44:45][C][i2c.arduino:054]:   SDA Pin: GPIO21
[02:44:45][C][i2c.arduino:055]:   SCL Pin: GPIO22
[02:44:45][C][i2c.arduino:056]:   Frequency: 50000 Hz
[02:44:45][C][i2c.arduino:059]:   Recovery: bus successfully recovered
[02:44:45][I][i2c.arduino:069]: Results from i2c bus scan:
[02:44:45][I][i2c.arduino:075]: Found i2c device at address 0x44
[02:44:45][I][i2c.arduino:075]: Found i2c device at address 0x68
[02:44:45][C][template.switch:068]: Template Switch 'Auto-Adjust Brightness'
[02:44:45][C][template.switch:070]:   Icon: 'mdi:brightness-auto'
[02:44:45][C][template.switch:091]:   Restore Mode: restore defaults to ON
[02:44:45][C][template.switch:060]:   Restore State: NO
[02:44:45][C][template.switch:061]:   Optimistic: NO
[02:44:45][C][template.switch:068]: Template Switch 'ulanzi Display'
[02:44:45][C][template.switch:070]:   Icon: 'mdi:power'
[02:44:45][C][template.switch:091]:   Restore Mode: always ON
[02:44:45][C][template.switch:060]:   Restore State: NO
[02:44:45][C][template.switch:061]:   Optimistic: NO
[02:44:45][C][ledc.output:160]: LEDC Output:
[02:44:45][C][ledc.output:161]:   Pin GPIO15
[02:44:45][C][ledc.output:162]:   LEDC Channel: 0
[02:44:45][C][ledc.output:163]:   PWM Frequency: 1000.0 Hz
[02:44:45][C][ledc.output:164]:   Bit depth: 16
[02:44:45][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Left button'
[02:44:45][C][gpio.binary_sensor:016]:   Pin: GPIO26
[02:44:45][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Middle button'
[02:44:45][C][gpio.binary_sensor:016]:   Pin: GPIO27
[02:44:45][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Right button'
[02:44:45][C][gpio.binary_sensor:016]:   Pin: GPIO14
[02:44:45][C][template.number:050]: Template Number 'ulanzi Brightness'
[02:44:45][C][template.number:051]:   Optimistic: NO
[02:44:45][C][template.number:052]:   Update Interval: 60.0s
[02:44:46][C][light:103]: Light 'ulanzi Light'
[02:44:46][C][light:105]:   Default Transition Length: 1.0s
[02:44:46][C][light:106]:   Gamma Correct: 2.00
[02:44:46][C][rtttl:018]: Rtttl
[02:44:46][C][status:034]: Status Binary Sensor 'ulanzi Status'
[02:44:46][C][status:034]:   Device Class: 'connectivity'
[02:44:46][C][sht3xd:029]: SHT3xD:
[02:44:46][C][sht3xd:030]:   Address: 0x44
[02:44:46][C][sht3xd:034]:   Update Interval: 60.0s
[02:44:46][C][sht3xd:036]:   Temperature 'ulanzi Temperature'
[02:44:46][C][sht3xd:036]:     Device Class: 'temperature'
[02:44:46][C][sht3xd:036]:     State Class: 'measurement'
[02:44:46][C][sht3xd:036]:     Unit of Measurement: '°C'
[02:44:46][C][sht3xd:036]:     Accuracy Decimals: 1
[02:44:46][C][sht3xd:037]:   Humidity 'ulanzi Relative Humidity'
[02:44:46][C][sht3xd:037]:     Device Class: 'humidity'
[02:44:46][C][sht3xd:037]:     State Class: 'measurement'
[02:44:46][C][sht3xd:037]:     Unit of Measurement: '%'
[02:44:46][C][sht3xd:037]:     Accuracy Decimals: 1
[02:44:46][C][adc:087]: ADC Sensor 'ulanzi Battery'
[02:44:46][C][adc:087]:   Device Class: 'battery'
[02:44:46][C][adc:087]:   State Class: 'measurement'
[02:44:46][C][adc:087]:   Unit of Measurement: '%'
[02:44:46][C][adc:087]:   Accuracy Decimals: 0
[02:44:46][C][adc:097]:   Pin: GPIO34
[02:44:46][C][adc:099]:  Attenuation: auto
[02:44:46][C][adc:126]:   Update Interval: 10.0s
[02:44:46][C][adc:087]: ADC Sensor 'ulanzi Illuminance'
[02:44:46][C][adc:087]:   Device Class: 'illuminance'
[02:44:46][C][adc:087]:   State Class: 'measurement'
[02:44:46][C][adc:087]:   Unit of Measurement: 'lx'
[02:44:46][C][adc:087]:   Accuracy Decimals: 0
[02:44:46][C][adc:097]:   Pin: GPIO35
[02:44:46][C][adc:099]:  Attenuation: auto
[02:44:46][C][adc:126]:   Update Interval: 10.0s
[02:44:46][C][ds1307:022]: DS1307:
[02:44:46][C][ds1307:023]:   Address: 0x68
[02:44:46][C][ds1307:027]:   Timezone: 'CST6CDT,M3.2.0,M11.1.0'
[02:44:46][C][homeassistant.time:010]: Home Assistant Time:
[02:44:46][C][homeassistant.time:011]:   Timezone: 'CST6CDT,M3.2.0,M11.1.0'
[02:44:46][C][captive_portal:088]: Captive Portal:
[02:44:46][C][mdns:108]: mDNS:
[02:44:46][C][mdns:109]:   Hostname: ulanzi
[02:44:46][C][ota:093]: Over-The-Air Updates:
[02:44:46][C][ota:094]:   Address: 10.0.0.227:3232
[02:44:46][C][ota:097]:   Using Password.
[02:44:46][C][api:138]: API Server:
[02:44:46][C][api:139]:   Address: 10.0.0.227:6053
[02:44:46][C][api:141]:   Using noise encryption: YES
[02:44:46][C][EHMTXv2:953]: EspHoMatriXv2 version: 2023.6.4
[02:44:46][C][EHMTXv2:954]: Icons: 18 of 90
[02:44:46][C][EHMTXv2:955]: Clock interval: 0 s
[02:44:46][C][EHMTXv2:956]: Date format: %m.%d
[02:44:46][C][EHMTXv2:957]: Time format: %I:%M
[02:44:46][C][EHMTXv2:958]: Interval (ms) scroll: 80
[02:44:46][C][EHMTXv2:961]: show day of week
[02:44:46][C][EHMTXv2:965]: show date
[02:44:46][C][EHMTXv2:972]: weekstart: monday
[02:44:54][D][EHMTXv2:033]: queue: date for: 5 sec
[02:44:55][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.68910 lx with 0 decimals of accuracy
[02:45:00][D][EHMTXv2:030]: queue: clock for: 10 sec
[02:45:05][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.90056 lx with 0 decimals of accuracy
[02:45:11][D][EHMTXv2:033]: queue: date for: 5 sec
[02:45:14][D][number:012]: 'ulanzi Brightness': Sending state 67.000000
[02:45:15][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.72728 lx with 0 decimals of accuracy
[02:45:15][D][sht3xd:060]: Got temperature=29.88°C humidity=33.18%
[02:45:15][D][sensor:094]: 'ulanzi Temperature': Sending state 29.88136 °C with 1 decimals of accuracy
[02:45:15][D][sensor:094]: 'ulanzi Relative Humidity': Sending state 33.17922 % with 1 decimals of accuracy
[02:45:17][D][EHMTXv2:030]: queue: clock for: 10 sec
[02:45:19][D][EHMTXv2:206]: icon: weather_partlycloudy found id: 4
[02:45:19][D][EHMTXv2:851]: free_screen: found by endtime 0
[02:45:19][D][EHMTXv2:378]: calc_scroll_time: mode: 5 text: "some text" pixels 32 calculated: 10 defined: 2 max_steps: 56
[02:45:19][D][EHMTXv2:672]: icon screen icon: 4 iconname: weather_partlycloudy text: some text lifetime: 180 screen_time: 2
[02:45:19][D][EHMTXv2:039]: queue: icon screen: "weather_partlycloudy" text: some text for: 10 sec
[02:45:25][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.98325 lx with 0 decimals of accuracy
[02:45:28][D][EHMTXv2:039]: queue: icon screen: "weather_partlycloudy" text: some text for: 10 sec
[02:45:35][D][sensor:094]: 'ulanzi Illuminance': Sending state 232.50621 lx with 0 decimals of accuracy
[02:45:39][D][EHMTXv2:033]: queue: date for: 5 sec
[02:45:40][W][EHMTXv2:623]: del_screen: icon weather_* in position: 0 mode 5
[02:45:45][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.39478 lx with 0 decimals of accuracy
[02:45:45][D][EHMTXv2:030]: queue: clock for: 10 sec
[02:45:55][D][sensor:094]: 'ulanzi Illuminance': Sending state 234.53830 lx with 0 decimals of accuracy
[02:45:56][D][EHMTXv2:039]: queue: icon screen: "weather_partlycloudy" text: some text for: 10 sec
[02:46:05][D][sensor:094]: 'ulanzi Illuminance': Sending state 232.25241 lx with 0 decimals of accuracy
[02:46:07][D][EHMTXv2:033]: queue: date for: 5 sec
[02:46:08][W][EHMTXv2:623]: del_screen: icon weather_partlycloudy in position: 0 mode 5
[02:46:08][W][EHMTXv2:633]: del_screen: force
[02:46:13][D][EHMTXv2:030]: queue: clock for: 10 sec
[02:46:14][D][number:012]: 'ulanzi Brightness': Sending state 67.000000
[02:46:15][D][sensor:094]: 'ulanzi Illuminance': Sending state 232.16005 lx with 0 decimals of accuracy
[02:46:15][D][sht3xd:060]: Got temperature=29.94°C humidity=33.07%
[02:46:15][D][sensor:094]: 'ulanzi Temperature': Sending state 29.93744 °C with 1 decimals of accuracy
[02:46:15][D][sensor:094]: 'ulanzi Relative Humidity': Sending state 33.06630 % with 1 decimals of accuracy
[02:46:24][D][EHMTXv2:033]: queue: date for: 5 sec
[02:46:25][D][sensor:094]: 'ulanzi Illuminance': Sending state 231.83841 lx with 0 decimals of accuracy

Services calls

These correspond to the logs above:

- service: esphome.ulanzi_icon_screen
  data:
    icon_name: weather_partlycloudy
    text: some text
    default_font: true
    lifetime: 180
    screen_time: 2
    r: 255
    g: 255
    b: 255

# observe "weather_partlycloudy" screen has been added

- service: esphome.ulanzi_del_screen
  data:
    icon_name: weather_*
    mode: 5 

# observe "weather_partlycloudy" screen has not been deleted

- service: esphome.ulanzi_del_screen
  data:
    icon_name: weather_partlycloudy
    mode: 5

# observe "weather_partlycloudy" screen has finally been deleted

Show date

Please return back the function that support not showing the date card as defualt (show_date: false).

[BUG]

Bug report

Describe the bug

When adding the light component, the provided code/lambdas to turn on/off are returning the 'set_enabled' function is not available. Incidentally, the sample code also has inconsistent indentations

Without this, the light flashes briefly and then turns off at next screen refresh

Additional information

  • used Hardware:
    • Ulanzi
    • EspHoMaTriXv2 version (current - just compiled on 22 May 2023)
    • ESPHome 2023.5.1

To Reproduce

Steps to reproduce the behavior:
Added sample code to YAML and corrected the indentations

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
#    internal: true
    variant: WS2812
    pin: $matrix_pin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    gamma_correct: 2.0
    name: "$device_friendly_name Light"
    restore_mode: ALWAYS_OFF
    on_turn_on:
      lambda: |-
        id(rgb8x32)->set_enabled(false);
    on_turn_off:
      lambda: |-
        id(rgb8x32)->set_enabled(true);

Logs

/config/esphome/aw-clock.yaml: In lambda function:
/config/esphome/aw-clock.yaml:213:16: error: 'class esphome::EHMTX' has no member named 'set_enabled'
         id(rgb8x32)->set_enabled(false);
                ^~~~~~~~~~~
/config/esphome/aw-clock.yaml: In lambda function:
/config/esphome/aw-clock.yaml:216:16: error: 'class esphome::EHMTX' has no member named 'set_enabled'
         id(rgb8x32)->set_enabled(true);
                ^~~~~~~~~~~

[QUESTION] Configure display times for clock and date.

Question

I'm using EspHoMaTriXv2 on a Ulanzi TC001. I want to display the time for 55 seconds and the date for 5 seconds in a loop. I don't understand, how I can configure the display times. I tried clock_interval: 55 but it doesn't seem to help.

What's the corerct way?

Additional information

  • used Hardware:
    • Ulanzi TC001
    • EspHoMaTriXv2 version: latest

[BUG] Cann´t compile

Bug report

Describe the bug

Add a description of the bug. Detail the expected behavior in contrast with the behavior you're observing.

Additional information

  • used Hardware:
    • ESP32 or ESP8266
    • EspHoMaTriXv2 version: [e.g. 2023.7.0]
    • Ulanzi TC001

To Reproduce

Just try to compile the ulanzi-easy.yaml

Expected behavior

no error message :)

Configuration

plain unchanged ulanzi-easy.yaml

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

INFO Reading configuration /config/esphome/ulanzi-easy.yaml...
WARNING 
WARNING Please check the documentation and wiki https://github.com/lubeda/EspHoMaTriXv2
WARNING This will only work with esphome >= 2023.7.0
WARNING 
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Detected timezone 'Europe/Berlin'
INFO Detected timezone 'Europe/Berlin'
INFO Generating C++ source...
INFO Preparing icons, this may take some seconds.
INFO EsphoMaTrix: wrote html-file with icon preview: /config/esphome/ulanzi-easy.html
INFO List of icons for e.g. blueprint:

["error","home_assistant","temperature","lightbulb","music","phone","car","sleep8x32",]

INFO Compiling app...
Processing ulanzi (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|-- ESPmDNS @ 2.0.0
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- NeoPixelBus @ 2.7.3
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX.cpp.o
Compiling /data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:6:10: fatal error: esphome/components/animation/animation.h: No such file or directory
 #include "esphome/components/animation/animation.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1
In file included from src/esphome.h:25,
                 from src/esphome/components/ehmtxv2/EHMTX_icons.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:6:10: fatal error: esphome/components/animation/animation.h: No such file or directory
 #include "esphome/components/animation/animation.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/ulanzi/.pioenvs/ulanzi/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o] Error 1
========================== [FAILED] Took 1.49 seconds ==========================```

## Services calls

```text
(optional) The YAML of your service calls

[BUG] [Wiki] night-mode.md

Bug report

  [on_empty_queue] is an invalid option for [ehmtxv2]. Did you mean [allow_empty_screen]?
  on_empty_queue: 
    then: 
      lambda: |-
        if (id(night))
        {
          id(rgb8x32)->clock_screen(10,10,true,140,120,120);
          id(rgb8x32)->date_screen(10,5,true,120,200,150);
        }
        else 
        {
          id(rgb8x32)->blank_screen(1,15);
        }

Describe the bug

[on_empty_queue] is an invalid option for [ehmtxv2]. Did you mean [allow_empty_screen]?

Additional information

  • used Hardware:
    • ESP32 on Ulanzi TC001

To Reproduce

Steps to reproduce the behavior:
Add to config:

  on_empty_queue: 
    then: 
      lambda: |-

[FEATURE REQUEST] - Transition between screens

Feature Request

Describe the solution / feature you'd like

As it currently stands, from what I can tell, there is no configuration option to do a scroll effect between the screens, it just jumps to the new screen. It would be nice to have either a default or configurable transition. Example when you add a screen it will scroll top down to the new screen from the old screen, or left to right, etc. Similar effects exist for other solutions so those can be used as another example.

[QUESTION] - Documentation Discussion

Question

This is more of a discussion topic than a question. I think the documentation so far is pretty good, I was able to work my way through going from v1 to v2 and figuring out the differences. I would like to contribute to getting the documentation a little more extensive.

The question part comes in to where should the documentation go? Is the README file the best place or would it be better to start porting a lot of it over to the wiki section?

Suggested additions:

  • Breaking changes going from v1 to v2
    • outline all of the changes required to do the upgrade
  • Detail services exposed to Home Assistant in a little more depth
  • Additional Home Assistant automation examples

[QUESTION] Compilation errors

Question

Trying to compile and getting the errors. Log is below. Any idea on how to fix it?

Home Assistant 2023.5.4
Supervisor 2023.06.2
Operating System 10.3
Frontend 20230503.3 - latest

Additional information

  • used Hardware:
    • ESP32 or ESP8266 (tried both)

    • EspHoMaTriXv2 version: tried Develop and Main branches

Logs

In file included from src/esphome.h:26,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:109:5: error: 'time' does not name a type
     time::RealTimeClock *clock;
     ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:20: error: 'time' is not a class, namespace, or enumeration
     void set_clock(time::RealTimeClock *clock);
                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:40: error: expected ',' or '...' before '*' token
     void set_clock(time::RealTimeClock *clock);
                                        ^
In file included from src/esphome.h:26,
                 from src/esphome/components/ehmtxv2/EHMTX_queue.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:109:5: error: 'time' does not name a type
     time::RealTimeClock *clock;
     ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:20: error: 'time' is not a class, namespace, or enumeration
     void set_clock(time::RealTimeClock *clock);
                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:40: error: expected ',' or '...' before '*' token
     void set_clock(time::RealTimeClock *clock);
                                        ^
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::bitmap_screen(std::__cxx11::string, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:142:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::bitmap_small(std::__cxx11::string, std::__cxx11::string, int, int, bool, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:177:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::blank_screen(int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:390:26: error: 'class esphome::EHMTX' has no member named 'clock'
     scr->endtime = this->clock->now().timestamp + lifetime * 60;
                          ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'virtual void esphome::EHMTX::update()':
src/esphome/components/ehmtxv2/EHMTX.cpp:397:17: error: 'class esphome::EHMTX' has no member named 'clock'
       if (this->clock->now().is_valid())
                 ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::force_screen(std::__cxx11::string, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:432:44: error: 'class esphome::EHMTX' has no member named 'clock'
             this->next_action_time = this->clock->now().timestamp;
                                            ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'uint8_t esphome::EHMTX::find_oldest_queue_element()':
src/esphome/components/ehmtxv2/EHMTX.cpp:442:30: error: 'class esphome::EHMTX' has no member named 'clock'
     time_t last_time = this->clock->now().timestamp;
                              ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'uint8_t esphome::EHMTX::find_last_clock()':
src/esphome/components/ehmtxv2/EHMTX.cpp:463:25: error: 'class esphome::EHMTX' has no member named 'clock'
       time_t ts = this->clock->now().timestamp;
                         ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::remove_expired_queue_element()':
src/esphome/components/ehmtxv2/EHMTX.cpp:485:15: error: 'class esphome::EHMTX' has no member named 'clock'
     if (this->clock->now().is_valid())
               ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:488:25: error: 'class esphome::EHMTX' has no member named 'clock'
       time_t ts = this->clock->now().timestamp;
                         ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::tick()':
src/esphome/components/ehmtxv2/EHMTX.cpp:549:35: error: 'class esphome::EHMTX' has no member named 'clock'
     if (this->is_running && this->clock->now().is_valid())
                                   ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:551:25: error: 'class esphome::EHMTX' has no member named 'clock'
       time_t ts = this->clock->now().timestamp;
                         ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::skip_screen()':
src/esphome/components/ehmtxv2/EHMTX.cpp:632:36: error: 'class esphome::EHMTX' has no member named 'clock'
     this->next_action_time = this->clock->now().timestamp - 1;
                                    ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::get_status()':
src/esphome/components/ehmtxv2/EHMTX.cpp:643:23: error: 'class esphome::EHMTX' has no member named 'clock'
     time_t ts = this->clock->now().timestamp;
                       ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::del_screen(std::__cxx11::string, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:718:44: error: 'class esphome::EHMTX' has no member named 'clock'
             this->next_action_time = this->clock->now().timestamp;
                                            ^~~~~
Compiling /data/espmatrix01/.pioenvs/espmatrix01/src/esphome/components/esp32/preferences.cpp.o
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::icon_screen(std::__cxx11::string, std::__cxx11::string, int, int, bool, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:741:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::rainbow_icon_screen(std::__cxx11::string, std::__cxx11::string, int, int, bool)':
src/esphome/components/ehmtxv2/EHMTX.cpp:773:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::rainbow_clock_screen(int, int, bool)':
src/esphome/components/ehmtxv2/EHMTX.cpp:802:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::rainbow_date_screen(int, int, bool)':
src/esphome/components/ehmtxv2/EHMTX.cpp:816:31: error: 'class esphome::EHMTX' has no member named 'clock'
       screen->endtime = this->clock->now().timestamp + lifetime * 60;
                               ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::text_screen(std::__cxx11::string, int, int, bool, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:830:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::rainbow_text_screen(std::__cxx11::string, int, int, bool)':
src/esphome/components/ehmtxv2/EHMTX.cpp:842:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::full_screen(std::__cxx11::string, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:868:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::clock_screen(int, int, bool, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:886:29: error: 'class esphome::EHMTX' has no member named 'clock'
     screen->endtime = this->clock->now().timestamp + lifetime * 60;
                             ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::date_screen(int, int, bool, int, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:902:31: error: 'class esphome::EHMTX' has no member named 'clock'
       screen->endtime = this->clock->now().timestamp + lifetime * 60;
                               ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'esphome::EHMTX_queue* esphome::EHMTX::find_free_queue_element()':
src/esphome/components/ehmtxv2/EHMTX.cpp:926:23: error: 'class esphome::EHMTX' has no member named 'clock'
     time_t ts = this->clock->now().timestamp;
                       ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: At global scope:
src/esphome/components/ehmtxv2/EHMTX.cpp:1005:8: error: no declaration matches 'void esphome::EHMTX::set_clock(esphome::time::RealTimeClock*)'
   void EHMTX::set_clock(time::RealTimeClock *clock)
        ^~~~~
In file included from src/esphome.h:26,
                 from src/esphome/components/ehmtxv2/EHMTX.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:148:10: note: candidate is: 'void esphome::EHMTX::set_clock(int)'
     void set_clock(time::RealTimeClock *clock);
          ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.h:58:9: note: 'class esphome::EHMTX' defined here
   class EHMTX : public PollingComponent, public api::CustomAPIDevice
         ^~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::draw_day_of_week()':
src/esphome/components/ehmtxv2/EHMTX.cpp:1015:24: error: 'class esphome::EHMTX' has no member named 'clock'
       auto dow = this->clock->now().day_of_week - 1; // SUN = 0
                        ^~~~~
In file included from src/esphome.h:26,
                 from src/esphome/components/ehmtxv2/EHMTX_icons.cpp:1:
src/esphome/components/ehmtxv2/EHMTX.h:109:5: error: 'time' does not name a type
     time::RealTimeClock *clock;
     ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:20: error: 'time' is not a class, namespace, or enumeration
     void set_clock(time::RealTimeClock *clock);
                    ^~~~
src/esphome/components/ehmtxv2/EHMTX.h:148:40: error: expected ',' or '...' before '*' token
     void set_clock(time::RealTimeClock *clock);
                                        ^
src/esphome/components/ehmtxv2/EHMTX_queue.cpp: In member function 'void esphome::EHMTX_queue::draw()':
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:207:28: error: 'class esphome::EHMTX' has no member named 'clock'
         if (this->config_->clock->now().is_valid()) // valid time
                            ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:210:38: error: 'class esphome::EHMTX' has no member named 'clock'
           time_t ts = this->config_->clock->now().timestamp;
                                      ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:212:59: error: 'class esphome::EHMTX' has no member named 'clock'
                                            this->config_->clock->now());
                                                           ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:213:31: error: 'class esphome::EHMTX' has no member named 'clock'
           if ((this->config_->clock->now().second % 2 == 0) && this->config_->show_seconds)
                               ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:229:28: error: 'class esphome::EHMTX' has no member named 'clock'
         if (this->config_->clock->now().is_valid())
                            ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:232:38: error: 'class esphome::EHMTX' has no member named 'clock'
           time_t ts = this->config_->clock->now().timestamp;
                                      ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:234:59: error: 'class esphome::EHMTX' has no member named 'clock'
                                            this->config_->clock->now());
                                                           ^~~~~
src/esphome/components/ehmtxv2/EHMTX_queue.cpp:235:31: error: 'class esphome::EHMTX' has no member named 'clock'
           if ((this->config_->clock->now().second % 2 == 0) && this->config_->show_seconds)
                               ^~~~~
*** [/data/espmatrix01/.pioenvs/espmatrix01/src/esphome/components/ehmtxv2/EHMTX_queue.cpp.o] Error 1
*** [/data/espmatrix01/.pioenvs/espmatrix01/src/esphome/components/ehmtxv2/EHMTX_icons.cpp.o] Error 1
*** [/data/espmatrix01/.pioenvs/espmatrix01/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1

Additional context

[FEATURE REQUEST] Increase the number of icons

Feature Request

Is your feature request related to a problem?

There is no way to pass an icon to EspHoMaTriXv2 from HA, but want to have flexibility, variety of information displayed. 90 icons are not always enough.

Describe the solution / feature you'd like

Is it possible to increase the number of icons to at least 100?
What are these limitations associated with?

Describe alternatives you've considered

Or maybe could add transferring icons from HA to EspHoMaTriXv2 when adding a new screen.

[FEATURE REQUEST] Localized abbreviated day of the week

Feature Request

Describe the solution / feature you'd like

This is rather a question for Wikipedia, whether it is possible to make the output of the date with localized abbreviated day of the week (ПО, ВТ or По, Вт), or at least in English but not 3 letters but 2, like MO, TU.... Or Mo, Tu... 3 letters take up a lot of space.

[BUG] Time Jump in %H:%M:%S format

Bug report

Describe the bug

If I output the time in %H:%M:%S format, when 1 occurs in seconds, it jumps constantly, this was not the case on the original firmware Ulanzi TC001.
How can this be solved? Changing the font? Or an additional parameter in the settings?

Additional information

  • used Hardware:
    • ESP32
    • EspHoMaTriXv2 version: 2.0.0
    • Ulanzi TC001

To Reproduce

Steps to reproduce the behavior:

Output the time in %H:%M:%S format with the font MatrixClock-Chunky6.bdf.

Expected behavior

So that when outputting in %H:%M:%S format, the starting position is the same and does not change during output. The font is monospaced, so stable output is expected.

Configuration

font:
  - file: fonts/MatrixClock-Chunky8.bdf
    id: default_font
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz°
  - file: fonts/MatrixClock-Chunky6.bdf
    id: special_font
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:APMTapmt

ehmtxv2:
  id: rgb8x32
  icons2html: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  time_format: "%H:%M:%S"
  date_format: "%d/%m"
  default_clock_font: false
  show_seconds: false
  default_font_id: default_font
  default_font_yoffset: 8
  special_font_id: special_font
  special_font_yoffset: 7

[QUESTION] What are the required dependencies and versions of those dependencies

Question

Hey fist of all thank you very much for this project!

Could you add some documentation on what versions are required for this to run?

I have the feeling that I'm running with the wrong version of one of the dependencies.

Additional information

  • used Hardware:
    • ESP8266

    • EspHoMaTriXv2 version: main / develop (both versions have this problem)

    • esphome(dev)

Logs

 Reading configuration /config/esphome/led-display.yaml...
WARNING 
WARNING This is a beta version of https://github.com/lubeda/EspHoMaTriXv2
WARNING 
INFO Detected timezone 'Europe/Amsterdam'
INFO Generating C++ source...
INFO Preparing icons, this may take some seconds.
INFO EsphoMaTrix: wrote html-file with icon preview: /config/esphome/led-display.html
INFO List of icons for e.g. blueprint:

["xani","xsta","pipo","d180","d080","fullscreen","samplegif",]

INFO Compiling app...
Processing led-display (board: d1_mini; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- NeoPixelBus @ 2.7.3
Compiling /data/led-display/.pioenvs/led-display/src/esphome/components/ehmtxv2/EHMTX.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/component.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/component_iterator.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/controller.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/entity_base.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/helpers.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/log.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/scheduler.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/string_ref.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/esphome/core/util.cpp.o
Compiling /data/led-display/.pioenvs/led-display/src/main.cpp.o
Generating LD script /data/led-display/.pioenvs/led-display/ld/local.eagle.app.v6.common.ld
Compiling /data/led-display/.pioenvs/led-display/lib67b/ESP8266WiFi/BearSSLHelpers.cpp.o
src/esphome/components/ehmtxv2/EHMTX.cpp: In member function 'void esphome::EHMTX::bitmap_screen(std::string, int, int)':
src/esphome/components/ehmtxv2/EHMTX.cpp:109:29: error: 'JSON_ARRAY_SIZE' was not declared in this scope; did you mean 'LWIP_ARRAYSIZE'?
  109 |     const size_t CAPACITY = JSON_ARRAY_SIZE(256);
      |                             ^~~~~~~~~~~~~~~
      |                             LWIP_ARRAYSIZE
src/esphome/components/ehmtxv2/EHMTX.cpp:110:5: error: 'StaticJsonDocument' was not declared in this scope
  110 |     StaticJsonDocument<CAPACITY> doc;
      |     ^~~~~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:110:34: error: 'doc' was not declared in this scope
  110 |     StaticJsonDocument<CAPACITY> doc;
      |                                  ^~~
src/esphome/components/ehmtxv2/EHMTX.cpp:111:5: error: 'deserializeJson' was not declared in this scope
  111 |     deserializeJson(doc, text);
      |     ^~~~~~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:112:5: error: 'JsonArray' was not declared in this scope
  112 |     JsonArray array = doc.as<JsonArray>();
      |     ^~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:115:10: error: 'JsonVariant' was not declared in this scope
  115 |     for (JsonVariant v : array)
      |          ^~~~~~~~~~~
src/esphome/components/ehmtxv2/EHMTX.cpp:129:22: error: expected ')' before ';' token
  129 |     screen->text = "";
      |                      ^
      |                      )
src/esphome/components/ehmtxv2/EHMTX.cpp:115:9: note: to match this '('
  115 |     for (JsonVariant v : array)
      |         ^
src/esphome/components/ehmtxv2/EHMTX.cpp:130:5: error: 'screen' was not declared in this scope; did you mean 'strlen'?
  130 |     screen->endtime = this->clock->now().timestamp + lifetime * 60;
      |     ^~~~~~
      |     strlen
Compiling /data/led-display/.pioenvs/led-display/lib67b/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling /data/led-display/.pioenvs/led-display/lib67b/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling /data/led-display/.pioenvs/led-display/lib67b/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling /data/led-display/.pioenvs/led-display/lib67b/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
*** [/data/led-display/.pioenvs/led-display/src/esphome/components/ehmtxv2/EHMTX.cpp.o] Error 1

This is my yaml config, i changed the time component and removed the wifi section

api:


# esphome config file with all features
substitutions:
  devicename: led-display
  ledpin: D3
  loglevel: DEBUG

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: develop # optional select a special branch or tag

esphome:
  name: $devicename
  comment: 8x32 RGB Display in kitchen
      
binary_sensor:
  - platform: status
    name: "$devicename Status"

esp8266:
  board: d1_mini

font: 
  - file: _fonts/EHMTXv2.ttf
    id: default_font
    size: 16
    glyphs:  |
       !"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@üöäÜÖÄß
  
logger:
  level: WARN


light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    variant: WS2812
    pin: $ledpin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    name: "$devicename Light"
    restore_mode: ALWAYS_OFF
    effects:
      - e131:
          universe: 1
          channels: RGB
    on_turn_on:
      lambda: |-
         id(ehmtx_display)->set_enabled(false);
    on_turn_off:
       lambda: |-
         id(ehmtx_display)->set_enabled(true);

e131:
  method: multicast # default: register E1.31 to Multicast group

time:
  - platform: homeassistant
    id: ehmtx_time
      
display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: ehmtx_light
    width: 32
    height: 8
    pixel_mapper: |-
      if (x % 2 == 0) {
        return (x * 8) + y;
      }
      return (x * 8) + (7 - y);
    rotation: 0°
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

ehmtxv2:
  id: rgb8x32
  show_seconds: true
  rainbow_interval: 32
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  icons2html: true
  default_font_id: default_font
  special_font_id: default_font
  special_font_yoffset: 6
  default_font_yoffset: 6
  icons: 
    - id: xani
      lameid: 6075
    - id: xsta
      lameid: 11236
    - url: https://developer.lametric.com/content/apps/icon_thumbs/48720.gif
      pingpong: true
      id: pipo
      frame_duration: 300
    - lameid: 5965
      frame_duration: 180
      id: d180
    - lameid: 5965
      frame_duration: 80
      id: d080
    - id: fullscreen
      file: icons/sample8x32.gif
    - id: samplegif
      file: icons/sample8x8.gif

Additional context

Add any other context about the problem here.

ehmtx.weekday.color and ehmtx.today.color actions fail

I tried doing the following in the esphome->on_boot->then:

esphome:
  # [...]
  on_boot:
    then:
      # [...]

      - ehmtx.weekday.color:
          id: rgb8x32
          red: !lambda return 100;
          green: !lambda return 100;
          blue: !lambda return 100;

      - ehmtx.today.color:
          id: rgb8x32
          red: !lambda return 199;
          green: !lambda return 90;
          blue: !lambda return 0;

Which looks like it should be valid according to this:

https://github.com/lubeda/EspHoMaTriXv2/blob/main/components/ehmtxv2/__init__.py#L211
https://github.com/lubeda/EspHoMaTriXv2/blob/main/components/ehmtxv2/__init__.py#L194

But I get the following error:

Compiling /data/pixel-clock/.pioenvs/pixel-clock/src/main.cpp.o
src/main.cpp:86:10: error: 'SetWeekdayColor' in namespace 'esphome' does not name a template type
 esphome::SetWeekdayColor<> *esphome_setweekdaycolor;
          ^~~~~~~~~~~~~~~
src/main.cpp:87:10: error: 'SetTodayColor' in namespace 'esphome' does not name a template type
 esphome::SetTodayColor<> *esphome_settodaycolor;
          ^~~~~~~~~~~~~
/config/esphome/pixel-clock.yaml: In function 'void setup()':
/config/esphome/pixel-clock.yaml:379:3: error: 'esphome_setweekdaycolor' was not declared in this scope
/config/esphome/pixel-clock.yaml:379:42: error: 'SetWeekdayColor' in namespace 'esphome' does not name a template type
/config/esphome/pixel-clock.yaml:379:58: error: expected primary-expression before '>' token
/config/esphome/pixel-clock.yaml:51:3: error: 'esphome_settodaycolor' was not declared in this scope
       - ehmtx.today.color:
   ^   ~~~~~~~~~~~~~~~~~
/config/esphome/pixel-clock.yaml:51:40: error: 'SetTodayColor' in namespace 'esphome' does not name a template type
       - ehmtx.today.color:
                                        ^            
/config/esphome/pixel-clock.yaml:51:54: error: expected primary-expression before '>' token
       - ehmtx.today.color:
                                                      ^
/config/esphome/pixel-clock.yaml:59:112: error: no matching function for call to 'esphome::Automation<>::add_actions(<brace-enclosed initializer list>)'
 
                                                                                                                ^
In file included from src/esphome/components/display/display_buffer.h:5,
                 from src/esphome/components/addressable_light/addressable_light_display.h:5,
                 from src/esphome.h:4,
                 from src/main.cpp:3:
src/esphome/core/automation.h:237:8: note: candidate: 'void esphome::Automation<Ts>::add_actions(const std::vector<esphome::Action<Ts ...>*>&) [with Ts = {}]'
   void add_actions(const std::vector<Action<Ts...> *> &actions) { this->actions_.add_actions(actions); }
        ^~~~~~~~~~~
src/esphome/core/automation.h:237:8: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<esphome::Action<>*, std::allocator<esphome::Action<>*> >&'
*** [/data/pixel-clock/.pioenvs/pixel-clock/src/main.cpp.o] Error 1

I'm doing something wrong or it is a bug with this beta version?

[QUESTION] Automatic translation of characters

Ah, I was digging around the ehmtxv2 files and I saw what you meant when you said "automatic translation of characters" over at trip5/Matrix-Fonts#3

In the extended_state.yaml I see:

    darkpoet78_replace:
      name: Use special character provided by Trip5 fonts (default=false)
      description: If you are using the bdf fonts of https://github.com/trip5/Matrix-Fonts you have to translate some character e.g. the euro sign. This flag actives the translation.
      selector:
        boolean:
      default: false

The intention was to allow these characters be substituted "on the fly" by the firmware. So I checked the .h and .cpp files and the idea was never implemented, right?

Now I've figured out how to properly implement TTF bitmap files and I'm even working on a Cyrillic character set. How about just removing that section from the yaml completely? It's totally possible to use Unicode characters when using my Matrix-Fonts TTF files.

[FEATURE REQUEST] Add transparency to Icons

Feature Request

Describe the solution / feature you'd like

Add transparency to Icons.
At higher brightness, the black background in the icons starts to appear as a gray background (screenshot below).
Is it possible to make the black background transparent (always black).
Then the icons will look more harmoniously on the matrix at any brightness.

Judging by the documentation and source code ESPHome supports icons with transparency, even in the RGB565 icon type used.
https://github.com/esphome/esphome/blob/dev/esphome/components/image/__init__.py#L321-L325

0x0020 as I understand it is RGB - [0,0,32], i.e. by enabling transparency we should get completely black color for all colors below [0,0,32].

Additional context

image

[BUG] Example code font too big, text chopped off

Bug report

Describe the bug

The top of the time and date is chopped off on the Ulanzi TC001.
Either the font is too big or the font size is set too big in the example yaml. Or there's an error in the pixel mapper.

Additional information

  • used Hardware:
    • Ulanzi TC001
    • EspHoMaTriXv2 version 2023.7.0

To Reproduce

Steps to reproduce the behavior:

  • Copy example code and flash it to the Ulanzi TC001 pixel clock

Expected behavior

All text should be readable

Configuration

# ...
font:
  - file: fonts/mateine.ttf
    size: 16
    id: default_font
    glyphs:  |
      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/
# ...

Screenshots

image
image

[BUG] Special font doesn't display.

Bug report

My clock screen only uses the default_font instead of the special_font.

Describe the bug

Worked as expected on develop branch right up to a few hours ago (just updated lol)... saw you push through an update so updated again... both on main and develop branches. Only shows the time with default_font.

Additional information

  • used Hardware:
    • Ulanzi TC-001

Configuration

font:
  - file: ehmtxv2/MatrixClock-Chunky8.bdf #
    id: special_font
    #size: 16
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:APMTapmt
  - file: ehmtxv2/MatrixClock-Light8.bdf #
    id: default_font
    #size: 16
    glyphs:  |
      ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz°{|}~¡¢£¤¥¦§¨©ª«¬®¯±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.