Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the TidBITS Content Network for Apple consultants.

Using Philips Hue Lights as a Hurricane and Tornado Alert

The other morning, I was rudely awakened when my wife, a teacher and the household weather hawk, started panicking about a tornado watch, which means that conditions are ripe for twisters. It soon became a tornado warning, which means that one is imminent. Not the best news to get first thing, particularly before coffee.

Tornados are no joke, especially here in Tennessee. A severe tornado in 2008 destroyed part of my town and killed several people. It was so bad that then-President Bush visited to survey the damage.

After that, the town installed a warning siren, but this time it was drowned out by the noise of high winds and pouring rain on the roof. Thankfully, I had a battery-powered radio tuned into a weather station and the local TV news to stay up to date on the storm’s direction. It didn’t end up hitting us, but I would have liked a little more warning.

When it comes to winds so powerful they can toss around cows, you can’t have enough warnings to take cover. You know how in Star Trek, when something bad is going down, the entire bridge turns red? That gave me an idea of how I might use the Philips Hue light bulbs (see “Getting Started with the Philips Hue Smart Light Bulbs,” 1 August 2016).

Apple’s HomeKit automation framework is great, but limited in what it can do. For its line of Hue bulbs, Philips provides its own API with many more capabilities, such as integration with the Internet automation service IFTTT (see “IFTTT Automates the Internet Now, but What Comes Next?,” 20 December 2013).

I initially thought about using the Philips Hue Severe Weather Alert applet, but the National Weather Service considers all sorts of things “severe” that fall well below the level of “There’s a tornado coming!” So I went looking for a more customizable solution and found it in the form of IFTTT’s Weather Underground integration.

It doesn’t include severe weather alerts, but it can use wind speed as a trigger. I made an IFTTT applet that turns on all my Hue lights and makes them red when the wind speed nearby exceeds 60 miles per hour (hurricane wind speed starts at 73 miles per hour, so I set it to 60 to be safe). Unfortunately, IFTTT no longer allows sharing of applets, so here are the steps to make your own:

  1. Set up accounts with My Hue and IFTTT.

  2. From the IFTTT Web page, click your username in the upper right to reveal a drop-down menu and choose New Applet.

  3. Click +this in the sentence, choose the Weather Underground service, and then choose the Wind Speed Rises Above trigger. When you first connect Weather Underground to IFTTT, it prompts you for your location.

  4. On the next screen, specify the trigger wind speed and the units. Keep the wind direction on Any, and click Create Trigger.


  5. Next, click +that, choose the Philips Hue service, and select the Change Color action. Under Which Lights, choose All Lights, and under Color Value or Name, enter Red. You can use any standard color you like, or even specify a color hex code to be precise.


  6. Click Create Action to finish.

Now, when wind speeds reach 60 miles per hour near you, all your lights should turn red. The next question is, how can you test this setup without an approaching hurricane or tornado?

I created another applet to try the actions first. It used a simple text message as a trigger, and when I activated it, it turned on all my colored Hue lights and made them red. My white Hue lights also turned on but obviously didn’t change color. I then created an applet to test Weather Underground’s triggers — it turned my living room lights blue when Weather Underground reported that it was sunset. It fired at 5:40 PM on the dot. So both the Weather Underground triggers and Hue actions worked. Feel free try other triggers and actions to test instead.

Of course, I wouldn’t recommend using this system as your only tornado or hurricane alert, since there are a lot of “moving parts.” If your power or Internet service cut out, as would be likely in high winds, this system wouldn’t work. Plus, latency could cause it to not work in time. (IFTTT says it could take up to an hour for an action to trigger, although my tests above worked much more quickly than that.) Unfortunately, I won’t know for certain how well this system works until we get high winds again. However, I’m willing to bet that I’ll see it in action before the spring is over.

What if you don’t have Hue bulbs, or would like an additional warning that you’ll see even if you’re not home? Create the same IFTTT automation, except change the “that” part to the SMS action and choose Send Me an SMS. The default message tells you the wind speed, but I prefer something a bit more to the point.


Although this is a good real-world example, I’m sure you can come up with other ways to use IFTTT with Hue bulbs. For instance, Philips provides an IFTTT automation that turns your lights blue when it’s raining. As amusing as that might be once or twice, I avoid such automations for fear of “haunted house syndrome” — things happening in your house seemingly at random. But if you’re interested, spend some time exploring IFTTT to see what other triggers inspire you.

 

READERS LIKE YOU! Support TidBITS by becoming a member today!
Check out the perks at <http://tidbits.com/member_benefits.html>
Special thanks to John Oakley, Steve Deckel, P T Withington, and
Sebastien thugnet for their generous support!
 

Comments about Using Philips Hue Lights as a Hurricane and Tornado Alert
(Comments are closed.)

To test, why not set to a lower number? Or make a copy, set to lower number and use a different signal, e.g., yellow lights?

Thanks for the article.
Josh Centers  An apple icon for a TidBITS Staffer 2017-03-06 12:39
I might try that, but wind speed is sort of hard to notice unless it's really strong. The tests I used were relatively quick and easy to verify. I'll definitely keep everyone posted on how well this setup works.
Scott M.  An apple icon for a TidBITS Benefactor 2017-03-09 19:18
Another way you can theoretically do specific severe weather alerts with Hue lights and IFTTT is to use the Feed IFTTT channel/applet maker piece (or whatever they call them now). With that, you can then use the feed for the National Weather Service (aka alerts.weather.gov) for your county for key words related to the type of alert. For example, I have one set to watch my county's feed for the word "tornado". I did this because like you, I cannot really hear my towns tornado warning sirens most of the time (I live on the edge of town and they only seem to have the sirens closer to town center, so unless I am outside I typically don't hear them).

I will be honest that I don't know completely if this works as I don't believe we have had a tornado watch or warning since I created it about 4 years ago. I do back this up with several apps on my iPhone for tornado alerts (but this is kind of defeated by my putting my iPhone into Do Not Disturb mode at night...I have put in feature requests multiple times to allow more granular control of what app alerts can bypass Do Not Disturb) and the fact that my county has a phone call alert system. And, of course, we do not have a ton of tornados here.

I do also have another another IFTTT recipe/app (again whatever they call them now...tired of marketing idiots "rebranding" stuff, usually to things that make less sense or sound stupid...but I guess they have to justify being paid somehow) that will turn just one of lights red when there is a severe weather alert. It too uses the Feed channel to watch alerts.weather.com. And you are definitely correct that they seem to treat just about every alert as "severe". That light seems to come on an awful lot. And with it setup the way it is, it will come on again just if they update/refresh the alert.

I have another light set to turn blue if the built-in IFTTT weather "channel" (which it appears IFTTT has replaced with the Weather Underground "channel" detects rain for my area. I plan to potentially switch this over to a Netatmo rain gage as soon as I get around to installing the rain gage.

For all there Hue light based alerts, I only turn one light a color in the family room, which does not bother me too much. The exception is the tornado one. That if triggered would "loop" (continuously run all the lights through the colors) all my Hue lights (including the lights in my bedroom).

I also use the sunset function of the Weather Underground "channel" to turn on a few lights. Some of the lights, I then just set a specific time off while a couple outside non-Hue "smart" lights do use the sunrise function. You can kind of do this directly with the Hue app, but you have to set specific times, while the sunset/sunrise function will change with the changing time of the sunsets/sunrises for your location.

I do make use of the built-in the Hue app "arrive home after sunset" function to turn on most of my Hue lights (exception being the bedroom...every once in a blue moon, the GPS location even when home somehow triggers this routine, which is kind of pain if I am sleeping in the middle of the night and include my bedroom Hue lights).

And while not part of IFTTT or the Hue app routines, I do make fairly extensive use of both Dimmer Switches and Taps (or "white hockey pucks" as I call them). And I also make use of a few Echo/Echo Dots for verbal control of the lights.

The one area I have not really gotten much into is using Homekit and Siri to control them. Part of this is because I just have not gotten around to swapping my original Hue bridge with a 2nd Gen one that support Homekit. The other reason is that for some strange reason I don't have a Homekit section in the Settings app on my iPhone, so I have yet to figure out how to set up my AppleTV as the Homekit "base". I do have a Homekit compatible thermostat, so Homekit was technically active when after I installed that thermostat back when the iPhone was using iOS 9. I will note that my iPad Pro does show the Homekit section in Settings. Both the iPad and iPhone are nominally fully updated (the iPad may not have the latest 10.2.1 update, but does have 10.2 at least). I am not overly worried about it as I can do verbal control with the Echos (which also seem to be much less picky than Siri, even with her nice British accent I gave her) and I have more than enough ways to control the light remotely with my phone and smartwatch. When I do get around to installing the 2 Gen bridge, I might be more focused about it.