Skip to main content

Trafic routier smart home integration, free and open source

Trafic routier integration for Gladys Assistant

Live road traffic in France (open data): national roads, Rennes, Nantes, Strasbourg, Bordeaux.

The live road traffic of several French metropolises, read from their open data portals: Rennes Métropole, Nantes Métropole, Strasbourg and Bordeaux Métropole. Free flow, heavy, congested or closed, road by road, and around your house. No account, no key.

Unofficial integration, not affiliated with the metropolises or their traffic centres. The sources were checked live on 2026-10-29; feedback from users of each city is welcome.

What you get​

  • The national roads run by the State (DIR): ring roads and expressways such as the Toulouse ring road (A620, A61, A621, A624), the N118 or the N136, one device per road, direction and département.
  • One device per road you follow: traffic level and its name (free flow, heavy, congested, closed), average speed (Rennes, Nantes, Strasbourg) or travel time and its usual value (Bordeaux), and the age of the measure.
  • One "Around the house" device per city: the road segments within the chosen distance of the house located in Gladys, gathered in a single level.
  • A widget "Road traffic": your roads on one row each, green, orange or red.
  • Two scene triggers: a road turns heavy or congested, a road flows freely again.
  • A scene action: the traffic on your roads in one sentence, ready to send or to say.

Requirements​

  • Gladys Assistant 5.3.0 or later.
  • Internet access from Gladys: the data comes from the open data portals.
  • No account, no API key. For the "Around the house" device, a house located in Gladys (Settings → Houses): the integration asks for access to its location at install.

Installation​

  1. In Gladys, open Integrations → Install from GitHub.
  2. Paste the address https://github.com/guim31/gladys-trafic and confirm.
  3. Open the integration once installed: the Configuration tab shows.

Configuration​

Settings​

SettingEffect
Citiesthe metropolises whose roads are offered in the Discover tab
Roads to followpart of the names of your roads, separated by commas (3 letters at least)
Around the houseoff, 500 m, 1 km (default), 2 km or 3 km around the house
Refreshevery 2, 3 (default) or 5 minutes
Language of names and messageslanguage of the feature names, the widget and the scene sentences (French)

Feature names are fixed when a device is added: pick the language first.

Add roads​

  1. Tick one or more cities and type the roads you take, for example Route nationale 136, Patton, Schirmeck. Upper case and accents do not matter. Save.
  2. Open the Discover tab: the matching roads show as "City · Road" (50 per city at most), with "City · Around the house" when segments lie within the chosen distance. For Bordeaux, the 16 routes are always offered.
  3. Add the ones you want to Gladys. Their values arrive at once.

The roads added are the watched roads: the widget, the triggers and the scene action offer them. A road added stays read even if you change the search afterwards.

A "road" gathers every segment of the portal bearing that name: in Rennes, a national or departmental road across communes, a street within its commune (the commune is in the name); in Nantes, both directions of a boulevard; in Strasbourg, the numbered sensors of one place of the traffic centre.

National roads (DIR)​

Tick National roads (DIR) and type the road number or the city, for example A620 or Toulouse. Each road is offered per direction and per département, as "A620 Toulouse · inner ring": inner or outer ring for a ring road, else "northbound", "southbound"… or "direction 1" and "direction 2" when the reference file gives no orientation. The city is the traffic-information area of the point; without one, the département number ("N136 (35)"). The direction is part of the name, its words in the language chosen.

Check​

The Status action of the Configuration tab lists the cities read, the number of roads known, the time of the last reading, the last error if any, the segments around the house and the number of roads added.

Devices​

Each road added is a read-only device:

FeatureGladys typeValue
TraffictextFree flow, Heavy, Congested, Closed or Unknown
Traffic levelrisk level0 unknown, 1 free flow, 2 heavy, 3 congested, 4 closed
Average speedspeed (km/h)Rennes, Nantes, Strasbourg, national roads
Travel timeduration (minutes)Bordeaux: travel time of the route
Usual travel timeduration (minutes)Bordeaux: the reference value published with it
Data ageduration (minutes)age of the newest measure

The level of a road is the worst level met on a quarter of its length at least (each segment counts once in Strasbourg, which does not publish lengths): one jammed crossroads does not make the whole ring road congested. The average speed is the length of the road divided by its travel time.

Without any measure less than 30 minutes old, the road is Unknown (level 0): no value is made up, the speed keeps its last known value and the data age keeps growing.

Dashboard widget​

Add the Road traffic widget to a dashboard. It shows one row per watched road (ten at most), with the name given in Gladys, for example "Rocade — Heavy · 42 km/h". In the widget settings you can pick the roads shown (empty: all of them) and hide the speed or the travel time.

Colors: green free flow, orange heavy, red congested or closed, grey unknown.

Scene triggers​

TriggerHappens when
Traffic jam on a roada watched road reaches the chosen level: heavy, or congested
Road clear againa watched road that was heavy or congested flows freely again

The Roads field filters the roads concerned; empty, any watched road. The variables available to the next actions: road, city, traffic (the level as a word), average speed.

