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

1.70 Tests #509

Open
SquidBytes opened this issue May 31, 2024 · 80 comments
Open

1.70 Tests #509

SquidBytes opened this issue May 31, 2024 · 80 comments
Labels
help wanted Extra attention is needed

Comments

@SquidBytes
Copy link
Collaborator

SquidBytes commented May 31, 2024

This is an Issue thread for people who are trying/testing out branch 1.70

Relevant question and answers:

  • Q: Do I switch to 1.70 now?

    • A: 1.70 is still a work in progress and it is recommended to stay on the current release if it is working for you
  • Q: Will 1.70 have new sensors?

    • A: Probably not, it is a new login flow to hopefully future proof any issues
  • Q: Is 1.70 the new API?

    • A: I am hoping to be able to incorporate the FordConnect API into this integration for users who can take advantage of it. See the 1.70 README for more information.
  • Q: If I want to switch to 1.70, how do I do so?

    • A: 1.70 is not currently available through HACS. Installation will need to be done manually. Download the files from the 1.70 branch, and replace the fordpass-ha files on your HomeAssistant install with the ones from the 1.70 branch.
  • Q: Is there an update time-frame/timeline/estimation/status/progress?

    • A: Please keep in mind we are both working on this for free and in our, very limited, spare time.

Relevant Wiki's

@TerrorSource
Copy link

i've made a PR for version 1.70 to let the plugin create an URL for NL users.

#510

@Giancky79
Copy link

Hi, i'm try to change only part from const.py

