Connected VAG/PON cars

Hi,im getting following error trying to setup this component.
I’m from Denmark, using an VW. I’m running HASS in a docker container, version 77.3 and I have made sure the py-files are executable. - Anyone who can me?

  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/mind.py", line 47, in setup
    hass.data[DATA_MIND] = Mind(hass, conf)
  File "/config/custom_components/mind.py", line 70, in __init__
    password=conf.get(CONF_PASSWORD), cache_ttl=conf.get(CONF_SCAN_INTERVAL))
  File "/config/deps/lib/python3.6/site-packages/mind/__init__.py", line 250, in __init__
    self._auth()
  File "/config/deps/lib/python3.6/site-packages/mind/__init__.py", line 269, in _auth
    auth=HTTPBasicAuth(self._client_id, self._client_secret))
  File "/usr/local/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 411, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 379, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 386, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 415, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.AccessDeniedError: (access_denied)

This is only available in the Netherlands as far as I know.

The location not being updated is a known bug, didnt have time to look into it deeply…

The rest of the states are probably the same as your app… Unfortunally it stil does not function properly since the new app.

Well, I got the app on my IPhone, called MyVolkswagen, where I can see the same things as you are talking about.

I there a way I can try sniff the API calls to see if I can add the correct parameters?

Well think the app / api is the problem then. WHen i got home yesterday i put on the handbrake, waited like 10min in the car and the parkingbrake icon in the app turned red. But after a few hours checking in the app the icon is “black” again just like the “doors” icon. So i think this feature is not working really well in their api / app.

You can install something like Fiddler (proxy) and connect your phone to it. You can then see all the network requests your phone is making and what it sends and is returned.

Great post! So I tried to set it up but without any luck. I first had to creat the custom_components folder, so I did. And also the 3 subfolders (sensor/device_tracker/binary_sensor) and I set 777 permission on al of those 4 folders. I created the .py files, and put mind: in my configuration.yaml. But after restarting I get a error:

Error during setup of component mind
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/mind.py", line 47, in setup
    hass.data[DATA_MIND] = Mind(hass, conf)
  File "/home/homeassistant/.homeassistant/custom_components/mind.py", line 70, in __init__
    password=conf.get(CONF_PASSWORD), cache_ttl=conf.get(CONF_SCAN_INTERVAL))
  File "/srv/homeassistant/lib/python3.5/site-packages/mind/__init__.py", line 250, in __init__
    self._auth()
  File "/srv/homeassistant/lib/python3.5/site-packages/mind/__init__.py", line 269, in _auth
    auth=HTTPBasicAuth(self._client_id, self._client_secret))
  File "/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/srv/homeassistant/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 411, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/srv/homeassistant/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 379, in parse_token_response
    validate_token_parameters(params)
  File "/srv/homeassistant/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 386, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/srv/homeassistant/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 415, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.AccessDeniedError: (access_denied)

I have the “Mijn Seat” app.

Can you share your config?

I just used this:

mind:
  username: [email protected]
  password: mypassword

Later on I would like to store it in my secrets file, but for now this isn’t even working.

Try to add:
client_id: 8ba04cb3869f4b568ea54fc57154d957
client_secret: b7fD6c394a7c4aFd998afA70Cb5fED86

This should be for Seat

Thank you! I tought that the default for Volkswagen also worked for Seat, and that I only needed those client_id/secret for Skoda. But now it works!

So it’s not perfect I gues, It tells me my ignition is on, handbreake is unsafe and my car is not locked. All of those are not true. Also the location is a address where I left 2 hours ago.

Do you guys have the same issue(s)?

EDIT: I see now the Seat app gives the same information. So the problem must be somewhere else. Normally the app is accurate.

Hi bloody2k, did you fix this - i do have a vw aswell, getting oauthlib.oauth2.rfc6749.errors.AccessDeniedError: (access_denied)
so i think we are in the same boat with a wrong client_id and client_secret

Didn’t had the time to look into it. But it’s still on my todo list. I’ll let you know when I get to it :+1:

1 Like

Please remember that this is not a Volkswagen component but a component for Mind Mobility. This is a company from the Dutch importer (PON) of Volkswagen/VAG cars. The importer installs a Mind mobility device in the cars they sell.

So it will not work with other Volkswagens and the standard official Volkswagen tools.

The problems I have with the app are that the handbrake and doors are only updated when the engine is running. Hopefully the garage can fix this soon.
The only problem I have with HA is that the location of my car isn’t always updated correctly.

I think it was something temporary because now the app works fine again and so does home assistant. Ignition and handbrake status and all the other stuff are correct now.

Thanks again!

Hi guys! So, I’ve been using this for a couple of days now. The info showed in the app is all correct except for the location. But I discovered something, when I restart Home Assistant, de location is correct again. So can this be a problem on the Home Assistant part?

I also tried it here and now the location is correct. Unfortunately I don’t know anything about developing HA components or how it works.

Skoda app on my phone reports correctly that the car is at home.
However the Mind platform is still believing its 10 km away :wink:
I crossed that point while driving, its in the middle my home - work.