Integración domótica STIB-MIVB, gratuita y de código abierto

Unofficial connector: next STIB metro, tram and bus departures at your stops, 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 STIB-MIVB. It brings the Brussels metros, trams and buses into Gladys through the STIB-MIVB open data published on the Belgian Mobility open data portal. STIB-MIVB is a trademark of the Société des Transports Intercommunaux de Bruxelles. Source of the data: STIB-MIVB – Open Data (CC BY 4.0).
What you get
| Surface | Content |
|---|---|
| One device per watched stop platform | minutes before the next metro, tram or bus, and for each of the next departures (3 by default): the countdown and a text line "92 → Schaerbeek Gare"; the STIB message of the stop ("Last departure") |
| The STIB network device | the number of travellers information notices on the network and for your stops and lines, the main notice for your stops |
| Scene triggers | vehicle approaching (1 to 15 minutes before arrival, optionally for one line), last departure of the day, line disrupted and disruption cleared (a notice published or withdrawn) |
| Scene action | next departures of a stop (list, next line, destination, countdown, STIB message) |
| Dashboard widgets | STIB departures (one stop) and STIB network (the notices for your stops and lines, or the lines you choose) |
A STIB stop has one platform per direction (and per mode at the big stops):
LOUISE has the metro towards Simonis / Roi Baudouin (8321), the metro
towards Elisabeth (8322) and two tram platforms. Each platform is a device:
add the directions you use.
Setup
- Recommended: create a free account on the Belgian Mobility developer portal, subscribe to the free offer, and paste the primary key in Subscription key. Without a key, the portal allows 100 requests a day: the integration then reads the departures every 20 minutes only, which is too slow for the "vehicle approaching" trigger.
- Install the integration. Every platform of the stops closest to your house (the house location of Gladys) is suggested in Discovery: add the ones you use.
- To watch other stops, type them in Stops to watch, separated by
commas: a name (
LouiseandLouizaboth work) or a platform id (3518B). The Search stops button lists the platforms of a stop with their id and their lines. - Optional, per stop: a line filter after
@keeps only these lines (Louise@2|6), and a custom name after:names the devices (...:Metro to work). Save, then open Discovery again and add the devices. - Put the STIB departures widget on a dashboard and pick a stop.
With a key, every watched stop is read every 30 seconds, all in one request (option Refresh interval, 20 seconds at least), the notices every 5 minutes and the stop list once a day. Without a key: the departures every 20 minutes, the notices every 2 hours.
Scenes
- Vehicle approaching: pick the stop, the number of minutes and,
optionally, the line as STIB writes it (
92,T81); the scene runs when a vehicle reaches the mark. Variables: the line, the destination, the minutes left, the expected time. - Last departure of the day: STIB flags the last departure of a line at the stop; the scene runs once per line and direction.
- Line disrupted / disruption cleared: STIB published or withdrew a travellers information notice (disruption, works, diversion) for a line. Needs the STIB network device. Filter on a line, or on the notices about your stops and lines. Variables: the line, the notice, the lines concerned.
The action next departures gives {{list}} (one line per departure) and
{{next_line}}, {{next_destination}}, {{next_minutes}}, {{message}} for
a message or a condition.
Troubleshooting
- A stop is not found: STIB names its stops in capitals, in French and Dutch; use Search stops with a part of the name.
- "Without a subscription key" in the status: add a key (step 1).
- "Request quota exceeded": the anonymous quota is shared by everything that calls the portal without a key from your connection; add a key.
- No departure announced at night: STIB shows its own message instead ("Last departure", "End of service") in the message feature.
- Logs: the integration's log level is set with the
LOG_LEVELvariable.
Privacy
The integration sends the portal only the platform ids it reads, and the subscription key in a header. The house location is used inside the integration to pick the nearest stops and never leaves it.
Parámetros de configuración
Estos son los parámetros que STIB-MIVB te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Brussels public transport in Gladys | section | No | Unofficial connector, not affiliated with STIB-MIVB. It reads the STIB-MIVB open data published on the Belgian Mobility portal: one device per watched stop platform with its next metros, trams and buses (line, destination, minutes) and STIB's messages (last departure, end of service), a network device with the travellers information notices, scene triggers when a vehicle approaches, at the last departure of the day and when a line gets or loses a notice, and two dashboard widgets. The stops closest to your house are suggested in Discovery; add others below. Without a subscription key the portal allows 100 requests a day: the departures are then read every 20 minutes. A free key gives real time. Source: STIB-MIVB – Open Data (CC BY 4.0). |
| Subscription key (recommended) | secret | No | The primary key of your free account on the Belgian Mobility developer portal. Without it, the departures are read every 20 minutes (anonymous quota). Stored encrypted by Gladys and only sent to the portal's gateway. |
| Stops near my home (suggested in Discovery) | number | No | Every platform of these stops is suggested: add the directions you use. |
| Stops to watch | string | No | Stop names or platform ids, separated by commas. Optional line filter after @ (several with |) and custom name after : — e.g. "Louise@2|6:Metro to work, 3518B". |
| Departures per stop | number | No | How many upcoming departures each stop device exposes as features. |
| Refresh interval (s) | number | No | With a subscription key: how often the watched stops are read, all in one request. Without a key the interval is at least 20 minutes. |
| Language of the stop and destination names | select | No | |
| Offer the "STIB network" device (travellers information) | boolean | No |
Cómo instalar STIB-MIVB en Gladys
- En Gladys, abre Integraciones: STIB-MIVB 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-stib: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-stib.
STIB-MIVB 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
STIB-MIVB 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