Sol 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.
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
More pictures
Software & Usage
This should all run on your Raspberry Pi.
I recommend setting up a virtual environment for Python, such as uv, first. Here are the instructions for if you're using uv (to be run inside the clone of this repo):
uv venv source .venv/bin/activate uv pip install -r requirements.txt
Without uv :
python -m venv . source .venv/bin/activate pip install -r requirements.txt
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:
python control.py show Barcelona
Don't leave the same image on the display for too long. Use the clear command to clear it:
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 && .venv/bin/python control.py show Barcelona 0 18 * * * cd ~/src/sol-mate-eink && .venv/bin/python control.py show Barcelona 0 2 * * * cd ~/src/sol-mate-eink && .venv/bin/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!