Summary
Building a HACS integration for making emergency management feeds useful, and seeking your input as part of its development and progress.
Disclosure: AI used in part within repository code referred to
Consistent with now located community rules (which may in part include Want to help others? Leave your AI at the door - Blog - Home Assistant Community), the repository referred to and getting started on development in this post contains - in part - AI generated code.
After doing some work in my HA instance to bring in RSS and CAP feeds from my local emergency management agency, I started thinking a little bigger.
I want to get some input and insight from others in this area to see if what I’m thinking about is wanted, how it might be used, or what prospective users might want to see from such an integration.
How can you help?
I’d appreciate all and any input from the community on the following:
- Would this be useful to you?
- Would you be using it in the way I’ve envisioned, or some other way - and if so, what would be that be and why?
- Does this offer all the features and functions you’d think are relevant for a first release of such an integration?
- Have I missed anything of importance or relevance to this?
Where I’m at with this idea
Short version: Repo created, in part using AI generated or supported code for the baseline of what I didn’t already have for this concept and idea, and nearly ready to run initial tests on one of the initial components (maintaining and creating a directory of feeds from public sources) - after I setup a standalone HA instance for the purpose of developing, testing and validating this.
On the basis of work to successfully ingest CAP-au feeds, filter them to a location, and render any filtered results in a Markdown card; I’ve opened and started a public Github repo where I’ve developed the scaffold for getting started on this, and am almost at the stage of testing the latest iteration of the concept and approach.
If you’d like to take a look, or read more, feel welcome to by visiting:
twcau/CAP-au-for-home-assistant: Repo for future HACS package, that will enable ingest of emergency information feeds following appropriate specifications, to identify alerts relevant to one or more locations for display and action.
What does the package need to be useful?
At the moment, this is where i’ve landed:
- Guided setup with *my.home‑assistant deep‑links to the exact screens (Blueprint import, Developer Tools → YAML, Entities, Scripts, Events).
- Multi‑feed ready:
- monitor multiple CAP/XML/geoJSON feeds (e.g., state, national, overseas agencies);
- use per‑feed or combined views, and
- a UI method for feed selection, supported by a list of feeds that is cached locally and updated from the repo on a regular basis (save users hunting for supported feeds for the most part).
- validation to warn when a provided/selected feed lacks lat/long or polygons to provide sufficient useful information pertaining to where the event is or impacting.
- Multi‑location ready: filters the feeds for events impacting one or more specified locations and radiuses/distance from border.
- plug‑and‑play feed ingestion (XML), with parsing that keeps entity
statesshort - and stores long values inattributes- (avoids the 255‑char clamp). - Unified alerts sensor: a template aggregator exposes a count plus an
alertsJSON attribute that dashboards and automations can consume. - Dashboard card - (Markdown) listing alerts with severity, urgency, area, issued time, and links.
- Blueprints - for:
- Notifications near watchpoints- (radius for circles + point‑in‑polygon for polygons).
- Zones lifecycle- (create/update/delete dynamic zones from alert geometry).
- Python Scripts where needed (sandbox‑safe; no imports) for geometry purposes.
Why am I looking at this?
Whilst we already have the Global Disaster Alert and Coordination System (GDACS) integration, it focuses on the bigger events - not smaller, more impactful things that might be closer to home (say a house or factory fire close by, or a burst pipe flooding a road).
What I found, and how I think this could be helpful
So I did a bit of research on the landscape, and found that:
- A lot of national/state/local emergency and weather agencies publish feeds for this data
- A good number of them use common and agreed protocols for these data feeds, such as the Common Alerting Protocol (CAP) or geoJSON
- When using these common protocols, they can include lat/long polygon information to work out the impacted
- There was nothing I could find for HA which would allow you to:
- Choose which feeds you monitor
- Choose exactly where you want to monitor (lat/long or polygon, and radius or distance from same, or edge of the polygon)
- Filter those feeds down to only those things which are within where you want to monitor
As such, it meant that a HA instance lacked information to trigger automations/actions at someone’s property so they could be alert or protect your property and family.
This automations/actions this could potentially enable might include:
- Send a notification about an event with as much or as little information as possible;
- Check where everyone normally at home is, and even get them to check-in by responding to a notification.
- Automatically close doors or windows, or check if any are open and need attention;
- Turn off air conditioners;
- Turn on air filters/recyclers;
- Turn on a sprinkler system for a period of time, repeatedly (say if fire or ember risk);
- Activate a well or scheme water pump, or turn one off;
- Top up a water tank;
- Focus on charging up battery storage and backup;
- Activate a foam protection system.
- Wait for a manual human confirmation from a notification, or another trigger, before taking action to do one or more of these things.
The possibilities of things that could be done on the back of having such filtered and focused data are limited only by someone’s imagination, what equipment they can get talking to Home Assistant, and how much something might cost.
But even so much as turning on an air conditioner, activating a sprinkler system on a regular basis to deal with ember attacks, or ensuring water supply and power backup is protected are things within most users’ reach.