Giter Club home page Giter Club logo

piweatherrock's Introduction

PiWeatherRock - Displays local weather on a Raspberry Pi

Designed with a 3.5" 480x320 TFT display in mind

Daily forecast Hourly forecast Info screen
daily-forecast-screenshot hourly-forecast-screenshot info-screenshot

Introduction

PiWeatherRock is an internet-connected weather station. Its purpose is to display local weather condtions. It was created with the goal of having a simple way to check the weather before taking our dogs out for a walk. The end result is a modern version of a weather rock.

Right now all data is pulled from Dark Sky. A future interation will also incorporate data from sensors connected to a battery powered Arduino.

Note: A previous version pulled data from Weather Underground. IBM bought Weather Undergrund and decided they were too cool to continue to let developers use their api at all for free. To quote their site as of 2018-09-03:

To improve our services and enhance our relationship with our users, we will no longer provide free weather API keys as part of our program.

I cannot wrap my head around how this is supposed to "enhance our relationship with our users."

Usage

The first thing you need to do to run this applicaiton is go to https://darksky.net/dev and get an API key. You can make up to 1,000 API calls per day without paying or even providing payment info. After getting a key, copy config.py.sample to config.py and fill in values for your setup. In addition to your API key you will also need your latitude and longitude. https://gps-coordinates.org/ seems to work well for this as do some cell phone apps.

Once you have your config file in place, you will need to install dependencies.

Note: Anywhere you see pip or python you should be able to substitute the Python 3 versions without issue (aka pip3 and python3).

sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev \
libsdl-mixer1.2-dev libjpeg-dev libportmidi-dev libtimedate-perl
pip install -r requirements.txt

Now you should be able to run python weather.py to start the program. While its running there are some keyboard shortcuts to see additional information:

  • w: Displays the main weather screen
  • i: Displays an info screen which contains some additiional info information
  • q: Quits the program

Influence and Credit

Weather.py - A PyGame-based weather data/forecast display

Icons

Almost all the icons have been replaced with ones from github.com/manifestinteractive/weather-underground-icons.

Some additional icons come from erikflowers.github.io/weather-icons. These have been converted to png files via the icons/alt_icons/generate-dark-sky-pngs.sh script in this repository. To use the script you will need to first run pip3 install cairosvg.

GPIOmock.py

Pulled GPIOmock.py from github.com/grantwinney/52-Weeks-of-Pi to enable testing in an x86 virtual machine.

piweatherrock's People

Contributors

genebean avatar deyspandan avatar qbovv avatar

Watchers

James Cloos avatar

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.