You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+53-57Lines changed: 53 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,12 @@ There are some "RGB-matrix" status displays/clocks out there, the commercial one
13
13
14
14
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!
15
15
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.
17
17
18
18
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).
19
19
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
+
20
22
See this [nice article](https://blakadder.com/esphome-pixel-clock/) about EsphoMaTrix on a Ulanzi TC001 from [blakadder](https://github.com/blakadder).
It is a working solution with core functionality coded. Advanced features, like automatic brightness control can be done with esphome actions and automations.
33
34
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).
35
36
36
37
### Features
37
38
@@ -93,7 +94,7 @@ font:
93
94
94
95
### Icons and Animations
95
96
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.
97
98
98
99
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.
99
100
@@ -123,7 +124,7 @@ First defined icon will be used as a fallback icon in case of an error, e.g. if
123
124
124
125
GIFs are limited to 16 frames to limit the flash space. The first icon in your list is the fallback.
125
126
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.
127
128
128
129
***Parameters***
129
130
@@ -165,17 +166,6 @@ esphome:
165
166
id(rgb8x32)->show_all_icons();
166
167
```
167
168
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
-
179
169
### esphome custom component
180
170
181
171
#### local use
@@ -266,6 +256,8 @@ binary_sensor:
266
256
267
257
**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)
268
258
259
+
**show_seconds** (Optional, boolean): toggle an indicator for seconds while the clock is displayed (default: false))
260
+
269
261
**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)
270
262
271
263
**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
320
312
321
313
See the examples:
322
314
323
-
##### Write information to log
315
+
##### Write information to homeassistant log
324
316
325
317
```yaml
326
318
ehmtx:
@@ -407,7 +399,7 @@ Force the selected screen ```icon_name``` to be displayed next. Afterwards the l
407
399
icon_name: !lambda return icon_name;
408
400
```
409
401
410
-
##### Set (text/alarm/clock/weekday/today) color action
402
+
##### Set (alarm/clock/gauge/text/today/weekday) color action
411
403
412
404
Sets the color of the select element
413
405
@@ -423,11 +415,12 @@ You have to use use id of your ehmtx component, e.g. `rgb8x32`
423
415
424
416
valid elements:
425
417
426
-
- `ehmtx.text.color:`
427
418
- `ehmtx.alarm.color:`
428
419
- `ehmtx.clock.color:`
429
-
- `ehmtx.weekday.color:`
420
+
- `ehmtx.gauge.color:`
421
+
- `ehmtx.text.color:`
430
422
- `ehmtx.today.color:`
423
+
- `ehmtx.weekday.color:`
431
424
- ```red, green, blue```: the color components (`0..255`) _(default = `80`)_
432
425
433
426
*Example*
@@ -458,29 +451,6 @@ esphome:
458
451
blue: !lambda return 30;
459
452
```
460
453
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
-
484
454
##### Add screen to loop
485
455
486
456
```yaml
@@ -506,7 +476,7 @@ Adapt all other data in the yaml to your needs, I use GPIO04/GPIO16 (esp8266/ESP
506
476
507
477
## Integration in Home Assistant
508
478
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.
510
480
511
481
### Use the light component
512
482
@@ -529,7 +499,7 @@ light:
529
499
530
500
### Services
531
501
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)```.
Sets the overall brightness of the display (`0..255`)
551
521
@@ -569,7 +539,7 @@ number:
569
539
id(rgb8x32)->set_brightness(x);
570
540
```
571
541
572
-
Service **_screen**
542
+
Service **screen**
573
543
574
544
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!
575
545
@@ -580,7 +550,7 @@ _parameters:_
580
550
- ```icon_name```: The number of the predefined icons (see installation)
581
551
- ```text```: The text to be displayed
582
552
583
-
Service **_screen_t**
553
+
Service **screen_t**
584
554
585
555
Same as above with a special duration paremeter. E.g. to indicate someone's birthday you can use `24*60` for 1440 minutes.
586
556
@@ -590,7 +560,7 @@ _parameters:_
590
560
- ```text```: The text to be displayed
591
561
- ```duration```: The lifetime in minutes
592
562
593
-
Service **_alarm**
563
+
Service **alarm**
594
564
595
565
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.
596
566
@@ -599,7 +569,7 @@ _parameters:_
599
569
- ```icon_name```: The name of the predefined icon id (see installation)
600
570
- ```text```: The text to be displayed
601
571
602
-
Service **del_screen**
572
+
**(D)** Service **del_screen**
603
573
604
574
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.
605
575
@@ -611,7 +581,9 @@ _parameters:_
611
581
612
582
- ```icon_name```: Icon `id` defined in the yaml (see installation)
613
583
614
-
Service **indicator_on**
584
+
**(D)** Service **indicator_on** / **indicator_off**
585
+
586
+
Turns indicator on/off
615
587
616
588
Display a colored corner on all screens and the clock. You can define the color by parameter.
There's an easier way in using a switch component:
633
611
@@ -666,7 +644,7 @@ binary_sensor:
666
644
667
645
Service **hold_screen**
668
646
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.
670
648
671
649
e.g. on the Ulanzi TC001
672
650
@@ -682,7 +660,7 @@ binary_sensor:
682
660
```
683
661
684
662
685
-
Service **status**
663
+
**(D)** Service **status**
686
664
687
665
This service displays the running queue and a list of icons in the logs
688
666
@@ -699,6 +677,19 @@ This service displays the running queue and a list of icons in the logs
699
677
[13:10:10][I][EHMTX:186]: status icon: 4 name: rain
700
678
```
701
679
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
+
702
693
### Use in Home Assistant automations
703
694
704
695
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
902
893
903
894
- 2022.6.1 removed image types only `rgb565` is valid!
904
895
- 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
905
901
906
902
## Usage
907
903
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