Integración domótica SNCB / NMBS, gratuita y de código abierto

Unofficial connector: next SNCB trains per station, delays, cancellations and disturbances.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Unofficial connector, not affiliated with SNCB/NMBS or iRail. It brings the Belgian trains into Gladys through iRail, the community API over the SNCB open data: no account, no key. SNCB/NMBS is a trademark of the Société nationale des chemins de fer belges.
What you get
| Surface | Content |
|---|---|
| One device per watched station | minutes before the next departure, delayed and canceled trains, and for each of the next departures (3 by default): the countdown, the delay and a text line "IC 2514 → Dinant · platform 6 · +4 min" |
| The SNCB network device | the number of disturbances and planned works, the latest disturbance |
| Scene triggers | train approaching (1 to 15 minutes before departure), train delayed, canceled or moved (delay of at least 5 to 30 minutes, cancellation, platform change), disturbance published |
| Scene actions | next departures of a station (list, next train, destination, countdown, delay, platform), disturbances of the network |
| Dashboard widgets | SNCB departures (one station) and SNCB disturbances (the network, with the SNCB texts and links) |
Setup
- Install the integration. The stations closest to your house (the house location of Gladys) are suggested in Discovery right away: add the ones you use.
- To watch other stations, type them in Stations to watch, separated by
commas: a name (
Namur,Brussel-CentraalandBruxelles-Centralboth work) or an iRail id (BE.NMBS.008863008). The Search stations button finds the exact names. - Optional, per station: a destination filter after
@keeps only the trains going towards these places (Bruxelles-Central@Namur|Dinant), and a custom name after:names the device (...:Train home). Save, then open Discovery again and add the devices. - Put the SNCB departures widget on a dashboard and pick a station.
Every watched station is read every 60 seconds (option Refresh interval), the disturbances every 5 minutes. The departures stop being shown once the train has left.
Scenes
- Train approaching: pick the station and the number of minutes; the scene runs when a train of that station reaches the mark. With a destination filter on the station, only your trains count. Variables: the train, the destination, the platform, the delay, the minutes left.
- Train delayed, canceled or moved: pick the station and the event. For "Delayed", also the minimum delay: the scene runs once per train when its delay reaches it, not at every refresh.
- Disturbance published: the SNCB published a new notice. Needs the SNCB network device. Variables: the title, the description, the link.
The action next departures gives {{list}} (one line per train) and
{{next_train}}, {{next_destination}}, {{next_minutes}},
{{next_delay}}, {{next_platform}} for a message or a condition;
disturbances gives {{count}}, {{titles}} and {{latest}}.
Troubleshooting
- A station is not found: iRail knows the stations by their official names in each language; use Search stations with a part of the name.
- "iRail is unreachable": iRail is a volunteer-run service; it comes back by itself, the integration keeps trying every refresh.
- No departure in the next hour: iRail lists about an hour of departures; small stations may show nothing in the evening.
- Logs: the integration's log level is set with the
LOG_LEVELvariable.
Privacy
The integration sends iRail only the station ids it reads. The house location is used inside the integration to pick the nearest stations and never leaves it.
Parámetros de configuración
Estos son los parámetros que SNCB / NMBS te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Belgian trains in Gladys | section | No | Unofficial connector, not affiliated with SNCB/NMBS or iRail. It reads the public iRail API (no account, no key): one device per watched station with its next departures (train, destination, platform, delay, cancellation), a network device with the current disturbances, scene triggers when a train approaches, is delayed, canceled or changes platform, and two dashboard widgets. The stations closest to your house are suggested in Discovery; add others below. |
| Stations near my home (suggested in Discovery) | number | No | |
| Stations to watch | string | No | Station names or iRail ids, separated by commas. Optional destination filter after @ (several with |) and custom name after : — e.g. "Namur, Bruxelles-Central@Namur|Dinant:Train home". |
| Departures per station | number | No | How many upcoming departures each station device exposes as features. |
| Refresh interval (s) | number | No | How often each watched station is read. iRail is a community service: 60 s is plenty. |
| Language of the station and disturbance names | select | No | |
| Offer the "SNCB network" device (disturbances) | boolean | No |
Cómo instalar SNCB / NMBS en Gladys
- En Gladys, abre Integraciones: SNCB / NMBS 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/lm1lc3n7/gladys-sncb:0.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/LM1LC3N7/gladys-sncb.
SNCB / NMBS 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
SNCB / NMBS 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 LM1LC3N7, no el equipo principal de Gladys.
- Explorar todas las integraciones externas
- Descubrir las integraciones nativas incluidas en Gladys
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación