FlixBus smart home integration, free and open source

Next FlixBus coaches from your bus stations: departure times, countdown, seats left.
The next FlixBus coaches from your bus stations in Gladys: departure time, countdown, buses within the hour and seats left, with a dashboard widget, scene triggers and a scene action. Everything comes from the public API of the FlixBus website: no account, no key.
Unofficial API. This integration reads the same public API as the FlixBus website. It is not documented, not supported by FlixBus and may change without notice. This integration is not affiliated with FlixBus or Flix SE.
Scheduled times, not real time. Without a key, FlixBus publishes the timetable and the seats left, but neither delays nor cancellations: the integration shows the scheduled times. A cancelled bus is not flagged.
What you get
- One device per watched bus station, with one to five destination cities: minutes to the next bus and to the following one, the next bus and its arrival station, the buses leaving within the hour and the seats left on the next one.
- A dashboard widget listing the next buses, coloured by the seats left.
- Two scene triggers: "Time to leave" (a bus leaves in 5 to 60 minutes) and "Bus sold out".
- A scene action that gives the next buses as numbers and as a sentence for a message or a speaker.
Requirements
- Gladys Assistant 5.3.0 or later.
- Internet access from Gladys (the API is
global.api.flixbus.com).
Installation
In Gladys, open Integrations → Install from GitHub and paste the address of the repository:
https://github.com/guim31/gladys-flixbus.
Configuration
Settings
- Language of the texts: language of the feature names (set when a device is created) and of the texts sent to your scenes. French by default.
- Refresh interval: how often FlixBus is read, 10 minutes by default (5, 10, 15 or 30). The countdowns go on every minute in between, without any request.
Watching a station
FlixBus only lists the buses of a route (from a city to another), not the whole board of a station: each station is watched towards one or more destination cities.
- Run Find a station with a city name (
Toulouse): it lists its bus stations. - Run Watch a station with the full name of the station (
Paris (Bercy Seine)) and a destination city (Lyon). A city with a single station can be typed by its city name. - Run Watch a station again with the same station and another city to add a destination (five at most). The device stays the same.
- Create the device in the Discover tab of the integration.
Removing, checking the state
- Stop watching a station with a destination removes that destination; without one, it removes the whole station. Its device stays in Gladys until you delete it.
- Status lists the watched stations, their destinations and the last read of FlixBus.
Devices
Each watched station gives a device named FlixBus · <station>:
| Feature | Value |
|---|---|
| Next bus | minutes to wait (1440 when no bus is scheduled) |
| Following bus | minutes to the bus after it |
| Next bus and destination | 18:15 → Lyon (Gerland), in the station's time |
| Buses within the hour | number of buses leaving in the next 60 minutes |
| Seats left on the next bus | seats FlixBus still sells, 0 when sold out |
Every bus of the chosen destinations counts, connections included. A bus serving two of your destinations counts once.
Dashboard widgets
Next FlixBus: the next buses of a station, one row per bus with its time, arrival station, countdown, seats left and changes. Green with seats, orange under 5 seats, red when sold out. The number of rows, the legend and the sold-out buses can be set in the widget settings.
Scene triggers
- Time to leave: a bus leaves a watched station in the chosen number of minutes (5 to 60), once per bus and per threshold.
- Bus sold out: a bus that still had seats becomes sold out, once per bus.
Both give the station, destination, arrival station, departure time, minutes to wait, seats left and changes as variables. Nothing fires at the first read after a start.
Scene actions
Get the next buses gives, for a watched station: a sentence ("Next FlixBus from Paris (Bercy
Seine): 18:15 to Lyon (Gerland), in 12 min, 40 seats left, then 21:15 to Lyon (Gerland)."), the
destination, arrival station and departure time of the next bus, the minutes to it and to the
following one, its seats left, sold_out (1 or 0) and the buses within the hour.
Scene examples
- At 7:45 on weekdays, Get the next buses, then send the sentence to your phone.
- Time to leave at 30 minutes: announce it on a speaker and switch on the hall light.
- Bus sold out on the station you leave from: a message to buy another ticket in time.
Data, refresh and quotas
- One trip search per destination at each refresh (a second one for the next day when fewer than three buses are left today), shared by the stations of the same city. With the default interval and two destinations: about 12 requests an hour.
- FlixBus publishes no quota for this API: read it sparingly. The interval cannot go below 5 minutes.
- Stored under
/data: the watched stations and destinations only. No personal data, no account.
Troubleshooting
- "Several stations match": type the full name of the station as listed by Find a station.
- "No bus scheduled": there is no bus towards your destinations from this station today and tomorrow, or the route does not exist from this station.
- "FlixBus cannot be read": the API is unreachable or answers with an error. The countdowns go on from the last timetable, and the integration retries at each refresh.
Limits
- No delays, no cancellations: FlixBus only publishes them with an API key.
- Only FlixBus: BlaBlaCar Bus has no public API of its own.
- Developed without access to an official API nor any FlixBus account: feedback welcome.
Compared with the Transitous departures integration: Transitous reads the open timetables (GTFS) of many operators, FlixBus and BlaBlaCar Bus included, and shows the whole board of a stop with real time where the operator feeds it. This integration is FlixBus only, by route, and adds what Transitous does not have: the seats left, the sold-out buses and their trigger.
Credits
Data © FlixBus (Flix SE), read from its public website API. This integration is not affiliated with FlixBus.
Configuration settings
These are the settings FlixBus asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| How it works | section | No | Watch bus stations and their destinations with the actions below, then create their devices in the Discover tab. Everything comes from the public FlixBus website API: no account, no key. Scheduled times and seats only: FlixBus does not publish delays without a key. |
| Language of the texts | select | No | Language of the feature names and of the texts sent to your scenes. Feature names are set when a device is created. |
| Refresh interval | select | No | How often FlixBus is read: one search per destination (two near midnight). The countdowns go on every minute in between. |
How to install FlixBus in Gladys
- In Gladys, open Integrations: FlixBus appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-flixbus:1.0.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/guim31/gladys-flixbus.
FlixBus 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
FlixBus 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.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation