blixt/sol-mate-eink
À propos
The Sol Mate GPT but on your e-Paper display!
IA et apprentissage automatiqueProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalSol Mate e-Paper Display ☀️
I initially made the ☀️ Sol Mate GPT, but it didn't take too long until I wondered what it would look like on an e-Paper display.
The script to update the screen takes a location (maybe your own, maybe your best friend's, or even a fictional place!) and get the weather for that location, then generate an illustration of the location including the current weather and lighting conditions. So if it's raining, there will be people with umbrellas in the picture, and so on. If you do generate for a fictional location, the weather service will be given the latitude/longitude of the most similar place on Earth (according to GPT). The illustrations are rendered using the gpt-image-1-mini model, with prompts produced by gpt-5-mini at high image quality. This is why an OpenAI API token is necessary to run it.
This repository contains all the code that was needed to generate and display a weather report for any specified location on a Raspberry Pi with an attached Waveshare e-Paper display.
Hardware
- Raspberry Pi 5
- Waveshare e-Paper 7.3" display (code needs to be updated for other sizes)
More pictures
- 3 more nice examples
- 3D-printing the case
- 4 examples, some with more color
- The setup, without the box
- Video of the thinness of the display
Software & Usage
This should all run on your Raspberry Pi.
This project assumes you use uv. It manages a virtual environment for you, and you don't need to activate it manually.
uv sync
On macOS or other non-Linux dev machines, the Raspberry Pi hardware libraries are skipped by default.
You will need to specify an OPENAI_API_KEY environment variable. For your convenience, the code will load environment variables from a .env file in the current working directory.
Now you can use the control.py script to generate an image and show it on the screen:
OPENAI_API_KEY=... uv run python control.py show Barcelona
If you want a quick local sanity check (iTerm2 image display), run (writes to your system temp dir as sol-mate-preview-<timestamp>.png by default):
OPENAI_API_KEY=... uv run python control.py preview "Barcelona"
Waveshare recommends you don't leave the same image on the display for too long.
Use the clear command to clear it:
uv run python control.py clear
I set up a cron job (crontab -e) to update the image two times per day, but keep in mind this can end up costing a non-trivial amount:
0 8 * * * cd ~/src/sol-mate-eink && OPENAI_API_KEY=... uv run python control.py show Barcelona
0 18 * * * cd ~/src/sol-mate-eink && OPENAI_API_KEY=... uv run python control.py show Barcelona
0 2 * * * cd ~/src/sol-mate-eink && uv run python control.py clear
(You'll need to tweak the paths for your setup, of course.)
Backend
Feel free to use the private API I hosted to get the weather if you're not going to hammer it. I also use this backend for my GPT. However, if you have high volume ideas in mind, please self-host it! The source code is here:
https://github.com/blixt/sol-mate
Having issues?
I'd love to help if I can – reach out on Twitter or create an issue in this repo!
Explorer des projets similaires
Chargement…