Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Here traveltime developer account no longer authenticates #117505

Open
Mariusthvdb opened this issue May 15, 2024 · 5 comments
Open

Here traveltime developer account no longer authenticates #117505

Mariusthvdb opened this issue May 15, 2024 · 5 comments

Comments

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented May 15, 2024

The problem

and docs at https://www.home-assistant.io/integrations/here_travel_time/ seem to no longer point to the correct method of getting a new Api?

What version of Home Assistant Core has the issue?

2024.5.3

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

Here Traveltime

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-05-15 16:54:39.549 ERROR (MainThread) [homeassistant.components.here_travel_time.coordinator] Unexpected error fetching here_travel_time data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/here_travel_time/coordinator.py", line 89, in _async_update_data
    response = await self._api.route(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/here_routing/here_routing.py", line 191, in route
    response = await self.request(uri=ROUTES_PATH, params=params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/here_routing/here_routing.py", line 122, in request
    raise HERERoutingUnauthorizedError(
here_routing.exceptions.HERERoutingUnauthorizedError: Sentry-EUM Error. EUM returned HTTP response code of 401 for https://account.api.here.com/authentication/v1.1/extendedApiKeys/vzMIb7redacted48Fmhs. The Server error message was {"errorId":"ERROR-e03f6c87-e761-42b7-b388-162f78891ccf","httpStatus":401,"errorCode":401311,"message":"Requesting client status is not active.","error":"invalid_request","error_description":"errorCode: '401311'. Requesting client status is not active.","correlationId":"aa34feredfacted04314f9fd36a"}. The Sentry cache was therefore not updated. X-HERE-TID="null"

Additional information

Ive tried to understand https://developer.here.com/documentation/migrate-to-platform/dev_guide/index.html on how to proceed, but that didnt work out....

as far as I can tell, the individually configured entities have their sensors setup correctly. However, my dynamic traveltime entities no longer have a duration and distance

I did manage to re-register for the rest api key, and added my Home Assistant 'app' at https://platform.here.com/portal/

not sure how to proceed as the current config flow does not allow to re-configure? adding a new entry seems to lead to succes, but then all individual entities show unavailable

@home-assistant
Copy link

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

Code owner commands

Code owners of here_travel_time 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 here_travel_time Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


here_travel_time documentation
here_travel_time source
(message by IssueLinks)

@eifinger
Copy link
Contributor

Hi. To address your concerns:

  1. The link in the documentation is correct. You might be suspecting the link the the old HERE API portal which was deprecated over a year ago
  2. There is currently no way to reconfigure here_travel_time: Add reconfigure step for here_travel_time #114667
  3. If your newly added entry does not work and is related to the attached logs the HERE "App" might be setup wrong. Can you confirm you can execute the instructions under https://www.here.com/docs/bundle/routing-api-developer-guide-v8/page/topics/send-request.html#send-a-request with your api key?

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented May 15, 2024

yes, I can confirm that to work indeed. it returns:

{"routes":[{"id":"119f3da6-6b00-41ac-b5c5-d7898181d37b","sections":[{"id":"f7c818be-ada3-4d84-a044-7b6ccbd2036e","type":"vehicle","departure":{"time":"2024-05-15T22:41:15+02:00","place":{"type":"place","location":{"lat":52.5309837,"lng":13.384567},"originalLocation":{"lat":52.5307999,"lng":13.3847}}},"arrival":{"time":"2024-05-15T22:44:25+02:00","place":{"type":"place","location":{"lat":52.5263761,"lng":13.3686186},"originalLocation":{"lat":52.5263999,"lng":13.3686}}},"summary":{"duration":190,"length":1206,"baseDuration":136},"transport":{"mode":"car"}}]}]}% 

the log entries are from the existing config entries still using the former api key/config. the new remains 'unknown' for all entities, even after manually updating.

btw, I now also No longer see the individual entities populated anymore, until I restart, and then they all are populated again.
the dynamic config: at startup it correctly calculates the default destination/origin numbers, changing those and updating the traveltime (manually, system settings are to Not poll), they return unavailable for distance and duration, others are no longer correct and show the startup defaults....

cut it short: Should I delete the former entries, and start all over?

or, could I test run your PR for reconfiguration, that would save me a lot of work if it would be merged shortly anyways ;-)

edit

yes that seems to work, I clicked on reconfigure and entered the new api key. there is an issue there though because the next options are not visible (and I knew to pick the bottom item for an entity, and not the top item to use the Map)

Scherm­afbeelding 2024-05-15 om 23 05 32

anyways, hope this gets merged soon, it will prevent a lot of trouble and redoing. thx for that!

@eifinger
Copy link
Contributor

The options are visible when I debug this branch on my local setup. Maybe the frontend translations are not correctly available in the setup where you pulled in my branch.

It seems like this issue is resolved. Can we close it?

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented May 17, 2024

well, its only 'semi' resolved using your PR.
so currently in release the issue remains

also, the translations issue is very much prohibiting, suppose that needs fixing too, especially since my backend is in English (profile is in Dutch), that ought to be working correctly, which obviously it doesnt yet.

Ill leave it up to you to decide

edit

I now see that there is a new startup error logged, that wasnt there before either:

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.here_travel_time.coordinator
Bron: helpers/update_coordinator.py:347
integratie: HERE Travel Time
Eerst voorgekomen: 16:25:40 (1 gebeurtenissen)
Laatst gelogd: 16:25:40

Error fetching here_travel_time data: sensor.here_destination does not have valid coordinates: not_home

this is for the default destination person.entity that indeed was not_home, but does have correct coordinates.. somehow it looks at the state of that person entity? and not its attributes for lat/long?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants