core icon indicating copy to clipboard operation
core copied to clipboard

Tibber integration increases cpu load by 25%

Open Martijnh89 opened this issue 2 years ago • 8 comments

The problem

The last couple of weeks I found that Home Assistant got quite slow in loading graphs and history. After the last update things seemed to start well, but today I found Home Assistant very slow again and decided to turn off integrations one by one to see what causes the issue. The cpu load was averaging on 25-30% continuously. Turning the Tibber integration off immediately solved the issue, Home Assistant was fast and responsive again and the cpu load went back to 1-2%.

What version of Home Assistant Core has the issue?

2022.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tibber

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I tried removing and installing the integration again, but everytime the integration gets active it slows the system down again. Thanks for the help!

Martijnh89 avatar Nov 07 '22 15:11 Martijnh89

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 Change the title of 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.

(message by CodeOwnersMention)


tibber documentation tibber source (message by IssueLinks)

home-assistant[bot] avatar Nov 07 '22 15:11 home-assistant[bot]

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

acrodyme avatar Nov 07 '22 16:11 acrodyme

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

jml002021 avatar Nov 07 '22 16:11 jml002021

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

Hi. Same problem here. Do we need to change the api address, or just wait for Tibber to update? If we need to update api. Can someone give a small "how to"

erikinoslo avatar Nov 07 '22 16:11 erikinoslo

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

Not so sure, node-red also has problems with the feed and in that integration one can specify which wss-endpoint to use and the above one also fails.

However it's another error than HA but still.

And also according to Tibber the new endpoint is the one to use first in December, the old one should still work.

kuseman avatar Nov 07 '22 16:11 kuseman

Same issue here that the Tibber integration isn't working since around 13.15CET today. Maybe change the title of this issue to just Tibber integration not working? Higher cpu load seems irrelevant when the integration isn't working at all.

On every reload of the integration I get this in the log: Error connecting to Tibber, resp code: 428

Tibber app is still working for me as well.

blackburn77 avatar Nov 07 '22 16:11 blackburn77

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

Hi. Same problem here. Do we need to change the api address, or just wait for Tibber to update? If we need to update api. Can someone give a small "how to"

Look at this link https://github.com/home-assistant/core/issues/81037#issuecomment-1305826359

jml002021 avatar Nov 07 '22 17:11 jml002021

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

Hi. Same problem here. Do we need to change the api address, or just wait for Tibber to update? If we need to update api. Can someone give a small "how to"

Look at this link #81037 (comment)

Can confirm that the solution works.

kuseman avatar Nov 07 '22 17:11 kuseman

there seem to be an open pull request for this upstream https://github.com/Danielhiversen/pyTibber/pull/213

perosb avatar Nov 07 '22 18:11 perosb

I have exactly the same issue. Tibber integration consumes a LOT of CPU and in addition, sensors are not available. I have reloaded the integration many times at no avail and even restarted HA but does not make any difference. Loss of connection/sensor data happened at ~13:20 CET. Power consumption on the app still works.

Same happen here. I believe Tibber has changed their api address (SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" ) ...

Hi. Same problem here. Do we need to change the api address, or just wait for Tibber to update? If we need to update api. Can someone give a small "how to"

Look at this link #81037 (comment)

Can confirm that the solution works.

Hey. Any way I can access that folder path when running HA OS? Seems I would need to somehow access the underlying OS/System of Hass but I have no idea how to achieve that?

Thanks

SebSkarp avatar Nov 07 '22 18:11 SebSkarp

Hey. Any way I can access that folder path when running HA OS? Seems I would need to somehow access the underlying OS/System of Hass but I have no idea how to achieve that?

Thanks

From the haos home screen type "login", then run "docker exec -it homeassistant bash" which will start a bash session in the homeassistant docker image. There you can browse to "/usr/local/lib/python3.10/site-packages/tibber" and then modify the file init.py using the editor vi for example.

blackburn77 avatar Nov 07 '22 19:11 blackburn77

@blackburn77 Svensk/Norsk? Lust att guida genom PM någonstans kanske? Hade uppskattats.

SebSkarp avatar Nov 07 '22 19:11 SebSkarp

Duplicate of https://github.com/home-assistant/core/issues/81037

Danielhiversen avatar Nov 07 '22 19:11 Danielhiversen