A collection of notes & ideas from the Quartz Engineering team
The clear, blue sky out the window of the Quartz office was telling us it was safe to venture out for lunch, but our light bulb, glowing purple, indicated otherwise. Sure enough, it started to rain about 10 minutes later. We could see pedestrians outside the window running for shelter, caught without an umbrella and in dire need of a weather bulb.
The weather bulb’s creation builds on our earlier project in which a bulb flashed every time Quartz was mentioned on Twitter. That was nice while it lasted. This time around, we wrote a few scripts to change the hue of a light bulb based on the forecasted weather.
We bought a set of three Philips Hues, which are multicolored LED bulbs that can be controlled wirelessly and connect to the internet. At first, we didn’t know what to do with them, but the Hue is easily hackable, so we were quickly able to gain control over the bulb via a group chat bot. This spiraled downhill pretty fast. Some people changed colors as rapidly as possible in a successful attempt to annoy the rest of the office. We needed another use for the bulb, and needed it fast.
A bunch of us at Quartz are weather nerds, and I thought connecting the bulb to the forecast.io API would be a useful solution for the office. And thus, the Quartz Weather Bulb was born. It changes color depending on what the weather is going to be 10 minutes from now, according to forecast.io. The idea is simple. You can look at the bulb before heading out and quickly know if you need to grab an umbrella to protect against a downpour or put on sunscreen to prevent a nasty burn.
The light color delineation is fairly straightforward. When the bulb is purple, it’s going to rain. The brighter the bulb, the wetter it will be. Yellow means clear skies during the day. At night, clear skies are designated by a light blue. And if the bulb is bright red, than it’s really hot out.
If you are comfortable editing a config file, know what a cron job is, and happen to have a Philips Hue Starter Pack laying around, you can check out our code on GitHub and set up your very own weather bulb.