Door monitor using ESPHome, an esp32, and an ili9341 TFT LCD

preview_player
Показать описание
ESPHome code and case model can be found at:

Рекомендации по теме
Комментарии
Автор

@dorffmaister Thank you so much for the work you have put behind this project. I have been trying to follow your steps but I cant seem to validate the yaml code on esp home. Any way you could go into more detail on how to "Connect" everything together.

What I am trying to accomplish with the display is to show the parameters of my car which is already linked to HA, and possibly have 2 buttons as well.

Thank you,
tommi

MrTommibru
Автор

HI,
I have graphic lcd 128x64 and displaying some info on it, but I struggle to display external sensor data.
here is the yaml code: any suggestion is highly appreciated

sensor:
- platform: homeassistant
id: Temp_vode
entity_id: sensor.temperatura_vode
internal: true
- platform: homeassistant
id: Temp_sever
entity_id: sensor.temperatura_sever
internal: true


display:
- platform: st7920
width: 128
height: 64
update_interval: 1s
cs_pin:
number: GPIO15 #4
inverted: true
lambda: |-
it.print(0, 3, id(comics), "Hello World!");
it.printf(0, 28, id(comics), "temp.vode: %.0f°c", id(Temp_vode).state);
it.printf(0, 15, id(comics), "temp.sever: %.1f°c", id(Temp_sever).state);
it.strftime(2, 45, id(ARIBL0), "%H:%M %d.%m.%Y", id(my_time).now());
it.rectangle(0, 48, 128, 15);

ZoomtronicBlogspot
Автор

Can I mention you on Steve’s server as I feel my questions might be helpful to us there and that is a nice environment. I have a few things that I hope to get your opinion on and I don’t think you are trying to monetize your channel so loss of comments here might not be an issue?? Ok I think I already posted a link to this video there and only warned you I might be asking…questions….😮

BELSERVICEMAN
Автор

I cannot get this to work for the life of me.

Compiling
In file included from src/room-time-temp.h:1,
from src/main.cpp:66:
src/display-panel.h:53:27: error: 'Font' in namespace 'esphome::display' does not name a type
esphome::display::Font* font;
^~~~
src/display-panel.h:56:27: error: 'Image' in namespace 'esphome::display' does not name a type
esphome::display::Image* image = NULL;
^~~~~
src/display-panel.h:56:9: note: suggested alternative: 'BaseImage'
esphome::display::Image* image = NULL;

BaseImage
src/display-panel.h: In member function 'void
src/display-panel.h:133:17: error: 'image' was not declared in this scope
if (image != NULL) {
^~~~~
src/display-panel.h: In member function 'void DisplayPanel::printMulti(esphome::display::DisplayBuffer&, >&)':
src/display-panel.h:153:17: error: expected primary-expression before '->' token
font->measure("M", &width, &x_offset, &textHeight, &height);
^~
src/display-panel.h:164:25: error: expected primary-expression before ', ' token
font, textColor, TextAlign::TOP_CENTER, line.c_str());
^
src/display-panel.h: In member function 'void DisplayPanel::printMiddle(esphome::display::DisplayBuffer&, const char*)':
src/display-panel.h:176:21: error: expected primary-expression before ', ' token
font, textColor, TextAlign::CENTER, text);
^
src/display-panel.h: In member function 'void
src/display-panel.h:181:33: error: 'image' was not declared in this scope
display.image(x, y, image);
^~~~~
In file included from src/main.cpp:66:
src/room-time-temp.h: In function 'void
src/room-time-temp.h:50:15: error: 'class DisplayPanel' has no member named 'font'
timePanel.font = font_time;
^~~~
src/room-time-temp.h:54:16: error: 'class DisplayPanel' has no member named 'font'
alarmPanel.font = font_alarm;
^~~~
src/room-time-temp.h:58:15: error: 'class DisplayPanel' has no member named 'font'
datePanel.font = font_date;
^~~~
src/room-time-temp.h:62:22: error: 'class DisplayPanel' has no member named 'font'
insideLabelPanel.font = font_temp_label;
^~~~
src/room-time-temp.h:67:21: error: 'class DisplayPanel' has no member named 'font'
insideTempPanel.font = font_temp;
^~~~
src/room-time-temp.h:71:23: error: 'class DisplayPanel' has no member named 'font'
outdoorLabelPanel.font = font_temp_label;
^~~~
src/room-time-temp.h:76:22: error: 'class DisplayPanel' has no member named 'font'
outdoorTempPanel.font = font_temp;
^~~~
In lambda function:
error: invalid initialization of reference of type from expression of type 'esphome::display::Display'
initializePanels(it);
^~
In file included from src/main.cpp:66:
src/room-time-temp.h:47:6: note: in passing argument 1 of 'void
void &display) {

Compiling
*** Error 1
[FAILED] Took 8.36 seconds

zarovich