EspHoMaTriX - A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io

Overview

EspHoMaTriX (ehmtx)

A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io

Introduction

There are some status displays out there, the commercial one from lamtric and some DIY alternatives.

The DIY solutions have their pros and cons, i am still using an awtrix. But the cons are so big (after my opinion) that i started an esphome.io variant with an optimized homeassistant integration. The main reason, for me is the homeassistant integration.

State

This is a somehow usable version!

It is not as mature as awtrix and pixeltIt but it's doing what i need. I am not shure about the copyright of the font and the icons i use so this repo has only a sample icons included and the font has to be included like all fonts in esphome (see installation). In professional terms it is a beta version. From the structure of the source code it is a chaos version. There will be possibly breaking changes in the code.

See it in action youtube

Features

Based a on a 8x32 RGB matrix it displays a clock, the date and up to 16 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.

Installation

Font

Download a "pixel" font, i use "monobit.ttf".

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

icons/animations

Download and install all needed icons under the "ehmtx"-key. All icons are automagically scaled to 8x8 on compile-time.

emhtx:
  icons: 
    - file: icons/rocket.gif
      id: boot 
    - file: temperature.png
      id: temp 
    - file: garage.gif
      id: garage

You can use gifs as animation and pngs as static "animations". Gif are limited to 8 frames to limit the flash space.

All other solutions provide icons, especialy lametric has a big database of icons. Please check the copyright of the used icons. The amount of icons is limited to 64 in the code and also by the flashspace and the RAM of your board.

The index of the icons is the order of definition, in the sample "temp" is 1 and garage is 2.

components

More stable

At the moment it is more stable to use a local component to get this running. Copy the components subfolder to your esphome folder. If needed customize the yaml to your folder structure.

external_components:
   - source:
       type: local
       path: components

More features but perhaps breaking changes

Use the github repo as component.

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EsphoMaTrix

YAML confugration

Sample

ehmtx:
  id: rgb328
  showclock: 6
  showscreen: 8
  display8x32: ehmtxdisplay
  time: ehmtxclock
  duration: 7
  font_id: ehmtxfont
  icons: 
    - file: sample.png
      id: boot 
    - file: sample.png
      id: temp 
    - file: sample.png
      id: garage

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

showclock (Optional, seconds): duration to display the clock after this time the date is display until "showscreen"

showscreen (Optional, seconds): duration to display a screen or a clock/date sequence

duration (Optional, minutes): lifetime of a screen in minutes (default=5)

yoffset (Optional, pixel): yoffset of the font, default -5 (see installation/font)

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

time (required, ID): ID of the time component

Integration in homeassistant

Each device has to be integrated in homeassistant. It provides three services, all prefixed with the devicename e.g. "ehmtx".

use the light component

To use the light component add the lambdason_turn_on and on_turn_off to the light

Sample:

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

Services

All communication uses the api. The services are defined in the yaml. To define the services you need the id of the ehmtx-component e.g. id(rgb8x32).

Sample

api:
  services:
    - service: alarm
      variables:
        icon: int
        text: string
      then:
        lambda: |-
          id(rgb8x32)->add_alarm(icon,text);

Service _alarm

Sets an alarm, the alarm is like a normal screen but is displayed two minutes longer as a normal screen and has a red marker in the upper right corner.

parameters:

  • icon: The number of the predefined icons (see installation)
  • text: The text to be displayed

Service _screen

Queues a screen with an icon and a text. Per icon there can only be one text. If you need to show e.g. an indoor and an outdoor temperature you have to use different icons (ids)! If the screen is still displayed and you change the text for the icon it will start a new lifetime with the new text.

parameters:

  • icon The number of the predefined icons (see installation)
  • text The text to be displayed

Service _screen_n

Queues a screen with an icon and a text. Per icon there can only be one text. If you need to show e.g. an indoor and an outdoor temperature you have to use different icons (ids)! If the screen is still displayed and you change the text for the icon it will start a new lifetime with the new text.

parameters:

  • icon_name The name of the icons as in the yaml (see installation)
  • text The text to be displayed

