Open jensb opened 1 month ago
I began to experiment it since yestedar after a long drive. This morning it was working until I started to charge up the car at home, after 3 hours, now Teslamate shows teh error 429.
2024-06-15 13:55:23.957 [info] Starting logger for 'xxxxxx'
2024-06-15 13:55:23.992 [info] MQTT connection has been established
2024-06-15 13:55:24.119 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (57.265 ms)
2024-06-15 13:55:24.119 [warning] TeslaApi.Error / "Retry in 43476 seconds\n"
2024-06-15 13:55:24.119 car_id=1 [error] Error / :unknown
2024-06-15 13:55:54.249 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (51.010 ms)
2024-06-15 13:55:54.250 [warning] TeslaApi.Error / "Retry in 43446 seconds\n"
2024-06-15 13:55:54.250 car_id=1 [error] Error / :unknown
2024-06-15 13:56:24.373 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (48.689 ms)
2024-06-15 13:56:24.374 [warning] TeslaApi.Error / "Retry in 43416 seconds\n"
2024-06-15 13:56:24.374 car_id=1 [error] Error / :unknown
2024-06-15 13:56:54.501 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (49.341 ms)
2024-06-15 13:56:54.501 [warning] TeslaApi.Error / "Retry in 43386 seconds\n"
2024-06-15 13:56:54.502 car_id=1 [error] Error / :unknown
2024-06-15 13:57:22.684 [notice] :alarm_handler: {:set, {TeslaMate.Vehicles.Vehicle_1_api_error, :fuse_blown}}
2024-06-15 13:57:24.628 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (47.889 ms)
2024-06-15 13:57:24.629 [warning] TeslaApi.Error / "Retry in 43356 seconds\n"
2024-06-15 13:57:24.629 car_id=1 [error] Error / :unknown
2024-06-15 13:57:54.756 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492931814800821/vehicle_data -> 429 (49.707 ms)
Describe the bug
See $SUBJECT. See also just every other Tesla API integration, e.g. TeslaMate: https://github.com/teslamate-org/teslamate/issues/3957
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Adapter should be able to poll the API the whole day. Instead, requests are rate limited according to https://developer.tesla.com/docs/fleet-api#membership-levels:
Screenshots & Logfiles
Versions:
Additional context
This may require a significant rewrite to be more conservative with requesting vehicle data. However, I am using tesla-motors information to control solar overflow charging of my vehicle, and this requires the charge state, current, battery etc. to be available in at least 30s to 1min intervals during charging. I also run TeslaMate to collect the rest of my vehicle stats.
Addressing this should be a collaborative effort and I'd be willing to help!