Code Monkey home page Code Monkey logo

weatherwhat's Introduction

weatherWHAT

Weather forecast display for the Pimeroni Inky wHAT, with global weather data powered by the UK's Met Office Weather DataHub. If you don't have an Inky wHAT, you can display the weather on your desktop background or screensaver, or just as text in your terminal.

display example

Get Started

Download the git repo (if using Docker, you don't need to type 'sudo'):

sudo apt-get update && sudo apt install git
git clone --depth=1 https://github.com/seaniedan/weatherWHAT.git

Prerequisites

If you are using Raspberry Pi OS lite, install pip3.

To separate the required Python libraries from others in your system, it's recommended to deploy a virtual environment, e.g. 'venv':

python3 -m venv venv --prompt="weatherWHAT"

To show images and use the location functions, install the rest of the prerequisites.

If you have one, install, connect and test your Inky wHAT.

Install

Register with Met Office Weather DataHub, enter your email adress and create a password. You also need to subscribe to their 'Site Specific forecast'. The service allows 360 free calls per day and you don't need to give any payment information.

You should receive a Client ID and Client Secret. Enter these values into the api.py file, by copying the example_api.py file:

cp example_api.py api.py
nano api.py #or use your favourite text editor

Deploy

If using 'venv', set your environment:

source venv/bin/activate

To show the weather on the command line:

./weatherWHAT.py

If you have installed the prerequisites to display an image:

./weatherWHAT.py -d

The numbers at the bpottom of the screen are hours: yellow means sunshine (high UV). Bars appearing above the numbers show the amount of rain at that hour.

If you have installed GeoPy, to see the weather in Paris:

./weatherWHAT.py -l 'paris, france' 

To display a map, use -m (or -z for the zoomed map):

./weatherWHAT.py -dz -l melbourne

To display a particular image or folder of images, use the -bg option. You'll also need -d to display the image onscreen, or -i to send to the InkyWHAT.

./weatherWHAT.py -bg icons/kids -d

Use the -h option for help!

You can use a Raspberry Pi connected to a Inky wHAT. If you don't have a suitable display, you can set this script up to, for example, change your desktop backdrop, or use the output images in your screensaver.

Use the -s option and specify a file to save to (.jpg or .png).

e.g. On Ubuntu Mate, to update your desktop background, you can use the instructions in this file:

crontab examples/mate_desktop_cron.txt

to save the image in your desktop background location.

Contribute

Please send a message or pull request if something isn't clear or doesn't work.

Want to help?

  • Write an installation script.
  • Share ideas, and folders of background images.
  • Rewrite it to work better on different resolution screens, color InkyWHAT etc.
  • Write additional API's to connect to other weather services, e.g. openweathermap.

Author

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Acknowledgments

  • Raspberry Pi for a great device
  • Pimeroni for their inspiring products
  • Everyone at Met Office Weather DataHub for fabulous support and weather data
  • Lee at 90 Degrees Picture Framing, 124 Fortess Rd, London NW5 2HP (+44 20 7267 4121) for the super frame
  • Olivia and Benet for cool drawings of various types of weather

weatherwhat's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bjdodson

weatherwhat's Issues

Only black and white on Inky What Yellow

Hi there and happy new Year,
Not sure if this is a problem with your code or my hardware or some instructions I've missed.
I've installed as per your instructions on a Pi zero W with the Pi OS Lite and it is plugged into a Inky What Yellow.
I can run weatherWHAT.py with the -i switch and it runs and update the Inky What screen, but I only get a black grayscale image displayed, just black and white with greys.

If I run the Inky examples from piromoni then it can display in yellow ok.

The only think I haven't done as per your instructions (I believe) is I'm not running it in a venv as I'm not planning to run anything else on the Pi.

Any idea where to look for a solution to this?
I've looked at WeatherDisplay.py and it seems to be pre set to use yellow already.
image

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.