Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 6ed829c

Browse files
authored
Merge pull request #68 from lubeda/8x32
8x32
2 parents 5644ca3 + 2542f19 commit 6ed829c

File tree

12 files changed

+352
-492
lines changed

12 files changed

+352
-492
lines changed

CHANGELOG.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
# Changelog
22

3+
## 2023.3.5
4+
- new: show_seconds indicator top left corner
5+
- breaking: removed automatic scaling of images
6+
- new: support 8x32 icons without text
7+
- breaking: added status,display_on,display_off as default service => remove these from your yaml
8+
- breaking: added indicator_on/off as default service => remove these from your yaml
9+
- breaking: added alarm_color,text_color,clock_color as default service => remove these from your yaml
10+
- breaking: gauge is also schown while the clock is displayed but without moving the screen to the right
11+
- breaking: show_icons as default service => remove from yaml
12+
313
## 2023.3.4
414

5-
added: option to not display clock/date #53
6-
added: dynamic set_show_clock
7-
added: on_next_clock trigger
15+
- added: option to not display clock/date #53
16+
- added: dynamic set_show_clock
17+
- added: on_next_clock trigger
818

919
## 2023.3.3
1020

11-
fixed: force_screen skips imediatly to the selected screen
12-
added: hold_time configurable
21+
- fixed: force_screen skips imediatly to the selected screen
22+
- added: hold_time configurable
1323

1424
## 2023.3.2
1525

16-
added: hold_screen for 20 additional seconds
26+
- added: hold_screen for 20 additional seconds
1727

1828
## 2023.3.1
1929

20-
added: del_screen with wildcards
21-
changed: maximum icons to 80
22-
fixed: skip_next
23-
fixed: show_all_icons on boot
30+
- added: del_screen with wildcards
31+
- changed: maximum icons to 80
32+
- fixed: skip_next
33+
- fixed: show_all_icons on boot
2434

2535
## 2023.3.0
2636

README.md

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ There are some "RGB-matrix" status displays/clocks out there, the commercial one
1313

1414
The other d.i.y. solutions have their pros and cons. I tried both and used AwTrix for a long time. But the cons are so big (in my opinion) that I started an esphome.io variant targeted to an optimized Home Assistant integration. The main reason, for me is the Home Assistant integration!
1515

