core icon indicating copy to clipboard operation
core copied to clipboard

tibber integration does not work with 2024.3

Open ignazhabibi opened this issue 1 year ago • 51 comments

The problem

tibber integration all sensors unavailable after update from 2024.2.5 to 2024.3

What version of Home Assistant Core has the issue?

2024.3

What was the last working version of Home Assistant Core?

2024.2.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tibber

Link to integration documentation on our website

No response

Diagnostics information

Downgrade from 2024.3 to 2024.2.5 solves the issue.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-03-08 08:47:53.223 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform tibber is taking longer than 60 seconds. Startup will proceed without waiting any longer.

2024-03-08 08:48:24.091 ERROR (MainThread) [tibber.home] rt not running

2024-03-08 08:48:57.874 ERROR (MainThread) [tibber.realtime] Watchdog: Connection is down, 2024-03-08 08:49:07.873989

Additional information

No response

ignazhabibi avatar Mar 07 '24 18:03 ignazhabibi

Strange. It works for me, using HA - OS on an Odroid (HA-blue). I get prices for today, tomorrow and consumption.

friendlycrow avatar Mar 07 '24 22:03 friendlycrow

I did the update again, same result. tibber platform is not working with 2024.3.0. I added the logs above. Downgrade to 2024.2.5 immediately solves the problem. Nothing else changed.

ignazhabibi avatar Mar 08 '24 08:03 ignazhabibi

Hey there @danielhiversen, mind taking a look at this issue as it has been labeled with an integration (tibber) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tibber can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tibber Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tibber documentation tibber source (message by IssueLinks)

home-assistant[bot] avatar Mar 09 '24 21:03 home-assistant[bot]

I had the same issue but for me it helped to restart Home Assistant to get it working again, but seems a bit unstable.

rasmusbe avatar Mar 12 '24 10:03 rasmusbe

I have not upgraded to 2024.3 yet. Had the same issue with the Tibber integration and a Home Assistant restart helped.

martin717171 avatar Mar 12 '24 11:03 martin717171

@rasmusbe @martin717171 Don‘t think so. The unstable thing and restarts that helped have its own issue: https://github.com/home-assistant/core/issues/100410

This one here happens immediately after the update and even a restart did not help. The whole integration doesn‘t start, as the logs show.

ignazhabibi avatar Mar 12 '24 19:03 ignazhabibi

Could you enable debug logging ?


logger:
  default: warning
  logs:
    homeassistant.components.tibber: debug
    tibber: debug
    
    

Danielhiversen avatar Mar 12 '24 19:03 Danielhiversen

I too ran in a problem today. I had no warm water. Checking everything in HA I found out that all the Tibber entities were unavailable. Therefore no price controlled steering of the boiler.

I deleted the Tibber integration and added it back in HA. For now it works.

ewoutschalkwijk avatar Mar 12 '24 21:03 ewoutschalkwijk

That has to do with instability in the service and is a different, long standing, issue. Tibber was unavailable for me (for everyone?) today between 09:44 -10:08 CET. It doesn't restart itself when that happens.

friendlycrow avatar Mar 12 '24 21:03 friendlycrow

@Danielhiversen Here are the logs you've asked for:

2024-03-14 11:45:53.476 DEBUG (MainThread) [tibber.response_handler] Response status: 200 2024-03-14 11:45:53.479 DEBUG (MainThread) [tibber] Using websocket subscription url wss://websocket-api.tibber.com/v1-beta/gql/subscriptions 2024-03-14 11:45:54.291 DEBUG (MainThread) [tibber.response_handler] Response status: 200 2024-03-14 11:45:54.295 DEBUG (MainThread) [tibber.realtime] Starting watchdog 2024-03-14 11:45:54.532 DEBUG (MainThread) [tibber.home] Waiting for rt_connect ... 024-03-14 11:46:07.126 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform tibber is taking over 10 seconds. ... 2024-03-14 11:46:07.212 DEBUG (MainThread) [tibber.home] Waiting for rt_connect ... 2024-03-14 11:46:07.306 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform tibber is taking longer than 60 seconds. Startup will proceed without waiting any longer. ... 2024-03-14 11:46:08.216 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:09.625 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:10.626 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:11.627 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:12.627 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:13.753 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:14.754 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:15.755 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:16.756 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:17.759 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:18.760 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:19.761 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:20.762 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:21.763 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:22.764 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:23.765 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:24.779 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:25.780 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:26.781 DEBUG (MainThread) [tibber.home] Waiting for rt_connect ... 2024-03-14 11:46:31.786 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:32.787 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:33.792 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:34.793 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:35.794 DEBUG (MainThread) [tibber.home] Waiting for rt_connect 2024-03-14 11:46:36.795 ERROR (MainThread) [tibber.home] rt not running 2024-03-14 11:46:59.534 ERROR (MainThread) [tibber.realtime] Watchdog: Connection is down, 2024-03-14 11:47:09.534566 2024-03-14 11:46:59.839 DEBUG (MainThread) [tibber.realtime] Resubscribing to homes 2024-03-14 11:46:59.840 DEBUG (MainThread) [tibber.realtime] Watchdog: Reconnected successfully ... 2024-03-14 11:48:09.843 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:14.844 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:19.847 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:24.848 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:29.850 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:34.851 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:39.852 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:44.853 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:49.855 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:54.857 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:48:59.859 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:04.860 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:09.862 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:14.863 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:19.865 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:24.866 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:29.868 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:34.870 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:39.871 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:44.872 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:49.874 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:54.875 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:49:59.876 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:50:04.878 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:50:09.879 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive 2024-03-14 11:50:14.881 DEBUG (MainThread) [tibber.realtime] Watchdog: Connection is alive

