kotope / esphome_eink_dashboard

Home Assistant Dashboard for LilyGO T5 4.7 E-Ink display
62 stars 7 forks source link

Build error on EspHome 10.6 (and probably earlier) #2

Closed ZogKarndon closed 10 months ago

ZogKarndon commented 10 months ago

I'm trying to build an e-ink dashboard, but when I build the YAML, I get an error: AttributeError: module 'esphome.components.display' has no attribute 'DisplayBufferRef'

I did some googling, and this seems to be a problem across the various ESPHome lilygo display drivers, and nobody has merged the fix yet.

Who should I follow up with to resolve this? I'd really like to get this started...

Thanks, Eric

kotope commented 10 months ago

Hi! You're absolutely right, this won't compile properly with the latest ESPHome. (I haven't updated my e-ink display for ages).

I'll try to look into this soon to see if I can find a replacement lib or make a fork and fix it on my own.

kotope commented 10 months ago

T547 library changed to made it compile with 2023.11.0 ESPHome.

ZogKarndon commented 10 months ago

I picked up your changes, and I no longer get errors about the display component, but I do still get errors about the time component:

Compiling .pioenvs/eink-dashboard/src/main.cpp.o
/config/esphome/eink-dashboard.yaml: In lambda function:
/config/esphome/eink-dashboard.yaml:350:24: error: 'esphome::time::ESPTime' has not been declared
         auto t = time::ESPTime::from_c_tm(&tp, c_t);
                        ^~~~~~~
/config/esphome/eink-dashboard.yaml:448:29: error: 'esphome::time::ESPTime' has not been declared
             auto dt = time::ESPTime::from_c_tm(&timeParsed, c_time);

I did some searching, and I couldn't find a reference to ESPTime on the web (as such).

kotope commented 10 months ago

I picked up your changes, and I no longer get errors about the display component, but I do still get errors about the time component:

Compiling .pioenvs/eink-dashboard/src/main.cpp.o
/config/esphome/eink-dashboard.yaml: In lambda function:
/config/esphome/eink-dashboard.yaml:350:24: error: 'esphome::time::ESPTime' has not been declared
         auto t = time::ESPTime::from_c_tm(&tp, c_t);
                        ^~~~~~~
/config/esphome/eink-dashboard.yaml:448:29: error: 'esphome::time::ESPTime' has not been declared
             auto dt = time::ESPTime::from_c_tm(&timeParsed, c_time);

I did some searching, and I couldn't find a reference to ESPTime on the web (as such).

Do you have any own changes in the code? I double checked and there's no 'time::' anymore in my code. If you have it on yours, remove the time:: prior the ESPTime::

(The namespace of ESPTime has changed in the ESPHome)

ZogKarndon commented 10 months ago

Man, I stared at those lines in your version, and just didn't notice the difference.

So, everything compiles now, but when I try to upload it to my LilyGo Screen-4.7-S3, the LilyGo goes into a boot loop. I recovered by pressing the STR_IO0 button while resetting, but that doesn't help me get the LilyGo going :)

Any ideas where to start? I'm a novice at embedded debugging....

ZogKarndon commented 10 months ago

A good part of the problem is that LilyGo completely revamped the IO mappings on their latest iteration of the card, so if you buy a LilyGo T5-4.7 today, you won't be able to use this ESPHome configuration at all.

I'm futzing around with the specs, and if I can manage to get this to work, I'll send a pull request. Either that, or I'll fork the repo (as my sensors don't match yours, unsurprisingly)