agillis / esphome-configs

ESPHome config files for my devices
MIT License
22 stars 2 forks source link

Compiling SDL notes #1

Open nickrout opened 1 month ago

nickrout commented 1 month ago

Hi Andrew. Just trying your SDL samples on my ubuntu (actually mint) laptop and wanted to make some notes while I remember them, and maye for your benefit in documentation. (1 & 3 are dos matters, 2 looks like an error, although I know you are probably refactoring)

  1. need to install pilllow and cairosvg from pip in the venv that is running esphome
  2. needed to add 'modules' to line 37 of sdl-lvgl_elegant_clock.yaml so it reads files: [modules/common/color.yaml]
  3. needed to add keys for encryption_key, latitude and longitiude in secrets.yaml

I think that's all.

agillis commented 1 month ago

Great. Thanks.

  1. This is covered in the install documentation on the ESPHome site
  2. Changed.
  3. This sort of thing is required for any ESPhome install. But I'll add a comment that this is required.

Let me know how it goes and if you come up with any other cool clock faces!

nickrout commented 1 month ago

Thanks, I missed the cairosvg myself, to may be an idea to add it just for emphasis. Entirely up to you of course. The compile message from missing cairosvg is quite different to the compile error for pillow. pillow gives an easy to implement pip install line in the errors. cairosvg missing gives a difficult to decipher error.

The clock is cool, and down to the second with my smart watch. Fun to watch them tick in unison. I like my smart watch face so much I may try to emulate it, but I am no artist!

agillis commented 1 month ago

Do you have a picture of the smart watch?

nickrout commented 1 month ago

Sorry for the delay, I was trying to find a pic online, and here we have a pic at last. Its called Trace of Time and is a Oneplus Watch 2 face. 1000000423

nickrout commented 1 month ago

I have been trying to make a black clock face, but there are some oddities

image

You may notice that the marks at 12, 24, 36 and 48 minutes do not look right (are a little short) and the 0 minute doesn't quite line up.The changes from yours are very minimal, basically changing white to black.

diff sdl-lvgl_elegant_clock.yaml sdl-lvgl_elegant_clock-nick.yaml 
202c202,203
<                   bg_color: White
---
>                   bg_color: Black
>                   border_width: 0                  
210c211
<                         color: Black
---
>                         color: White
221c222
<                             color: Black
---
>                             color: White
232c233
<                         color: Black                       
---
>                         color: White                       
243c244
<                             color: Black
---
>                             color: White

Needless to say, yours looks fine. Any tips?