Skip to main content

Ametis Amiens smart home integration, free and open source

Ametis Amiens integration for Gladys Assistant

Real-time bus departures and traffic alerts of the Ametis network in Amiens.

The next buses of the Ametis network (Amiens Métropole, France) in Gladys: waiting times at your stops, delays, cancellations and traffic alerts.

The integration reads the network's open data published on transport.data.gouv.fr (Licence Ouverte 2.0): the timetable (GTFS), corrected by the real-time feed (GTFS-RT). No account, no API key. The timetable is downloaded once a day and kept in the container's /data volume; the real-time data is read at every refresh.

Installation​

  1. In Gladys, open Integrations, then the external integrations store.
  2. Search for Ametis Amiens and click Install.
  3. Wait for the container to start: the integration shows up in the list.

Configuration​

  1. In the Configuration tab, use the Find a stop action: type a name ("Gare du Nord", "Hôtel de Ville"…). Every platform is listed with its code, its lines and its destinations. A stop is one platform, so one direction: pick the one going your way.
  2. Enter the codes in the Stops field, separated by commas (e.g. 1045, 128).
  3. Optional:
    • Lines: keep some lines only (e.g. N1, N2); empty = every line;
    • "Bus approaching" notice: minutes before the departure for the "Bus approaching" trigger (5 by default);
    • Delay threshold: the delay from which the "Bus delayed" trigger fires (5 minutes by default);
    • Refresh interval: 30 to 600 seconds (60 by default).
  4. Save. The Test the Ametis data action checks that the data is reachable. An unknown stop code is reported in the connection status.

Devices​

Go to Discovery to add the devices:

  • one device per followed stop ("Ametis Gare du Nord quai A (1045)"):
    • Next departure: minutes until the next bus;
    • Next line: line and destination of the next bus (e.g. N1 → ETOUVIE);
    • Delay of the next departure: its delay in minutes (negative when early);
    • Following departure: minutes until the bus after it;
    • Next departures: the next three departures as one line of text;
  • Ametis network: number of active traffic alerts and title of the latest one.

Cancelled buses are skipped in these values. Departures without real-time data use the scheduled time.

Scenes and dashboards​

Triggers​

  • Bus approaching: a bus will leave a followed stop within the configured number of minutes. Variables: stop, line, destination, minutes, departure time, delay.
  • Bus delayed: a bus runs late by at least the configured delay. Variables: stop, line, destination, delay, departure time, scheduled time.
  • Bus cancelled: a trip is cancelled, or the bus will not serve the stop. Variables: stop, line, destination, scheduled time.
  • New traffic alert: Ametis publishes a new disruption. Variables: line, title, description, affected lines, effect (detour, no_service…). The alerts already active when the integration starts fire nothing.

Every trigger can be filtered by stop and by line, and fires once per departure.

Actions​

  • Refresh the departures: reads the real-time data now. Outputs: number of upcoming departures, number of alerts.
  • Get the next bus: for a stop (and optionally a line), returns line, destination, minutes, delay, time, and a ready-made sentence in the chosen language ("Line N1 to ETOUVIE in 4 min (17:32)"), to send as a message or to have a speaker read out.

Example: "every weekday at 7:40, get the next bus at my stop, then send me the sentence".

Widget​

Next buses: the next departures (line, destination, time, delay, cancellation) of one chosen stop or of every followed stop, the wait for the next bus, the latest traffic alert and a Refresh button.

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 Ametis Amiens asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoThe integration reads the open data of the Ametis network (timetable and real time, transport.data.gouv.fr): no account, no API key. Find the codes of your stops with the "Find a stop" action below, then enter them here. A stop is one platform, so one direction.
StopsstringYesCodes of the stops to follow, separated by commas. Each stop becomes a device.
LinesstringNoOnly show these lines (short names, separated by commas). Leave empty for every line.
"Bus approaching" notice (min)numberNoThe "Bus approaching" scene trigger fires when a bus is this many minutes away.
Delay threshold (min)numberNoThe "Bus delayed" scene trigger fires from this delay on.
Refresh interval (s)numberNoHow often the real-time data is read, in seconds (30 to 600).

How to install Ametis Amiens in Gladys​

  1. In Gladys, open Integrations: Ametis Amiens appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/prohand/gladys-ametis-amiens:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/prohand/gladys-ametis-amiens.

Ametis Amiens 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​

Ametis Amiens 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.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