In this article, you can use your RGBW bulb and strips to give you a heads up alert you when there's severe weather in your area. Program the bulbs and light strips around your house to turn 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 bulb and/or light strip. 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:
LZW42 (RGBW Bulb), LZW45 (RGBW Light Strip - Coming Soon, Not Shown)
Before we get into setting up the automation, there are a few things we need to do.
Create a Virtual Switch in SmartThings
- Login to the IDE @ https://graph.api.smartthings.com/
- Click “My Devices”
- Click the “New Device” Button
- Name: Enter a “Name” for the device, this can be whatever you want.
- Label: Enter a “Label” for the device, this is optional and can be whatever you want.
- Zigbee ID: Leave blank
- Device Network ID: Enter a “Device Network Id” This can be anything you want. I recommend short and sweet but it cannot duplicate other device ID’s. Lets say it was a virtual switch for your living room fan lights, maybe call it LRVFL01
- Type: Select a “Type” from the dropdown, this should be, "Simulated Switch"
- Version: Set to Published
- Location: Should be your hub location, probably “Home”
- Hub: should be your hub name.
- Group: Leave blank
- Click Create
Setup an IFTTT account (https://ifttt.com/)
Figure out your RSS Feed
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 =
Now that the pre-reqs are out of the way, let's start setting this automation up. First, we'll setup the virtual switch and RGBW bulb/strip color automation via SmartThings (to use to notify you of inclement weather), then we'll setup IFTTT. In this example, we're going to have your bulb and/or light strip turn red when there's a Tornado Watch.
Setting up the Automation
The first step is to create the automation that when the virtual switch is turned on via IFTTT, your bulb and/or light strip will turn on (we'll just use the bulb in this example). The reason we have to do this is because there's no built in effect in IFTTT to turn on your bulb to a certain color -- it only has the ability to turn on.
Open up your SmartThings App
- Click on the three lines at the top left of the screen and select, "SmartApps"
- SKIP IF YOU HAVE SMART LIGHTING INSTALLED: Then if you haven't installed the Smart Lighting SmartApp, click on the (+) and search for Smart Lighting and select it
- Open up your Smart Lighting SmartApp and select, "New Lighting Automation" and fill out the fields as shown below:
- Which devices do you want to control = Select your smart bulb(s) and/or light strip
- What do you want to do = Turn On & Set Color (ST shows Colour)
- Color = Red
- Dimmer Level = 100%
- Select Trigger = Switch
- Which switch? = Select your Virtual Switch
- Turn on & set color when = Turned On
- Turn off as well = De-select this
Check to see if this works by turning on your virtual switch -- your bulb should turn red.
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 Virtual Switch you created
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 virtual switch and then SmartThings will run the automation we created to turn on your bulb(s) and/or light strip to red at 100%.