This dashboard displays information easily read at a glance:
- Date info: day of the week, month, day of the month and year
- Weather info: weather icon, current temperature, description, what it feels like, humidity and temperature range for the day
- Covid-19 info: global and local infections and deaths
- Internet speed: current upload and download speeds
Any information can be displayed on the display (to-do list items, calendar events for the day, current song playing on Spotify)
This dashboard uses two data sources accessed via REST API:
- Weather info: gathered from openweathermap.org
- Covid info: gathered from corona.lmao.ninja (API version 2.0 was used for this dashboard but a newer API version is already available)
Any datasource can be used instead of the ones chosen for this dashboard, but changing the datasource will require modifying the parsing of the response
And two local data sources:
- Date info: from the local machine
- Internet speed: by locally running the speed-test CLI application
- Python 3.7+
- Waveshare 2.7inch E-Ink display libraries
- Node.js 8+
- Speed-Test NPM package
- Rubik font (Raspberry Pi font installation instructions)
Any font may be used instead of Rubik, but not all fonts will look good on the display, especially in smaller sizes.
- Raspberry Pi (this dashboard was run on a Raspberry Pi 3 Model B but will probably work on any version)
- Waveshare 2.7inch E-Ink display HAT for Raspberry Pi
- The assets used in this dashboard were chosen from flaticon for their aesthetics and appearances on the low resolution e-ink display used. The repository includes an icon for the US flag, if you would like to display Covid-19 data for a different country, an appropriate
<country_name>.jpeg
flag icon must be added underdashboard/assets/covid
. - The repository includes a
Config.py
file which holds all the configurations required to run the dashboard. In order for the dashboard to run correctly, all of the properties must be provided:lon
andlat
are used to gather weather information for the desired locationunits
used to determine which temperature units will be used in the weather request. Options areimperial
for Fahrenheit andmetric
for Celsiusunit_letter
used to determine which temperature letter will be used in the display.F
for Fahrenheit andC
for Celsiusopen_weather_map_api_key
is the openweathermap.org API key.An account is required to access the openweathermap.org weather API, you can register for free here.
country
is used to query Covid-19 data and to load the flag icon so it must match the<country_name>.jpeg
[small\medium\large]_font_[size\name]
were chosen to fit the size of the e-ink display
Every application that includes usage of an e-ink display will require two files provided by the manufacturer:
epd2in7b.py
andepdconfig.py
. These files have been provided and are in thelib
folder in the repository so no configuration is required.
Running the dashboard requires the following steps:
- Connecting the e-ink display to the Raspberry Pi
- Cloning the repository
- Configuring the properties listed in the Code configuration section, and
- Running the
main.py
script
This will display the dashboard on the display and will not be cleared even if the Raspberry Pi is shut down or disconnected from a power source. In order to refresh the dashboard in a predefined interval, using crontab is recommended:
- Run the command
crontab -e
in the CLI - Add a new line to the file and insert
*/30 * * * * cd /absolute/path/to/the/project/folder && python3 main.py
- Save and close the editor
The meaning of
*/30 * * * *
is "run the following command at the top of the hour and 30 minutes past the top of the hour". More examples may be found here.
Keep in mind that it takes the dashboard approximately 70 seconds to load the required data and another 33 seconds for the display to clear and refresh, so running it too often won't be effective. Not to mention that the screen flickers when refreshing which is distracting.
- Dynamically load country flag according to provided
lon
andlat
values - Load weather data according to city name instead of
lon
andlat
values - Display weather data for upcoming days
- Change Covid-19 datasource to a newer API version
- Graph Covid-19 data for a given timeframe
- Graph Internet speed data for a given timeframe
- Support use of the display buttons to select which information will be displayed on screen