Strange, I am running the binding without problems under latest stable release.
Could you enable debugging, to get log details for your actual query response, to check why you would get the parse error?
Strange, I am running the binding without problems under latest stable release.
Could you enable debugging, to get log details for your actual query response, to check why you would get the parse error?
2021-08-10 17:56:34.725 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)' to UNINITIALIZED
2021-08-10 17:56:34.732 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-08-10 17:56:38.559 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-08-10 17:56:38.561 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from INITIALIZING to UNKNOWN
2021-08-10 17:56:39.165 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from UNKNOWN to ONLINE
2021-08-10 17:56:39.538 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tibber:tibberapi:0d270b17' changed from ONLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)'
2021-08-10 17:56:39.533 [DEBUG] [ibber.internal.handler.TibberHandler] - API response: {"data":{"viewer":{"home":{"currentSubscription":{"priceInfo":{"current":{"total":0.941,"startsAt":"2021-08-10T17:00:00+02:00","level":"EXPENSIVE"}}},"daily":{"nodes":[{"from":"2021-08-09T00:00:00+02:00","to":"2021-08-10T00:00:00+02:00","cost":45.987347125,"unitPrice":0.835071,"consumption":55.07,"consumptionUnit":"kWh"}]},"hourly":{"nodes":[{"from":"2021-08-10T16:00:00+02:00","to":"2021-08-10T17:00:00+02:00","cost":3.1929249,"unitPrice":0.931425,"consumption":3.428,"consumptionUnit":"kWh"}]}}}}}
2021-08-10 17:56:39.534 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.tibber.internal.handler.TibberHandler@28b19786': 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)'
at org.openhab.binding.tibber.internal.handler.TibberHandler.getURLInput(TibberHandler.java:155) ~[?:?]
at org.openhab.binding.tibber.internal.handler.TibberHandler.getTibberParameters(TibberHandler.java:117) ~[?:?]
at org.openhab.binding.tibber.internal.handler.TibberHandler.initialize(TibberHandler.java:91) ~[?:?]
2021-08-10 17:56:39.537 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'tibber:tibberapi:0d270b17': 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)'
at org.openhab.binding.tibber.internal.handler.TibberHandler.getURLInput(TibberHandler.java:155) ~[?:?]
at org.openhab.binding.tibber.internal.handler.TibberHandler.getTibberParameters(TibberHandler.java:117) ~[?:?]
at org.openhab.binding.tibber.internal.handler.TibberHandler.initialize(TibberHandler.java:91) ~[?:?]
This is really strange, as you are getting similar query response as myself, although in my case it works without errors running OH 3.1.0 - release build. Although I am running openHABian, having com.google.gson 2.8.6 (default version). Uncertain at the moment what to suggest.
Is the channel ācurrent levelā missing in the current stable version 3.1?
It is in the documentation, but it is missing in the UI.
Sorry, the channel ācurrent levelā was missing in my old thing.
Iāve created a new Tibber-API-Thing and the Channel appears.
@kjoglums , what version of the tibber binding is the latest for openhab 2.5?
The ones you have posted for download say 2.5.8 and the one in openhab binding installation menu says 2.5.11 and 2.5.6.
Iām asking as I canāt get Total Hourly consumption to work.
The latest active development made by me for OH 2.5 would be the 2.5.8 version made for manual install, linked to under: https://community.openhab.org/t/tibber-binding/67019/94?u=kjoglums
Other versions installed directly from OH binding installation would not contain the latest updates (like price level). Although Total Hourly Consumption should be the same for all versions. You could try to enable debug logging to get the actual response for the API query made by the binding.
So after some troubleshooting:
It shows NULL for my values.
I tested some queries with my token in the tibber developer portal and if I run this query āCONSUMPTIONā I get correct results:
{
viewer {
homes {
consumption(resolution: HOURLY, last: 100) {
nodes {
from
to
cost
unitPrice
unitPriceVAT
consumption
consumptionUnit
}
}
}
}
}
Reply:
"consumption": {
"nodes": [
{
"from": "2021-11-17T11:00:00.000+01:00",
"to": "2021-11-17T12:00:00.000+01:00",
"cost": 2.5478285,
"unitPrice": 1.2999125,
"unitPriceVAT": 0.2599825,
"consumption": 1.96,
"consumptionUnit": "kWh"
},
But if I run this query āHOME/PRICE/CONSUMPTIONā I only get NULL in the consumption!
{
viewer {
homes {
timeZone
address {
address1
postalCode
city
}
owner {
firstName
lastName
contactInfo {
email
mobile
}
}
consumption(resolution: HOURLY, last: 10) {
nodes {
from
to
cost
unitPrice
unitPriceVAT
consumption
consumptionUnit
}
}
currentSubscription {
status
priceInfo {
current {
total
energy
tax
startsAt
}
}
}
}
}
}
Reply:
"consumption": {
"nodes": [
{
"from": "2021-11-21T05:00:00.000+01:00",
"to": "2021-11-21T06:00:00.000+01:00",
"cost": null,
"unitPrice": 0.2049125,
"unitPriceVAT": 0.0409825,
"consumption": null,
LOG DEBUG from openhab:
2021-11-21 15:52:21.960 [DEBUG] [ibber.internal.handler.TibberHandler] - API response: {"data":{"viewer":{"home":{"currentSubscription":{"priceInfo":{"current":{"total":1.2804,"startsAt":"2021-11-21T15:00:00.000+01:00","level":"VERY_EXPENSIVE"}}},"daily":{"nodes":[{"from":"2021-11-20T00:00:00.000+01:00","to":"2021-11-21T00:00:00.000+01:00","cost":20.426514375,"unitPrice":0.443188,"consumption":46.09,"consumptionUnit":"kWh"}]},"hourly":{"nodes":[{"from":"2021-11-21T14:00:00.000+01:00","to":"2021-11-21T15:00:00.000+01:00","cost":null,"unitPrice":1.2506875,"consumption":null,"consumptionUnit":"kWh"}]}}}}}
The ādailyā and āhourlyā values are set up similarly, in the same query, and as seen from your debug log, you are receiving values for the daily node, indicating the binding query/response works as intended.
Do you have the Tibber subscription alone, without Tibber Pulse? I believe I have seen some info from Tibber that only Pulse customers should be receiving hourly updates, while others should āat bestā receive updates once per day.
Also, the exact query, as used in the binding is presented below (i.e. not the same as the ones you have listed above). For me, having both Tibber subscription and Tibber Pulse, I do get the hourly updates. And just for referense, it is only for OH 3 the binding is being maintained.
{
viewer {
home(id: "MY_HOME_ID") {
currentSubscription {
priceInfo {
current {
total
startsAt
}
}
}
daily: consumption(resolution: DAILY, last: 1) {
nodes {
from
to
cost
unitPrice
consumption
consumptionUnit
}
}
hourly: consumption(resolution: HOURLY, last: 1) {
nodes {
from
to
cost
unitPrice
consumption
consumptionUnit
}
}
}
}
}
As a note: I just checked my persisted data, and my hourly data also stopped logging 2021-11-17 around 14:00 (I believe there has been a Tibber cloud issue during the last days). And I have also been struggling with Pulse data over the last couple of days, whereas I ended up doing a reset of Tibber Pulse, now getting data as normal.
I found the problem
So I do not have Tibber Pulse. So It takes 2 days for Tibber to register my hourly consumption and make it available.
Since the binding only queries the latest hour it will not work.
Thanks for the support and a great binding!
is there a official forum for this binding? If so, iām sorry for bringing this old thread up.
Sometimes the binding stops updating the live-data. and the log keep spamming
2022-10-17 12:33:58.002 [INFO ] [ibber.internal.handler.TibberHandler] - Attempting to reopen Websocket connection
2022-10-17 12:33:58.004 [WARN ] [ibber.internal.handler.TibberHandler] - Open: Websocket client already running
2022-10-17 12:34:58.098 [INFO ] [ibber.internal.handler.TibberHandler] - Attempting to reopen Websocket connection
2022-10-17 12:34:58.100 [WARN ] [ibber.internal.handler.TibberHandler] - Open: Websocket client already running
2022-10-17 12:35:58.882 [INFO ] [ibber.internal.handler.TibberHandler] - Attempting to reopen Websocket connection
2022-10-17 12:35:58.891 [WARN ] [ibber.internal.handler.TibberHandler] - Open: Websocket client already running
2022-10-17 12:36:58.992 [INFO ] [ibber.internal.handler.TibberHandler] - Attempting to reopen Websocket connection
2022-10-17 12:36:58.994 [WARN ] [ibber.internal.handler.TibberHandler] - Open: Websocket client already running
2022-10-17 12:37:59.091 [INFO ] [ibber.internal.handler.TibberHandler] - Attempting to reopen Websocket connection
2022-10-17 12:37:59.093 [WARN ] [ibber.internal.handler.TibberHandler] - Open: Websocket client already running
It has happend a few times before. The Tibber App is recieving the live updates as normal.
Openhab 3
Rpi 4
I have also experienced this. My Tibber runs fine for a day or two, then I have to disable/enable the Tibber Thing.
Tried to run a Home Assistent i paralell, and this have been running non stop for weeks now.
Which version of the bindng are you using? Regardless, an openHAB reboot will reinitialise the binding.
Also, a pull request has been merged, and will follow with the next OH Milestone release. PR based on bug reported:
I am running version 3.3.0, after reading through the github issue I will try this new binding and report back. Thank you!
Thank you for the new channel " Tomorrow prices"
Newbie here.
Heard about breaking update at Tibber API in December for the connection.
Running OH3 with public Tibber binding 3.3.3.
Just want to make sure smooth transition but unsure about if I need to update binding manually by uninstall/reinstall and perhaps re-link all my items?
Following the next openHAB milestone release, the updated version for breaking API changes will be included as part of the official binding repo. So the only required action on your behalf would be to update to next openHAB milestone release.
Ok, so I really need to upgrade OH3?
I usually not taking milestone updates, but major release only.
What do I need to do to get M5 27:th Nov or M6 at 11:th Dec?
If Tibber API would lose support for old connection early December (they havenāt specified a date) time is short.
And when is official OH 3.4.0 release due?