REGIONS = {
    "UK&Europe": {
        "region": "1E8C7794-FF5F-49BC-9596-A1E0C86C5B19",
        "locale": "it-IT",
        "locale_short": "ITA", #Temp fix 
        "locale_url": "https://login.ford.it" <-- from app ford open with .com

worked for now , i'm try to open a PR

@seebaer1976
Copy link

seebaer1976 commented Jun 2, 2024

hi,
which of these two id's is the region id

login.ford.de/4566605f-43a7-400a-946e-89cc9fdb0bd7 or
ford_application_id=260ea066-aa5e-4344-995d-b8a3d7dd0fca
client_id=89f879a5-4474-413f-a090-46649584706d
scope=89f879a5-4474-413f-a090-46649584706d

this is the whole link when I log in normally at ford:
https://login.ford.de/4566605f-43a7-400a-946e-89cc9fdb0bd7/B2C_1A_SignInSignUp_de-DE/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fwww.ford.de%2Fmein-ford-account%2F&response_type=code&state=%7B%22policy%22%3A%22email_susi_policy%22%2C%22lang%22%3A%22de_de%22%2C%22state%22%3A%22YWNjb3VudC1kYXNoYm9hcmQ%3D%22%2C%22queryHash%22%3A%22%22%2C%22existingPath%22%3A%22%22%2C%22forwardUrl%22%3A%22%22%7D&client_id=89f879a5-4474-413f-a090-46649584706d&scope=89f879a5-4474-413f-a090-46649584706d%20openid&code_challenge=x_LFTcurVp6rmskPdcaIIiFLY4nIpYOj_MMNpU92lmY&code_challenge_method=S256&ui_locales=de-DE&template_id=Ford-MFA-Authentication&ford_application_id=260ea066-aa5e-4344-995d-b8a3d7dd0fca&country_code=DEU&language_code=de-DE

If it is neither of these, how can I find out the region ID?

Regions in const.py

REGION_OPTIONS = ["UK&Europe", "Australia", "North America & Canada", "Germany"]

and

REGIONS = {
    "Germany": {
        "region": "????????????",
        "locale": "de-DE",
        "locale_short": "DEU", #Temp fix 
        "locale_url": "https://login.ford.de"
    },

in fordpass_new.py :

region_lookup = {
"Germany": "?????????",

and

elif self.region2 == "Germany":
countryheader = "DEU"

would like to try the German login because it is very slow and does not always respond

@creedda
Copy link

creedda commented Jun 2, 2024

Hello! In the US here and tried to follow the instructions but getting a "unknown error occurred" when I enter in my token from the developer tools in my browser.

2024-06-02 11:39:30.512 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
return await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token
info = await validate_token(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token
results = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens
return self.generate_fulltokens(req.json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens
data = {"idpToken": token["access_token"]}
~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'


Maybe something in the token not being expected is causing the error? DM me if you want me to share anything more confidential.

Or of course if there is anything I can retry let me know.

@itchannel
Copy link
Owner

Hello! In the US here and tried to follow the instructions but getting a "unknown error occurred" when I enter in my token from the developer tools in my browser.


2024-06-02 11:39:30.512 ERROR (MainThread) [aiohttp.server] Error handling request

Traceback (most recent call last):

File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request

resp = await request_handler(request)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle

resp = await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory

response = await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware

return await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware

response = await handler(request)

^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle

result = await handler(request, **request.match_info)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin

return await func(self, request, *args, **kwargs)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post

return await super().post(request, flow_id)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper

return await method(view, request, data, *args, **kwargs)

File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post

result = await self._flow_mgr.async_configure(flow_id, data)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure

result = await self._async_configure(flow_id, user_input)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure

result = await self._async_handle_step(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step

result: _FlowResultT = await getattr(flow, method)(user_input)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token

info = await validate_token(self.hass, user_input)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token

results = await hass.async_add_executor_job(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run

result = self.fn(*self.args, **self.kwargs)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens

return self.generate_fulltokens(req.json())

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens

data = {"idpToken": token["access_token"]}

~~~~~^^^^^^^^^^^^^^^^

KeyError: 'access_token'





Maybe something in the token not being expected is causing the error? DM me if you want me to share anything more confidential.

Or of course if there is anything I can retry let me know.

Can I confirm the token you are entering into the box starts with fordpass://

@itchannel
Copy link
Owner

hi,

which of these two id's is the region id

login.ford.de/4566605f-43a7-400a-946e-89cc9fdb0bd7 or

ford_application_id=260ea066-aa5e-4344-995d-b8a3d7dd0fca

client_id=89f879a5-4474-413f-a090-46649584706d

scope=89f879a5-4474-413f-a090-46649584706d

this is the whole link when I log in normally at ford:

https://login.ford.de/4566605f-43a7-400a-946e-89cc9fdb0bd7/B2C_1A_SignInSignUp_de-DE/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fwww.ford.de%2Fmein-ford-account%2F&response_type=code&state=%7B%22policy%22%3A%22email_susi_policy%22%2C%22lang%22%3A%22de_de%22%2C%22state%22%3A%22YWNjb3VudC1kYXNoYm9hcmQ%3D%22%2C%22queryHash%22%3A%22%22%2C%22existingPath%22%3A%22%22%2C%22forwardUrl%22%3A%22%22%7D&client_id=89f879a5-4474-413f-a090-46649584706d&scope=89f879a5-4474-413f-a090-46649584706d%20openid&code_challenge=x_LFTcurVp6rmskPdcaIIiFLY4nIpYOj_MMNpU92lmY&code_challenge_method=S256&ui_locales=de-DE&template_id=Ford-MFA-Authentication&ford_application_id=260ea066-aa5e-4344-995d-b8a3d7dd0fca&country_code=DEU&language_code=de-DE

If it is neither of these, how can I find out the region ID?

Regions in const.py


REGION_OPTIONS = ["UK&Europe", "Australia", "North America & Canada", "Germany"]



and



REGIONS = {

    "Germany": {

        "region": "????????????",

        "locale": "de-DE",

        "locale_short": "DEU", #Temp fix 

        "locale_url": "https://login.ford.de"

    },

in fordpass_new.py :


region_lookup = {

"Germany": "?????????",



and



elif self.region2 == "Germany":

countryheader = "DEU"

would like to try the German login because it is very slow and does not always respond

Leave the region id as the uk/Europe one, just change the country codes.

Also that login string you showed isn't for the fordpass app so the token won't work. It needs to have a callback_url as fordpass://token

@creedda
Copy link

creedda commented Jun 2, 2024

Can I confirm the token you are entering into the box starts with fordpass://

Yes, i can confirm that.

Just for fun I tried entering just the token and not the full URL and I got a validation error. (a different error than I am seeing)

@crslen
Copy link

crslen commented Jun 3, 2024

It took me a couple of attempts, but I was successfully able to get the token and add my vehicle to HA for the US region.

@SquidBytes SquidBytes mentioned this issue Jun 3, 2024
@DougSisk
Copy link

DougSisk commented Jun 3, 2024

I had to delete my original vehicle device to get it to work. New region config doesn't line up with the old and I didn't see a way to change that on the existing device.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 584, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/__init__.py", line 65, in async_setup_entry
    coordinator = FordPassDataUpdateCoordinator(hass, user, password, vin, region, update_interval, 1)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/__init__.py", line 189, in __init__
    self.vehicle = Vehicle(user, password, vin, region, save_token, config_path)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 64, in __init__
    self.region = REGIONS[region]["region"]
                  ~~~~~~~^^^^^^^^
KeyError: 'North America & Canada'

@creedda
Copy link

creedda commented Jun 3, 2024

Another error I am seeing:

2024-06-03 18:12:31.681 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token
    info = await validate_token(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token
    results = await hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens
    return self.generate_fulltokens(req.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens
    data = {"idpToken": token["access_token"]}
                        ~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

@tobox
Copy link

tobox commented Jun 4, 2024

I just tested 1.70 in Germany.

The page did not load properly when I selected Europe/UK.

Then, I tried North Ameriaca an everything worked properly, except that all text messages appeared in dutch language!

But the integration seems to be OK now.

@BluThunder2k
Copy link

BluThunder2k commented Jun 4, 2024

I've copied the files over and am trying to get the token to work with a US login. I get the developer tool string - but mine is "fordapp://userauthorized/?code=" and the string. I get unknown error occurred as another did above. No where in the network tab on the URL I am given has "fordpass". Anyone have any suggestions?

I as well have the " KeyError: 'access_token' " entry in my logs (with all the other entries matching what's been posted above).

@KrickGregory
Copy link

If I try with my European login I get a link for the token that won't load in Chrome if I set it to European. But if in ha I put it to USA I get a link that loads but then I get the error user not known in dev tools.

This is what I get if I set Europe in ha with 1.7
The resource https://prodb2cuicontentdelivery-d0bbevfjaxfmedda.z01.azurefd.net/b2cui/assets/fonts/FordAntenna-Regular.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

This is what I get if I set it to USA in ha.
Failed to launch 'fordapp://userauthorized/?error=server_error&error_description=AADB2C90002%3a+The+CORS+resource+%27https%3a%2f%2fprodb2cuicontentdelivery-d0bbevfjaxfmedda.z01.azurefd.net%2fb2cui%2fui%2fford%2fEN-IE%2funified.html%3fver%3d20240111.4%26SessionId%3d7d1c65c0-f71b-4021-bb67-16c59041f857%26InstanceId%3dc990bb7a-51f4-439b-bd36-9c07fb1041c0%27+returned+a+404+not+found.%0d%0aCorrelation+ID%3a+7d1c65c0-f71b-4021-bb67-16c59041f857%0d%0aTimestamp%3a+2024-06-04+17%3a42%3a40Z%0d%0a' because the scheme does not have a registered handler.

I'm not an IT guy so just tried for what I know and wanted to Share so it maybe can help.

Thanks for your efforts. Great work.

@ghostbitmeta
Copy link

My sensors don't seem to update unless I manually reload the integration (had not updated in a week)

@tunisiano187
Copy link

OK, tryied your solution, but ... i received this error
fordapp://userauthorized/?error=server_error&error_description=AADB2C90002%3a+The+CORS+resource+%27https%3a%2f%2fprodb2cuicontentdelivery-d0bbevfjaxfmedda.z01.azurefd.net%2fb2cui%2fui%2fford%2fEN-IE%2funified.html%3fver%3d20240111.4%26SessionId%3d74dec7b6-c56e-44fb-9d64-f1590edd9920%26InstanceId%3dc990bb7a-51f4-439b-bd36-9c07fb1041c0%27+returned+a+404+not+found.%0d%0aCorrelation+ID%3a+74dec7b6-c56e-44fb-9d64-f1590edd9920%0d%0aTimestamp%3a+2024-06-06+19%3a51%3a19Z%0d%0a

@mlewanca
Copy link

mlewanca commented Jun 6, 2024

My sensors don't seem to update unless I manually reload the integration (had not updated in a week)

I seem to have the same issue. Its not updating.

@chrestme
Copy link

chrestme commented Jun 7, 2024

Another error I am seeing:

2024-06-03 18:12:31.681 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token
    info = await validate_token(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token
    results = await hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens
    return self.generate_fulltokens(req.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens
    data = {"idpToken": token["access_token"]}
                        ~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

I'm getting this same error. I tried rebuilding the POST request directly in a python interpreter to see what the response code and text were. I got a 400 response, and the following text:
>>> req.text '{"error":"invalid_grant","error_description":"AADB2C90090: The provided JWE is not a valid 5 segment token.\\r\\nCorrelation ID: 7a7d936c-84b1-480a-b152-e9ed4eaf4f24\\r\\nTimestamp: 2024-06-07 15:54:23Z\\r\\n"}'

@mapero
Copy link

mapero commented Jun 9, 2024

OK, tryied your solution, but ... i received this error fordapp://userauthorized/?error=server_error&error_description=AADB2C90002%3a+The+CORS+resource+%27https%3a%2f%2fprodb2cuicontentdelivery-d0bbevfjaxfmedda.z01.azurefd.net%2fb2cui%2fui%2fford%2fEN-IE%2funified.html%3fver%3d20240111.4%26SessionId%3d74dec7b6-c56e-44fb-9d64-f1590edd9920%26InstanceId%3dc990bb7a-51f4-439b-bd36-9c07fb1041c0%27+returned+a+404+not+found.%0d%0aCorrelation+ID%3a+74dec7b6-c56e-44fb-9d64-f1590edd9920%0d%0aTimestamp%3a+2024-06-06+19%3a51%3a19Z%0d%0a

Same here.

@Koosdezwart
Copy link

1.70 works for three days in row. Netherlands.

@chrestme
Copy link

Another error I am seeing:

2024-06-03 18:12:31.681 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token
    info = await validate_token(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token
    results = await hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens
    return self.generate_fulltokens(req.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens
    data = {"idpToken": token["access_token"]}
                        ~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

I'm getting this same error. I tried rebuilding the POST request directly in a python interpreter to see what the response code and text were. I got a 400 response, and the following text:
>>> req.text '{"error":"invalid_grant","error_description":"AADB2C90090: The provided JWE is not a valid 5 segment token.\\r\\nCorrelation ID: 7a7d936c-84b1-480a-b152-e9ed4eaf4f24\\r\\nTimestamp: 2024-06-07 15:54:23Z\\r\\n"}'

Another error I am seeing:

2024-06-03 18:12:31.681 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp_session/__init__.py", line 199, in factory
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 71, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 171, in async_step_token
    info = await validate_token(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/config_flow.py", line 64, in validate_token
    results = await hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 116, in generate_tokens
    return self.generate_fulltokens(req.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fordpass/fordpass_new.py", line 119, in generate_fulltokens
    data = {"idpToken": token["access_token"]}
                        ~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

I'm getting this same error. I tried rebuilding the POST request directly in a python interpreter to see what the response code and text were. I got a 400 response, and the following text: >>> req.text '{"error":"invalid_grant","error_description":"AADB2C90090: The provided JWE is not a valid 5 segment token.\\r\\nCorrelation ID: 7a7d936c-84b1-480a-b152-e9ed4eaf4f24\\r\\nTimestamp: 2024-06-07 15:54:23Z\\r\\n"}'

Update: I tried the login process from a different browser (Chrome) and it worked. I had been using Firefox before.

@nexusis7
Copy link

i've followe the instructions and manually updated to 1.70 but after entering the fordapp code, i just get Unknown error occurred repeatedly. i logged out and signed in again with new fordapp code, same error on home assistant

Opera Snapshot_2024-06-11_190358_homeassistant local

@Next9999
Copy link

Working fin on my end "Canada"

Script to reload /refresh Data is also good :-)

@tunisiano187
Copy link

Maybe we need to add also Belgium (be-fr) .be for it to work for me, (i've tryied to just update the login link copied, with .be, but it didn't work

@chrestme
Copy link

i've followe the instructions and manually updated to 1.70 but after entering the fordapp code, i just get Unknown error occurred repeatedly. i logged out and signed in again with new fordapp code, same error on home assistant

Opera Snapshot_2024-06-11_190358_homeassistant local

Have you tried using a different browser? Firefox wouldn't work for me, but Chrome did. You can also try using a private browsing/incognito window or clearing cookies/cache.

@seebaer1976
Copy link

I was able to get the token without any problems.

I just noticed that not all sensors are updated for a longer period of time

There are three warnings in the logs:

1:
Returning Stale data to prevent unavaliable status
2:
Error communicating with FordPass for XXXXXXXXXX
and
502 Server Error: Bad Gateway for url: https://api.mps.ford.com/api/expdashboard/v1/details/

@KElkhorn
Copy link

I have been on 1.70 for about a month, it seems to lose access every few days. When I log in to add a vehicle and re-enter, all access is restored. In USA.

@amichaelwagner
Copy link

amichaelwagner commented Jun 27, 2024

Just wanted to add my experience here, as well:

Just got 1.70 going, and I've tested both locking and remote starting. The functionality for both works, but reporting back to HA doesn't seem to. I have the unlocking issue reported above, and my ignition status doesn't update once the car is started (though it does show in the FordPass app as started).

EDIT:
I just now noticed your note about the refresh rate. As a test, I changed it from 900 seconds to 30 seconds, and that seems to have alleviated at least the locking issue. I set it back to 900 and now the status seems to be updating as expected. Not sure if this is a fluke, but that's what's happened so far.

I did test the ignition after setting it to 30, and that status didn't change. I do notice that fordpass_remoteStartStatus is updating to Active when the vehicle is remote started, though (and I noticed this prior to doing this refresh test as well).

@doczong
Copy link

doczong commented Jun 28, 2024

Just a note, I was running 1.68 fine until I noticed the last update to my odometer, fuel remaining, unlock not working. Last update on the mileage was June 21st. Figuring my token probably finally expired, I deleted the integration and manually updated to 1.70. Had the same issues with Firefox noted above so I used Chrome.

Added the token/vehicle back no issues.

All/Some the data being pulled from the API is old state data that 1.68 was showing. I think the outside temperature may be accurate, but most of it is at a point in time from 7 days ago. It is not throwing any errors. Using Canada as my endpoint.

Update: Things that are as of right now on Canada endpoint updating: Outside temperature, Messages, Oil %, Battery. Things not updating: Odometer, fuel tank - haven't checked unlock/lock or alarm status since I updated to 1.70.

@Wright55
Copy link

Wright55 commented Jul 2, 2024

Followed the instructions. In Uk but understand not working so using USA.
Not finding the ?code= line in network.

When trying to sign in understand the login should still spin, mine completes and advise 'We do not recognize this email and password. Please try again'

Any advice appreciated. Not seen this issue mentioned.

@thoompje
Copy link

thoompje commented Jul 8, 2024

Anyone any idea with a challenge I got? Don't get the code

#488 (comment)

@Sarke
Copy link

Sarke commented Jul 12, 2024

In case anyone is having trouble with the dev tools and such, you can install this Chrome extension and it will show you the redirects in a nicer way.

https://chromewebstore.google.com/detail/redirect-path/aomidfkchockcldhbkggjokdkkebmdll

@uluzox
Copy link

uluzox commented Jul 12, 2024

I use latest 1.70 code and it works perfectly. I am located in Germany but selected US as the location because Europe does not work at all (a not working URL is generated in the login screen).

I can second that. Also Brave Browser did not work for me. But Chrome did.

@kurtSejr
Copy link

I'm following the installation guide carefully (I assume), but I don't get the login picture. When I copy the login URL as described (Chrome, and in dev mode). In the Network tab, I get this error:
image

Any way to bypass this?

@TheLizard
Copy link

@kurtSejr which country have you chosen? from the 404 I recon an URL is generated that does not exist (anymore)

@kurtSejr
Copy link

@kurtSejr which country have you chosen? from the 404 I recon an URL is generated that does not exist (anymore)

I have chosen UK&Europe, I'm in Denmark.

@kurtSejr
Copy link

@kurtSejr which country have you chosen? from the 404 I recon an URL is generated that does not exist (anymore)

I have chosen UK&Europe, I'm in Denmark.

If I select "Netherlands" it works for me :-)

@memesalot
Copy link

1.70 branch works fine for me! Thanks :)

@Prekzz
Copy link

Prekzz commented Aug 8, 2024

I constantly get an error message in HA "Unkown error occured" when retrieving the token.
See screenshot

ford

I use the 1.70 branch, i used NL / UK & Europe and USA as locations but all doesn't work for me. I'm located in the Netherlands

@TheLizard
Copy link

@Prekzz Could you enable the debug log and provide it?

@Prekzz
Copy link

Prekzz commented Aug 9, 2024

@TheLizard i can't, this is the initial setup so the plugin is not loaded yet.
When the plugin is loaded i can enable the debug log. Or is there a way to do it before?

I manually installed the plugin in home-assistant (ssh and do a git pull in the correct folders), because i could'nt do it in de HACS gui because that errored with the message that the repo already exists (on the default master branch).

@DennisHilhorst
Copy link

I've updated to 1.70 and it works for me... BUT the function 'fordpass.refresh_status' is not working well.
Does anyone know what I can do to fix it ?!

@clindsey79
Copy link

More and more frequently I am having to generate a new token to keep 1.70 working. The only way I know to do this is to delete the device (car) and then rebuild it from scratch. Beyond that I don't know how to get the login box to reappear. Am I missing something? There has to be a way to redo the token without deleting the device right?

@YBonline
Copy link

More and more frequently I am having to generate a new token to keep 1.70 working. The only way I know to do this is to delete the device (car) and then rebuild it from scratch. Beyond that I don't know how to get the login box to reappear. Am I missing something? There has to be a way to redo the token without deleting the device right?

Yes, you can redo the token by just going though the login process again like you going to add a new device. It will say no new vehicles found but still update the token fixing your old one. Also, you likely are running into #524 so you can also open the tokens.txt file and delete the last character (or 2) without generating a new token.

@clindsey79
Copy link

More and more frequently I am having to generate a new token to keep 1.70 working. The only way I know to do this is to delete the device (car) and then rebuild it from scratch. Beyond that I don't know how to get the login box to reappear. Am I missing something? There has to be a way to redo the token without deleting the device right?

Yes, you can redo the token by just going though the login process again like you going to add a new device. It will say no new vehicles found but still update the token fixing your old one. Also, you likely are running into #524 so you can also open the tokens.txt file and delete the last character (or 2) without generating a new token.

Thanks! Got me working again. It seems so obvious now that I can update the token that way. I had already deleted the token file so it just generated a new one. I will take a look at #524 to see what I need to do in the future.

@volly92
Copy link

volly92 commented Sep 3, 2024

Hey there, I wanted to download then 1.70 version but I just can't do it.
When I try to add the custom rep.: https://github.com/itchannel/fordpass-ha/tree/1.70
I get the message that itchannel/fordpass-ha is already existing in the store. I can only choose 1.68 as a version though. What am I doing wrong? Sorry if it's something very easy. Not a pro here :D

@danchace
Copy link

danchace commented Sep 3, 2024

Hey there, I wanted to download then 1.70 version but I just can't do it.
When I try to add the custom rep.: https://github.com/itchannel/fordpass-ha/tree/1.70
I get the message that itchannel/fordpass-ha is already existing in the store. I can only choose 1.68 as a version though. What am I doing wrong? Sorry if it's something very easy. Not a pro here :D

Try this: #488 (comment)

@volly92
Copy link

volly92 commented Sep 4, 2024

Try this: #488 (comment)

Thanks for the reply. That worked for me but while doing everything I get an error message:
Unknown error occurred.

I was trying the Netherlands way as UK&Europe wouldn't open anything on any of the browsers (Safari, Firefox and Chrome)

@arrisfe
Copy link

arrisfe commented Oct 9, 2024

Installed 1.70 today, things went pretty well. All functionality seems to work except for starting and stopping ignition. On initial installation, it will start the vehicle the first time, but any subsequent attempt to start / stop the vehicle fails. Locking / Unlocking the doors, and all other data continues to work. I removed the integration, deleted the old config, reinstalled the integration and the same exact issue happens again.

In the logs when trying to start the vehicle, I see this:

2024-10-08 22:03:08.863 DEBUG (SyncWorker_16) [custom_components.fordpass.fordpass_new] 1728443020.3598437
2024-10-08 22:03:08.864 DEBUG (SyncWorker_16) [custom_components.fordpass.fordpass_new] Token is valid, continuing
2024-10-08 22:03:08.945 DEBUG (SyncWorker_16) [custom_components.fordpass.fordpass_new] Testing command
2024-10-08 22:03:08.945 DEBUG (SyncWorker_16) [custom_components.fordpass.fordpass_new] 403
2024-10-08 22:03:08.945 DEBUG (SyncWorker_16) [custom_components.fordpass.fordpass_new] {"code":403,"error":"forbidden","message":"DENY_ALLOW: Not authorized to perform: 'command:issueRemoteStartControl'","messageTemplate":"{status}: Not authorized to perform: '{action}'","messageParams":{"action":"command:issueRemoteStartControl","status":"DENY_ALLOW"},"timestamp":"2024-10-09T03:03:08.904695Z","referenceId":"f9ab9d5b84c70476fa8a4d4c7a6943a8"}

Any suggestions?

@nota3k
Copy link

nota3k commented Oct 10, 2024

It's been working great for me in the US, no accounts locks on secondary account with refresh set to every 15 min.

@gpf2ez
Copy link

gpf2ez commented Oct 10, 2024

It's been working great for me in the US, no accounts locks on secondary account with refresh set to every 15 min.

Same for me.

@arrisfe
Copy link

arrisfe commented Oct 10, 2024

Thanks for the replies. Apparently, some kind of race condition or spam of the command must be occurring because when I try to use the FordPass app directly after it fails with Home Assistant, I get an error that states that there were too many remote start requests, and I'll need to start the car manually to reset. I'll try to mess around with it some more this weekend and make sure my refresh timer is set to 15m.

@GazTheGeek
Copy link

I am in Australia and have successfully obtained a token and had the integration working fine. I add a second vehicle by repeating all the steps again for the same account, obtaining a new token and all worked great. I left the update frequency at 900 (15mins) and all worked great for a couple of days and then the integration failed with both integrations showing "Failed setup". I can delete them and go through the installation again and it works fine fin a day or so then fails again. Happy to provide more details if someone can point me to the procedure for getting said details. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests