(Or "How I Sold My Wife & Mother-in-Law on Home Assistant")
I live out in the Midwest part of the United States. Specifically, Iowa. Some might think of our state as being "tornado alley," and perhaps at one time, that might have been the case. It's not really totally true any longer, though. Yes, we do get our share of interesting weather out here, but the Southeastern part of the US certainly has it's share of tornadic activity (arguably even more than we have in Iowa); and states like Kansas, Oklahoma, and Missouri sometimes give us a run for our money as well. Take a look at the
NOAA Storm Prediction Center's "Tornado Watch Summary" for 2023 (up to the date that I started putting this article together) to see what I mean:
It's common knowledge out here that a NOAA Weather Radio is your best line of defense when it comes to keeping up with notification of weather alerts. I've owned one since the early 1990's, and I can attest to it being a nearly flawless method of weather alerting. I say nearly because:
- You must live close enough to a transmitting site to make a weather radio work. NOAA does a pretty good job of blanketing the country. However, where I live, I must use an external antenna (as opposed to the telescoping whip that comes with the radio) to receive any sort of clarity on any of the stations "near" to me.
- If you are out of earshot of your radio, it can alert non-stop until the sun rises in the west, and it would do you no good.
There is a pretty good workaround to these issues, though: weather alerts by cell phone. We've seen massive improvements in how well (and reliable) weather alerts by cell phone have become. This assumes, however, that you have your phone with you; you're connected to the network; and you have alerts properly configured.
But what if you want to have a "high tech" or even "Trekkie" kind of look at weather alerting? Something that would make even your wife and live-in mother-in-law think that all of the tinkering you've done with Home Assistant actually makes some useful sense? A way to get the alerts noticed, unmistakably, even when working out in the yard?
If that's what you're seeking, you've come to the right place!
Weatheralerts
The first thing you're going to need is a HACS integration called "
Weatheralerts". Nothing that I talk about in this article will work without that integration fully installed and properly configured, as it's the main driver behind this project. My recommendation would be to get that package installed first. Make sure it's actually working as it should, and that you are getting proper notifications of alerts for your specific area. It's far easier to troubleshoot one problem at a time than to introduce several new packages, have something fail, then try to figure out exactly which one caused the wheels to fall off.
It took a little bit of playing around with the YAML code to get Weatheralerts working correctly for my HA installation. Ever since, though, it's been flawless - with one caveat: loss of internet. If there is an active alert and I lose internet connectivity (which happens more than I like, since I'm on Starlink), the package then assumes that there are NO active alerts. That's a problem, and you'll see why shortly.
Light Strips
Once you have Weatheralerts running like a well oiled machine, it's time for the next step: alerting. My house is a very long and narrow build, almost like a manufactured (or mobile) home. I have a very long hallway on the main floor and in the basement, perfect for a long strip of LED lights that will show the current "alert level." I chose the
Meross 16.4 ft Smart WiFi LED Strip for this task, one for each floor. There is an integration in HA for Meross, but I strongly advise you to NOT use the standard integration. Instead, look for the
Meross LAN integration in HACS. If you use the standard integration, you'll be dependent on the cloud, you'll quickly exhaust your API resources from Meross - and they'll shut you off. I know that from experience. 😉
Alerting Rules
Now, here's where it gets fun.
You need to build an automation that lets HA tell your light strips what to do and when to do it. This is where you're going to need a good understanding of YAML, or a little help from someone who knows YAML.
I'm going to come out and say it: the HA community does some truly outstanding and amazing things, but for the sake of all that is holy, don't try to find a lot of help with YAML programming. I asked several times for assistance with this on the Discord server and in the HA Community Forums on the web. You might have guessed I was asking for the secret to KFC's fried chicken or the recipe for Coca-Cola; I got almost as much response looking for YAML coding help as I might have gotten for those two requests!
I ended up using a new resource: ChatGPT. I told the AI what I wanted to do, and it actually helped me with setting up the framework. Huge disclaimer here though! Remember that unless you actually subscribe to ChatGPT, you're going to get info that is current only to 2021. YAML programming syntax has changed a little bit in 2 years, and that did create a couple of issues.
But not to worry! At least now I had a framework, I could post what I had. and ask for some specific, targeted help. That generated a little more response, but had it not been for one particular user on Discord who was actually very generous with his (or her) suggestions, I'd probably still be floundering around.
Here's what I had in mind:
Green Alert
Everyday, run of the mill, nothing to see here - move along status. In this mode, the light strips remain turned on, colored green, and at only 5% brightness. This does a couple of things:
- Ensures that the light strips are powered on.
- Keeps the presence of the light strips in mind, so a change in color is noticed more readily.
Yellow Alert
This mode would be for any alerts that I wanted the household to know about but were not considered critical or immediately life-threatening. In this mode, the lights go to 100% steady yellow. Your level of comfort will vary on this, but for us, we chose the following:
- Severe Thunderstorm Watch
- Tornado Watch
- Flash Flood Warning (we sit on pretty high ground - if we get flooded, we have bigger problems)
- Excessive Heat Warning (gotta take care of the animals)
Red Alert
Time for the fecal matter to hit the rotary oscillator. In this mode, the lights go to flashing red, 100% brightness. Again, your comfort level will vary, but we chose the following:
- Severe Thunderstorm Warning
- Tornado Warning
- High Wind Warning
- Extreme High Wind Warning
- Ice Storm Warning
These are all alerts that we wanted to have as full front & center of our attention. We're still a little on the fence about the Ice Storm Warning, though... that one might move to yellow, since it's a longer term event.
After some fits and starts, I have code that is basically doing what I want it to do about 95% of the time.
You can find my automation code on dpaste. I will strive to keep it updated as I make any changes to it.
And I'm very open to others who want to make suggestions to streamline it or make it better! I won't bite your head off or ignore you.
If you want to see how this works, I've posted a
short YouTube video of the lights going through their different modes.
What's Not Working?
- If NWS issues a follow up "Special Weather Statement" while a "yellow alert" watch of some sort remains in effect, the new SWS will overwrite the watch and the lights will go back to green (they should remain yellow). Or, perhaps a new "yellow alert" watch of some sort is issued while a "red alert" warning remains active. (Flash Flood watch issued after a Severe Thunderstorm Warning is issued.) Again, the lights will flip to yellow instead of remaining flashing red. I know this can be tweaked with some modifications to the YAML logic statements, but I haven't been able to do so yet.
- If internet connectivity is lost while in yellow or red mode, the lights will go back to green. I'm not 100% sure how to handle that one just yet.
Outside Alerts
This was all well and good for interior alerting, but what about outside? We nearly got caught with our britches down one day this spring, so I set out to tackle that as well. For this stage of the project, I purchased the
Govee Outside Smart Wi-Fi 32 Foot LED Light Strip. I then wrapped them around the utility pole we have in our driveway for our personal streetlight (seems like everyone has one of these in rural Iowa). There is a HACS repository built for the Govee Lan Integration, and that's the one you want.
Once installed on the pole, it was simply a matter of adding that strip to my "Alert Lights" device group, and bingo-bango - all three strips now act as weather alerting lights. My neighbor even watches for my exterior lights to change from her house, 1/4 mile away.
(I told my wife the next thing I need is a surplus tornado siren from eBay, but she did not think that would be a good idea. Killjoy.)
(And those are not electric wires. That's a folded dipole and the feeder coax.)
Still To Do...
- If there's a "red alert" from NWS, I'd like to get this automation to switch my wall-mounted tablets from whatever theme they're currently using to the HA LCARS "Red Alert" theme. (If you're a Trekkie and you haven't checked out that frontend in HACS, you're missing out.) And of course, back to whatever default theme they were using when the alert is over. I'm sure it can be done, probably. I haven't fully investigated that.
- I need to clean up the hallway light strips. This will involve installing an AC outlet up higher to the ceiling. I might also look at some translucent tubing to put the lights in, so it's a more diffused light and it's easier to mount nicely.
- I might look at a way to add a sound effect to the red alert mode, but it better be something that only sounds for a short period of time (or until/unless manually silenced). Any goodwill I've gotten from the ladies of the house up to this point would be trashed as soon as this project becomes annoying.
- I still have to believe there's a way to get the trigger for these alerts directly from NWS over their weather radios, as opposed to requiring a feed from NWS in Weatheralerts. This is the 21st century. We have the technology. I just need one or two people really good with automation and coding to help make it happen.
If you've made it this far in the post, thank you for reading! Again, I'm open to any suggestions you might have, as this is not at all a be-all/end-all installation. There's probably a lot more that could be done, and I'm still pretty new to the HA world right now. Constructive comments are always welcome!