For this project to work properly, you will have to make a minimum of two changes in the code, although we provide a few more options that you may wish to play with.
The two mandatory changes are:
- entering your zip code (or your postal code)
- entering you Weather Underground Key
To do this, you will need to edit the program by typing:
sudo nano rain_notifier.py
and scroll down a few lines until you find the one that states zipcode = ‘YOUR_ZIP_CODE’
Change YOUR_ZIP_CODE for your own zip code (or postal code), keeping the opening and ending quote. Your Zip Code is not sent to Dexter Industries, but it is sent to Weather Underground as a way of customizing the weather information for where you live.
Change YOUR_WUNDERGROUND_API_KEY for the key that you got on the Weather Underground website in the previous step. Here too, keep the opening and closing quote around the key.
Then press Control-X to exit
Click the Y key to confirm that you want to save the changes
And then press Enter to confirm the filename
Your changes are done!
To launch the program, run the following in the command line:
sudo python rain_notifier.py
Will it rain today for you?