Have anyone done any integration with Tibber?
Its a Norwegian powercompany that lets you buy energy at the lowest price at that minute.

Open API - https://developer.tibber.com/
If anyone can point me in the right direction would also be appreciated.

Hi, Tibber-engineer here.

I have no specific knowledge about openHAB, but can assist if you (or anybody else) have questions related to usage of the API.

I was hoping that somebody had done some work on this as my skills with API is not that good :slight_smile:
But ofcourse i would be happy to try if somebody could point me to some starters?

The wishlist for the tibber integration would ofcourse be the powerprice that hour. So if the power price is cheap now i could charge my car, i would also maybe turn down the temp in the house with 1 celsius if the power was over a price and so on.

Rumors (from a Tibber-developer in a thread on Facebook) has it that somebody has integrated Tibber information in its openHAB. Does anyone know who?

Anyway, I think the first step would be to figure out what to use it for. For example:

Cron rule: If the time is 7.30 AM on a weekday:
Call the API, transform the result.
If the price has risen more than it usually does, turn off/lower heating as everyone’s out of the house soon anyway.

It seems like this might be a good starting point for setting up the API-call/transformation:

Hi Andreas,

I manage to do this with some help of a friend that made a cron script that runs every minut getting the information with MQTT and JSON.

# Getting data to MQTT broker
data=$(curl \-H "Authorization: Bearer DiNtokenkode" \-H "Content-Type: application/json" \-X POST \-d  '{ "query": "{viewer {homes {currentSubscription {priceInfo {current {total energy tax startsAt }}}}}}" }' https://api.tibber.com/v1-beta/gql)
mosquitto_pub -t /TibberData -m "$data"

Items file.

Number TibberPris "Gjeldende kWh Pris ink mva  [%.4f kr]" <price> {mqtt="<[mosquito:/TibberData:state:JSONPATH($.data.viewer.homes[0].currentSubscription.priceInfo.current.total)]"}
DateTime TibberPrisStartet "Gjeldende pris startet [%1$tH:%1$tM %1$td.%1$tm.%1$tY]" <time> {mqtt="<[mosquito:/TibberData:state:JSONPATH($.data.viewer.homes[0].currentSubscription.priceInfo.current.startsAt)]"}

Hope this helps.

Hello fellow tinkerers, and god JUL :slight_smile:
How can I get this into OH without usig MQTT or som background script?

Tibber has an API


Just wondered if anyone is working on a Binding for Tibber? That would be awesome! :smiley:
Especially after they published the “pulse” and extended their api.

I see that Home Assistant has Tibber integrated via plugin. Would it be possible to implement it in openhab as well?

I have had a functional integration between Tibber and OpenHAB for a long time, utilizing https://pypi.org/project/pyTibber/ together with https://pypi.org/project/python-openhab/

It is too messy and intertwined with other stuff to be shared, but I could perhaps come up with some simple examples. It has been quite a while since I did anything in Java, so a native OpenHAB binding is not as easy as such a mock-up in Python.