https://github.com/blixt/sol-mate-eink Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} blixt / sol-mate-eink Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 114 * The Sol Mate GPT but on your e-Paper display! 114 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights blixt/sol-mate-eink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 15 Commits .vscode .vscode .gitignore .gitignore README.md README.md ai.py ai.py control.py control.py convert.py convert.py epaper.py epaper.py requirements.txt requirements.txt View all files Repository files navigation * README 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. IMG_5006 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 Dall-E 3. 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 * 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. 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 Waveshare recommends you 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! About The Sol Mate GPT but on your e-Paper display! Resources Readme Activity Stars 114 stars Watchers 1 watching Forks 0 forks Report repository Releases No releases published Packages 0 No packages published Languages * Python 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.