Git Product home page Git Product logo

weather-report's Introduction

Weather Report 🌡️🌤️

Weather display project, featuring a Inky wHAT e-ink display and a Raspberry Pi.

  • The Weather Report is meant to display the weather in a more visually pleasing layout, which will combine assets such as hourly readings, date and time, and whatever comes along. PXL_20220321_125707503

Features

Current weather information

  • Temperature
  • Highs and Lows
  • Weather conditions (rainy, sunny, etc.)
  • Humidity
  • Wind
  • Icon depicting weather conditions

Hourly Weather Forecast (Every two hours, total of eight hours ahead)

  • Temperature
  • Future time of forecast
  • One word weather conditions

Hardware / Software Used

  • Raspberry Pi Zero W (Headers)
  • Inky
  • Micro SD Card (min. 8GB)
  • OpenWeatherMaps API
    • One can get free API licenses by going to this link

Installation

  1. Enable I2C and SPI under raspi-config
sudo raspi-config
  1. Get and install git
sudo apt update
sudo apt install git
  1. Install libraries for Inky wHAT/Impression displays:
curl https://get.pimoroni.com/inky | bash
  1. Install pyOWM. pyOWM is a python library that utilizes the OpenWeatherMaps APIs.
pip install pyowm
  1. Copy the git repo for this project
git clone https://github.com/Hothomir/weather-report.git
  1. Go to the weather-report directory
cd weather-report
  1. Access configfile.ini using nano
nano configfile.ini
  1. Change the values to what is preferred. Example for Philadelphia, PA:
[OWM_API]
api = 123456789abcdefg

[Location]
latitude = 39.952583
longitude = -75.165222
city = Philadelphia
country = US
  1. Run the program while in the weather-report directory
Inky wHAT: python main.py
Inky Impression: python impression-main.py

Recurring Display Refreshes

To get new weather information in timed intervals, I've used crontab. Crontab schedules when to run the main.py file and is flexible with how often it should be run.

I've set up the crontab job to run every 30 minutes, so the display will refresh every 30 minutes. Example:

  1. Open crontab in terminal
crontab -e
  1. At the bottom of the crontab file, provide the following line:
*/30 * * * * python /home/pi/weather-report/main.py
  1. To refresh the display every 60 mins (every hour):
*/60 * * * * python /home/pi/weather-report/main.py

To-Do

  • Where the weather condition prints "Clear" in the image, it would be better to print the detailed condition for the current weather. However, need to see how to wrap text, as the detailed conditions print as one line and get cut off by the edge of the display.

Resources

pyOWM https://pyowm.readthedocs.io/en/latest/#

Pimoroni Inky https://github.com/pimoroni/inky

weather-report's People

Contributors

blockarchitech avatar hothomir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

blockarchitech

weather-report's Issues

[BUG] Inky Impression displays have inverted colors.

On Inky Impression displays, black/white is inverted. Inverting the BG, and other colors doesn't fix this, neither does PIL inverting colors.

Continuing to try and fix this, but it may be a few days before I find a solution.

Inky Impression Image

Image of the inky Impression running.

Colors need to be reversed, but that's on me.PXL_20220324_015105533~2.jpg

If you only need icons this should work fine

Artifacts on Icons

There's an issue where the icons printed onto the display seem to be choppy in some portions, as if the icon graphic were "bleeding". Seems to happen in the same way with each graphic.

pHAT Support

Inky pHAT is a much smaller display, as it's 2.13" diagonally. A link to the product: https://shop.pimoroni.com/products/inky-phat?variant=12549254217811

After creating the weather report on a wHAT display, I wanted to heavily adjust it to fit onto a pHAT display as well. However due to size constraints, multiple things will have to change to keep the layout consistent, readable and still fit the theme of the Weather Report

Detailed Condition cuts off

On the display, the Detailed Condition sometimes gets cut off by the display and does not print properly. This is usually an issue only for longer, descriptive conditions, such as "scattered clouds" or "light shower snow".

The idea is to indent the lines once they are too long, but only have it specific to some conditions as it does not apply to all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.