16-
There is a little hype around the Ulanzi TC001 pixel clock. This hardware can be used with **EspHoMaTriX** (with some limitations). You can connect the device and flash it via USB-C. As a starting point you can use the [``UlanziTC001.yaml``](https://github.com/lubeda/EsphoMaTrix/blob/main/UlanziTC001.yaml). Yet the LDR and battery sensor are not perfectly supported. For another use of the hardware see [PixelIT_Ulanzi](https://github.com/aptonline/PixelIt_Ulanzi) firmware.
16+
There is a little hype around the Ulanzi TC001 pixel clock. This hardware can be used with **EspHoMaTriX** (with some limitations). You can connect the device and flash it via USB-C. As a starting point you can use the [``UlanziTC001.yaml``](https://github.com/lubeda/EsphoMaTrix/blob/main/UlanziTC001.yaml). Yet the LDR and battery sensor are not perfectly supported. For another use of the hardware see [PixelIT_Ulanzi](https://github.com/aptonline/PixelIt_Ulanzi) or [AWTRIX-LIGHT](https://github.com/Blueforcer/awtrix-light) firmwares.
1717

1818
See this German tutorial video with information on setting up your display [RGB-LED Status Display für Home Assistant mit ESPHome | ESPHoMaTrix](https://www.youtube.com/watch?v=DTd9vAhet9A).
1919

20+
Another german tutorial video focused at the Ulanzi [Smarte Pixel Clock über Home Assistant steuern - Entitäten / Icons und mehr in der Ulanzi](https://www.youtube.com/watch?v=LgaT0mNbl34)
21+
2022
See this [nice article](https://blakadder.com/esphome-pixel-clock/) about EsphoMaTrix on a Ulanzi TC001 from [blakadder](https://github.com/blakadder).
2123

2224
See this english discussions:
@@ -26,12 +28,11 @@ See this english discussions:
2628
Or in german:
2729
[Showroom](https://community.simon42.com/t/8x32-pixel-uhr-mit-homeassistant-anbindung/1076)
2830

29-
3031
### State
3132

3233
It is a working solution with core functionality coded. Advanced features, like automatic brightness control can be done with esphome actions and automations.
3334

34-
See it in action on [YouTube](https://www.youtube.com/watch?v=ZyaFj7ArIdY) (boring, no sound but subtitles).
35+
See it in action on [YouTube](https://www.youtube.com/watch?v=ZyaFj7ArIdY) (no sound but subtitles).
3536

3637
### Features
3738

@@ -93,7 +94,7 @@ font:
9394
9495
### Icons and Animations
9596
96-
Download and install all needed icons (.jpg/.png) and animations (.gif) under the `ehmtx:` key. All icons are automagically scaled to 8x8 on compile-time. This doesn't work well for gif's, you will have to resize them beforehand!
97+
Download and install all needed icons (.jpg/.png) and animations (.gif) under the `ehmtx:` key. All icons have to be 8x8 or 8x32 piksels.
9798

9899
You can also specify an 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.
99100

@@ -123,7 +124,7 @@ First defined icon will be used as a fallback icon in case of an error, e.g. if
123124

124125
GIFs are limited to 16 frames to limit the flash space. The first icon in your list is the fallback.
125126

126-
All other solutions provide ready made icons, especially Lametric has a big database of [icons](https://developer.lametric.com/icons). Please check the copyright of the icons you use. The amount of icons is limited to 64 in the code and also by the flash space and the RAM of your board.
127+
All other solutions provide ready made icons, especially Lametric has a big database of [icons](https://developer.lametric.com/icons). Please check the copyright of the icons you use. The amount of icons is limited to 80 in the code and also by the flash space and the RAM of your board.
127128

128129
***Parameters***
129130

@@ -165,17 +166,6 @@ esphome:
165166
id(rgb8x32)->show_all_icons();
166167
```
167168

168-
Here you can show all of your icons via a service call:
169-
170-
```yaml
171-
api:
172-
services:
173-
- service: icons
174-
then:
175-
lambda: |-
176-
id(rgb8x32)->show_all_icons();
177-
```
178-
179169
### esphome custom component
180170

181171
#### local use
@@ -266,6 +256,8 @@ binary_sensor:
266256
267257
**date_format** (Optional, string): formats the date display with [strftime syntax](https://esphome.io/components/time.html?highlight=strftime), defaults `"%d.%m."` (use `"%m.%d."` for the US)
268258
259+
**show_seconds** (Optional, boolean): toggle an indicator for seconds while the clock is displayed (default: false))
260+
269261
**time_format** (Optional, string): formats the date display with [strftime syntax](https://esphome.io/components/time.html?highlight=strftime), defaults `"%H:%M"` (use `"%I:%M%p"` for the US)
270262
271263
**yoffset** (Optional, pixel): yoffset the text is aligned BASELINE_LEFT, the baseline defaults to `6`
@@ -320,7 +312,7 @@ There is a trigger available to do some local magic. The trigger ```on_next_scre
320312

321313
See the examples:
322314

323-
##### Write information to log
315+
##### Write information to homeassistant log
324316

325317
```yaml
326318
ehmtx:
@@ -407,7 +399,7 @@ Force the selected screen ```icon_name``` to be displayed next. Afterwards the l
407399
icon_name: !lambda return icon_name;
408400
```
409401

410-
##### Set (text/alarm/clock/weekday/today) color action
402+
##### Set (alarm/clock/gauge/text/today/weekday) color action
411403

412404
Sets the color of the select element
413405

@@ -423,11 +415,12 @@ You have to use use id of your ehmtx component, e.g. `rgb8x32`
423415

424416
valid elements:
425417

426-
- `ehmtx.text.color:`
427418
- `ehmtx.alarm.color:`
428419
- `ehmtx.clock.color:`
429-
- `ehmtx.weekday.color:`
420+
- `ehmtx.gauge.color:`
421+
- `ehmtx.text.color:`
430422
- `ehmtx.today.color:`
423+
- `ehmtx.weekday.color:`
431424
- ```red, green, blue```: the color components (`0..255`) _(default = `80`)_
432425

433426
*Example*
@@ -458,29 +451,6 @@ esphome:
458451
blue: !lambda return 30;
459452
```
460453

461-
##### Indicator on
462-
463-
The indicator is a static colored corner on the display.
464-
465-
You have to use use id of your ehmtx component, e.g. ```rgb8x32```
466-
467-
```yaml
468-
- ehmtx.indicator.on:
469-
id: rgb8x32
470-
red: !lambda return r;
471-
green: !lambda return g;
472-
blue: !lambda return b;
473-
```
474-
475-
- ```red, green, blue```: the color components (0..255) (default=80)
476-
477-
##### Indicator off
478-
479-
```yaml
480-
- ehmtx.indicator.off:
481-
id: rgb8x32
482-
```
483-
484454
##### Add screen to loop
485455

486456
```yaml
@@ -506,7 +476,7 @@ Adapt all other data in the yaml to your needs, I use GPIO04/GPIO16 (esp8266/ESP
506476

507477
## Integration in Home Assistant
508478

509-
To control your display it has to be integrated in Home Assistant. Then it provides at least three services, all prefixed with the configured `devicename` e.g. "ehmtx". See the [sample yaml](https://github.com/lubeda/EsphoMaTrix/blob/main/ehmtx32.yaml) for the default services, but you can add your own.
479+
To control your display it has to be integrated in Home Assistant. Then it provides a number of services, all prefixed with the configured `devicename` e.g. "ehmtx". See the default services marked as **(D)** [below](https://github.com/lubeda/EsphoMaTrix#services), but you can add your own.
510480

511481
### Use the light component
512482

@@ -529,7 +499,7 @@ light:
529499

530500
### Services
531501

532-
All communication with Home Assistant use the homeasistant-api. The services are defined in the yaml. To define the services you need the id of the ehmtx-component e.g. ```id(rgb8x32)```.
502+
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)```.
533503

534504
*Example*
535505

@@ -545,7 +515,7 @@ api:
545515
id(rgb8x32)->add_screen(icon_name, text, 7, true); // 7 Minutes alarm=true
546516
```
547517

548-
Service **_brightness**
518+
**(D)** Service **brightness**
549519

550520
Sets the overall brightness of the display (`0..255`)
551521

@@ -569,7 +539,7 @@ number:
569539
id(rgb8x32)->set_brightness(x);
570540
```
571541

572-
Service **_screen**
542+
Service **screen**
573543

574544
Queues a screen with an icon/animation and a text. There can only be one text per icon id. If you need to show e.g. an indoor and an outdoor temperature you have to use different icon id's!
575545

@@ -580,7 +550,7 @@ _parameters:_
580550
- ```icon_name```: The number of the predefined icons (see installation)
581551
- ```text```: The text to be displayed
582552

583-
Service **_screen_t**
553+
Service **screen_t**
584554

585555
Same as above with a special duration paremeter. E.g. to indicate someone's birthday you can use `24*60` for 1440 minutes.
586556

@@ -590,7 +560,7 @@ _parameters:_
590560
- ```text```: The text to be displayed
591561
- ```duration```: The lifetime in minutes
592562

593-
Service **_alarm**
563+
Service **alarm**
594564

595565
Alarm is like a regular screen but it is displayed two minutes longer and has a red text color and a red marker in the upper right corner.
596566

@@ -599,7 +569,7 @@ _parameters:_
599569
- ```icon_name```: The name of the predefined icon id (see installation)
600570
- ```text```: The text to be displayed
601571

602-
Service **del_screen**
572+
**(D)** Service **del_screen**
603573

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

@@ -611,7 +581,9 @@ _parameters:_
611581

612582
- ```icon_name```: Icon `id` defined in the yaml (see installation)
613583

614-
Service **indicator_on**
584+
**(D)** Service **indicator_on** / **indicator_off**
585+
586+
Turns indicator on/off
615587

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

@@ -621,13 +593,19 @@ _parameters:_
621593
- ```g``` green in 0..255
622594
- ```b``` blue in 0..255
623595

624-
Service **indicator_off**
596+
**(D)** Service **alarm_color** / **clock_color** / **gauge_color** / **text_color** / **today_color** / **weekday_color**
625597

626-
removes the indicator
598+
Set the color of the named text-type
627599

628-
Service **display_on** / **display_off**
600+
_parameters:_
629601

630-
turns the display on or off
602+
- ```r``` red in 0..255
603+
- ```g``` green in 0..255
604+
- ```b``` blue in 0..255
605+
606+
**(D)** Service **display_on** / **display_off**
607+
608+
Turns the display on or off
631609

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

@@ -666,7 +644,7 @@ binary_sensor:
666644

667645
Service **hold_screen**
668646

669-
displays the current screen for configured ammount (see **hold_time**) (default=20) seconds longer.
647+
Displays the current screen for configured ammount (see **hold_time**) (default=20) seconds longer.
670648

671649
e.g. on the Ulanzi TC001
672650

@@ -682,7 +660,7 @@ binary_sensor:
682660
```
683661
684662
685-
Service **status**
663+
**(D)** Service **status**
686664
687665
This service displays the running queue and a list of icons in the logs
688666
@@ -699,6 +677,19 @@ This service displays the running queue and a list of icons in the logs
699677
[13:10:10][I][EHMTX:186]: status icon: 4 name: rain
700678
```
701679

680+
**(D)** Service **show_all_icons**
681+
682+
Display all of your icons sequentially by ID.
683+
684+
Service **gauge_value** / **gauge_off**
685+
686+
**(D)** Turns gauge on/off
687+
Displays a colored gauge. You can define the color by parameter.
688+
689+
_parameters:_
690+
691+
- ```percent``` gauge percentage
692+
702693
### Use in Home Assistant automations
703694

704695
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.
@@ -902,6 +893,11 @@ There is an optional [notifier custom component](https://github.com/lubeda/EHMTX
902893

903894
- 2022.6.1 removed image types only `rgb565` is valid!
904895
- 2023.2.0 removed awtrix icon `awtrixid` support
896+
- 2023.3.5 removed automatic scaling of images and animations
897+
- 2023.3.5 added status,display_on,display_off as default service => remove these from your yaml
898+
- 2023.3.5 added indicator_on/off as default services => remove these from your yaml
899+
- 2023.3.5 added *_color as default services => remove these from your yaml
900+
- 2023.3.5 added show_all_icons,gauge_percent/gauge_off as default services => remove these from your yaml
905901

906902
## Usage
907903
The integration works with the Home Assistant api so, after boot of the device, it takes a few seconds until the service calls start working.

0 commit comments

Comments
 (0)