home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.67k stars 29.95k forks source link

Tibber integration is not updated / devices removed #81037

Closed unik42 closed 1 year ago

unik42 commented 1 year ago

The problem

Tibber does not update any sensors. After removal of Tibber and reinstallalation, no devices or entities are populated. It is quite simply blank. 2022-10-26 (2)

What version of Home Assistant Core has the issue?

Home Assistant 2022.10.4

What was the last working version of Home Assistant Core?

Home Assistant 2022.10.4

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

No response

joggs commented 1 year ago

Same problem here. I have started to use the node-red integration in parallel as that integration is rock solid in comparison, and that still works now, when there are problems with the home assistant integraiton.

simonepittis commented 1 year ago

note: https://developer.tibber.com/docs/overview#Breaking%20change%20in%20websocket%20subscriptions%20December%202022

the error comes from websocket: Logger: graphql_subscription_manager Source: components/tibber/init.py:88 First occurred: 2:14:24 PM (2 occurrences) Last logged: 2:15:01 PM Websocket is closed.

Tibber changed it before December 2022? :-)

simonepittis commented 1 year ago

INPUT: { viewer { websocketSubscriptionUrl } }


OUTPUT: { "data": { "viewer": { "websocketSubscriptionUrl": "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" } } }

the URL is changed to the new one

swejmansson commented 1 year ago

🙋‍♂️ Same problem....

I'm a Tibber user with Pulse running HA tibber integration and at the same time running Domoticz with tibber plugin. (Running in parallell while I'm moving away from Domoticz) Also using the Tibber app from time to time. Think i got the first "code 429" 5-7th October. Did an update to 2022.10 same week and was not sure if that was the reason. Tried some things, reinstalled tibber integration, created a new token, still same issue. Tested tibbers API explorer and looks like my IP is banned. Shut off both HA and Domoticz integration but it is now after several days still not OK. Tibber app is working fine. Emailed the support 31 October, Estimated time for reply 7-10 days, still no reply. I'll let you know when i get the reply....

image

simonepittis commented 1 year ago

image

ReidarKri commented 1 year ago

I changed to SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" in the file "init.py" located at "/usr/local/lib/python3.10/site-packages/tibber" and then restarted HASS. Now I gets all the Entity information again. So, looks like Tibber changed the URL for wss.

simonepittis commented 1 year ago

@ReidarKri yes works if we change it. tested OK me too. we waiting the bug fix in the next release :-)

SebSkarp commented 1 year ago

I changed to SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" in the file "init.py" located at "/usr/local/lib/python3.10/site-packages/tibber" and then restarted HASS. Now I gets all the Entity information again. So, looks like Tibber changed the URL for wss.

Can you tell me how to find that path? Using HA OS as installation on my NUC. Guessing it's somewhat hidden from everyday access hehe. #newbie

dowermyr commented 1 year ago

I changed to SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" in the file "init.py" located at "/usr/local/lib/python3.10/site-packages/tibber" and then restarted HASS. Now I gets all the Entity information again. So, looks like Tibber changed the URL for wss.

Can´t find folder python3.10. Only 3.9. And no /site-packages/

surakin commented 1 year ago

I changed to SUB_ENDPOINT = "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions" in the file "init.py" located at "/usr/local/lib/python3.10/site-packages/tibber" and then restarted HASS. Now I gets all the Entity information again. So, looks like Tibber changed the URL for wss.

can confirm this fixed the issue

mariusjell commented 1 year ago

Got a reply from Tibber now, they said they fixed it on their end. Reloaded the integration and I have all sensors back now :-) I did not modify any files.

biopixen commented 1 year ago

Ok? Really. Reloaded the integration and is still getting: 2022-11-07 20:50:04.150 ERROR (MainThread) [tibber] Error connecting to Tibber, resp code: 429

biopixen commented 1 year ago

Nope! Removed/Re-added. I think the support made som magic on your account @mariusjell... 2022-11-07 20:52:07.167 ERROR (MainThread) [tibber] Error connecting to Tibber, resp code: 429 2022-11-07 20:52:07.285 ERROR (MainThread) [tibber] Error connecting to Tibber, resp code: 429 2022-11-07 20:52:07.286 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.tibber 2022-11-07 20:52:07.289 INFO (MainThread) [homeassistant.components.notify] Setting up notify.tibber

mariusjell commented 1 year ago

Ok? Really. Reloaded the integration and is still getting: 2022-11-07 20:50:04.150 ERROR (MainThread) [tibber] Error connecting to Tibber, resp code: 429

Yes, I got no other explaination than "our engineer has looked at it, can you try again now" and it works. Maybe an ip-ban that they removed?

SebSkarp commented 1 year ago

@mariusjell It seems to be working for me now too. I deactivated the integration some hours ago since this issue caused my CPU to spike and temps to go wild. Re-enabled it about 5 mins ago and all sensors seems to be working still and feeding updates.

Stormbringer-67 commented 1 year ago

Disabled an reenabled Tibber integration and it's now working again for me also

biopixen commented 1 year ago

I sent a email to the support on the 2nd

If this is a ratelimit issue its not really clear from the errormessage? Also, IF its a rate-limit issue, how do you/me clear it?

Well, ill try and reload it and hope for the best i guess!

acrodyme commented 1 year ago

Got a reply from Tibber now, they said they fixed it on their end. Reloaded the integration and I have all sensors back now :-) I did not modify any files.

Works for me! Re-enabled/reloaded the Tibber integration and the sensor values get flowing. CPU usage is also normal. Looks all good!

swejmansson commented 1 year ago

Enabled the Tibber integration in HA, same issue. Tried Tibber API Explorer, Same issue. Apparently not fixed for me 🤷‍♂️

image

Running HassOS and cannot find the file to edit as suggested.....

blazern1980 commented 1 year ago

Enabled the Tibber integration in HA, same issue. Tried Tibber API Explorer, Same issue. Apparently not fixed for me 🤷‍♂️

image

Running HassOS and cannot find the file to edit as suggested.....

Same here, but when i try with another IP in Tibber API Explorer it works just fine. Feels like my IP is banned.

olealm commented 1 year ago

Did a reload and I have my sensors back! Didn't even have to restart (and no changes in the .py file). Let's see for how long it works this time :)

erikinoslo commented 1 year ago

At 20:55 today I removed and re-added the Tibber integration. Works fine since then.

odechr commented 1 year ago

Only needed to reload my integration and now its working again,

unik42 commented 1 year ago

Tried deleting the integration, waiting all weekend, reinstall it and still it does not work.

nolenjohan commented 1 year ago

Got a reply from Tibber now, they said they fixed it on their end. Reloaded the integration and I have all sensors back now :-) I did not modify any files.

Yes, same for me, works like a charm now!

joggs commented 1 year ago

How many entities do the integration create for you now? I got 3, renewed my api key and got 5, but still feels like there should be many more?

On Tue, Nov 8, 2022 at 8:40 AM Johan Nolén @.***> wrote:

Got a reply from Tibber now, they said they fixed it on their end. Reloaded the integration and I have all sensors back now :-) I did not modify any files.

Yes, same for me, works like a charm now!

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/81037#issuecomment-1306760420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLJXM5H4BGFCKNZXPE2XDWHH7XLANCNFSM6AAAAAARPH4UPA . You are receiving this because you commented.Message ID: @.***>

--

/Jörgen Bergström

nolenjohan commented 1 year ago

How many entities do the integration create for you now? I got 3, renewed my api key and got 5, but still feels like there should be many more? On Tue, Nov 8, 2022 at 8:40 AM Johan Nolén @.> wrote: Got a reply from Tibber now, they said they fixed it on their end. Reloaded the integration and I have all sensors back now :-) I did not modify any files. Yes, same for me, works like a charm now! — Reply to this email directly, view it on GitHub <#81037 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLJXM5H4BGFCKNZXPE2XDWHH7XLANCNFSM6AAAAAARPH4UPA . You are receiving this because you commented.Message ID: @.> -- /Jörgen Bergström

