Making an E-paper Dashboard with ESPHome

Поделиться
HTML-код
  • Опубликовано: 12 июн 2024
  • Using Home Assistant and ESPHome to make a custom e-paper (e-ink) dashboard. The hardware is pretty trivial... the code is where all the magic happens. This can serve as a demo of using the Waveshare E-paper displays, displaying weather or other sensor data from Home Assistant, using the graph component, finding and mapping custom MDI icons, drawing boxes, formatting dates/numbers/text, and general display setup in ESPHome.
    I'm using the Met.no weather integration, and the method for extracting weather forecast data has changed in recent Home Assistant updates (2024.2). You have to create a template to run weather.get_forecasts to extract hourly/daily forecast information into sensors for use in ESPHome.
    Hardware used was a Adafruit Feather V1 ESP32 and a Waveshare 7.5" epaper screen.
    github for yaml and step files: github.com/techdregs/E-Paper-...
    Weather icons are from Google MDI, and here's where I found the codes for any custom icons you want to include in the code:
    I was inspired by seeing Madelena's project: community.home-assistant.io/t...
    MDI TFT file: community.home-assistant.io/t...
    === Timestamps ===
    00:00 Introduction
    04:11 Hardware
    08:18 Assembly Interlude
    10:45 Set up Weather Forecasts
    14:40 ESPHome YAML Highlights
    21:10 Conclusion
  • НаукаНаука

Комментарии • 71

  • @kaimcbride1553
    @kaimcbride1553 3 месяца назад +19

    This has been on my TODO list for a while and your detailed video has pushed me over the edge. Ordering stuff right now. Thanks for the information!

  • @hunordori
    @hunordori 3 месяца назад +12

    Thank you, I grabbed your refresh button. I have the same display in my office to show if I am on a meeting or off, WFH, etc. The refresh is pretty annoying, but works.

    • @TechDregs
      @TechDregs  3 месяца назад +2

      Yeah, if you don't need the clock, I would slow the refresh interval down. No need refreshing faster than any data component will actually change.

  • @TheCreat
    @TheCreat Месяц назад +6

    Since the whole thing is relatively hefty already with a 7.5" display, I would just add a 18650 as a semi-permanent power source. It can probably run that thing for a year or something, possibly longer if power management is setup correctly on the ESP32. While probably not necessary, but the weight of the cell would also make it harder to knock over (assuming battery is placed sensibly at the bottom).

  • @Frisky0563
    @Frisky0563 3 месяца назад +7

    Pretty cool display

  • @simonsayshomeassistant
    @simonsayshomeassistant 3 месяца назад +2

    Great video mate! I must try this

  • @automated6225
    @automated6225 2 месяца назад +2

    Nice work & project 👍

  • @rolasiohfbjydbj5848
    @rolasiohfbjydbj5848 3 месяца назад

    Good to hear from you😮 i2c home wtf...

  • @pcbwayluz
    @pcbwayluz 3 месяца назад +2

    Very nicely done, and good delivery. Wondering if any custom PCBs would be needed from us? Hope to reach out soon:D

  • @lawrencemanning
    @lawrencemanning 3 месяца назад +8

    The screen I made for my hallway only updates every hour, and the board sleeps when not doing anything, giving a battery life off a little Lipo of about 3 months. It therefore doesn’t need USB power normally. I think these screens are much better with infrequent refreshes, which lends itself to the ESP going to sleep. The downside is the info can’t update more then once an hour, but that’s adequate for weather forecasts, temperatures around the house, and calendar summaries, which is what I use mine for.
    Lots of different approaches.

    • @TechDregs
      @TechDregs  3 месяца назад +1

      Yeah, if a person just wants sensor statuses and weather forecasts, I would say that would be the way to go. The big driver of me updating once a minute is the clock... otherwise I would cut it back to once every 15 minutes or so.

    • @lawrencemanning
      @lawrencemanning 3 месяца назад +2

      @@TechDregs I was never happy with the refresh and I have a few clocks. Plus I really didn’t want to go routing cables in walls. I love your case and size of your screen. I should look at re-housing and enlarging my screen, but too many other projects!

  • @zaca83
    @zaca83 3 месяца назад +2

    I would definitely buy something like this.
    It would be great to choose skins like Google Calendar, To do lists, upcoming meetings...

  • @YoutubeBorkedMyOldHandle_why
    @YoutubeBorkedMyOldHandle_why 11 дней назад +1

    Cool project. I agree, e-ink displays are interesting. I've been curious about them for years. Notably they: use very little power, retain the image after disconnecting power, and they can be easily viewed outside. Nice, although on the down side they are slow and lack colour. But as you say, they are expensive (even from China.) I recently bought a tiny credit card sized display on sale from China, and even that was $10. Unless I'm sadly mistaken, the reasons they are so expensive are: greedy manufacturers and a lack of competition. So, I'll be waiting for patents to expire, other companies to start making them, and prices to drop substantially, before doing any e-ink projects.

    • @2DarkDreams
      @2DarkDreams 7 дней назад

      I was thinking the same. Alltho normal tft screens are a lot cheaper, it stll baffles me esp screens that have capacitive touch in phone-size cost upwards to a hundred dollars. Its weird to me you can buy a whole phone for tens of bucks that contain the screen, but we can't similair screens for our esp32 for the same price...

  • @pjohnson21211
    @pjohnson21211 3 месяца назад +2

    very nice!
    I was also inspired by that project. But I applied a Pi Zero W to my project instead of an esp32. My variation allowed me to pull data from NOAA APIs. They are great....you can even get tide and water temp data if you are on a coastline!

    • @TechDregs
      @TechDregs  3 месяца назад

      That is pretty cool! I checked and it's possible to get tide data from an existing integration (via configuration.yaml) but it's not comprehensive. Just in case anyone wants this for an ESPHome device, looks like it pulls just the next days high/low tide times and heights. None of the other data. www.home-assistant.io/integrations/noaa_tides/

    • @pjohnson21211
      @pjohnson21211 3 месяца назад +1

      oh wow...... and of course it does. And that should work as well as my direct call to the API and parsing the results. @@TechDregs

    • @TechDregs
      @TechDregs  3 месяца назад +1

      I'm always shocked at what the HA community already has. It's one of the most impressive open source projects out there. ESPHome too... I've looked up some random oddball sensors and ICs and of course someone already has a component built for them.

  • @jaymzx0
    @jaymzx0 2 месяца назад +3

    Hi, fun project. I just wanted to mention if anyone is using the Waveshare 'Universal e-paper driver board' ESP32 board with the screen interface built in, the pin assignments are the following:
    Display power = GPIO4
    SPI CLK = GPIO13
    SPI MOSI = GPIO14
    Screen:
    CS = GPIO15
    DC = GPIO27
    Busy = GPIO25
    Reset = GPIO26
    The display power pin had me scratching my head since I didn't see it anywhere in the Waveshare docs, but I found it on the schematic for the dev board. Once that was fixed the screen sprang to life. Also, if the switch isn't set correctly, the screen will refresh and then go blank/fade. Be sure to flip the switch on the board to 'A' if you're using the 7.5" v2 display.

    • @vitsu_
      @vitsu_ Месяц назад

      Thank you for this!! I just got that board and display in the mail and was watching this video to start figuring out how to set it all up

  • @Larry67902
    @Larry67902 3 месяца назад +1

    Great Video. Have you thought about female thread knurled Brass inserts for the 3d printed holes? They work great. I have a link for them but i know you tube doesn't like links.

    • @TechDregs
      @TechDregs  3 месяца назад +1

      Yeah, I think I may have some somewhere actually. I should see if I can find them. They aren't quite as secure as using a nut, but for a lot of this stuff they are more than strong enough.

  • @wasyl00
    @wasyl00 3 месяца назад +1

    In the process of building something similar. Esphoime is such a great tool. Shame there isn't any any graphical design tool to help with making layout other than flash and check, rinse and repeat.

    • @TechDregs
      @TechDregs  3 месяца назад +2

      Check out the ESPHome discord. I think there's actually someone working on a web based esphome display emulator.

  • @jeekakrishna
    @jeekakrishna 3 месяца назад

    amazing

  • @xani666
    @xani666 3 месяца назад +9

    The updates do look pretty distracting, I wonder if there is a way to only update the area that changed rather than flashing whole screen every minute?

    • @TechDregs
      @TechDregs  3 месяца назад +6

      Some of the Waveshare epaper panels do support partial screen refresh, but not the 7.5". See the selection guide at the bottom of this page: www.waveshare.com/7.5inch-e-paper-hat.htm

    • @jerrymk6846
      @jerrymk6846 3 месяца назад +5

      you technically can, even if the display doesn’t support it, by keeping a copy of the display memory on the microcontroller, and swap out the LUT settings mid update and do two updates
      but no, it won’t be supported natively, and I don’t see many people doing such thing. I did have success displaying 16 shades of grey and partial updates on an epaper display that doesn’t support it

    • @TechDregs
      @TechDregs  3 месяца назад

      Interesting. I'm not sure how that would interact with the ESPHome component, but possibly it could me handled in a lambda.

    • @notmyname9062
      @notmyname9062 3 месяца назад +1

      I tried a weather station with ePaper also like 2 years ago with an Waveshare 2,7". And yes, the display updates were really anoying even on just a 2,7" display. Whenever it updated you noticed the blinking which is really distracting.
      And imho it should update quite often. For environmental values i'd do at least every 5 minutes. And if it shows a clock (not showing seconds), every 1 minute.
      I managed to do partial updates even though this display doesn't support it officially. There are some driver modifications out there that allow to do it. So it's basically NEVER an hardware issue, it's just about the driver.
      As how ePaper works, just doing simple updates leaves shadows behind and there will be point reached where you have to do a full update to refresh the display. However with knowing the previous values you can do an "inverse" update clearing out the previous values and then do another update to show new values. This totally reduces the flickering to what is actually really updated and minimizes left behind shadows and works pretty well with full updates only be done every 6 hours or so. Of course depending on what you display and how often you update it anyway.
      * used a Pi Zero, so not actually the micro controller libs being used.

  • @MauroTamm
    @MauroTamm 2 месяца назад

    What if you swapped the colours, so the refresh is less noticeable?
    White text on black.

  • @cheyannei5983
    @cheyannei5983 3 месяца назад +1

    I've been wanting to make a weather station/display for years now. This will be perfect! What would I need to learn to setup Home Assistant to pull the presence or text of notices from the National weather Service, ie Hazardous Weather Outlooks or Tornado Warnings?

    • @TechDregs
      @TechDregs  3 месяца назад +1

      I'm not familiar with how any NWS integration works, however, presuming that integration produces some sort of entities with the alert text (and perhaps another which produces an alert indicator), you could pull that into ESPHome with the same sort of text sensors I used for the weather stuff. I'm not sure if you'd need the template sensors for that, as weather forecasts are a pretty specific setup. But, presuming those alerts were just text, you could display that directly in a section of the screen. You could also potentially code it to trigger an alert icon if the text isn't a _null_ or something, ie if any alert comes through other than an "all clear", then an icon get's displayed.
      Again, not knowing the exact integration, it's hard to get too specific, but I think something along those lines would work.

    • @demodemo5991
      @demodemo5991 3 месяца назад

      Do not do this on an epaper device. It is a silent device without sound. Additionally, it does not emit flashes. If there were a tornado warning displayed on an epaper device, when would you notice it?

    • @TechDregs
      @TechDregs  3 месяца назад +1

      You could easily add LEDs, piezos, or speakers if you wanted the device to have audio/visual warnings. I am pretty sure I could have Home Assistant broadcast warnings through my home A/V system without much effort.

    • @demodemo5991
      @demodemo5991 3 месяца назад

      @@TechDregs Yes, you can use your home assistant to send alerts through any other audiovisual device.
      Returning to the original discussion, what is the significance of using an e-paper-based device for notifications such as tornado alerts? These urgent and real-time notifications are typically sent to smartphones. Using an e-paper-based device? You could add LED lights, speakers, and various other components yourself, so wouldn't it be better to just use a tablet directly?

    • @TechDregs
      @TechDregs  3 месяца назад

      I'm not saying someone should. This person wants to, and it's not hard to do. If they use LEDs and piezo alarms, it being an E-paper display won't have any impact. The display refresh is totally independent, and alarms could be set off pretty much instantly if the weather condition returns a hazard. Further, you could force the display to refresh as part of the alarm, so again, it being E-paper won't have any impact.
      Sorry, I should add, a tablet would also be a viable way to do all kinds of things if a person wanted. I figure E-paper would just be more of an aesthetic choice.

  • @ericborchardt5238
    @ericborchardt5238 3 месяца назад +3

    Can you have the esp32 send an API request to home assistant to automatically refresh the display when it's powered up?

    • @TechDregs
      @TechDregs  3 месяца назад

      Go check out Madelena's version. She has all the sensors set to flip a flag when they are updated, then waits a bit and refreshes the screen 5 seconds later. That gives the values enough time to update. I didn't do that because I have mine updating every minute, and I didn't feel like that's too long to wait since it's only an issue on boot.
      community.home-assistant.io/t/use-esphome-with-e-ink-displays-to-blend-in-with-your-home-decor/435428

  • @circuitdotlt
    @circuitdotlt 3 месяца назад +2

    what's power consumption of this? Would love a battery powered one.
    Edit: I've found ESP32 can go down to 2.5uA in hibernation mode. So it all depends on straight hands of the programmer.
    Have you looked into ways of using those low power modes?

    • @TechDregs
      @TechDregs  3 месяца назад +3

      I don't think you will get an ESP32 board down that low. The best one I've found has like 30uA in deep sleep, but I've seen some that were in the mA range of deep sleep current. You have to factor in the voltage regulator and battery management chip draw on top of the ESP32 module itself, and some ES32 boards use pretty inefficient LDOs.
      That said, the e-paper displays are very well suited to battery power, as they don't require power to maintain the display. I didn't measure it directly, but the spec sheet for my 7.5" panel says it draws ~10mA at 3.3v while it's updating. That only takes a few seconds. Then you can unpower it, and the image will just stay that way for probably as long as you want. I would probably power the panel via a GPIO pin, and turn that off when I put the ESP32 into deep sleep. That would eliminate all power draw from the display panel while the system sleeps.
      So, very suited to battery. As a matter of fact, there are versions of these from Waveshare that don't use power at all. They have an NFC antenna inside, and you "power" them when you want to update them with your phone via NFC. They can be used for shelf labels and things without having to worry about batteries or anything.

    • @pstevenson
      @pstevenson 3 месяца назад

      check out openepaperlink - uses battery powered grocery store shelf label epaper tags.

    • @notmyname9062
      @notmyname9062 3 месяца назад

      With ESP8266 waking up every 5 minutes reading a sensor and sending the value via Wifi to a host, i managed to let it run for ~6 weeks with an 2500mAh li-ion battery.
      ESP32 i read will use a little more power and with the display updates it will run more often and for longer times, as the display update takes a few seconds as seen in the video and of course the display will need some power for the update itself too.
      So basically i guess you might achieve few weeks of runtime but of course you can always increase battery capacity. 2500mAh isn't that much either. Without hardware modifications. Might be further improved if you switch to more efficient LDOs as mentioned.
      Edit: ESP8266 programmed manually. Don't know if the ESPHome stuff causes overhead.

  • @ajwelker
    @ajwelker 3 месяца назад

    Is there any chance you can convert the step file to the 3 stl files needed to slice in cura?

    • @TechDregs
      @TechDregs  3 месяца назад

      I think there are web utilities you can use for that.

  • @cyberfly8452
    @cyberfly8452 3 месяца назад +1

    too bad the screen refresh is a bit “crappy” but otherwise very good!

  • @cardriverfreerider9783
    @cardriverfreerider9783 3 месяца назад

    What brand of the e-ink screen is?

  • @cig_in_mouth3786
    @cig_in_mouth3786 2 месяца назад

    It's is looking good tbf whatif I hacked my Kindle and run Linux and then code reason building whole stuff is pain (mainly sourcing part) having spare Kindle

    • @TechDregs
      @TechDregs  2 месяца назад

      That sounds like a whole different ball of wax there.

  • @johnwalker8952
    @johnwalker8952 Месяц назад

    What is the point in showing air pressure to 4 significant figures?

    • @TechDregs
      @TechDregs  Месяц назад

      When measuring barometric pressure, typical value changes are very small. Average daily fluctuations in my area are around 0.25inHg per day, and over the past week the daily average range of values was only 0.10inHg.

  • @mixedup5858
    @mixedup5858 3 месяца назад +1

    just anything except clock or PC monitoring lol

  • @SP-ny1fk
    @SP-ny1fk 3 месяца назад

    The whole screen refresh every minute might get annoying though

  • @etmax1
    @etmax1 3 месяца назад

    I think the people that did ESP home did a great job, but surely they can follow standard design protocols and do a refresh of everything on power up, it's not rocket science.

    • @TechDregs
      @TechDregs  3 месяца назад

      I think you could probably do it with something in the boot sequence. Deprioritize the screen startup or something. Or some people use scripts that update after sensors receive new values.

  • @larrybud
    @larrybud 3 месяца назад +17

    Not sure why you'd want an e-paper screen for this. Can't read it in dim/darkness, can't color code your temperatures/graph, etc and the fact that you're running it on usb means power isn't an issue. Seems like the wrong tech for a project like this. You can also get a 7" lcd for about 40 bucks.

    • @ParodieHecker-mobile
      @ParodieHecker-mobile 3 месяца назад +27

      E paper screens are just a cool piece of tech. Also the power consumption is basically 0 while not changing the image, so pretty good for battery powered devices. I like them

    • @thewebmachine
      @thewebmachine 3 месяца назад +16

      What!? You are clearly uninformed about e-paper/e-ink. I have several E-ink projects around my house. All battery powered and last for months on a charge. Several have frontlights for seeing them in the dark. One of them is a color display. Most of them even have capacitive touch layers! E-ink is simply spectacular and getting better with each generation.

    • @larrybud
      @larrybud 3 месяца назад +4

      @@thewebmachine What part of my message contradicts ANYTHING which you said? Eink "color" is a max of 2 color. The Waveshare red/black eink is $185 without touch, far more than any lcd.
      Then you need your "front light" to see anything, which means you either have it on at all times, or require a sensor or button to turn the light on. So seeing it across the room is out of the question in dim light.
      Yes, they are low power consumption, but this guy has his device plugged into usb all the time, so power consumption is irrelevant.

    • @thewebmachine
      @thewebmachine 3 месяца назад +20

      @larrybud For starters, e-ink is also available in 4-color (CMYK), which can create an entire spectrum just like a tri-color LCD or the subpixels of an OLED. The world of e-ink doesn't begin and end at Waveshare...nothing does, thankfully. 🙄
      I mentioned nothing about price but, since you bring it up, reclaimed e-ink displays from recycled readers are actually rather cheap, many on par with LCDs. I'd never buy a "hobbyist" display at the prices Waveshare charges. You can get far better quality components, including LCDs, for cheaper elsewhere. (Yes, I'm dunking on Waveshare again; their prices and selection in some categories are just horrible.)
      A 7" LCD is hardly readable from "across the room" unless you're Superman, at which point you could probably see e-ink in the dark, too. Just because it is lit doesn't mean it is legible at a distance. E-ink's lower DPI is actually markedly easier to read at a distance; in the light, of course.
      The only reason he has his device plugged in the whole time is because he didn't add a LiPo circuit and battery...a trivial addition that has no bearing on the concept he was illustrating (ESPHome and displays). Even if you crammed a 40Wh battery in the back of it, an LCD wouldn't run a full day on it. I don't know about you, but I'm tired of every outlet in the house being consumed by a bunch of otherwise low-power devices. We're all burning twice the power in transformer heat losses than we're using to actually power half the things we're forced to plug in. E-ink is a massive power saver in any project you can fit it into. It certainly *can be* a "right tech" for this type of project, he just didn't illustrate the benefits (OR downsides) adequately. Again, that doesn't appear to have been his goal (extolling the virtues of e-ink), instead focusing on the ease and versatility of ESPHome.
      Besides, if you're going to spring for an LCD because 'reasons,' then screw the drawbacks of LCD tech - bad viewing angles, annoying backlight bleed, unnecessary power consumption, etc - all together and get an OLED panel. 🤷🏻‍♂️ (Yes, that was intentionally trolling. 🤣) Since I don't live in a dark cave, I find e-ink to be quite pleasant to look at versus the endless glare from a traditional screen...I have to look at enough of those all day, as it is. In all seriousness, there's a lot to be said for aesthetic preference.
      My point was/is: If you're going to dunk on a technology for its pitfalls, you might want to know a bit more about the tech than a 60s Google search will allow. I merely seek to inform. (My sarcasm is not a part of that mission, instead a byproduct of many jaded years in this industry. Sorry for that.)

    • @jankoodziej877
      @jankoodziej877 3 месяца назад +7

      This is so much nicer looking than a cheap lcd screen. Also it could have light if you really think you would need it, but do you not have lights in your home? For a display on the wall I would much prefer no backlight.
      But ultimately, you don't want it, you don't need to make one.