Closed lhumb closed 10 months ago
Hi @lhumb , thx for reporting. Have you already set up your car via the MyToyota app? The mytoyota
Python package only works if your car was previously set up via the official app.
Hi Simon @CM000n – I use the mentioned App to get data for my car and at first I though I should open it, to activate the api via verification code, but nothing happened … but I have'nt set up multimedia elements in the app. … perhaps I should?
Sry don't know what you mean with multimedia elements.
If you can already see data such as remaining range, mileage etc. in the app, this is set up and mytoyota
should also work. If not, your vehicle either does not support the connected services or they have not yet been set up correctly.
It is also possible, if there is a separate registration process for your multimedia unit in the App, that the API ist reporting this as some kind of separate "vehicle". The fact that mytoyota
is iterating over all vehicles may trigger the registration process for them.
Unfortunately, I do not have a vehicle with a corresponding multimedia unit myself and therefore cannot reproduce this behavior.
TNX -- I will try.
All right, please let us know if it worked 😊
By the way, since I'm just looking at your error output again. The mytoyota
Lib is not intended to be used directly as a custom_component in Home Assistant. 😉
ok … but I deleted the complete path data, to be sure for anonymizing. In the meantime I looked at the personal privacy website at https://www.toyota.de/customer/portal#/myDetails there I decided that toyota has no access any data, but »Einblick und Analysen« … perhaps this makes a difference and so I'm not able to get a verified access?
What do you mean with path data and where and how did you deleted it? Can you share a Screenshot from your App?
a) I shortened the pathes in the error message b) see attached file
Oh … thank you very much … indeed … now with the current MyToyota App the error is different:
(homeassistant) homeassistant@aberddi:/home/humbert/dokumente/photovoltaik-wallbox/mytoyota$ python simple_client_example.py
Logging in...
Retrieving cars...
Traceback (most recent call last):
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/simple_client_example.py", line 83, in <module>
loop.run_until_complete(get_information())
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/simple_client_example.py", line 49, in get_information
await car.update()
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/models/vehicle.py", line 113, in update
for name, data in await responses:
^^^^^^^^^^^^^^^
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/models/vehicle.py", line 107, in parallel_wrapper
r = await function()
^^^^^^^^^^^^^^^^
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/api.py", line 135, in get_vehicle_electric_status_endpoint
return await self._request_and_parse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/api.py", line 49, in _request_and_parse
return model(**response)
^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for ElectricResponseModel
payload -> fuelLevel
field required (type=value_error.missing)
payload -> fuelRange
field required (type=value_error.missing)
Oh … thank you very much … indeed … now with the current MyToyota App the error is different:
(homeassistant) homeassistant@aberddi:/home/humbert/dokumente/photovoltaik-wallbox/mytoyota$ python simple_client_example.py Logging in... Retrieving cars... Traceback (most recent call last): File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/simple_client_example.py", line 83, in <module> loop.run_until_complete(get_information()) File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/simple_client_example.py", line 49, in get_information await car.update() File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/models/vehicle.py", line 113, in update for name, data in await responses: ^^^^^^^^^^^^^^^ File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/models/vehicle.py", line 107, in parallel_wrapper r = await function() ^^^^^^^^^^^^^^^^ File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/api.py", line 135, in get_vehicle_electric_status_endpoint return await self._request_and_parse( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/api.py", line 49, in _request_and_parse return model(**response) ^^^^^^^^^^^^^^^^^ File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 2 validation errors for ElectricResponseModel payload -> fuelLevel field required (type=value_error.missing) payload -> fuelRange field required (type=value_error.missing)
Very well, 😊 These new error are due to the fact that we do not yet know all the API endpoints for all Toyota vehicles and their functions. We therefore still have to adapt some of our models. Please open a separate issue for better tracking.
Describe the bug When running simple_client_example.py I get an Authentication Error plus an e-mail from toyota with a verification code.
`Deine Anmeldung in der MyToyota App ist fast fertig, du musst nur noch deine E-Mail-Adresse bestätigen. Bitte gebe den Verifizeriungscode ein, wenn du dazu aufgefordert wirst.
Dies ist der sechsstellige Verifizierungscode: 080628 Dieser Code ist fünf Minuten lang gültig`
Where should I place/save this code?
To Reproduce Steps to reproduce the behavior:
Expected behavior After saving the verification-code at ?? simple_client_example.py should run ;-)