Skip to main content

E-Control fuel prices smart home integration, free and open source

E-Control fuel prices integration for Gladys Assistant

The cheapest fuel stations around your home in Austria, from the official E-Control calculator.

The cheapest fuel stations around your home in Austria, from the Spritpreisrechner of E-Control, the Austrian energy regulator. Free, without account or key. Not affiliated with E-Control.

What you get​

  • A Cheapest fuel – Austria device: for each fuel followed (diesel, Super 95, CNG), the lowest price around the search point, the name and address of the station, and its distance.
  • A Fuel price drop scene trigger, with the station and the new price.
  • A Cheapest stations dashboard widget: the lowest price and the list of the cheapest stations.
  • An action to test the service from the Configuration screen.

Requirements​

  • Gladys Assistant 5.3.0 or later.
  • Your house located on the map in Gladys (Settings β†’ Houses), or an Austrian postal code.
  • Internet access from Gladys: the integration asks the E-Control servers.

Installation​

In Gladys, open Integrations β†’ Install from GitHub and enter https://github.com/guim31/gladys-e-control. Then open the integration, fill in the configuration, and add the device from the Discovery tab.

Configuration​

  • Fuels to follow: diesel and Super 95 by default; CNG (natural gas, €/kg) too if you wish. One request per fuel every 30 minutes.
  • Austrian postal code (optional): the stations are searched around it instead of around the house located in Gladys (for example a workplace, or a house in another country).
  • Language of the names: the language of the device and feature names, written once when the device is added, and of the texts of the trigger and the action.

Devices​

Cheapest fuel – Austria​

For each fuel followed, four features:

  • the price in euros (per litre, per kilogram for CNG);
  • the name of the station;
  • its address;
  • its distance in km from the search point.

The device is read only. Its values are kept in the history, except the texts.

Scenes​

Price under a threshold​

No trigger is needed: create a scene with the Device value trigger on the price feature, for example "Diesel (€/l) below 1.90".

Fuel price drop​

Fires when the lowest price of a fuel falls, with the variables fuel, fuel name, station, new price, previous price and drop. Filter on one or more fuels if you wish. The first price after an installation or a change of search point is only remembered.

Dashboard​

Cheapest stations widget​

Choose a fuel (the first one followed by default). The widget shows the lowest price, then up to 5 stations with their address, distance and price, and the time of the last read. A setting hides the list.

Actions​

Test the price service asks E-Control at once and answers with the lowest price of each fuel. It fails in red when no search point is set, when the postal code is unknown, when no station is found or when the service cannot be reached.

Data and limits​

  • Austrian law obliges stations to report their prices; the Spritpreisrechner only shows the cheapest ones (5 per fuel), so a given station cannot be followed and the API gives no favourites.
  • In Austria, prices may only rise once a day, at noon; they may fall at any time.
  • The integration asks every 30 minutes (15 minutes after a failure), which stays gentle with a free public service. Closed stations are left out.
  • The search area is the one of E-Control: in the countryside, the cheapest CNG station may be 100 km away.
  • Outside Austria, E-Control finds nothing.
  • During an outage, or when no station sells a fuel any more, the device keeps its last values: the Configuration screen and the widget say so.

Troubleshooting​

  • "No search point": locate your house in Gladys, or enter a postal code.
  • "This postal code is not an Austrian one known to E-Control": check the four digits (for example 6580).
  • "The E-Control fuel price service cannot be reached": the E-Control servers do not answer; the integration tries again every 15 minutes. More details with LOG_LEVEL=debug in the logs of the integration.

Credits​

Prices: E-Control, Spritpreisrechner. Integration by guim31, Apache-2.0 licence. Not affiliated with E-Control.

Configuration settings​

These are the settings E-Control fuel prices asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Spritpreisrechner of E-ControlsectionNoThe official fuel price calculator of the Austrian regulator, without account. It only gives the cheapest stations (5 at most per fuel), read every 30 minutes. Not affiliated with E-Control.
Fuels to followmulti_selectNoOne request to E-Control per fuel and per refresh.
Austrian postal code (optional)stringNoSearched around it instead of the house located in Gladys.
Language of the namesselectNoNames of the device and its features (frozen when it is added) and texts of the trigger and the action.

How to install E-Control fuel prices in Gladys​

  1. In Gladys, open Integrations: E-Control fuel prices appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-e-control:1.0.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/guim31/gladys-e-control.

E-Control fuel prices 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​

E-Control fuel prices 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 guim31, 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 πŸ™‚