A digital clock and weather app built with Python for the Raspberry Pi
Check out the documentation to get started.
These instructions are for anyone wanting to change the source code.
- Clone repository
git clone git@github.com:aalcala07/home_dashboard.git
- Create venv from within project directory:
python -m venv venv
source venv/bin/activate
- Install packages:
pip install -r requirements.txt
- Copy example config
cp .env.example .env
- Edit the
.env
file and copy your API key toOPEN_WEATHER_MAP_API_KEY
- Change the
LOCATION_LAT
andLOCATION_LONG
(go to Google Maps and right click your city or any point on the map to get coordinates) - Change the
SCREEN_WIDTH
andSCREEN_HEIGHT
to match your screen resolution or desired resolution - Tweak other config fields as needed
To start the venv use:
source venv/bin/activate
To exit the venv use:
deactivate
Run the script inside of your project directory (make sure venv is activated):
python main.py
If you install any new packages using pip, save them to the requirements so they are added when setting up a new environment.
pip freeze > requirements.txt
Create a new custom component to display in the app:
- Create new Python module in
components
directory - Register the component in the
templates.json
file
All components must have a draw
function with screen
, rect
and props
arguments. Check out the existing components for examples.
You can add a component to an existing row's columns in the template.json
or create a new row.