tibber / com.tibber.athom

Tibber app for Athom Homey
16 stars 4 forks source link

Tibber fails to fetch data in Homey #27

Closed Coderaxx closed 2 years ago

Coderaxx commented 2 years ago

Had issues with nothing updating in Homey, and tried removing Tibber and reinstalling it on Homey. This is what appears after reinstalling, when trying to add Home and Tibber Pulse.

Running Homey Bridge. 0F5A36B5-7847-49FF-82C1-49C17A8DB5EA

jstaro commented 2 years ago

Could you please reproduce the error and then send an app diagnostic report? (More -> Apps -> Tibber -> [cog wheel] -> Create diagnostic report).

Also please add a note to the diagnostic report referring to this issue so we can easily correlate it.

Coderaxx commented 2 years ago

Can’t find a way to create a diagnostics report when I’m using Homey bridge.

johntrygve-haaverstad commented 2 years ago

I've got the same problem. 'Failed to retrieve data' message after tibber login when installing tibber app in homey.

jstaro commented 2 years ago

Can’t find a way to create a diagnostics report when I’m using Homey bridge.

Oh man, you're right. You can't do that unless you have a Homey Pro, looks like. That's... unfortunate.

What seems to be happening here (without having any diagnostics to go on) is that the request to fetch the your home(s) and related devices fails for some reason. Without knowing more, it could be a number of things.

Are you able to test to see if you can query your home using the public Tibber API (which the Tibber app for Homey is using)?

  1. Sign in with your Tibber customer account (top right)
  2. Press Get an access token and then Create token. Be sure to read the important notice there and not leak your token to third parties.
  3. Go to API Explorer
  4. Press Load personal token
  5. You can now query the API in the same way the Tibber app for Homey does

There are some example queries in the dropdown to the right if you're not familiar with GraphQL syntax/playground.

Coderaxx commented 2 years ago

Tried both in the API explorer, and on my own. Works fine. Tried resetting the token, in case something got messed up there, which seems unlikely, but did it either way. API requests are working fine on my own and in the explorer, but not in the Homey app… Just shooting for the stars here, but since the Bridge is in the cloud, and the app probably sends request to the Tibber API from the same IP address for a lot of people, maybe the API recognized the IP as spam, and blocked it/timed it out? Or even banned it automatically?

jstaro commented 2 years ago

Thanks for testing!

We are currently investigating our infrastructure to see where these connection errors occur (we cannot currently see these errors on our end). Diagnostic logging of this should be improved in the upcoming version (including showing the HTTP status code in that particular view).

Rate-limiting could definitely occur, but it should only be intermittent. We have reached out to Athom for some details so we can ensure we do not aggressively rate-limit their datacenter location(s).

You could try the v1.5.11 version that's available in the test channel right now, ~but there are reports across the web of people having intermittent issues installing test versions with the Homey Bridge (the "No App Manager Available" error) so you may not be successful in that endeavour. I haven't seen a statement from Athom about that yet, but I may have missed it.~

Update: Athom have fixed the "No App Manager Available" issue now.

We're aiming to release the new version really soon; just trying to hammer out some of these issues.

jstaro commented 2 years ago

@Coderaxx We have made some changes so please try again now.

lovethyresson commented 2 years ago

Should be fixed, please reopen if not fixed.