Sign inSign up

drumsergio/radares-anunciados

By drumsergio

•Updated 1 day ago

Speed radars announced in Spain, as Home Assistant zones that warn you

Image
0

194

drumsergio/radares-anunciados repository overview

Radares Anunciados

⁠Radares Anunciados

License

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.

⁠Features

  • One GeoJSON feed with every announced radar, each point tagged with its source and license
  • The mobile-radar lists that councils publish: Murcia (weekly), León (monthly, every day) and Donostia (daily)
  • Fixed, section and mobile-stretch radars from the DGT, the Servei Català de Trànsit, the Basque and Navarra governments, and the cities of Madrid, Salamanca and Donostia
  • Speed cameras mapped in OpenStreetMap⁠
  • Home Assistant zones kept in sync with the radars around you, for alerts through the companion app
  • Warns from published positions only; it never senses or jams a radar signal

⁠Quick start

export HA_URL=https://homeassistant.example.org HA_TOKEN='<long-lived token>'
docker run --rm -e HA_URL -e HA_TOKEN drumsergio/radares-anunciados:0.2.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:0.2.0

Then import the alert blueprint⁠. Full steps in Getting started⁠.

⁠Open feed

Every 6 hours a GitHub Actions run builds the feed for all of Spain from every source and publishes it on GitHub Pages, at geiserx.github.io/radares-anunciados⁠:

  • feed.geojson⁠: every radar as a point and every watched stretch as a line, each with its source, attribution, limit and link
  • status.json⁠: per source, ok, stale (this run failed, its last good copy is used) or missing, with record counts and the time of its data
  • a map of the feed

The feed includes OpenStreetMap data, so the database is offered under ODbL 1.0⁠ with each source's attribution: see LICENSE-DATA.md⁠. The run happens outside Spain, so a source that answers only Spanish addresses shows as missing there. How it works⁠ has the details.

⁠Documentation

  • Getting started⁠: token, container, blueprint, settings
  • How it works⁠: sources, street matching, the 20-zone limit, passive zones
  • Alerting⁠: Prometheus metrics, the health check, alert rules for a failing service
  • Sources⁠: every source, its licence and cadence, and what we checked that publishes nothing usable

⁠Data sources

SourceLicense
DGT NAP⁠: fixed radars, sections and mobile-radar stretchesCreative Commons Attribution
Servei Català de Trànsit⁠: fixed, section and trailer radarsLlicència oberta d'ús d'informació – Catalunya
Madrid⁠ and Salamanca⁠ open dataCC BY 4.0; GNU FDL
Basque and Navarra governments, Donostia, Murcia and León councilsno reuse terms published
OpenStreetMap⁠ contributors: cameras, speed limits, street geometryODbL 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.

⁠License

Code: GPL-3.0-or-later⁠. Data in the published feed: ODbL 1.0⁠.

Tag summary

Content type

Image

Digest

sha256:1b56893d9…

Size

65.6 MB

Last updated

1 day ago

docker pull drumsergio/radares-anunciados