You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the plugin for a little but now, purely to get my Jaguar I Page charging state into HA, so I can view it on a dashboard and create automations based on that. E.g. if the car's at home, not plugged in, and < X miles remaining, then give me a reminder to plug it in.
Largely it's working great! However I am seeing an issue.
Every ~10 minutes, all entity states for the car go Unavailable.
30 seconds later, everything is back and the request is always successful.
For those 30 seconds or so, my dashboard shows that the entity is unavailable - not a big problem but it doesn't look nice if I glance at the dashboard then. I could adjust the visibility of course but I'd rather just show the last known value.
Errors in the log below pertaining to this (example over one hour) .
2025-02-18 12:01:59.050 ERROR (SyncWorker_32) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:01:59.052 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:01:59.052 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.920 ERROR (SyncWorker_40) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.921 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.921 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.890 ERROR (SyncWorker_23) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.892 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.892 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.892 ERROR (SyncWorker_37) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.894 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.894 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.958 ERROR (SyncWorker_0) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.959 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.960 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.928 ERROR (SyncWorker_41) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.929 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.930 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Debug log for one example:
Previous success:
2025-02-18 13:37:06.691 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
....
2025-02-18 13:37:37.377 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 0.685 seconds (success: True)
2025-02-18 13:38:06.692 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
2025-02-18 13:38:06.897 DEBUG (SyncWorker_18) [custom_components.dimo.dimoapi.auth] Obtaining privileged token for 123456 with privileges [1, 2, 3, 4]
2025-02-18 13:38:06.917 ERROR (SyncWorker_18) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for 123456: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.917 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.917 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.918 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 0.226 seconds (success: False)
... 30 seconds later:
2025-02-18 13:38:36.692 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
2025-02-18 13:38:36.868 DEBUG (SyncWorker_22) [custom_components.dimo.dimoapi.auth] Obtaining privileged token for 123456 with privileges [1, 2, 3, 4]
2025-02-18 13:38:38.351 DEBUG (MainThread) [custom_components.dimo] SIGNALS DATA: {'data': {'signalsLatest': [Redacting, but all the data is returned as expected]
2025-02-18 13:38:38.596 INFO (MainThread) [custom_components.dimo] Fetching dimo (None) data recovered
2025-02-18 13:38:38.596 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 1.905 seconds (success: True)
Note I'm redacting the "privileged token for 123456" number, but there is a number which is consistent the whole time.
Corresponding Log Book entries in HA GUI:
Jaguar I-Pace EV Battery Charging started charging
13:38:38 - 29 minutes ago
Jaguar I-Pace EV Battery Charging became unavailable
13:38:06 - 30 minutes ago
I've also noticed that the values from the API only change every two hours. Which is fine for my use case, but in that case calling the API every 30s feels excessive at least for my use case.
Possible causes:
Could there be an API limit of N calls every 10 minutes, and we're just hitting that?
Perhaps a more network-level limit on via some WAF the other end? I'm pretty sure this isn't a problem my end, and it's a dropping the connection rather than showing nice HTTP 429 or something.
Is there a token being obtained which expires in after ten minutes, and we just need to handle that more gracefully? I see a reference to this 10 minutes in test_auth.py but nowhere else .
Maybe one solution could be to just refresh the token after 9 minutes (or 9m30s) to avoid these errors and hopefully have all the entities remain Available in the dashboards. Or handle the failure and retry as part of the same act, so we don't have to wait until the next run 30 seconds later.
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report. I've noticed the same thing. It's a DIMO API issue I think. We parse the expiration time from the JWT token and refresh it if necessary. I'll check in with DIMO and figure out what the problem is and also implement a more graceful handling of the error so that the entities aren't marked as "unavailable".
Hello,
I've been using the plugin for a little but now, purely to get my Jaguar I Page charging state into HA, so I can view it on a dashboard and create automations based on that. E.g. if the car's at home, not plugged in, and < X miles remaining, then give me a reminder to plug it in.
Largely it's working great! However I am seeing an issue.
2025-02-18 12:01:59.050 ERROR (SyncWorker_32) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:01:59.052 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:01:59.052 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.920 ERROR (SyncWorker_40) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.921 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:12:41.921 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.890 ERROR (SyncWorker_23) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.892 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:23:24.892 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.892 ERROR (SyncWorker_37) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.894 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:34:02.894 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.958 ERROR (SyncWorker_0) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.959 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:44:46.960 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.928 ERROR (SyncWorker_41) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for XXXXXX: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.929 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 2025-02-18 12:55:24.930 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Debug log for one example:
Previous success:
2025-02-18 13:37:06.691 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
....
2025-02-18 13:37:37.377 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 0.685 seconds (success: True)
2025-02-18 13:38:06.692 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
2025-02-18 13:38:06.897 DEBUG (SyncWorker_18) [custom_components.dimo.dimoapi.auth] Obtaining privileged token for 123456 with privileges [1, 2, 3, 4]
2025-02-18 13:38:06.917 ERROR (SyncWorker_18) [custom_components.dimo.dimoapi.dimo_client] Failed to obtain privileged token for 123456: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.917 ERROR (MainThread) [custom_components.dimo] An unknown error occurred trying to retrieve data from the Dimo api. Error is: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.917 ERROR (MainThread) [custom_components.dimo] Error requesting dimo (None) data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2025-02-18 13:38:06.918 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 0.226 seconds (success: False)
... 30 seconds later:
2025-02-18 13:38:36.692 DEBUG (MainThread) [custom_components.dimo] Updating from the DIMO api
2025-02-18 13:38:36.868 DEBUG (SyncWorker_22) [custom_components.dimo.dimoapi.auth] Obtaining privileged token for 123456 with privileges [1, 2, 3, 4]
2025-02-18 13:38:38.351 DEBUG (MainThread) [custom_components.dimo] SIGNALS DATA: {'data': {'signalsLatest': [Redacting, but all the data is returned as expected]
2025-02-18 13:38:38.596 INFO (MainThread) [custom_components.dimo] Fetching dimo (None) data recovered
2025-02-18 13:38:38.596 DEBUG (MainThread) [custom_components.dimo] Finished fetching dimo (None) data in 1.905 seconds (success: True)
Note I'm redacting the "privileged token for 123456" number, but there is a number which is consistent the whole time.
Corresponding Log Book entries in HA GUI:
Jaguar I-Pace EV Battery Charging started charging
13:38:38 - 29 minutes ago
Jaguar I-Pace EV Battery Charging became unavailable
13:38:06 - 30 minutes ago
I've also noticed that the values from the API only change every two hours. Which is fine for my use case, but in that case calling the API every 30s feels excessive at least for my use case.
Possible causes:
Maybe one solution could be to just refresh the token after 9 minutes (or 9m30s) to avoid these errors and hopefully have all the entities remain Available in the dashboards. Or handle the failure and retry as part of the same act, so we don't have to wait until the next run 30 seconds later.
Thanks!
The text was updated successfully, but these errors were encountered: