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.17k stars 29.85k forks source link

Too many requests error for Tractive integration #99121

Closed FS1961 closed 10 months ago

FS1961 commented 1 year ago

The problem

I have had the Tractive integration working for at least a year but now it's not updating. I have to "reload" the integration for the status to change.

I have the app on my iPhone and it shows everything correctly.

I've logged out, removed the integration, re-added the integration, restarted many times, no joy.

Screenshot 2023-08-25 at 2 56 42 PM Screenshot 2023-08-25 at 2 56 03 PM

What version of Home Assistant Core has the issue?

core-2023.8.4

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

Tractive

Link to integration documentation on our website

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

Diagnostics information

config_entry-tractive-62ae0bb4796d9f6d64450900523b1a57.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing in logs with "Tractive".

Additional information

Used to work fine. Not sure what exactly changed and when.

home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `tractive` 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 tractive` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


tractive documentation tractive source (message by IssueLinks)

bieniu commented 1 year ago

https://github.com/home-assistant/core/pull/97091 should fix your issue.

FS1961 commented 1 year ago

Not the sharpest tool in the shed, what are you saying? Is there something I have to do?

Or am I just waiting for a fix forthcoming?

Thanks! Fran

On Aug 27, 2023, at 12:36 PM, Maciej Bieniek @.***> wrote:

97091 https://github.com/home-assistant/core/pull/97091 should fix your issue.

β€” Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/99121#issuecomment-1694631342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPFZNXEK4JKWGJ57QJTTNLXXMPKLANCNFSM6AAAAAA4AHCWOY. You are receiving this because you authored the thread.

bieniu commented 1 year ago

You should wait for HA 2023.9.0. Or, if you want to help with testing, I can prepare this version for you as a custom component.

FS1961 commented 1 year ago

Thanks for the clarification.

Some day I hope to be as smart as everyone else.

I think I will just wait. :)

Frank

On Aug 27, 2023, at 2:06 PM, Maciej Bieniek @.***> wrote:

You should wait for HA 2023.9.0. Or, if you want to help with testing, I can prepare this version for you as a custom component.

β€” Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/99121#issuecomment-1694650750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPFZNRDXVSHLHMNKCB6MNDXXMZ3ZANCNFSM6AAAAAA4AHCWOY. You are receiving this because you authored the thread.

Raouzer commented 1 year ago

Hi all,

Same problem for me.

https://i.imgur.com/hoW69BE.png

Can i try your fix with your custom component ?

Thanks in advance

bieniu commented 1 year ago

@Raouzer Which HA version do you use?

Raouzer commented 1 year ago

Hi,

Home Assistant 2023.8.4 Supervisor 2023.08.1 Operating System 10.5 Interface utilisateur : 20230802.1 - latest

Thanks

bieniu commented 1 year ago

tractive.zip You have to copy tractive folder from this zip file to your /config/custom_components folder and restart HA.

Raouzer commented 1 year ago

After restart, i got de same issues. So i decided to reinstall the app and reconnect the account. Now i don't have device or entitie on tractive anymore.

How can i be sure that the started application is the custom and not the official application ?

https://i.imgur.com/wUvswAn.png

bieniu commented 1 year ago

Please do not call this "application" as this is misleading. This is integration.

is the custom and not the official application ?

obraz

Add this to your configuration.yaml file:

logger:
  default: warning
  logs:
    aiotractive: debug
    custom_components.tractive: debug

restart HA, wait 20-30 minutes and attach here /config/home-assistant.log file.

Raouzer commented 1 year ago

Hi,

Please find in attachement my home assistant log file.

bieniu commented 1 year ago

This is very strange. Use this version and attach the log tractive_debug.zip

Raouzer commented 1 year ago

Done

bieniu commented 1 year ago

Once again tractive_debug_v2.zip

Raouzer commented 1 year ago

Hi,

Here is the log for debug V2.

Thanks

bieniu commented 1 year ago

Ok we found out the cause πŸ‘

item.tracker_details: b'<html>\r\n<head><title>429 Too Many Requests</title></head>\r\n<body>\r\n<center><h1>429 Too Many Requests</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n'
bieniu commented 1 year ago

Once again please πŸ˜„ tractive_debug_v3.zip

Raouzer commented 1 year ago

Ok,

We have one little change. ^^

image

home-assistant (2).log

Regards

bieniu commented 1 year ago

Next attempt πŸ˜‰ tractive_debug_v4.zip

Raouzer commented 1 year ago

Hi

Same result:

home-assistant (3).log

I have also try to remove and reconfigure the tractive account.

Regards

bieniu commented 1 year ago

Please don't do any extra steps because you are disturbing the debugging process!

bieniu commented 1 year ago

Same result:

home-assistant (3).log

This log file is almost empty.

Raouzer commented 1 year ago

Hi,

Sorry, I won't do that again.

About the log, i have check again. This is the good file and the debug mode is always enable for Tractive integration.

I don't know why only one line is present for tractive. :/

This is the lasted log file after the lasted restart. home-assistant (4).log

Regards

bieniu commented 1 year ago

Try this one: tractive_debug_v5.zip

Raouzer commented 1 year ago

Ho ! This is beter ! But all sensors are unavailable.

image

Logs: home-assistant (V5).log

Regards

bieniu commented 1 year ago

Try this one: tractive_debug_v6.zip

Raouzer commented 1 year ago

Ok, now i have all sensors for one tracker. The others tracker have some unavalable sensors.

image image image

And two more trackers.

Logs home-assistant (V6).log

Regards

bieniu commented 1 year ago

Could you try this one: tractive_debug_v7.zip

Raouzer commented 1 year ago

Hi,

Same results for the sensors.

Log: home-assistant (V7).log

Regards

bieniu commented 1 year ago

Oops, I attached the wrong file, this is the correct one tractive_debug_v8.zip

Raouzer commented 1 year ago

No problems,

This is the same result for sensors with V8.

Log: home-assistant (V8).log

Regards

bieniu commented 1 year ago

One more try tractive_debug_v9.zip

Raouzer commented 1 year ago

Hi,

We have same results for sensors.

Log file: home-assistant (V9).log

Thanks for you work !

Regards

bieniu commented 1 year ago

I hope this will be the last one ;) tractive_debug_v10.zip

Raouzer commented 1 year ago

Hi,

I think that's ok for tracers sensors informations. But i also think that i don't have auto update anymore. I have to make a reload of the integration to get the lasted informations (No update on 30 minutes of working).

Logs: home-assistant(v10).log

Regards

ThaRelk commented 1 year ago

Hopefully on the same topic, but might be related to other issue..

My auto update has never worked since i istalled it installed it (27th of Aug) I could reload the integration to get a update on all fields (as mentioned by Raouzer), if i manually do the following call: entity_id:

Raouzer commented 1 year ago

Hi,

I think that the auto-update as never work since a couple of week.

I began with the tractive integration 1 year ago. I always had some issues like sensors unavailable, loosing gps position, live boutton not working... In general make a reload of the integration can fix the issues for some days or weeks.

With the last issues, even a reload can't fix the issues.

I think we are in the best way to fix all the problems with @bieniu . :)

Regards.

HanBarn commented 1 year ago

I hope this will be the last one ;) tractive_debug_v10.zip

Same issue here with my Tractive trackers. Removing the Tractive integration and re-adding it again did not help. Waited for HA 2023.9 Same problem, so I used your ZIP file, custom integration.

This solved the problem for now!

Home Assistant 2023.9.1 Supervisor 2023.08.3 Operating System 10.5 Frontend-versie: 20230908.0 - latest

bieniu commented 1 year ago

Same issue here with my Tractive trackers.

Debug log please

bieniu commented 1 year ago

Too many requests issue needs to be fixed in the backend library, unfortunately I don't have enough free time this week to work on it. Maybe at the weekend...

HanBarn commented 1 year ago

Too many requests issue needs to be fixed in the backend library, unfortunately I don't have enough free time this week to work on it. Maybe at the weekend...

Thanks a lot for your help. Take your time, it is not a hot issue right now because the trackers are available now.

bieniu commented 1 year ago

@Raouzer Please test this one and attach the log tractive_debug_v11.zip

Raouzer commented 12 months ago

Hi,

I updated home assistant last week.

Now :

Home Assistant 2023.9.1 Supervisor 2023.09.2 Operating System 10.5 Interface utilisateur : 20230908.0 - latest

For tracers, i have the same issue than v6-7-8-9. Only one tracer have all sensor available. No auto-update.

Log ; home-assistant (v11).log

Regards

bieniu commented 11 months ago

Only one tracer have all sensor available. No auto-update.

We are debugging the problem with "too many requests" here and in this looks ok in the log. I'm waiting for a review of the change in the backend library. About lack of updates, the log too short to say anything. As for sensors that are not available, e.g. your pet "Momiji", spends too little time with the tracker and the API reports no wellness data

'no_data_reason': 'NOT_ACTIVE_ENOUGH'
scooper1 commented 11 months ago

any progress on the auto-update issue assuming this is why i get no tracking info as well

bieniu commented 11 months ago

@scooper1 This issue is related to the "too many requests" error. Open a new issue if you experience other problems.

BerraHok commented 10 months ago

@bieniu, my Tractive data does not refresh unless I reload the integration. Is that problem related with this issue?

bieniu commented 10 months ago

I don’t know πŸ€·β€β™‚οΈ

scooper1 commented 10 months ago

yes the problem is related and there is a temporary solution in the form of tractive_debug_v11.zip linked above which has fixed the problem for me