Skip to content

SamWilliams/WeatherBulb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeatherBulb 0.5

Change the color of your Philips Hue bulb based on the current minute weather forecast from the forecast.io api

If You are tired of getting soaked because you forgot to check one of the 500+ weather apps installed on your phone, and happen to have a Philips Hue kit, this script is for you.

Requirements

Setup

Edit the config.php file with the appropriate settings.

  • apiKey: The api key provided at https://developer.forecast.io/ after registering for a free account.

  • hubApiUrl: this is the full url to access the api, according to the steps http://developers.meethue.com/gettingstarted.html here. The url should include the name of the user you created on the hue bridge for accessing the api.

  • longitude/latitude: In decimal degrees format (40.723056 -74.000833). Note: forecast.io may not provide "minutely" forecasts for all locations. The script should default to the forecast for the next hour if it can't find a minute forecast.

You'll also want to create a cronjob to run weatherBulbCron.php every 2 minutes or so to stay under the current free forecast.io api limit. Below is an example one that I use.

*/2 * * * * /usr/local/bin/php /www/weatherBulbCron.php > /tmp/hue.txt

Usage

  • look into the light
    • If it's purple, It's going to rain, grab a rain coat or umbrella. The brighter it is, the more it will rain.
    • If it's red, It's going to be hot and you might want to put on some sunscreen.
    • If it's orange, all is good, with clear/overcast day skies. Brightness is based on temperature.
    • If it's blue, it's night time, but all is still good with clear/overcast night skies. Brightness is based on temperature.

About

PHP scripts for displaying the weather forecast on a Philips Hue Bulb.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages