In this article, you can use your Red Series Switches to give you a heads up alert you when there's severe weather in your area. Program the switches around your house to flash red when there's a Tornado Watch, blue when there's a Flash Flood Warning, or white when there's a Winter Weather advisory, etc. This is done via IFTTT (If This Then That) and SmartThings.
How it will work is via an RSS Feed to Weather.gov and when there's a keyword/phrase detected (ie: tornado watch) in that RSS Feed, it will notify SmartThings to turn on your switches notification. Then if you want them to be all be synced, we'll setup an automation to do so.
Products Used & Links to Purchase
The following products below can be used in this scenario. Feel free to click on the pictures to be taken to the product page.
Model #'s from left to right: LZW30-SN (On/Off Switch), LZW31-SN (Dimmer Switch), LZW36 (Fan/Light Switch)
Before we get into setting up the automation, there are a few things we need to do.
- Install the proper Device Handler and Child Handler (for notifications)
- Red Series On/Off (LZW30-SN): Device Handler Installation Instructions, Device Handler Raw Code, Child Handler Raw Code
- Red Series Dimmer (LZW31-SN): Device Handler Installation Instructions, Device Handler Raw Code, Child Handler Raw Code
- Red Series Fan/Light (LZW36): Device Handler Installation Instructions, Device Handler Raw Code, Child Handler Raw Code
- Setup an IFTTT account (https://ifttt.com/)
- Figure out your RSS Feed
- Go to: https://alerts.weather.gov/ (RSS Feed for Kalamazoo says it updates every 2-3 minutes -- check your city for speed)
- Click on, "By State/County" (on the left side)
- Scroll down and find your state -- then select the county list
- Find your county and then click on the county code (ie: Kalamazoo, MI is MIC077)
- The URL is your RSS Feed (ie: Kalamazoo, MI = https://alerts.weather.gov/cap/wwaatmget.php?x=MIC077&y=1)
Now that the pre-reqs are out of the way, let's start setting this automation up. First, we'll setup the notification effect child device via SmartThings (to use to notify you of inclement weather), then we'll setup IFTTT. In this example, we're going to have your switch Fast Blink Red when there's a Tornado Watch.
Setting up the Notification Effect
The first step is to create the notification animation that will run when your IFTTT Applet is triggered.
- Open up your SmartThings App
- Select your Inovelli Red Series Switch
- Click the three dots at the top right and select, "Settings"
- Scroll down to the, "LED Notifications" section and choose the following effect settings
- Effect Color = Red
- Effect Level = 100
- Effect Duration = Indefinitely
- Effect Type = Fast Blink
- Go back to the home screen (where it lists out your rooms) and check to see if your notification switch shows up (it should say, "[Your Switch Name] (Notification 1)")
NOTE: The Fan/Light switch will have two different LED Bars to choose from (the Fan and the Light portion).
Setting up the IFTTT Integration
Now that the notification animation is setup, it's time to setup your IFTTT Applet and then connect everything.
- Log into IFTTT and click, "Explore"
- Click on, "Services" at the top right and search for, "SmartThings"
- Click on, "Connect" and then enter in your credentials if prompted
- Select the devices you want IFTTT to be able to see (ie: select when you create an Applet)
- Once completed, you will see that SmartThings is connected
- Now click on, "Create" at the top right
- Click on, "If This (Add)" and search for, "RSS Feed" and select it
- Then click on, "New feed item matches"
- In the text box, "Keyword or simple phrase", type, "Tornado Watch" (NOTE: if you wanted to be notified whenever there's a Tornado Warning and Watch, just type the word, "Tornado")
- In the text box, "Feed URL" insert the Weather.gov URL from the Pre-Requisites section (ie: https://alerts.weather.gov/cap/wwaatmget.php?x=MIC077&y=1)
- Then click on, "Create trigger"
- Then click on, "Then That" and search for, "SmartThings" and select it
- Next click on, "Switch on"
- Under the, "Which device?" dropdown, select the Notification switch you created (ie: "[Your Switch Name] (Notification 1)")
- Click on, "Create action", "Continue", and then, "Finish"
Now whenever the keyword, "Tornado Watch" is detected in your RSS Feed (via Weather.gov), IFTTT will trigger an Applet which tells SmartThings to turn on your notification.