Mistral Toulon smart home integration, free and open source

Toulon buses and boat-buses (Mistral): real-time departures, delays, line traffic.
Overview
This integration brings the Réseau Mistral into Gladys: the buses, the boat-buses of the harbour and the cable car of the Mont Faron of Métropole Toulon Provence Méditerranée. It gives the next departures, corrected in real time, with their delay, at the stops you choose (three in the form, up to 10 more with a button), filtered by line and direction. It also follows the traffic of up to six lines (normal, traffic information, disrupted, heavily disrupted), from the alerts of Mistral: diversions, stops not served, works, special timetables. Each stop and each line becomes a device to show on a dashboard and to use in scenes.
The data come from the official open data of the Réseau Mistral, published on transport.data.gouv.fr under the Licence Ouverte 2.0 (Etalab): no account, no key. The timetable (GTFS) is downloaded once a day when it changed, and kept by the integration. The real time (GTFS-RT) of the whole network is read in one single request for every followed stop, every minute by default (every 10 minutes while no stop announces anything in the next half hour, at night). The alerts are read every 5 minutes.
A departure is followed in real time a little before it leaves its terminus: its estimated time and its delay are given. Before, it is the timetable, marked "(timetable)". Cancelled trips and stops not served (diversions) are shown.
This is a cloud integration: it contacts www.data.gouv.fr / static.data.gouv.fr (timetable), feed-rdtpm-toulon.ratpdev.com (real time) and notify.ratpdev.com (alerts), the servers of RATP Dev, the operator of the network. Nothing else leaves your network.
Requirements
- Gladys Assistant 5.3.0 or later.
- Nothing else: the open data of Mistral need no account and no key.
Configuration
| Field | What to enter |
|---|---|
| Stop 1, 2, 3 | The name of the stop as written on it ("Liberté", "Ponton Toulon") or the id of a platform ("TOLIBN"). |
| Line | Only this line: "1", "U", "8M" or "bateau 8". Empty: every line of the stop. |
| Direction | Only the destinations holding these words: "Coupiane", "La Seyne | Sablettes". Empty: both directions. |
| Followed lines | The lines whose traffic you follow, six at most: "1, 8M, 28M, T". |
| Real-time reading | Every 30 seconds, every minute, every 2 minutes or every 5 minutes. |
| Language of texts | Names of the devices, summaries and outputs of the scenes. Stop names and traffic messages stay in French. |
A stop gathers the platforms of one name in one place: "Liberté" gives both directions of the lines calling there. When the same name exists in two places ("Gendarmerie", "St Martin"), they are two stops: then type the id of one of its platforms. The Find a stop button gives the stops holding a few words, with the ids of their platforms and their lines ("Ponton Toulon [TOPTOS] → 8M, 18M, 28M"). A few words are enough when one stop only holds them. The boats leave from the pontoons: "Ponton Toulon", "Ponton Seyne", "Ponton Sablettes"… Test the connection asks for the timetable again and reads each stop and each line at once.
A line is written as on the vehicle: "1", "U", "11B", "70"… The boat-buses are "8M", "18M", "28M" ("bateau 8" works too), the cable car "T" ("téléphérique" or "Faron" work too). The school runs ("HY09", "TL10"…) are kept.
More stops than the three of the form (home, work, school…): Add a stop takes the same three fields — stop, line, direction — and follows up to 10 more stops. List the stops shows every followed stop, numbered; Remove a stop takes that number (or the name). The added stops are kept in the configuration of Gladys, so in its backups.
Usage
Devices
In the Discover tab, create the devices you want:
- Mistral <stop>: the next departure as text ("1 → Coupiane · 3 min (+2 min late)"), the wait of the next departure and of the following one (minutes), and the delay of the next one (minutes, published only when it is followed in real time);
- Mistral line 1, Mistral boat-bus 8M, Mistral cable car…: the traffic as text ("Disrupted traffic: Du 30/11 au 03/12 : Travaux Pont de la Clue à La Garde") and the number of traffic messages under way.
At night, without a departure in the next three hours, the device gives the first departure of the morning.
Traffic
Mistral publishes alerts: a title, a text, the lines concerned and their periods. The state of a line comes from its heaviest alert under way: heavily disrupted for an interruption or a closing (the yearly closing of the cable car), disrupted for a diversion, stops not served or delays, traffic information otherwise (a new stop, special timetables); normal without an alert. An alert starting in the next three days is shown as "coming". The periods are the ones Mistral publishes: an alert "on Tuesday, Friday and Saturday mornings" counts over its whole span.
Dashboard widgets

