Aix en bus smart home integration, free and open source

Next Aix en bus departures at your stops, from the official timetable.
The next departures of the Aix en bus network (Aix-en-Provence, France) at your stops, right in Gladys: on your dashboards, in your scenes and in your messages.
The integration downloads the network's official timetable, published as open data by the Métropole Aix-Marseille-Provence on transport.data.gouv.fr (Licence Ouverte v2.0). It then computes the next departures on your Gladys, with no account and no API key. The file (about 2 MB) is checked once a day and downloaded again only when it changed. When the internet is down, the cached copy keeps working.
These are the scheduled times, the ones on the network's timetables. Real time (delays) is not supported yet.
Installationâ
- In Gladys, open Integrations, then the external integrations store.
- Search for Aix en bus and click Install.
- Wait for the container to start: the integration shows up in the list.
Configurationâ
Open the Configuration tab of the integration:
- Stops: the stops to follow, separated by commas, as written at the bus stop (
Rotonde, Gare RoutiĂšre). Case and accents are ignored. The stop code works too (roto). - Lines (optional): keep only some lines (
4, 5, A). Leave empty for every line of the stops. - âBus soonâ alert: how many minutes before a departure the âBus departing soonâ trigger fires (5 by default).
- âLast busâ alert: how many minutes before the last bus of the day the âLast bus of the day soonâ trigger fires (30 by default).
- Refresh interval: how often the next departures are recomputed (60 seconds by default). Computed locally: no network call.
Two buttons help:
- Search a stop: type part of the name (
gare) to get the exact stop names and the lines departing from each. - Refresh the timetable: downloads the latest published timetable now, instead of waiting for the daily check.
Usageâ
Open the Discovery tab: every line departing from a followed stop, in each direction, is offered as a device, such as âRotonde · Bus 4 â PĂŽle d'ActivitĂ©sâ. Add the ones you need. Each device has three features:
- Next departure: minutes before the next departure;
- Following departure: minutes before the one after;
- Next times: the next three departure times (
17:55 · 18:09 · 18:22).
The value 1440 (24 h) means âno departure within 24 hoursâ, for instance for a line that does not run on Sundays. A terminus is never offered as a departure.
Scenes and dashboardsâ
Scene triggers:
- Bus departing soon: the next bus of a followed line leaves within the configured number of minutes. It fires once per departure. Filter: the line at a stop. Variables: line, stop, destination, minutes left, departure time.
- Last bus of the day soon: the same, for the last bus of the day only, with its own delay.
- New timetable published: the network published a new timetable (new season, holidays, works). Variables: version, start and end of validity.
Scene actions:
- Get the next buses: reads the next departures of a line at a stop. Outputs: a bus within 24 h (yes/no), minutes and time of the next and of the following bus, last bus of the day (yes/no), line, stop, destination. For instance a message âThe 4 leaves in 7 minutesâ, or a condition âif less than 10 minutes are leftâ.
- Refresh the timetable: downloads the latest timetable. Outputs: new timetable (yes/no), version, end of validity.
âNext busesâ dashboard widget: the board of your stops. It has one row per followed bus line, soonest first, with the destination, the stop, the next times and a badge with the minutes left (orange under the alert delay, red when the bus is imminent). Below: the validity of the timetable and a Refresh button. The widget shows the devices you added. Until you add one, it shows the lines of the configuration.
Helpâ
A question or a problem? Ask on the Gladys community forum or open an issue on the GitHub repository.
Configuration settingsâ
These are the settings Aix en bus asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Getting started | section | No | The integration downloads the official Aix en bus timetable, published as open data by the MĂ©tropole Aix-Marseille-Provence, and computes the next departures of your stops on your Gladys. No account, no API key. Type the stops as written at the bus stop; the âSearch a stopâ button below lists the exact names. |
| Stops | string | Yes | Stops to follow, separated by commas. Each line departing from them becomes a device. |
| Lines | string | No | Keep only these lines, separated by commas. Leave empty for every line of the stops. |
| âBus soonâ alert (min) | number | No | The âBus departing soonâ scene trigger fires when a bus is this many minutes away. |
| âLast busâ alert (min) | number | No | The âLast bus of the day soonâ scene trigger fires this many minutes before the last bus. |
| Refresh interval (s) | number | No | How often the next departures are recomputed, in seconds (one minute minimum). Computed locally: no network call. |
How to install Aix en bus in Gladysâ
- In Gladys, open Integrations: Aix en bus appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/prohand/gladys-aix-en-bus:1.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/prohand/gladys-aix-en-bus.
Aix en bus 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â
Aix en bus 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 prohand, 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