Skip to content

Commit 86dba5f

Browse files
authored
Update 2025-03-02-building-your-own-ai-and-e-ink-powered-art-gallery-local.md
1 parent 1d6ecad commit 86dba5f

File tree

1 file changed

+41
-51
lines changed

1 file changed

+41
-51
lines changed

_drafts/2025-03-02-building-your-own-ai-and-e-ink-powered-art-gallery-local.md

+41-51
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,39 @@ author: Jimmy & Peter
88

99
![E-ink with AI art ESP32 home assistant based]({{ site.baseurl }}/assets/images/eink_art/eink_art_framed_filter.jpg)
1010

11-
- [ ] TODO: insert images of the frame, front and back, with a gif for when it changes the image to show what it can do.
12-
- [ ] TODO: explain what it is before why
13-
- [ ] TODO: performance expectations( image fresh, battery life)
14-
- [ ] TODO: cost
15-
- [ ] TODO: Hardware for the product
16-
- [ ] TODO: software for the product
17-
- [ ] TODO: tools to get it done, need to have, and nice to have category
18-
- [ ] TODO: skill required on the hardware side
19-
- [ ] TODO: skill required on the software side
20-
21-
2211
We build a **E-ink** picture **ESP32** frame that displays a new artwork every morning, generated by **local AI diffusion model**.
2312
The content changes daily, so each day brings a completely new and random image to enjoy.
2413
Everything is run locally on our network, ensuring the process is private and keeping everything off the cloud.
25-
It's straightforward to have dynamic, AI-generated art on your walls without compromising privacy.
14+
Having dynamic, AI-generated art on your walls is straightforward without compromising privacy.
2615
This setup naturally extends our Home Assistant smart home setup, which hosts the image server and monitors the ESP32s.
2716

28-
TODO Insert
17+
TODO Insert image gif
2918

3019
Want to build your own? Here is the recipe.
3120
If you want wireless picture frames, you would want to use an ESP32 chip, which requires some soldering.
3221
You can build it with a Raspberry Pi Zero if you don't want to solder.
3322

3423
TODO Insert image from the backside
3524

