Vielen dank an, Dr.Jones für die Bereitstellung seines Projektes.


Pinbelegung:
Display –> ESP-Wromm32
CS ———–> GPIO27
Reset ——–> GPIO5
D/C ———-> GPIO26
SDI(MOSI)—-> GPIO23
SCK ———-> GPIO18
LED ———-> GPIO4
SDO(MISO) –>GPIO19

Empfohlene Produkte
Ausgewählte Empfehlungen für dein Smart Home Projekt
Vielen dank an, Dr.Jones für die Bereitstellung seines Projektes.


Pinbelegung:
Display –> ESP-Wromm32
CS ———–> GPIO27
Reset ——–> GPIO5
D/C ———-> GPIO26
SDI(MOSI)—-> GPIO23
SCK ———-> GPIO18
LED ———-> GPIO4
SDO(MISO) –>GPIO19
Shopping-Empfehlungen
Weitere empfohlene Produkte für dein Smart Home
1display:
2 - platform: ili9341
3 model: TFT_2.4
4 cs_pin: 27
5 dc_pin: 26
6 led_pin: 4
7 reset_pin: 5
8 rotation: 270
9
10spi:
11 clk_pin: 18
12 mosi_pin: 23
13 miso_pin: 19
14
15output:
16 - platform: ledc
17 pin: 4
18 id: gpio_4_backlight_pwm
19
20light:
21 - platform: monochromatic
22 output: gpio_4_backlight_pwm
23 name: "Touchdisplay Licht"
24 id: back_light
25 restore_mode: ALWAYS_ON1font:
2 - file: 'arial.ttf'
3 id: font1
4 size: 20
5 glyphs:
6 ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
7 '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
8 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
9 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
10 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
11 'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/']
12
13 - file: 'arial.ttf'
14 id: font2
15 size: 24
16 glyphs:
17 ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
18 '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
19 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
20 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
21 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
22 'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/']
23
24color:
25 - id: my_red
26 red: 100%
27 green: 0%
28 blue: 0%
29 - id: my_green
30 red: 0%
31 green: 100%
32 blue: 0%
33 - id: my_blue
34 red: 0%
35 green: 0%
36 blue: 100%
37 - id: my_turkis
38 red: 5%
39 green: 50%
40 blue: 80%
41 - id: my_yellow
42 red: 100%
43 green: 100%
44 blue: 0%1lambda: |-
2 it.printf(145, 60, id(font1), my_red, "Smarthome yourself");1text_sensor:
2 - platform: homeassistant
3 id: wetter_ani
4 entity_id: weather.dwd_weather_berlin_brandenburg
5 filters:
6 - substitute:
7 - "sunny -> sonnig"
8 - "partlycloudy -> teilweise wolkig"
9 - "rainy -> Regen"
10 - "windy -> windig"
11 - "snowy -> Schnee"
12 - "lightning -> Gewitter"
13 - "cloudy -> wolkig"
14
15 - platform: homeassistant
16 id: windgeschwindigkeit
17 entity_id: weather.dwd_weather_berlin_brandenburg1it.printf(145, 80, id(font1), id(wetter_ani).state.c_str());
2 it.printf(145, 98, id(font1), "Wind: %.1f km/h", id(wind_speed).state);1esphome:
2 name: touchdisplay
3 platform: ESP32
4 board: nodemcu-32s
5 platformio_options:
6 upload_speed: 921600
7 monitor_speed: 115200
8
9
10logger:
11
12api:
13
14ota:
15 password: "cc3e253e9022dac095965c5e0563989d"
16
17wifi:
18 ssid: SSID
19 password: "PASSWORT"
20 power_save_mode: none
21 output_power: 20dB
22
23 ap:
24 ssid: "Touchdisplay Fallback Hotspot"
25 password: "xVxOKhNVKpWm"
26
27captive_portal:
28
29sensor:
30 - platform: homeassistant
31 id: temp_keller
32 entity_id: sensor.temp_keller
33
34 - platform: homeassistant
35 id: temp_aussen
36 entity_id: sensor.temp_aussen
37
38 - platform: homeassistant
39 id: wind_speed
40 entity_id: sensor.wind_speed
41
42
43 - platform: homeassistant
44 id: ha_disk_use
45 entity_id: sensor.disk_use
46
47 - platform: homeassistant
48 id: phase_a
49 entity_id: sensor.shellyem3_c45bbe6c1e95_channel_a_power
50
51 - platform: homeassistant
52 id: phase_b
53 entity_id: sensor.shellyem3_c45bbe6c1e95_channel_b_power
54
55 - platform: homeassistant
56 id: phase_c
57 entity_id: sensor.shellyem3_c45bbe6c1e95_channel_c_power
58
59binary_sensor:
60 - platform: homeassistant
61 id: lino
62 entity_id: binary_sensor.pet_lino
63
64time:
65 - platform: homeassistant
66 id: homeassistant_time
67
68text_sensor:
69 - platform: homeassistant
70 id: abfall_naechster
71 entity_id: sensor.abfallnaechster
72
73 - platform: homeassistant
74 id: nachster_abfall
75 entity_id: sensor.nachster_abfall
76
77 - platform: homeassistant
78 id: wetter_ani
79 entity_id: weather.dwd_weather_berlin_brandenburg
80 filters:
81 - substitute:
82 - "sunny -> sonnig"
83 - "partlycloudy -> teilweise wolkig"
84 - "rainy -> Regen"
85 - "windy -> windig"
86 - "snowy -> Schnee"
87 - "lightning -> Gewitter"
88 - "cloudy -> wolkig"
89
90 - platform: homeassistant
91 id: windgeschwindigkeit
92 entity_id: weather.dwd_weather_berlin_brandenburg
93
94
95font:
96 - file: 'arial.ttf'
97 id: font1
98 size: 20
99 glyphs:
100 ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
101 '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
102 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
103 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
104 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
105 'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/']
106
107 - file: 'arial.ttf'
108 id: font2
109 size: 24
110 glyphs:
111 ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
112 '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
113 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
114 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
115 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
116 'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/']
117
118color:
119 - id: my_red
120 red: 100%
121 green: 0%
122 blue: 0%
123 - id: my_green
124 red: 0%
125 green: 100%
126 blue: 0%
127 - id: my_blue
128 red: 0%
129 green: 0%
130 blue: 100%
131 - id: my_turkis
132 red: 5%
133 green: 50%
134 blue: 80%
135 - id: my_yellow
136 red: 100%
137 green: 100%
138 blue: 0%
139
140image:
141 - file: "image.jpg"
142 id: my_image
143 type: RGB24
144
145 - file: "smarthomeinberlin.png"
146 id: my_logo
147 resize: 70x70
148 type: RGB24
149
150 - file: "temp.gif"
151 id: thermometer
152 - file: "trash.gif"
153 id: trash
154
155
156display:
157 - platform: ili9341
158 model: TFT_2.4
159 cs_pin: 27
160 dc_pin: 26
161 led_pin: 4
162 reset_pin: 5
163 rotation: 270
164 lambda: |-
165 it.printf(2, 5, id(font1), "HA Disk use");
166 it.printf(115, 5, id(font1), "%.1fGB", id(ha_disk_use).state);
167 it.image(250, 5, id(my_logo));
168 it.line(0, 80, 400, 80);
169 it.printf(25, 30, id(font1), "Abholung");
170 it.print(0, 55, id(font1), id(nachster_abfall).state.c_str());
171 it.printf(2, 80, id(font1), "Aussen: %.1f°C", id(temp_aussen).state);
172 it.printf(2, 98, id(font1), "Innen: %.1f°C", id(temp_keller).state);
173 it.printf(145, 80, id(font1), id(wetter_ani).state.c_str());
174 it.printf(145, 98, id(font1), "Wind: %.1f km/h", id(wind_speed).state);
175 it.line(0, 121, 400, 121);
176 it.image(0, 30, id(trash));
177 it.line(140, 122, 140, 240);
178 it.printf(145, 120, id(font1), my_red, "Stromverbrauch");
179 it.printf(235, 140, id(font1), "%.1f W", id(phase_a).state);
180 it.printf(235, 160, id(font1), "%.1f W", id(phase_b).state);
181 it.printf(235, 180, id(font1), "%.1f W", id(phase_c).state);
182 it.printf(145, 140, id(font1), my_green, "Phase A");
183 it.printf(145, 160, id(font1), my_turkis, "Phase B");
184 it.printf(145, 180, id(font1), my_yellow, "Phase C");
185 it.printf(2, 122, id(font1), "Lino: %s", id(lino).state ? "Zuhause" : "Draussen");
186 it.line(140, 205, 340, 205);
187 it.strftime(150, 210, id(font2), "%H:%M %d.%m.%y", id(homeassistant_time).now());
188
189spi:
190 clk_pin: 18
191 mosi_pin: 23
192 miso_pin: 19
193
194output:
195 - platform: ledc
196 pin: 4
197 id: gpio_4_backlight_pwm
198
199light:
200 - platform: monochromatic
201 output: gpio_4_backlight_pwm
202 name: "Touchdisplay Licht"
203 id: back_light
204 restore_mode: ALWAYS_ON