Illuminating Hack: Pager Hue-ty

As many of you guys know, every 7 weeks at Chartbeat we have a Hack Week where we can work on any project or projects that interest us. At the end of the week, we present our creations, some of which make it to our Labs page or even become fully-fledged features for our products. 

Meet Hue.

Last year Philips released a much-hyped LED light bulb called the Hue that gives you complete control of every aspect of the bulb from your smart phone or through the Philips website. Hue lights have an API which unlocks a ton of potential for interesting integrations.  I acquired a Hue set around the holidays and ever since I’ve been wanting to hook them up to our PagerDuty alert notification system at Chartbeat.

Enter: My Hack Week project, which I’ve named “Pager Huety”.  Pager Huety is a script that controls the Philips Hue light bulbs based on triggered incidents from the PagerDuty API.

Meet me and my hack.

Part of my job as the Chartbeat Senior Web Operations Engineer requires being a part of an on-call rotation to ensure everyone’s dashboards are running smoothly 24/7.  Occasionally you may see an issue on your dashboard but luckily we’re immediately alerted to any issues via our monitoring system, which will send an alert via PagerDuty to the dedicated on-call team member.

I wrote Pager Huety to wake me up in the middle of the night with my Hue lights rather than have my phone going off with whatever less-than-awesome ringtone I’ve selected.  There’s an option to only have it alert during nighttime and filter for incidents only assigned to me.  Currently the default light sequence is to flash the bulbs red and blue a few times, then turn bright white for 10 seconds and shut off.  A video of Pager Huety in action can be seen below:


There are a lot of cool things you can do with the Hue Bulbs and your Chartbeat data.  You can even utilize the Chartbeat API to flash Hue lights when you hit a new 30 day max – want to give it a go yourself? Tweet your results to @Chartbeat.

More in Culture