RSS and Home Assistant: early warning for grid blackouts
California, like most of the West Coast, is currently in the middle of a prolonged and serious heat-wave. Record breaking temperatures results in a distribution grid stressed beyond it’s abilities which guarantees blackouts.
The organization that oversees the electric grid in California publishes RSS feeds for various types of grid related news and events. All the CA ISO RSS feeds are published here, but the two feed that I’m using are:
As energy demand ramps up,
flex alerts are issued as a call to reduce energy consumption. If demand continues to rise
warnings and, finally,
stage3 events are issued. A
warning does not guarantee a
stage3 event, but a
stage3 event mans that blackouts are all but inevitable in the coming hours. The exact meaning of each alert type is outlined in this PDF.
noticeRSS.xml feed, has early warning notifications that look like this:
Note: there’s nothing wrong w/ your browser, the
\n characters are in the actual feed. No matter, the RSS parser in Home Assistant can tolerate them.
I use the alerts/warnings to do a few simple tasks, but there’s so much potential beyond the automation I currently have:
- bumps thermostats up by a few degrees to lighten demand*
- re-schedule a few routine activities that are usually done in the evening to as soon as possible (cooking, for example)
- notify me to immediately go check that the generator has fuel
- Currently in ‘unarmed’ mode as I tweak the logic driving the decision
How to do it
Basically, add the two feeds above to the feedreader integration and use the
feedreader type of event to trigger your automation.
configuration.yaml, load the
and in the
feedreader/rss.yaml file, add the URLs:
Unfortunately, Home Assistant does not support setting the
scan_interval per feed, so you’ll have to figure out a happy middle ground if you’ve already got a few RSS feeds you monitor. Likewise, don’t pull the feed down excessively… I don’t see a lot of evidence that the feed is cached well and the CA ISO does occasionally have to put banners on the top of their site saying that the site is under heavy load. Don’t be the reason the site goes down because you wanted instant notification.
If you’re not in a position to do any sophisticated automation based on the notification, it’s still simple to fire off a notification to manually prepare:
Which should create a simple notification that’ll look something like this:
strptime function yields
end objects that can be manipulated further: