Skip to main content

Prix carburants integration for Gladys Assistant

Prix carburants integration for Gladys Assistant

Follow the price of your fuel at the petrol stations near you, from official open data.

Follow the price of the fuel you use at the petrol stations near you, right inside Gladys: one device per station, a price history, and scenes that can warn you when filling up becomes worth it.

Data comes from official open data. No account, no API key, no subscription.

CountrySource
Franceprix-carburants.gouv.fr (Etalab licence)

More countries can be added in future versions: the integration is built around one "provider" per country.

What you get

For every station you add, a device with two read-only features:

  • Price — the price per litre of the chosen fuel, in euros. History is kept, so Gladys charts the price over time.
  • Last price update — when the station declared that price (the national feed refreshes about every 10 minutes, but a given station does not change its prices every day).

The address, the brand, the GPS coordinates and the distance to the postal code are stored in the device parameters.

A device is named after the brand of the station and its city, e.g. Total Access - Oullins-Pierre-Bénite - SP98. The national price feed does not publish that brand, so it is read from a reference dataset of the same information system; a station that reference dataset does not know keeps a name built from its street.

Configuration

  1. Open the Configuration tab of the integration.
  2. Pick your country (France for now).
  3. Fill in your postal code (5 digits in France, e.g. 35000). Stations are searched around it.
  4. Set the search radius: 0 keeps only the stations of the postal code itself, 10 km widens the search to the neighbouring towns.
  5. Tick the fuel type(s) you care about: Diesel, SP95, SP98, E10, E85, LPG.
  6. Save.

The Preview the nearby stations button immediately shows what the search returns, with the current prices — handy to tune the postal code or the radius before adding anything.

Adding stations

Open the Discovery tab: the stations found appear there, one entry per station and per selected fuel ("TotalEnergies - Rennes - Diesel", "TotalEnergies - Rennes - SP98"…). Click Add on the ones you want to follow. Add one, several, or all of them.

Only the combinations that really exist are offered: a station that does not sell LPG never shows up in the LPG list.

Once added, the station publishes its price straight away, then at every refresh (once an hour by default). The pace is the Refresh interval of the Configuration tab: the integration runs its own timer, so the device shows no polling option on the Gladys side. The Refresh the prices now button forces a read without waiting.

Removing stations

Open the device in Settings → Devices, then Delete. The integration stops polling it immediately. The station stays visible in the Discovery tab as long as it matches your search, so you can add it back later.

Removing one fuel of a station does not affect the others: "Rennes - Diesel" and "Rennes - SP98" are two independent devices.

Changing the fuel later

A Gladys device keeps the features it was created with. The fuel is therefore part of the device identity: ticking an extra fuel in the configuration makes new entries appear in the Discovery tab, and your existing devices keep working untouched. Delete the ones you no longer need.

Scene ideas

  • Get a notification when the diesel price of your station drops below a threshold.
  • Compare two stations on the dashboard before driving out to fill up.
  • Track the monthly average price thanks to the history.

Troubleshooting

No station in the Discovery tab. Check the postal code (5 digits in France) and raise the search radius. The Preview the nearby stations button shows the exact error message.

The price stopped updating. A station can temporarily disappear from the national feed (roadworks, closure). The last known price stays displayed; the integration logs list the missing stations.

An empty price. The station is not declaring that fuel right now. The integration keeps the last known value instead of leaving a hole in the chart.

Limited number of stations. The Maximum number of stations setting bounds the discovery list (20 by default, 50 max). In a dense city, lower it and shrink the radius.

Data and licence

The French data is published by the Ministry of the Economy under the Etalab open licence. The integration queries the "flux instantané" dataset and only fetches the stations around your postal code.

Configuration settings

These are the settings Prix carburants asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
How it workssectionNoChoose your country, your postal code and the fuel you use, then open the Discovery tab: the petrol stations around you appear there with their current price. Add the ones you want to follow, delete them when you no longer need them. Data comes from the official open data, no account and no API key needed.
CountryselectYesCountry whose open data is queried. More countries will be added in future versions.
Postal codestringYesStations are searched around this postal code. In France, 5 digits.
Search radius (km)numberNoAlso look for stations around the postal code. 0 keeps only the stations of the postal code itself.
Fuel typemulti_selectYesOne device is offered per station AND per selected fuel, so you can follow several fuels at the same station.
Maximum number of stationsnumberNoHow many stations the Discovery tab may list. Lower it in a dense city, raise it in the countryside.
Refresh interval (s)numberNoHow often the price of each added station is refreshed. The French feed is updated about every 10 minutes; once an hour is plenty.

How to install Prix carburants in Gladys

  1. In Gladys, open Integrations: Prix carburants 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-prixcarburants:1.0.1), 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-prixcarburants.

Prix carburants requires Gladys >=4.62.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

Prix carburants 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 🙂