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

Current position #2

Open
keesschollaart81 opened this issue Jun 16, 2018 · 5 comments
Open

Current position #2

keesschollaart81 opened this issue Jun 16, 2018 · 5 comments

Comments

@keesschollaart81
Copy link

Thanks for the Api, nice work!

I'm trying to get the current location of my car, is that in any way supported? The CarFinderService throws:

Exception: API error: {'errorCode': 'CF.security.9007', 'description': 'MBB Roles and Rights responded: 404 - Not Found'}
@davidgiga1993
Copy link
Owner

The CarFinderService requires special permissions for your account. At least here in germany I can't get any data from it. But I guess it would be possible to get the last parked position of the car since the official app also shows these information.

@djmoonshine
Copy link

djmoonshine commented Nov 8, 2018

@keesschollaart81 I'm able to run something like this:

cfs = CarFinderService(api,vehicle)
print(str(cfs.find()))

This will show coordinates and parking time so it is probably not "live" while moving, but the parking position as noted by @davidgiga1993
As a note i live in sweden.

@rangerzhou
Copy link

rangerzhou commented May 28, 2019

Hi davidgiga1993,
I have tested it but some errors like below:

Traceback (most recent call last):
File "test.py", line 46, in
res = asyncio.get_event_loop().run_until_complete( task )
File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "test.py", line 35, in main
account = AudiConnectAccount (user, password)
File "/home/pi/.homeassistant/custom_components/audiconnect/audi_connect_account.py", line 30, in init
self.logon_service.login(username, password)
File "/usr/local/lib/python3.5/dist-packages/audiapi/Services.py", line 190, in login
token = self.__login_request(user, password)
File "/usr/local/lib/python3.5/dist-packages/audiapi/Services.py", line 220, in __login_request
reply = self._api.post(self.url('/token'), data, use_json=False)
File "/usr/local/lib/python3.5/dist-packages/audiapi/API.py", line 62, in post
return self.__handle_error(r.json())
File "/usr/local/lib/python3.5/dist-packages/audiapi/API.py", line 68, in __handle_error
raise Exception('API error: ' + str(error) + '\n' + error_msg)
Exception: API error: invalid_grant
expectedTenant:zh-CN

and I had modified the COUNTRY from DE to CN in “/usr/local/lib/python3.5/dist-packages/audiapi/Services.py” , audiapi had been installed with “pip3 install audiapi” .

Thanks.

@jgardiner68
Copy link

In the UK, I can get the car's position when it is locked but not when it is being driven

@davidgiga1993
Copy link
Owner

@jgardiner68 That's the expected behavior. If you don't have the valet package you can't get the realtime position of the car. Only the parking position.

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

No branches or pull requests

5 participants