No sensors available at all

ignazhabibi avatar Mar 14 '24 11:03 ignazhabibi

Thanks, does it work to get live(pulse) data at https://developer.tibber.com/explorer ? Could you share the diagnostics information?

Danielhiversen avatar Mar 14 '24 11:03 Danielhiversen

Live Measurement via API Explorer is working

ignazhabibi avatar Mar 14 '24 11:03 ignazhabibi

Sorry, then I do not know how to fix it. Not able to reproduce here.

Danielhiversen avatar Mar 14 '24 11:03 Danielhiversen

Thanks for helping :-) It seems that no other users currently have that issue. I'll try to find out more.

ignazhabibi avatar Mar 14 '24 11:03 ignazhabibi

At least one other person (me) also has this problem: image

The weird thing is, it seems to be extremely intermittent.

All tibber sensors go from correct value to unavailable and vice versa from second to second. This has started with the last home assistant update (I think).

In this graph, you can see the gaps: image

WegnerDan avatar Mar 14 '24 11:03 WegnerDan

With 2024.3.1 it does also not work.

There has been the same issue before, see https://github.com/home-assistant/core/issues/89058

There it "magically" was fixed with a newer HA version, but no information about what was changed. Maybe @Danielhiversen you can have a look at this?

ignazhabibi avatar Mar 15 '24 07:03 ignazhabibi

I had the same experience for 2-3 days ago. Now the enitities are available but steering based on price hasn’t worked since. IMG_3156

Update frequency’s 2 seconds

ewoutschalkwijk avatar Mar 15 '24 08:03 ewoutschalkwijk

Reloading tibber integration after HA booted completely helps. For me it seems like a timing issue during startup.

ignazhabibi avatar Mar 24 '24 13:03 ignazhabibi

Reloading tibber integration after HA booted completely helps. For me it seems like a timing issue during startup.

That also fixed it for me - but only until the next HA restart, then the integration is again not loaded :-( Another integration reload and it is fixed again.

I am using HA core 2024.3.3

Edit: this is my corresponding log

2024-03-29 09:16:08.242 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform tibber is taking over 10 seconds. 2024-03-29 09:16:08.968 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform tibber is taking longer than 60 seconds. Startup will proceed without waiting any longer. 2024-03-29 09:16:40.870 ERROR (MainThread) [tibber.home] rt not running 2024-03-29 09:17:03.203 ERROR (MainThread) [tibber.realtime] Watchdog: Connection is down, 2024-03-29 09:17:13.203109

sebeichholz avatar Mar 29 '24 08:03 sebeichholz

Same here, it doesn’t work more often than it does. I get the info from the entities but a very simple ‘turn on/off’ of my boiler worked 2-3 days out of 10.

I’m sadly not smart enough to figure out where the problem lies.

ewoutschalkwijk avatar Mar 29 '24 09:03 ewoutschalkwijk

I created a temporary workaround: an automation which checks every x minutes, if a typical tibber sensor is "unavailable", and if so, it calls a rest command which reloads the tibber integration. Works like a charm!

Here is my automation:

alias: "Check: Tibber-Integration offline?"
description: ""
trigger:
  - platform: time_pattern
    minutes: /5
condition:
  - condition: state
    entity_id: sensor.power_sebi
    state: unavailable
    for:
      hours: 0
      minutes: 1
      seconds: 0
action:
  - service: rest_command.command_reload_tibber
    data: {}
    response_variable: result
  - service: notify.smtp
    data:
      title: Home Assistant: Tibber Integration ist offline and is reloaded
      message: >-
        result of reload:
        {{result}}
      target: <enter your mail adress>
mode: single

and this is the rest command in restcommand.yaml:

command_reload_tibber:
  url: "http://<home assistant IP>:8123/api/config/config_entries/entry/<config_entry for your tibber integration>/reload"
  method: POST
  headers:
    authorization: !secret longlive_token_bearer
    content-type: 'application/json'

You can get the config_entry for the tibber integration in the URL by clicking this path: settings => integrations => tibber => devices => Tibber (top left). For me the URL ist then http://192.168.0.21:8123/config/integrations/integration/tibber#config_entry=a1d3844b12d186102e7e2ab41a6d04bd

I hope it's ok to post it here. If not, sorry, feel free to remove my comment.

Good luck with your work on the error and thanks for your general work on this integration!

sebeichholz avatar Mar 29 '24 11:03 sebeichholz

Scherm­afbeelding 2024-03-29 om 16 22 49

I don't think my sensors are offline (haven't noticed it lately) but still no action I being taken when power prices differ.

Anyway, I created an automation with the code 'Tibber-Integration offline?', but what do I do with the 'restcommand.yaml'? Is that a new automation or do I paste it in an existing .yaml file? I'm not a programmer as you certainly notice.

Thank you for your effort, even though I unsure if it was meant for me.

Ewout

ewoutschalkwijk avatar Mar 29 '24 15:03 ewoutschalkwijk

Here is explained how to create a REST command:

https://www.home-assistant.io/integrations/rest_command/

The REST command is then called in the automation.

You can also write it directly in your configuration.yaml

sebeichholz avatar Mar 29 '24 16:03 sebeichholz

@sebeichholz Here is a simpler Reload script that worked for me as well: https://github.com/home-assistant/core/issues/100410#issuecomment-1784143895

ignazhabibi avatar Mar 30 '24 07:03 ignazhabibi

@Danielhiversen There a a lot of users that have problems with the tibber integration, that all can be solved with a reload tibber automation. Isn‘t there anything that could fix this issue in your integration? Is this rt, rt_ connect your code or base code of HA? Automate things based on cheap prices is a core functionality of a modern smart home and it is sad that it does not work reliable. Really appreciate your work and if I could I would contribute more than just testing things out

ignazhabibi avatar Mar 30 '24 07:03 ignazhabibi

@sebeichholz Here is a simpler Reload script that worked for me as well: #100410 (comment)

@ignazhabibi , I cannot open the link. Could you be so kind to look at it?

thank you 😃👍🏻

ewoutschalkwijk avatar Mar 30 '24 09:03 ewoutschalkwijk

@ignazhabibi unfortunately, I have not found time to look into this. I will try to prioritise it, but can't promise anything

Danielhiversen avatar Mar 30 '24 16:03 Danielhiversen

Any news @Danielhiversen? Have the same problem... just a friendly reminder :)

Zkaning avatar Apr 12 '24 08:04 Zkaning

No

Danielhiversen avatar Apr 12 '24 08:04 Danielhiversen

Just adding that I seem to have the same issue as other people in here. Tibber integration just goes down seemingly at random times, and I have to reload it for it to work again. I've also used an automation to just reload the integration.

Core 2024.4.3
Supervisor 2024.04.0
Operating System 12.2
Frontend 20240404.2

From the logs:

Logger: tibber.realtime
Source: runner.py:189
First occurred: April 12, 2024 at 6:01:07 PM (114 occurrences)
Last logged: 2:01:09 PM

Watchdog: Connection is down, 2024-04-15 08:01:17.200833
Watchdog: Connection is down, 2024-04-15 11:21:15.984067
Watchdog: Connection is down, 2024-04-15 12:51:15.661397
Watchdog: Connection is down, 2024-04-15 13:01:16.247135
Watchdog: Connection is down, 2024-04-15 14:01:19.772230
Logger: tibber.home
Source: /usr/local/lib/python3.12/site-packages/tibber/home.py:461
First occurred: April 12, 2024 at 9:20:07 PM (38 occurrences)
Last logged: 2:00:08 PM

Error in rt_subscribe
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 439, in _start
    async for data in self._tibber_control.realtime.sub_manager.session.subscribe(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Client' object has no attribute 'session'
Logger: homeassistant.components.sensor
Source: runner.py:189
integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: April 12, 2024 at 6:00:12 PM (80 occurrences)
Last logged: 1:00:10 PM

Setup of sensor platform tibber is taking over 10 seconds.

image

jgjestad avatar Apr 15 '24 12:04 jgjestad