Service del_screen_n

Removes a screen from the display.

parameters:

  • icon_name The name of the icons as in the yaml (see installation)

Service _screen_t

Queues a screen with an icon and a text. Per icon there can only be one text. If you need to show e.g. an indoor and an outdoor temperature you have to use different icons (ids)! If the screen is still displayed and you change the text for the icon it will start a new lifetime with the new text.

parameters:

  • icon The number of the predefined icons (see installation)
  • text The text to be displayed
  • duration The lifetime in minutes

Service indicator_on

Display a colored corner on all screen and the clock. You can define the color by parameter.

parameters:

  • r red in 0..255
  • g green in 0..255
  • b blue in 0..255

Service indicator_off

removes the indicator

Hardware/Wifi

Adapt all other data in the yaml to your needs, I use GPIO04 as port for the display.

Usage

The integration works with the homeassistant api so, after boot of the device, it take some seconds until the service calls work.

Disclaimer

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

Comments
  • Update error

    Update error

    The component cannot be updated after updating ESPhome. I haven't changed anything in the configuration and everything works, but it can't be updated.

    src/main.cpp:76:10: error: 'SetAlarmColor' in namespace 'esphome' does not name a template type; did you mean 'SetClockColor'?
       76 | esphome::SetAlarmColor<> *esphome_setalarmcolor;
          |          ^~~~~~~~~~~~~
          |          SetClockColor
    /config/esphome/led-8x32.yaml: In function 'void setup()':
    /config/esphome/led-8x32.yaml:42:3: error: 'esphome_setalarmcolor' was not declared in this scope; did you mean 'esphome_setclockcolor'?
       42 |           id: rgb8x32
          |   ^       ~~~~~~~~~~~  
          |   esphome_setclockcolor
    /config/esphome/led-8x32.yaml:42:40: error: 'SetAlarmColor' in namespace 'esphome' does not name a template type; did you mean 'SetClockColor'?
       42 |           id: rgb8x32
          |                                        ^            
          |                                        SetClockColor
    /config/esphome/led-8x32.yaml:42:54: error: expected primary-expression before '>' token
       42 |           id: rgb8x32
          |                                                      ^
    /config/esphome/led-8x32.yaml:47:143: error: cannot convert '<brace-enclosed initializer list>' to 'const std::vector<esphome::Action<>*, std::allocator<esphome::Action<>*> >&'
       47 | esp8266:
          |                                                                                                                                               ^
    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:3,
                     from src/main.cpp:3:
    src/esphome/core/automation.h:237:56: note:   initializing argument 1 of 'void esphome::Automation<Ts>::add_actions(const std::vector<esphome::Action<Ts ...>*>&) [with Ts = {}]'
      237 |   void add_actions(const std::vector<Action<Ts...> *> &actions) { this->actions_.add_actions(actions); }
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    *** [/data/led-8x32/.pioenvs/led-8x32/src/main.cpp.o] Error 1
    ========================= [FAILED] Took 28.66 seconds =========================
    ========== [ERROR] /config/esphome/led-8x32.yaml ==========
    
    opened by pepe59 5
  • Time / date switching does not work

    Time / date switching does not work

    Time / date switching does not work after updating ESPhome. I tried to add:

      show_date: true
      date_format: "%d.%m."
    

    That didn't help. Only the time is still displayed.

    opened by pepe59 4
  • Where to start if LED won't work

    Where to start if LED won't work

    Hi. Sorry for garbled issue, accidentally hit Enter while typing.

    Don't hesitate to tell me if I'm asking something wrong, but I'm not sure where to start debugging. I use 30-pin WROOM 32 for this project, want to build an informer from a 8x32 LED panel, I'm using standart GPIO16(D2) for data and VIN/GDN for LED power. ESP32 was tested with WLED project so I know it works fine, power supply is USB charger 5V/3A. For testing purposes I removed icons from ESPHome code and changed font file with bitmap Cozette (https://github.com/slavfox/Cozette, font size 13px), everything else left untouched.

    On your video switching power makes matrix display "01.01", but my stays unlit blank, what could I miss?

    Again, feel free to move issue if I'm not supposed to ask such things here.

    Thank you advance.

    opened by YujiTFD 4
  • Problem Compiling

    Problem Compiling

    Using latest Home Assistant Version & ESPHome with a D1 Mini I get a compile error:

    INFO Reading configuration /config/esphome/matrix.yaml... INFO Detected timezone 'Europe/Berlin' INFO Generating C++ source... Traceback (most recent call last): File "/usr/local/bin/esphome", line 33, in sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')()) File "/esphome/esphome/main.py", line 825, in main return run_esphome(sys.argv) File "/esphome/esphome/main.py", line 812, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/esphome/esphome/main.py", line 326, in command_compile exit_code = write_cpp(config) File "/esphome/esphome/main.py", line 159, in write_cpp generate_cpp_contents(config) File "/esphome/esphome/main.py", line 171, in generate_cpp_contents CORE.flush_tasks() File "/esphome/esphome/core/init.py", line 613, in flush_tasks self.event_loop.flush_tasks() File "/esphome/esphome/coroutine.py", line 245, in flush_tasks next(task.iterator) File "/esphome/esphome/main.py", line 151, in wrapped await coro(conf) File "/config/esphome/.esphome/external_components/66a08d7e/components/ehmtx/init.py", line 560, in to_code espImage.IMAGE_TYPE["RGB565"], KeyError: 'RGB565'

    Any hints for me? I used one single Icon in the yaml, tried different file formats (gif, png) but as far as I understand this should not be the issue here. I tried to replace the Key RGB585 with RGB24, which throws another error. (I have to admit I have no clue what I am doing there ;) )

    If I replace the Key with RGB24 in the code, this error is thrown:

    INFO Reading configuration /config/esphome/matrix.yaml... INFO Detected timezone 'Europe/Berlin' INFO Generating C++ source... INFO Compiling app... Processing matrix (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)

    HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf Dependency Graph |-- 1.0 |-- 1.2 |-- 2.6.9 | |-- 1.0 Compiling /data/matrix/.pioenvs/matrix/src/esphome/components/ehmtx/EHMTX_icons.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/ESP8266WiFiMulti.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/ESP8266WiFiSTA.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/ESP8266WiFiScan.cpp.o Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/WiFiClient.cpp.o src/esphome/components/ehmtx/EHMTX_icons.cpp: In member function 'void esphome::EHMTX_Icon::next_frame()': src/esphome/components/ehmtx/EHMTX_icons.cpp:33:20: error: 'prev_frame' is not a member of 'esphome::display::Animation' 33 | Animation::prev_frame(); | ^~~~~~~~~~ Compiling /data/matrix/.pioenvs/matrix/lib67b/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o *** [/data/matrix/.pioenvs/matrix/src/esphome/components/ehmtx/EHMTX_icons.cpp.o] Error 1 ========================= [FAILED] Took 15.85 seconds =========================

    I would be happy for anything pointing me into the right direction. Thank you! :)

    opened by pollierer 3
  • time format and date format

    time format and date format

    Hi,

    First of all, thank you for this awesome project of yours! Im using it at the moment and it is fantastic! If i may request, is it possible to have as a setting the hour and date formats. Say 12 hour format for the hours or the inclusion of seconds and for the dates, the inclusion of year and changing to different locale.

    Thanks!

    opened by kelvincabaldo07 3
  • Issue: GIF not working Only static image is displayed

    Issue: GIF not working Only static image is displayed

    GIF is not working on my setup. it is just showing a static image.

    below is my yaml file

    substitutions:
      devicename: ehmtx8266
      mypin: GPIO02
       #  GPIO04
    
    external_components:
      - source:
          type: git
          url: https://github.com/lubeda/EsphoMaTrix
          ref: date-time
        refresh: 120s 
        components: [ ehmtx ]   
          #type: local
          #path: components/components
    
    esphome:
      name: $devicename
      on_boot:
          priority: -100
          then: 
            - ehmtx.text.color:
                id: rgb8x32
                red: !lambda return 200;
                green: !lambda return 200;
                blue: !lambda return 200;            
            - ehmtx.today.color:
                id: rgb8x32
                red: !lambda return 255;
                green: !lambda return 165;
                blue: !lambda return 0;
            - ehmtx.clock.color:
                id: rgb8x32
                red: !lambda return 255;
                green: !lambda return 165;
                blue: !lambda return 0;
            - ehmtx.weekday.color:
                id: rgb8x32
                red: !lambda return 0;
                green: !lambda return 128;
                blue: !lambda return 128;
            - lambda: !lambda |-
                id(rgb8x32)->show_all_icons();
    
    esp8266:
      board: nodemcuv2
    
    font:
      - file: monobit.ttf
        id: ehmtx_font
        size: 16
        glyphs:  |
          !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@<>/
    
    binary_sensor:
      - platform: status
        name: "$devicename Status"
    
    logger:
    
    # Enable Home Assistant API
    api:
      services:
        - service: show_all_icons
          then:
            lambda: |-
              id(rgb8x32)->show_all_icons();
    
        - service: alarm
          variables:
            icon_name: string
            text: string
          then:
            lambda: |-
              id(rgb8x32)->add_screen(icon_name,text,7 ,true);
              id(rgb8x32)->force_screen(icon_name);
    
        - service: screen
          variables:
            icon_name: string
            text: string
          then:
            - ehmtx.add.screen:
                id: rgb8x32
                text: !lambda return text;
                icon_name: !lambda return icon_name;
                duration: 1440
                alarm: false
                
    
        - service: brightness
          variables:
            brightness: int
          then:
            lambda: |-
              id(rgb8x32)->set_brightness(brightness);
    
        - service: status
          then:
            lambda: |-
              id(rgb8x32)->get_status();
        - service: del_screen
          variables:
            icon_name: string
          then:
            - ehmtx.delete.screen:
                id: rgb8x32
                icon_name: !lambda return icon_name;
    
        - service: indicator_on
          variables:
            r: int
            g: int
            b: int
          then:
            - ehmtx.indicator.on:
                id: rgb8x32
                red: !lambda return r;
                green: !lambda return g;
                blue: !lambda return b;
    
        - service: force_screen
          variables:
            icon_name: string
          then:
            - ehmtx.force.screen:
                id: rgb8x32
                icon_name: !lambda return icon_name;
    
        - service: text_color
          variables:
            r: int
            g: int
            b: int
          then:
            lambda: |-
              id(rgb8x32)->set_text_color(r,g,b);
    
        - service: alarm_color
          variables:
            r: int
            g: int
            b: int
          then:
            lambda: |-
              id(rgb8x32)->set_alarm_color(r,g,b);
    
        - service: indicator_off
          then:
            - ehmtx.indicator.off:
                id: rgb8x32
    
        - service: clock_text_color
          variables:
            r: int
            g: int
            b: int
          then: 
            lambda: |-
              id(rgb8x32)->set_clock_color(r,g,b);
              id(rgb8x32)->set_today_color(r,g,b);
    
    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);
    
    ota:
      password: !secret ota_password
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    
    light:
      - platform: neopixelbus
        id: ehmtx_light
        type: GRB
        variant: WS2812
        pin: $mypin
        num_leds: 256
        color_correct: [30%, 30%, 30%]
        name: "$devicename 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);
    time:
      - platform: homeassistant
        id: ehmtx_time
        timezone: "Asia/Manila"
    
    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: 100ms
        auto_clear_enabled: true
        lambda: |-
          id(rgb8x32)->tick();
          id(rgb8x32)->draw();
    
    ehmtx:
      id: rgb8x32
    #  show_clock: 5
      show_screen: 5
      display8x32: ehmtx_display
      time: ehmtx_time
      time_format: "%I:%M"
      date_format: "%m.%d"
      week_start_monday: true
      duration: 7
      font_id: ehmtx_font
      icons: 
        - file: _icons/1918.gif #https://awtrix.blueforcer.de/icons/1918
          duration: 200
          pingpong: true
          id: heart
        - url: https://awtrix.blueforcer.de/icons/175
          id: phflag
        - url: https://awtrix.blueforcer.de/icons/1286
          duration: 10000
          id: weather
        - file: _icons/warning.gif #https://awtrix.blueforcer.de/icons/1901
          duration: 100
          id: warning
        - url: https://awtrix.blueforcer.de/icons/766
          id: smiley
    
    opened by kelvincabaldo07 2
  • Alarm color compilation error

    Alarm color compilation error

    If I use your example, everything works fine.

    esphome:
      name: $devicename
      on_boot:
        priority: -100
        then: 
          - ehmtx.text.color:
              id: rgb8x32
              red: !lambda return 200;
              blue: !lambda return 170;
          - ehmtx.today.color:
              id: rgb8x32
              red: !lambda return 10;
              green: !lambda return 250;
          - ehmtx.clock.color:
              id: rgb8x32
              red: !lambda return 50;
              green: !lambda return 150;
              blue: !lambda return 230;
          - ehmtx.weekday.color:
              id: rgb8x32
              red: !lambda return 250;
              green: !lambda return 50;
              blue: !lambda return 30;
    

    If I add an alarm color, the compilation will fail

          - ehmtx.alarm.color:
              id: rgb8x32
              red: !lambda return 250;
              green: !lambda return 50;
              blue: !lambda return 30;
    
    src/main.cpp:76:10: error: 'SetAlarmColor' in namespace 'esphome' does not name a template type; did you mean 'SetClockColor'?
       76 | esphome::SetAlarmColor<> *esphome_setalarmcolor;
          |          ^~~~~~~~~~~~~
          |          SetClockColor
    /config/esphome/led-8x32.yaml: In function 'void setup()':
    /config/esphome/led-8x32.yaml:42:3: error: 'esphome_setalarmcolor' was not declared in this scope; did you mean 'esphome_setclockcolor'?
       42 |           id: rgb8x32
          |   ^       ~~~~~~~~~~~  
          |   esphome_setclockcolor
    /config/esphome/led-8x32.yaml:42:40: error: 'SetAlarmColor' in namespace 'esphome' does not name a template type; did you mean 'SetClockColor'?
       42 |           id: rgb8x32
          |                                        ^            
          |                                        SetClockColor
    /config/esphome/led-8x32.yaml:42:54: error: expected primary-expression before '>' token
       42 |           id: rgb8x32
          |                                                      ^
    /config/esphome/led-8x32.yaml:47:143: error: cannot convert '<brace-enclosed initializer list>' to 'const std::vector<esphome::Action<>*, std::allocator<esphome::Action<>*> >&'
       47 | esp8266:
          |                                                                                                                                               ^
    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:3,
                     from src/main.cpp:3:
    src/esphome/core/automation.h:237:56: note:   initializing argument 1 of 'void esphome::Automation<Ts>::add_actions(const std::vector<esphome::Action<Ts ...>*>&) [with Ts = {}]'
      237 |   void add_actions(const std::vector<Action<Ts...> *> &actions) { this->actions_.add_actions(actions); }
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    *** [/data/led-8x32/.pioenvs/led-8x32/src/main.cpp.o] Error 1
    
    opened by pepe59 2
  • Porting it for an 16x16 led matrix?

    Porting it for an 16x16 led matrix?

    Hey, I've started to have a look if it's possible to port this to a simple WS2812B 16x16 led matrix. The concept is to have 2 rows (8x16 + 8x16), like:

    • icons / hours on the top
    • text / minutes on the bottom

    Also to have background color settings (but I'm not sure if that's already implemented) Do you think it's possible using this setup?

    Thanks, awesome job btw :)

    opened by Andoramb 1
  • compilation problem

    compilation problem

    Traceback (most recent call last): File "/usr/local/bin/esphome", line 33, in sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')()) File "/esphome/esphome/main.py", line 825, in main return run_esphome(sys.argv) File "/esphome/esphome/main.py", line 812, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/esphome/esphome/main.py", line 366, in command_run exit_code = write_cpp(config) File "/esphome/esphome/main.py", line 159, in write_cpp generate_cpp_contents(config) File "/esphome/esphome/main.py", line 171, in generate_cpp_contents CORE.flush_tasks() File "/esphome/esphome/core/init.py", line 613, in flush_tasks self.event_loop.flush_tasks() File "/esphome/esphome/coroutine.py", line 245, in flush_tasks next(task.iterator) File "/esphome/esphome/main.py", line 151, in wrapped await coro(conf) File "/config/esphome/.esphome/external_components/66a08d7e/components/ehmtx/init.py", line 560, in to_code espImage.IMAGE_TYPE["RGB565"], KeyError: 'RGB565'

    opened by akomylator 1
  • FEATURE REQUEST: Enable Separate Control of Clock, Dates and Others Display

    FEATURE REQUEST: Enable Separate Control of Clock, Dates and Others Display

    Is it possible to have a separate control of how long the clock, date and other details will be displayed. i am trying to figure out a way to display the date a little bit longer as i think it is displaying just about a second or even less and i cant figure out for the life of me. haha. i may just be missing some documentation but i would appreciate it if you can point me to it. thanks!

    opened by kelvincabaldo07 1
  • add sensors from HA in loop as time

    add sensors from HA in loop as time

    hello I congratulate you for a great job, I added this sensor:

    sensor:

    • platform: homeassistant id: istantaneo_w entity_id: sensor.energia_assorbita internal: true`

    but I can't put it in loop at the date and time, could you tell me how to insert it? bearing in mind that I am using the sample code

    thank you very much if anyone replies

    opened by maverik80 1
  • feature resizing gifs

    feature resizing gifs

    in Pillow, using image.resize() returns a resized image of the first frame only.

    • iterating and resizing each frame.
    • saving the resized frames as new gif, and re-loading it.
    • there's an issue I can't find why it's happening - seems like the first frame breaks while resizing/saving, therefore we save the frames from the second frame forward and setting the new frames number. Probably resolves #14
    opened by ofirsnb 2
  • Issue: Light goes on every now and then when there's no screen showing

    Issue: Light goes on every now and then when there's no screen showing

    For some reason whenever i dont have a screen displayed and just the clock and date are showing, the lights goes on and then boot loop so the workaround i did was to automate it in home assistant so that when the light goes on, it will turn it off.

    substitutions:
      devicename: ehmtx8266
      mypin: GPIO02
       #  GPIO04
    
    external_components:
      - source:
          type: git
          url: https://github.com/lubeda/EsphoMaTrix
          ref: date-time
        refresh: 120s 
        components: [ ehmtx ]   
          #type: local
          #path: components/components
    
    esphome:
      name: $devicename
      on_boot:
          priority: -100
          then: 
            - ehmtx.text.color:
                id: rgb8x32
                red: !lambda return 200;
                green: !lambda return 200;
                blue: !lambda return 200;            
            - ehmtx.today.color:
                id: rgb8x32
                red: !lambda return 255;
                green: !lambda return 165;
                blue: !lambda return 0;
            - ehmtx.clock.color:
                id: rgb8x32
                red: !lambda return 255;
                green: !lambda return 165;
                blue: !lambda return 0;
            - ehmtx.weekday.color:
                id: rgb8x32
                red: !lambda return 0;
                green: !lambda return 128;
                blue: !lambda return 128;
            - lambda: !lambda |-
                id(rgb8x32)->show_all_icons();
    
    esp8266:
      board: nodemcuv2
    
    font:
      - file: monobit.ttf
        id: ehmtx_font
        size: 16
        glyphs:  |
          !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@<>/
    
    binary_sensor:
      - platform: status
        name: "$devicename Status"
    
    logger:
    
    # Enable Home Assistant API
    api:
      services:
        - service: show_all_icons
          then:
            lambda: |-
              id(rgb8x32)->show_all_icons();
    
        - service: alarm
          variables:
            icon_name: string
            text: string
          then:
            lambda: |-
              id(rgb8x32)->add_screen(icon_name,text,7 ,true);
              id(rgb8x32)->force_screen(icon_name);
    
        - service: screen
          variables:
            icon_name: string
            text: string
          then:
            - ehmtx.add.screen:
                id: rgb8x32
                text: !lambda return text;
                icon_name: !lambda return icon_name;
                duration: 1440
                alarm: false
                
    
        - service: brightness
          variables:
            brightness: int
          then:
            lambda: |-
              id(rgb8x32)->set_brightness(brightness);
    
        - service: status
          then:
            lambda: |-
              id(rgb8x32)->get_status();
        - service: del_screen
          variables:
            icon_name: string
          then:
            - ehmtx.delete.screen:
                id: rgb8x32
                icon_name: !lambda return icon_name;
    
        - service: indicator_on
          variables:
            r: int
            g: int
            b: int
          then:
            - ehmtx.indicator.on:
                id: rgb8x32
                red: !lambda return r;
                green: !lambda return g;
                blue: !lambda return b;
    
        - service: force_screen
          variables:
            icon_name: string
          then:
            - ehmtx.force.screen:
                id: rgb8x32
                icon_name: !lambda return icon_name;
    
        - service: text_color
          variables:
            r: int
            g: int
            b: int
          then:
            lambda: |-
              id(rgb8x32)->set_text_color(r,g,b);
    
        - service: alarm_color
          variables:
            r: int
            g: int
            b: int
          then:
            lambda: |-
              id(rgb8x32)->set_alarm_color(r,g,b);
    
        - service: indicator_off
          then:
            - ehmtx.indicator.off:
                id: rgb8x32
    
        - service: clock_text_color
          variables:
            r: int
            g: int
            b: int
          then: 
            lambda: |-
              id(rgb8x32)->set_clock_color(r,g,b);
              id(rgb8x32)->set_today_color(r,g,b);
    
    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);
    
    ota:
      password: !secret ota_password
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    
    light:
      - platform: neopixelbus
        id: ehmtx_light
        type: GRB
        variant: WS2812
        pin: $mypin
        num_leds: 256
        color_correct: [30%, 30%, 30%]
        name: "$devicename 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);
    time:
      - platform: homeassistant
        id: ehmtx_time
        timezone: "Asia/Manila"
    
    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: 100ms
        auto_clear_enabled: true
        lambda: |-
          id(rgb8x32)->tick();
          id(rgb8x32)->draw();
    
    ehmtx:
      id: rgb8x32
    #  show_clock: 5
      show_screen: 5
      display8x32: ehmtx_display
      time: ehmtx_time
      time_format: "%I:%M"
      date_format: "%m.%d"
      week_start_monday: true
      duration: 7
      font_id: ehmtx_font
      icons: 
        - file: _icons/1918.gif #https://awtrix.blueforcer.de/icons/1918
          duration: 200
          pingpong: true
          id: heart
        - url: https://awtrix.blueforcer.de/icons/175
          id: phflag
        - url: https://awtrix.blueforcer.de/icons/1286
          duration: 10000
          id: weather
        - file: _icons/warning.gif #https://awtrix.blueforcer.de/icons/1901
          duration: 100
          id: warning
        - url: https://awtrix.blueforcer.de/icons/766
          id: smiley
    
    
    opened by kelvincabaldo07 5
Releases(v1.1)
Owner
LuBeDa
LuBeDa
Foo_openlyrics - An open-source lyric display panel for foobar2000

foo_openlyrics An open-source lyrics plugin for foobar2000 that includes its own UI panel for displaying and sources for downloading lyrics that are n

Jacques Heunis 241 Dec 23, 2022
I2C to WS2812 (RGB LED) converter

i2c_ws2812 I2C to WS2812 (RGB LED) converter MCU and Peripherals The code is tested on ATtiny 0 & 1 series (ATtiny212 & ATtiny402). I2C, CCL, SPI, and

null 1 Oct 15, 2021
Side panels for the Voron Zero printer that has 16 WS2812 RGB LED's per side.

Voron Zero RGB Side Panels Side panels for the Voron Zero printer with 16 WS2812 RGB LED's per side. The build below has some 3mm TAP Plastic black LE

Tim Abraham 3 Jul 22, 2022
A wireless control for an RGB LED based on emotions found in discord messages.

Sample project (See the README.md file in the upper level 'examples' directory for more information about examples.) This is the simplest buildable ex

Fernando Mendoza 2 Dec 1, 2021
If the button pressed esp will reset and App mode will on. App mode will on then led will on, network is connected led will off.

DHT22-to-Google-sheet-Reset-Using-ESP8266-LED-Switch If button pressed esp will reset and App mode will on. App mode will on then led will on, network

Md. Harun-Or-Rashid 3 Aug 17, 2022
Harsh Badwaik 1 Dec 19, 2021
Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Brian Lough 23 Oct 8, 2022
A simple program to control the status LEDs of your Raspberry Pi!

ledcontrol is a program which was developed especially for the Raspberry Pi. With the help of this program you can easily turn on or off the status leds of your Raspberry Pi. Or even let them blink in different rythm!

Strawberry Software Industries 6 Jun 24, 2022
A push-button control panel for Zoom

Zoom Control Panel A push-button control panel for Zoom This repo contains files for building a push-button control panel for Zoom.

Elena Long 48 Nov 15, 2022
Yet another alarm (control) panel for Home Assistant.

HASS-YAAP Yet another alarm (control) panel for Home Assistant. Change alarm system mode (away, home, night, disarmed) Welcome people arriving by thei

Paul-Vincent Roll 48 Dec 4, 2021
Display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together

The display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together, and leaving individual access to the cs lines of each display, This board allows you to display images with a resolution of 480x160px.

Josue Alejandro Gutierrez 70 Dec 19, 2022
Simple ESPHome Wiegand custom component

esphome-wiegand Simple ESPHome Wiegand custom component Based on this code: https://github.com/Luisiado/wiegand_esphome_module To use: Drop wiegand_de

Av 24 Dec 26, 2022
Contains ST, Status Bar, DWM, DMenu, Wallpaper and Xinitrc

Very Minimal DWM Setup Contains ST, Joestandring's Dwm-Bar, DWM, DMenu, Wallpaper and .xinitrc Patches & Customization St: Alpha Scrollback Scrollback

Finn Gould 2 Jan 11, 2022
Modular status bar for dwm written in c.

dwmblocks Modular status bar for dwm written in c. usage To use dwmblocks first run 'make' and then install it with 'sudo make install'. After that yo

C0de 1 Oct 12, 2021
This progrom aims at providing high-quality healthcare system for everyone ragardless of their social status.

This progrom aims at providing high-quality healthcare system for everyone ragardless of their social status. It tackles long-existed problems such as incompetent staff, long queues and outdated equipment. I am sure that this program has a potential to transform a healthcare system in our country.

Azimjon Abduvohidov 1 Jul 28, 2022
Vaccine Monitor app implemented in C with system Programming techniques.Projects implemented as part of the course Syspro K24

System_Programming_Projects Vaccine Monitor app implemented in C with system Programming techniques.Projects implemented as part of the course Syspro

Aristi_Papastavrou 10 Dec 30, 2021
A simple DIY project that will make oldschool POCSAG pagers/beepers work again

Arduino POCSAG Transcoder Features Message types: Tone, Numeric, Alphanumeric 4 encodings: Latin, 2xLatin/Cyrillic, Cyrillic Data rates: 512, 1200, 24

SinuX 7 Nov 20, 2022
ESPHome integration for the Xiaomi Mijia Bedside Lamp v2.

esphome-xiaomi_bslamp2 Warning: this code is still under development This code might not yet be production-ready. At this point, it is declared beta-q

Maurice Makaay 136 Dec 27, 2022
SmartShunt ve.direct to ESPHOME node

VictronSmartShunt-ESPHOME SmartShunt ve.direct to ESPHOME node A configured uart component is required. Example: victron: uart_id: the_uart sensor:

null 33 Dec 11, 2022