36-
- [Overview](#overview)
37-
- [Shopping List](#shopping-list)
38-
- [Why E-ink?](#why-e-ink)
39-
- [Choice of AI art](#choice-of-ai-art)
40-
- [Choice of dithering](#choice-of-dithering)
41-
- [Choice of hosting model](#choice-of-hosting-model)
42-
- [Using ESPHome and ESP32](#using-esphome-and-esp32)
43-
- [Battery choice](#battery-choice)
44-
- [3D printed backside?](#3d-printed-backside)
45-
- [Bring it all together](#bring-it-all-together)
46-
- [Note on the next version](#note-on-the-next-version)
47-
- [References](#references)
48-
49-
## Requirements
25+
## Hardware Requirements
5026

5127
You will need
5228

53-
- A computer with a relatively good graphics card
29+
- A computer with a relatively good graphics card, to generate AI images
5430
- E-ink screen and e-ink screen HAT
55-
- if battery-based; ESP32 and LIPO battery
56-
- if wire-based; Raspberry Pi zero
57-
- Optionally, a raspberry Pi to host an image server
31+
- if wireless/battery-based; an ESP32 chip and LiPo battery
32+
- if wire-based/non-soldering, a Raspberry Pi Zero
33+
- Optionally, a Raspberry Pi 5 to host an image server
5834

59-
and you will need to be comfotrable with
35+
And you will need to be comfortable with
6036

61-
- Python programming
62-
- Basic Linux skills
37+
- Python Programming
38+
- Basic Linux skills (shell)
6339
- Soldering
6440

65-
Using a Raspberry Pi Zero for the picture frame is prefered because of the dimensions of the device.
66-
67-
For choice of ESP32, you need PSRAM to be able to download images over the WiFi
68-
69-
It also depends on where you want to shop
41+
A Raspberry Pi Zero is preferred for the picture frame because of its dimensions, but any Raspberry Pi will work.
7042

71-
check TODO page for overview of ESP32's supported by ESPHome
43+
> **IMPORTANT**: When shopping for ESP32, if you want to download images over Wi-Fi/the internet via ESPHome, you need a chipset with PSRAM, which is an external memory module allocated to one of the GPIO pins. The WiFi image downloader module needs this extra memory.
7244
7345

7446
| Item | Product Link |
@@ -81,17 +53,21 @@ check TODO page for overview of ESP32's supported by ESPHome
8153

8254
Estimated total cost per frame $$\approx 200 \text{ EUR}$$ + physical frame.
8355

84-
When shopping, try to avoid Amazon.
85-
If you are swiss based, checkout [bastelgarage.ch](https://www.bastelgarage.ch).
56+
The choice of ESP32 was made by browsing [https://registry.platformio.org/platforms/platformio/espressif32/boards?version=5.3.0](https://registry.platformio.org/platforms/platformio/espressif32/boards?version=5.3.0) for compatible devices. The version is locked to 5.3.0 because, as of the time of writing, ESPHome uses `platformio=5.3.0'. However, the only main requirement is that the ESP32 needs PSRAM to download the PNG image over WiFi.
8657

58+
Could you try to avoid Amazon when shopping? If you are Swiss-based, check out [bastelgarage.ch](https://www.bastelgarage.ch).
59+
But you can find a small shop in your country that sells most components.
60+
Unfortunately, we couldn't find a supplier that sells the [Waveshare 13.3" black/white e-ink display](https://amzn.to/4im9Wjj), so we ordered it via Amazon.
8761

88-
## Infrastructure overview
62+
## Software/Service Overview
63+
64+
To organize everything smoothly and easily manipulate the workflow, we split the tasks into three sections: generating images, storing images, and displaying images.
65+
We use our desktop computer with a graphics card to generate images, either live or as a scheduled job.
66+
We both implemented different versions of the workflow; you can find Jimmy's at [github.com/charnley/eink_art_gallery](https://github.com/charnley/eink_art_gallery) and Peter's at [github.com/pgericson/eink-hub](https://github.com/pgericson/eink-hub).
8967

9068
```mermaid
9169
graph LR
9270
93-
%% start --> stop
94-
9571
subgraph Desktop [Desktop Computer]
9672
direction RL
9773
gpucron@{ shape: rounded, label: "Cron job" }
@@ -128,12 +104,14 @@ graph LR
128104
class pictures,HA,Desktop,esp32,rpi ParentGraph
129105
```
130106

131-
The workflow is as following;
107+
The workflow is as follows;
132108

133-
- The **picture server** holds a list of prompts, with associated pictures, stored in a sqlite database. For our setup this is hosted on Home Assistant, but could be any docker hosting service.
134-
- Every night the **desktop computer** asks the picture server if there any prompts without a images. For all those prompts, generate new images with the GPU and send them to the picture server.
135-
- The picture frames run by **ESP32** will then run on a sleep schdule. Wake up, request a picture, display the picture and go back to sleep.
136-
- For live updates, like alarms that it is going to rain, the picture server can send a messeage to the **Raspberry Pi** and make a live update.
109+
- The **picture server** holds a list of AI prompts, each with associated pictures, stored in a SQLite database. For our setup, this is hosted on Home Assistant, but it could be any docker hosting service.
110+
- Every night, the **desktop computer** asks the picture server if there are any prompts without images. For all those prompts, the desktop computer generates new images and sends them to the picture server.
111+
- The picture frame(s) run by **ESP32** will run on a sleep schedule for 24h, waking up at 4 am. Wake up, request a picture, display the picture and go back to sleep.
112+
- The picture frame(s) run by **Raspberry Pi** will host an API for displaying images, which means you can send live notifications/images to that frame.
113+
114+
Overall, the services works very nicely together and can be adopted to one personal needs.
137115

138116
## Why E-ink?
139117

@@ -574,6 +552,8 @@ It was expensive, but worth it for the final touch.
574552
- Auto AI generated prompts based on themes and events
575553
- Generate AI art of your friends when they visit
576554
- Home Assistant updates the timer and picture url from variables
555+
- Home Assistant can send notification, such as weather or ski
556+
- Better infographics, such as weather in local area
577557

578558
## Known issues
579559

@@ -593,6 +573,16 @@ It was expensive, but worth it for the final touch.
593573
## Thanks
594574

595575
Ananda for providing answers when stuck.
596-
Kristoffer for proof-reading.
576+
Kristoffer for proofreading.
577+
597578

598579

580+
- [ ] TODO: insert images of the frame, front and back, with a gif for when it changes the image to show what it can do.
581+
- [ ] TODO: explain what it is before why
582+
- [ ] TODO: performance expectations( image fresh, battery life)
583+
- [ ] TODO: cost
584+
- [ ] TODO: Hardware for the product
585+
- [ ] TODO: software for the product
586+
- [ ] TODO: tools to get it done, need to have, and nice to have category
587+
- [ ] TODO: skill required on the hardware side
588+
- [ ] TODO: skill required on the software side

0 commit comments

Comments
 (0)