20 entities

Stormbringer-67 commented 1 year ago

I have 25 entities

unik42 commented 1 year ago

What was your error message? Mine is this:

Logger: tibber Source: components/tibber/init.py:55 First occurred: 7. november 2022 kl. 08:16:01 (4 occurrences) Last logged: 10:00:04

Error connecting to Tibber, resp code: 429

ztamas83 commented 1 year ago

I cannot even provoke the 429 error code. Got 428 but it seems it comes already from the AWS front and not the Tibber backend. Can someone with the 429 responses capture the full HTTP response together with body and headers?

Maybe try via postman or curl in the HA CLI. It works fine there too, no external tools required. Would help to see what the response is so some kind of recovery mechanism can be added.

Replace with own token here:

curl -v --location --request POST 'https://api.tibber.com/v1-beta/gql' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"{\r\n  viewer {\r\n    websocketSubscriptionUrl\r\n  }\r\n}","variables":{}}'
swejmansson commented 1 year ago

I cannot even provoke the 429 error code. Got 428 but it seems it comes already from the AWS front and not the Tibber backend. Can someone with the 429 responses capture the full HTTP response together with body and headers?

Maybe try via postman or curl?

Replace with own token here:

curl -v --location --request POST 'https://api.tibber.com/v1-beta/gql' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"{\r\n  viewer {\r\n    websocketSubscriptionUrl\r\n  }\r\n}","variables":{}}'

@ztamas83 Looks like this for me.....

image

ztamas83 commented 1 year ago

Thanks!

On Tue, 8 Nov 2022, 17:05 Jens Månsson, @.***> wrote:

I cannot even provoke the 429 error code. Got 428 but it seems it comes already from the AWS front and not the Tibber backend. Can someone with the 429 responses capture the full HTTP response together with body and headers?

Maybe try via postman or curl?

Replace with own token here:

curl -v --location --request POST 'https://api.tibber.com/v1-beta/gql' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"query":"{\r\n viewer {\r\n websocketSubscriptionUrl\r\n }\r\n}","variables":{}}'

@ztamas83 https://github.com/ztamas83 Looks like this for me.....

[image: image] https://user-images.githubusercontent.com/45631337/200614859-b217a0dd-1a7a-4db9-9fb4-bed9c06065fc.png

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/81037#issuecomment-1307453969, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARB36Q6T2W5OZPWE6OLODXTWHJ24LANCNFSM6AAAAAARPH4UPA . You are receiving this because you were mentioned.Message ID: @.***>

unik42 commented 1 year ago

And now this: image

ztamas83 commented 1 year ago

This one is expected due to a change in 2022.11.2.

Instead of totally die during setup it will be retried. This message comes when you see the 429 errors otherwise.

On Wed, 9 Nov 2022, 07:05 unik42, @.***> wrote:

And now this: [image: image] https://user-images.githubusercontent.com/114183507/200752267-e08d34d0-3abe-4a45-816c-abfad561195e.png

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/81037#issuecomment-1308256966, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARB36Q3FEMLSELC65CNOL5LWHM5LDANCNFSM6AAAAAARPH4UPA . You are receiving this because you were mentioned.Message ID: @.***>

joggs commented 1 year ago

I still only get 5 entities after upgrading to 22.11.2. It seems like I get all data on all requests i test from tibbers api eplorer, so it feels like the problem still is in home assistant. I am using the node-red tibber integration in parallel and that integration has been working flawlessly during all this time. Is the new SUB_ENDPOINT updated in 22.11.2 ?

joggs commented 1 year ago

Interesting. I added the tibber integration again, but now with a demo api token from the tibber api explorer, and then i get a house called vita huset where the owner is Ayra Stark and I get all 26 entities. Ayra seems to be one of Tibbers lucky customers that has a working integration