- Mistral departures: the next departures of a stop, compact. One row per line and destination, with its next two departures, each with its unit ("2 min · 17 min"; the time beyond an hour of wait: "23:55 · 00:05"). A departure of another day gives its day ("tomorrow 05:30") and is then shown alone. The trips cancelled in the next hour and the stops not served are shown ("7 min · cancelled 22:58 · 22 min") and turn the row orange, like a delay of 5 minutes or more. When a row is too long, the departure after goes first, then the cancellations: the next departure always stays. The Routes shown setting sets the number of rows. Choose a followed stop, or type any stop (and a line) in the widget settings. With Several stops, a widget shows several stop devices: the ones of one stop are merged under its name; for different stops, each stop starts with a row of its name.
- Mistral traffic: the state of each line, then the alerts under way and the ones of the next three days, with their period. Tap a card for the full text. The followed lines, the ones typed in the settings, or the three boat-buses when you follow none.
Scenes
Triggers, once per change (the first reading is only a baseline):
- Mistral: departure soon: a departure of a followed stop leaves in 2, 3, 5, 10, 15 or 20 minutes, counted on its real-time estimate.
- Mistral: departure cancelled: a trip of the next hour at a followed stop is cancelled, or does not serve the stop.
- Mistral: line disrupted: a followed line becomes disrupted or heavily disrupted.
- Mistral: back to normal: no disruption under way on the line any more.
- Mistral: new traffic message: Mistral publishes an alert about a followed line, under way or coming.
Each gives a ready-made sentence, {{triggerEvent.data.summary}}, and its values (line, destination, time, delay, title, text, start and end…). The actions Mistral: next departures and Mistral: traffic of a line return the same kind of values, to put in a message or to test in a condition.
Examples:
- When the boat-bus 8M towards La Seyne leaves Ponton Toulon in 10 minutes → turn the hall lamp green.
- When a departure of your stop is cancelled, or line 1 is diverted → send the summary to your phone before you leave.
- Every weekday at 7:30 → read the next departures of your stop and have the kitchen speaker announce them.
Transport
Cloud only: the data come from the internet. The timetable once a day, the real time of the whole network in one request, the alerts every 5 minutes.
Troubleshooting
- "Unknown or ambiguous": use Find a stop, then copy the exact name or a platform id (a name found in two places needs a platform id); for a line, its name as on the vehicle ("1", "U", "8M").
- "(timetable)" after a departure: the trip is not followed in real time yet, or Mistral does not follow it (the cable car, some school runs); the time is the one of the timetable.
- No departure in the typed direction: the destinations are the ones written on the vehicles ("Coupiane", "Esp. Marine-Seyne", "Gare Routière Toulon"); empty the direction to see them all.
- "The open data of Mistral do not answer": the integration tries again at each reading; meanwhile, the departures come from the timetable kept.
- To report a problem: press Diagnostic, then copy the lines starting with "Mistral diagnostic" from the Logs tab into a GitHub issue or a reply on the forum, with the versions of Gladys and of the integration.
Configuration settings
These are the settings Mistral Toulon asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Mistral open data | section | No | The departures and the traffic come from the official open data of the Réseau Mistral, the buses, boat-buses and cable car of Métropole Toulon Provence Méditerranée: the timetable (GTFS), the real time and the traffic alerts (GTFS-RT). No account and no key: fill in your stops and lines below, then press "Test the connection". |
| Stop 1 | section | No | The stop where you take the bus or the boat: its next departures, from the timetable corrected in real time, with their delay. Type its name as written on the stop ("Liberté", "Gare Routière (Toulon)") or the id of one of its platforms ("TOLIBN"): the "Find a stop" button gives them. The line keeps only its departures ("1", "U", "8M" or "bateau 8"). The direction keeps only the destinations holding these words ("Coupiane", "La Seyne | Sablettes"). |
| Stop | string | No | |
| Line | string | No | Empty for every line. |
| Direction | string | No | Words of the destination. Empty for both directions. |
| Stop 2 | section | No | |
| Stop | string | No | |
| Line | string | No | Empty for every line. |
| Direction | string | No | Words of the destination. Empty for both directions. |
| Stop 3 | section | No | More stops (a home, a workplace, a school…): the "Add a stop" button, under the form, follows up to 10 more, "List the stops" shows them all, numbered, and "Remove a stop" stops following one. The real time of every stop comes in one request. |
| Stop | string | No | |
| Line | string | No | Empty for every line. |
| Direction | string | No | Words of the destination. Empty for both directions. |
| Traffic of the lines | section | No | The lines whose traffic you follow: a device per line, with its state (normal, traffic information, disrupted, heavily disrupted) worked out from the alerts of Mistral, and its traffic messages (works, diversions, stops not served), read every 5 minutes. |
| Followed lines | string | No | Up to 6, separated by commas. |
| Options | section | No | |
| Reading of the real time | select | No | How often the real time of the network is read: one request for every followed stop. While no stop announces anything in the next half hour (at night), every 10 minutes. The timetable is read once a day. |
| Language of the texts | select | No | Names of the devices, summaries and outputs of the scenes. Automatic: the language of your dashboard, as soon as a Mistral widget has been shown. Stop names and traffic messages stay in French. |
How to install Mistral Toulon in Gladys
- In Gladys, open Integrations: Mistral Toulon appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/william-de71/gladys-mistral-toulon:0.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/William-De71/gladys-mistral-toulon.
Mistral Toulon 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
Mistral Toulon 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 William-De71, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation