Speed radars announced in Spain, as Home Assistant zones that warn you
119
Radares Anunciados is a Docker service that gathers the speed radars announced in Spain into one open GeoJSON feed. Its Home Assistant side turns the radars near you into zones, so the Home Assistant companion app alerts you when you drive toward one.
This repo is the data side: the sources, the open feed and the Home Assistant zones. The phone app (iPhone now, Android later) lives at https://github.com/GeiserX/radares-anunciados and reads this feed.
export HA_URL=https://homeassistant.example.org HA_TOKEN='<long-lived token>'
docker run --rm -e HA_URL -e HA_TOKEN drumsergio/radares-anunciados-ha:0.3.0 sync --dry-run
mkdir -p data && sudo chown 65534:65534 data # the container runs as nobody
docker run -d --name radares -e HA_URL -e HA_TOKEN -v ./data:/data -e RADARES_CACHE=/data drumsergio/radares-anunciados-ha:0.3.0
Then import the alert blueprint. Full steps in Getting started.
Every 6 hours a GitHub Actions run on a self-hosted runner in Spain builds the feed for all of Spain from every source, including those that answer only Spanish addresses, and publishes it on GitHub Pages, at geiserx.github.io/radares-anunciados-ha:
feed.geojson: every radar as a point and every
watched stretch as a line, each with its source, attribution, limit and linkstatus.json: per source, ok, stale (this run
failed, its last good copy is used) or missing, with record counts, the time of its data and the
source's own last update date when it gives oneThe feed includes OpenStreetMap data, so the database is offered under ODbL 1.0 with each source's attribution: see LICENSE-DATA.md. Data from public bodies is reused under Ley 37/2007 on the reuse of public-sector information, with the source cited, values unchanged, and the source's last update date where the source gives one. How it works has the details.
| Source | License |
|---|---|
| DGT NAP: fixed radars, sections and mobile-radar stretches | Creative Commons Attribution |
| Servei Català de Trànsit: fixed, section and trailer radars | Llicència oberta d'ús d'informació – Catalunya |
| Madrid and Salamanca open data | CC BY 4.0; GNU FDL |
| Barcelona and Madrid traffic-fines open data, and Madrid's street register: where mobile radars fined, months ago | CC BY 4.0 |
| Basque and Navarra governments, León council | no reuse licence; reused under Ley 37/2007 |
| Donostia council | its own reuse terms, in its legal notice |
| Murcia's Policía Local list, León's on days only iLeón covers | facts only, read in the press |
| OpenStreetMap contributors: cameras, sections, notes, speed limits, street geometry | ODbL 1.0 |
The full table, with cadence and which sources need a Spanish IP, is in docs/sources.md.
In Spain, RGC art. 18.3 bans radar jammers and radar detectors in a vehicle, and excludes from that ban the warning mechanisms that report where traffic enforcement systems are. Radar positions here come only from published lists and maps, so this project is one of those warning mechanisms.
Code: GPL-3.0-or-later. Data in the published feed: ODbL 1.0.
Content type
Image
Digest
sha256:34a4859af…
Size
65.6 MB
Last updated
5 days ago
docker pull drumsergio/radares-anunciados-ha