A new level counts once read twice in a row (one more refresh): a road hovering around a threshold does not fire at every cycle. Triggers compare two successive known levels of the road: nothing fires when a portal comes back after a long outage, nor while the road is unknown.

Scene action​

Traffic in one sentence: the state of your watched roads (or the ones picked). Results:

  • sentence: "Traffic: Rocade (heavy, 42 km/h). Free flow elsewhere.", or "Traffic is flowing freely on your 3 watched roads.";
  • worst_level: the worst level, 0 to 4 (to test with "Continue only if");
  • jammed: the number of roads heavy or worse.

The sentence follows the language chosen in the configuration.

Scene examples​

  • Before leaving for work: at 7:30 on weekdays, action "Traffic in one sentence", then "Send a message" with sentence, or say it on a speaker.
  • Ring road jammed: trigger "Traffic jam on a road" (ring road, congested), then a notification "Leave earlier or take the train".
  • The road is clear: trigger "Road clear again" on the road home, then a message.

Data and refresh​

CityPortal and datasetUpdated by the citySegments
Rennesdata.rennesmetropole.fr, "État du trafic en temps réel"every few minutes~2,900
Nantesdata.nantesmetropole.fr, "Fluidité des axes routiers"every few minutes~890
Strasbourgdata.strasbourg.eu, "SIRAC - flux trafic en temps réel"every 3 minutes~480
Bordeauxopendata.bordeaux-metropole.fr, "Temps de parcours en temps réel"every 2.5 minutes16 routes
National roadstipi.bison-fute.gouv.fr (National Access Point), "État de circulation en temps réel sur le réseau national routier non concédé"every 6 minutes~1,000 points

The list of the segments (names, positions) is read once a day per city. At each refresh, one request per city reads only the segments of the roads added, filtered by the portal itself (one more request per hundred segments): a few kilobytes, about 500 requests a day per city at 3 minutes, well within the anonymous use of the Opendatasoft portals. Only the cities ticked and those of the roads added are read.

Bordeaux publishes no status: the level is computed from the travel time compared with its usual value (up to 1.3 times: free flow, up to 1.8 times: heavy, above: congested). Nantes "blocked" segments count as congested. The cycle counters of Strasbourg are left out.

The national roads publish speeds and flows per measuring point, no status: the level of a point is deduced from its speed (60 km/h or more: free flow; 30 to 60: heavy; below 30: congested). A speed of 0 km/h is no measure (an empty road or a faulty loop): the point counts as unknown. The reference file of the points (refDir.csv, ~120 KB) is read once a day; the measure file (qtvDir.xml, ~1.5 MB, every point in France) is read as a stream, keeping only the points of the roads added, and only when republished since the previous read (If-Modified-Since header). Only the non-conceded roads are published: no toll motorways.

Troubleshooting​

  • No road in Discover: check that a city is ticked and a road typed (3 letters at least), then run the Status action. An "HTTP 503" or "timeout" error comes from the portal: try again later.
  • No "Around the house" device: the house has no location in Gladys, or no segment lies within the chosen distance: try a larger one. The Status action says how many segments were found.
  • "Unknown" level: the portal has published no measure for this road for more than 30 minutes (at night, some segments are not measured).
  • For more details, set LOG_LEVEL=debug: every reading is then logged.

Limitations​

  • Only the cities listed are supported. Lyon now requires an account for its traffic feed, Grenoble publishes levels without the names of the segments, Paris and Toulouse only publish hourly or archived counts: these cities can be added if their data allows it.

  • The roads are the portals' own segments and names: a road renamed by the city becomes a new device.

  • The levels are the cities' own (floating car data in Rennes, sensors elsewhere): they may differ from a navigation app.

  • Read only. Not affiliated with the metropolises.

  • National roads: only the measuring points published by the DIR (about 1,000, mostly around the big cities); the conceded (toll) motorways are not part of them. Developed without driving there: feedback welcome.

Credits​

  • Data: Rennes Métropole, Nantes Métropole, Eurométropole de Strasbourg (SIRAC), Bordeaux Métropole, under their respective open licences (Licence Ouverte / ODbL). Commune names: geo.api.gouv.fr.
  • Built from the official integration template.
  • National roads: Directions interdépartementales des routes (DIR), French ministry of transport, through the National Access Point (transport.data.gouv.fr), Licence Ouverte. Lambert-93 projection: IGN formulas.

Configuration settings​

These are the settings Trafic routier asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
How it workssectionNoTick your cities, type the roads you take and save: they appear in the Discover tab, with the segments around your house. Add the ones you want to Gladys. No account, no key.
Cities and networksmulti_selectNoRoad traffic published live in open data. Others: see the guide.
Roads to followstringNoPart of their name, separated by commas, 3 letters at least. National roads: number or city (A620, Toulouse). Bordeaux: every route is offered.
Around the houseselectNoOne more device: the segments within this distance of the house located in Gladys.
RefreshselectNo
Language of names and messagesselectNoFeature names are fixed when a device is added.

How to install Trafic routier in Gladys​

  1. In Gladys, open Integrations: Trafic routier appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-trafic:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-trafic.

Trafic routier requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Trafic routier is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