Integración domótica GareSNCF, gratuita y de código abierto

Searches SNCF stations and tracks multiple timetables and delays.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
GareSNCF connects Gladys to the official SNCF API (Navitia API). Station search is integrated into Gladys device discovery so users can select and follow several stations.
Get a token and add stations
- Request a free developer token from the SNCF API portal.
- In the integration configuration, enter the API token and a station or city name in Search for stations.
- Save the configuration, open Discovery, and scan for devices. Matching stations appear as selectable devices.
- Select every station you want to follow and add them to Gladys. To follow stations in other cities, change the search and scan again; stations already added remain tracked.
- Set the refresh interval per station and the delay threshold that triggers scenes.
- Use the Followed stations widget to review tracked devices. To stop following a station, delete its device from the Gladys devices list. Repeated searches do not create duplicates because SNCF station IDs are stable keys.
API usage is shared across the integration. The default interval is 10 minutes per station. Cancellation detection is enabled by default and adds one request for the theoretical timetable per refresh; disable it in the integration settings to reduce API usage. Increase the refresh interval if you follow many stations.
Optional global filters match line/train code, destination and transport type. They apply to boards, sensors and scenes; each board widget can also set its own display filters. On HTTP 429, the widget keeps the last received data and shows the error and retry delay when SNCF provides one. The API does not expose the remaining quota here.
Widget
Add Followed stations to review tracked devices, or SNCF station board to display one station. The board shows train times, countdowns, available platforms, delays and cancellations reported by the API. It can be limited to three trains in compact view. Its status shows data freshness and refresh errors; Refresh queries the API immediately.
Scene trigger and action
The Delayed train, Cancelled train and Platform change triggers can be filtered by station. The latter two use information returned by SNCF and changes compared between refreshes. Variables include the station, train, destination, delay, time and platform (plus the previous platform on a platform change).
The Get upcoming trains action lets you choose one of your added stations. It forces a refresh and returns count, next_train, destination, minutes, platform, delay_minutes and cancelled to later scene steps.
Data and privacy
The token is stored in the GareSNCF configuration and sent to api.sncf.com in the Basic Authentication header. It is never included in the URL or logs. Train schedules and real-time details are provided by SNCF and may be missing or change.
Parámetros de configuración
Estos son los parámetros que GareSNCF te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| SNCF API | section | No | A free token is required. Request one at numerique.sncf.com/startup/api/token-developpeur/. |
| SNCF API token | secret | Sí | Your personal SNCF token. It is passed to the container and must not be shared. |
| Search for stations | string | Sí | Enter a station or city name, then scan to select one or more stations. |
| Displayed board | select | No | |
| Refresh interval (seconds) | number | No | |
| Delay threshold for scene trigger (minutes) | number | No | |
| Filter by line or train code (optional) | string | No | Leave empty to show all results. |
| Filter by destination (optional) | string | No | Leave empty to show all results. |
| Filter by transport type (optional) | string | No | Leave empty to show all results. |
| Trigger a scene when a train is cancelled | boolean | No | |
| Trigger a scene when the platform changes | boolean | No |
Cómo instalar GareSNCF en Gladys
- En Gladys, abre Integraciones: GareSNCF aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/quentin-cs/gladysgaresncf:2.1.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/Quentin-CS/GladysGareSNCF.
GareSNCF requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Sobre las integraciones externas
GareSNCF es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene Quentin-CS, no el equipo principal de Gladys.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación