Citéa Valence smart home integration, free and open source

Next Citéa bus departures in Valence and Romans in real time, with delays and disruptions.
The next departures of the Citéa buses (the network of Valence Romans Mobilités, in Valence, Romans and around, France) in Gladys: timetables corrected in real time, delays, canceled buses and disruptions.
The integration reads the open data published by Valence Romans Mobilités on transport.data.gouv.fr: no account and no API key needed.
Install
- In Gladys, open Integrations, then the external integrations store.
- Search for Citéa Valence and click Install.
- Wait for the container to start: the integration shows up in the list.
On its first start, the integration downloads the timetables of the network (about ten megabytes). It then keeps them in its data volume and downloads them again only when the network publishes new timetables (checked once a day).
Configuration
Open the Configuration tab of the integration:
- Stops (required): the stops to follow, separated by commas, e.g.
Pôle Bus, Victor Hugo. Accents and case do not matter. The Search a stop button gives the exact name of a stop from a part of it. When two stops have the same name (there is a Libération stop in Valence and another one in Romans), the search also shows their id (1:L_LIB10): type that id to follow only one of them. - Lines: to keep only some lines, e.g.
C1, C3. Empty: every line. - Departures listed: the number of departures in the "Next departures" feature (5 by default).
- "Bus approaching" (min): the delay of the "Bus approaching" trigger (5 minutes by default).
- Delay threshold (min): the delay from which the "Bus delayed" trigger fires (5 minutes by default).
- Refresh interval (s): how often the real-time data is read (60 seconds by default, 30 at least).
Save, then click Test the connection: the message gives the number of trips followed in real time, the number of buses running and the stops found (or not found).
Devices
Go to the Discovery tab of the integration to add the devices:
- One device per followed stop ("Citéa Pole Bus"…):
- Next departure: the next departure, in minutes;
- Next departure line: its line and destination, e.g.
C1 → Valence Valensolles; - Next departure delay: its delay in minutes (negative when early, 0 without real-time data);
- Following departure and Following departure line: the departure after it;
- Next departures: the list of the next departures, as text.
- Citéa network: the number of disruptions in progress, the title of the latest disruption and the number of buses running.
A canceled bus never counts as the next departure. The last stop of a trip is not a departure: a bus ending its trip at the stop is not listed.
Scenes and dashboards
Triggers
Every trigger can be filtered by stop and by line (exact number, e.g. C1):
- Bus approaching: a bus leaves a followed stop within the configured number of minutes. To leave on time: "when the C1 leaves Pôle Bus in 5 minutes, blink the hall light".
- Bus delayed: a bus is late by at least the configured threshold.
- Bus canceled: a departure of the next two hours is canceled.
- New disruption: Citéa publishes a new disruption (works, diversion…). The disruptions already in progress when the integration starts do not fire.
Each trigger fires once per bus. The scene receives the variables stop, line, destination, minutes before departure, departure time, scheduled time and delay; for a disruption: line, lines concerned, title and description.
Actions
- Get the next bus: for a stop (and optionally a line), gives the minutes before departure, the line, the destination, the time, the delay and whether the time comes from the real-time data. Ideal for a morning message: "The next C1 leaves in 7 minutes". The Bus found output is false when no bus is expected.
- Get the disruptions: the number and the list of the disruptions in progress, on the whole network or on one line.
Widget
The Next departures widget shows the departure board of a stop (the first followed stop, or the one chosen in the widget settings): the next bus in large, then the list of departures with their line, destination, time, delay (in orange beyond the threshold) and the canceled buses (in red). It also shows the number of disruptions in progress and the time of the latest real-time data. The Refresh button reads the real-time data again at once.
Data and limits
- The timetables come from the GTFS dataset of Valence Romans Mobilités, the real time from its GTFS-Realtime feeds. Both are published on the French national access point for transport data (transport.data.gouv.fr).
- The real time only covers the trips the network already follows, usually the next hour. Beyond, the theoretical timetables are used.
- When the real time does not answer, the integration goes on with the timetables and the Configuration screen reports the problem.
- The integration only uses the Internet (no local connection) and only serves in France.
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 Citéa Valence asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Getting started | section | No | The integration reads the open data of the Citéa network (Valence Romans Mobilités) on transport.data.gouv.fr: timetables and real time, no account needed. Enter the stops to follow; the "Search a stop" button below gives their exact names. |
| Stops | string | Yes | Names (or ids) of the stops to follow, separated by commas. Accents and case do not matter. |
| Lines | string | No | Lines to keep, separated by commas (e.g. C1, C3). Empty: every line. |
| Departures listed | number | No | Number of departures in the "Next departures" feature. |
| "Bus approaching" (min) | number | No | The "Bus approaching" scene trigger fires when a bus leaves within this many minutes. |
| Delay threshold (min) | number | No | The "Bus delayed" scene trigger fires from this delay. |
| Refresh interval (s) | number | No | How often the real-time data is read, in seconds. |
How to install Citéa Valence in Gladys
- In Gladys, open Integrations: Citéa Valence appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/prohand/gladys-citea-valence: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-citea-valence.
Citéa Valence 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
Citéa Valence 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