ads' corner

openHAB and Tankerkönig gas prices + Telegram integration - Second iteration

In my previous blog post about “Tankerkönig” I explained the details of how to integrate this binding into openHAB and provide a Telegram interface.

Someone on the openHAB community forum pointed out that Telegram bots allow queries, where one can present the user with options, and the user only has to click on one of the options. That makes it easier to use, and less typing is required as well. I went ahead and implemented that.

Most of the implementation does not change, especially all the Things and Items are the same. The Rules change however.

openHAB and Tankerkönig gas prices + Telegram integration

In Germany, every gas station must report gas prices online, to the Markttransparenzstelle für Kraftstoffe. Businesses and users can then fetch this data and provide services. One of these companies is Tankerkönig, and there’s also a Binding for openHAB.

If you are interested in gas prices for certain gas stations, you need to sign up for a (free) API key, and figure out the IDs of the gas stations. For that go to this website, Position the blue marker on the location you are interested in, and then click on all the gas stations you want to include. Finally click on Tankstellen übernehmen - this will open a JSON with the data, from there extract the id (and possibly the other data as well).

Dieselpreise nun höher als Benzinpreise

Die Preisspirale für Kraftstoffe dreht sich ja schon länger immer nur in eine Richtung - nach oben. Bisher war Diesel jedoch immer noch etwas günstiger (von billiger will ich mal nicht sprechen) als Super.