Air Quality Sensors + E-Ink Display using ESPHome

It’s work ! Are you on the French discord ?

Hi @makai,
Thanks for sharing the project.
Can I use waveshare 7,5” e-ink display that uses red color along with black and white?
https://www.waveshare.com/7.5inch-hd-e-paper-b.htm

I would like to use red color to accent high values.

I have other question regarding 3D printed case, the finish on the 3D printed materials always feels cheap and not smooth at all, do you have some method where it would turn out like a molded plastic?

ESPHome does not currently support color for displays. So only the “black and white” 7.5" display is supported and the red one won’t work at all.

Regarding the case, I have no idea :man_shrugging:

Thanks @makai!
Is the 7,5” Display with 880x528 resolution supported, or just the one with 800x480?

Supported model are in the documentation:

That is true, but there are more than one 4.2 inch version sold by WaveShare.

This thread seems to indicate that the higher res version of the 7.5 in is not supported by esphome, I think the same would apply to the higher res 4.2 in. Waveshare e-ink paper 7.5 HD display support

Hey, did anyone with this project managed to trigger only partial updates in the 4.2 inches screen?

I seem to have a full update every 60s (my update interval). Which means that 1) I only see the temperature updates every minute 2) the update is ugly (I hate the going to black, white and render). The second point is what is killing me.

I was hoping to be able to only do full refresh every 30 min or so.

I have seen this guy on youtube that manages to do partial updates using the same hardware (min 9:30 of the video). He does it directly using arduino IDE.

Thanks!

There is an option (full_update_every) in ESPHome for this but it is not available for this display…

I saw it yes, but with the same hardware (esp32) and screen the guy in the video I shared was able to. That’s why I was wondering whether there is any hidden (or not that obvious) option available.

If not, how did you deal with the full update in this project? I don’t think if I go with the constant full update I will pass the WAT (wife acceptance test) XD

I’ve checked the code and the refresh command for this screen is not implemented, so nothing hidden.
Well my screen do a full refresh every minute and we are used to now.

But now that we know that partial refresh works, we need to do some coding! (Or find someone able to do it :stuck_out_tongue_winking_eye:)

1 Like

I wish I were! It “only” took me 40 min to be able to find which code you were referring too (I think is this one)

I will open a feature request.

Thanks!

1 Like

This is how my project looks like (looking for a nice wood frame now :)). Few questions in case someone can help me:

  • Which font do you recommend? While this one looks nice, I am not super convinced with it´s resolution, specially in the tiny font (P.S I know I need to fix the º symbol)
  • I´d like to add some visual cue to the circle to show the AQI (value 1-10). Suggestions? I thought about uploading 10 different circle images but the quality is terrible
  • Any other feedback or suggestions?

Thanks a lot

4 Likes

Nice project!

Regarding fonts, I used this website to choose the one: https://fonts.google.com

1 Like

Very cool project. Any progress on the case?

No… I plan to do it in 2021 :crossed_fingers:

2 Likes

This project is very nice!

That’s why I started building it with ESP32 and 4.2" e-Paper display. I get static text to appear to display, but not sensor value, which exists and is working in HA.

I’ve defined the sensor like this:

sensor:
  - platform: homeassistant
    id: outside_temperature
    entity_id: sensor.viking_02811_88_00_temperature
    internal: true

and I try to print it to display like this.

    lambda: |-
      it.print(5, 5, id(bebas_font), "Hello World!");
      
      if (id(outside_temperature).has_state()) {
        it.printf(130, 60, id(bebas_font), TextAlign::BASELINE_LEFT , "%.1f°", id(outside_temperature).state);
      }

ESP32 connects to wifi just fine and HA is able to update the ESP32 OTA, but the program never prints anything from the sensor, not initially and not after refreshes. If I take away the “if” part, I get NaN text on display. I have just about similar printf code working with ESP32 and a small display (not e-Paper) - that is why I’m a bit confused.

Any ideas what could be wrong? How to debug this?

SOLVED: Oh my, I just forgot to add the ESPHome integration in HA…

1 Like

I’ve updated my ESPHome code because I’m no more using DarkSky as it will be removed soon. My code should now work with all maintained weather integrations and you can now copy/paste my code without issues related to fonts.

1 Like

This is awesome. Can you post your code for the Display section?

How do you calculate the AQI Value?

Thanks

Here it goes. I never got to finish it because without partial refresh did not pass the WAT (Wife Acceptance Test) and because I broke it when trying to frame it (and did not want to buy another screen XD)

It’s not super clean as it was in progress when abandoned. If you improve it, please feel free to post new versions

https://pastecode.io/s/hb984d1g6s