[Custom Integration] Dutch emergency service alerts sensors

Small disclaimer: this custom integration has potentially limited use to others; I built it for my own pleasure.

For background, I’ve been working on a hobby project where I collect public emergency service alerts in the Netherlands (P2000) and plot them on a map after enriching and contextualizing them: zwaailicht.nu.

I wanted my Sonoff NSPanel to alert me whenever there’s an emergency service call nearby. So I vibe-coded this custom integration, which closed a nice loop: I receive the raw P2000 pager messages via an RTL-SDR dongle plugged into the same Raspberry Pi that runs my Home Assistant.

These raw received messages are cryptic pager codes like P1 BNH-03 BR WONING WESTZIJDE ZAANDAM 118032. They go out to a VPS where I run an enrichment pipeline (geocoding, incident type classification, AI summaries, clustering nearby calls into incidents, matching to news articles), and return to that same Pi via this HACS integration as something more comprehensible — like “Large fire at Westzijde in Zaandam, 5 units dispatched” — including lat/long coordinates.

What the integration provides:

  • Two sensors: one for meldingen (individual dispatches), one for pieken (notable multi-unit incidents)
  • State shows the most recent alert within a configurable radius from home
  • Attributes include dienst, priority, distance, AI summary, street name, coordinates, and timestamp
  • Custom events (zwaailicht_new_alert, zwaailicht_new_piek) that fire once per new alert

My automation: the NSPanel receives a notification on any urgent call within 2 km, and when bursts of activity are detected nearby. Useful? Questionable. Fun to build? Quite :-).

Links:

Curious if there are other RTL-SDR / P2000 hobbyists here, and what automations you’d build with this.

Well, when my elderly mother was still alive I had setup a 500m radius around the house where she lived and an automation that triggered at specific P2000 messages at that location. Since she lived about 100km away I was happy to get notified as soon as possible.

1 Like