joggs commented 1 year ago

Interesting. I added the tibber integration again, but now with a demo api token from the tibber api explorer, and then i get a house called vita huset where the owner is Ayra Stark and I get all 26 entities. Ayra seems to be one of Tibbers lucky customers that has a working integration

Captain's log, final entry... My 26 entities just appeared. I've hade a mail conversation with Tibber where I've asked them to look into my problem, but I do not know if they have done something or if it just started working.

biopixen commented 1 year ago

I have sent two emails to the support and still no response...

cessnail commented 1 year ago

The Tibber API Explorer is also broken: "Network error: Failed to fetch". Also with demo token. If I make a regular API request through Node-Red, reply is: too many requests. That can't be right. We'll probably have to wait for fixed on their end?

ztamas83 commented 1 year ago

The Tibber API Explorer is also broken: "Network error: Failed to fetch". Also with demo token. If I make a regular API request through Node-Red, reply is: too many requests. That can't be right. We'll probably have to wait for fixed on their end?

It is normal if you have different clients trying to use your API token. See https://github.com/home-assistant/core/issues/76491#issuecomment-1308818175 for an explanation.

unik42 commented 1 year ago

New error:

image

ztamas83 commented 1 year ago

@unik42 this is nothing to do with HA Tibber integration

unik42 commented 1 year ago

I see there is reference to tibber in the config file - I don't know what it is. Probably safe to delete.

swejmansson commented 1 year ago

Do you know what!? I was banned due to overuse of the API. As I wrote above I have been running HA and Domoticz in parallel. Guess that was to much. Hope the HA integration never exceeds the limit of 100 in 5 minutes regardless of what you do in HA. Is it possible to track it in some way? After they removed the bann the integration works fine again and I can also get result from Tibbers API explorer page.

Working fine: Screenshot_20221110_214939_Chrome

Reply from Tibber: Screenshot_20221110_212902_Gmail

I asked some more questions, like if it's a permanent band and also gave som suggestions to inform about it. API Explorer could for sure tell the IP is banned etc I will share the reply when I get it.

cessnail commented 1 year ago

Do you know what!? I was banned due to overuse of the API. As I wrote above I have been running HA and Domoticz in parallel. Guess that was to much.

This is probably what causes my problems with Tibber as well. For me the API Explorer did not even work with the demo token! After your message above I tried the API Explorer but from a different IP-address (through a VPN) and voilà: we're back! So yes, it was personal.

swejmansson commented 1 year ago

@cessnail send a mail to Tibber and you will be un-banned after 10 long days of waiting 😅 Do you know why/how you have exceeded the limit? Have you also been running thing in parallel? My Tibber app have not been affected by the ban so most likely it cannot be counted. Would be good to understand it.....

cessnail commented 1 year ago

@cessnail send a mail to Tibber and you will be un-banned after 10 long days of waiting 😅 Do you know why/how you have exceeded the limit? Have you also been running thing in parallel? My Tibber app have not been affected by the ban so most likely it cannot be counted. Would be good to understand it.....

I'm aware of the 100 / 5 minutes limit and I was very careful in not exceeding this. Could it be that using the same token from multiple endpoints triggered the ban? I've been using the HA Tibber integration, the API Explorer (to test queries and results) and node-red.

unik42 commented 1 year ago

Just a heads up to anyone reading this thread; my problem is not IP banning, as Tibber confirmed I am not banned.

ztamas83 commented 1 year ago

Just a heads up to anyone reading this thread; my problem is not IP banning, as Tibber confirmed I am not banned.

This is pretty much offtopic but if you have that problem you showed, cannot connect to api.tibber.com, then you should investigate your network. Can you reach from your computer on the same network, etc. Restart router, you name it...

unik42 commented 1 year ago

Everything tibber works normal on everything but Home Assistant. The tibber app works fine, I can check power usage on pulse for instance. The tibber api explorer works perfectly, no error messages and my home shows up.

But Home Assistant refuses to or is not able to connect (error 429).