Closed HEAzem closed 3 months ago
Same here
Describe the bug Upgraded HA last night to 2024.8.0 and noticed this morning that all the entities were not available. Waited a few hours, still unavailable. Deleted the car, restarted HA and then added back my username and password. 1 entry successful, but the car (device) and entities didn't show up, again did a restart and reload a few times.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
I just tried installing it on another HA system, that wasn't updated yet to the new HA release, and it's the same issue, so it's a coincidence that it happened after the upgrade. Nevertheless, something isn't working. Any thoughts?
My installation also broke.
I suspect the problem is in the authentication flow as I do receive an email with a code from Toyota, but when adding the integration it says the login is wrong.
2024-08-08 16:43:57.667 ERROR (MainThread) [custom_components.toyota.config_flow] Authentication Failed. Unknown method.
Same here. Restore last night vm backup running HA 2024.7.4 does not solve this issue, all entities Not Available
I agree this doesn't have anything to do with 2024.8.0, as I've upgraded right after the release and it still worked for a few hours.
I confirm, I'm stuck at 2024.07.03 and it doesn't work for me either. I think the problem lies elsewhere
Same error
Same problem here. There are several errors and warnings in the log:
2024-08-09 10:14:40.392 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/root/.cache/toyota_credentials_cache_contains_secrets', 'w') inside the event loop by custom integration 'toyota' at custom_components/toyota/__init__.py, line 62: await client.login() (offender: /config/deps/lib/python3.12/site-packages/mytoyota/controller.py, line 203: with open(str(CACHE_FILENAME), "w", encoding="utf-8") as f:), please create a bug report at https://github.com/DurgNomis-drol/ha_toyota/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 456, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, 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 85, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, 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/config/config_entries.py", line 120, in post
await hass.config_entries.async_reload(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1939, in async_reload
return await self.async_setup(entry_id, _lock=False)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1863, in async_setup
await entry.async_setup(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/toyota/__init__.py", line 62, in async_setup_entry
await client.login()
2024-08-09 10:14:41.742 ERROR (MainThread) [custom_components.toyota] 2 validation errors for NotificationResponseModel
guid
field required (type=value_error.missing)
payload -> 0 -> vin
field required (type=value_error.missing)
2024-08-09 10:14:41.743 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-09 10:14:41.745 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry
for index, vehicle in enumerate(coordinator.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-09 10:14:41.747 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
Here too. Removed, rebooted, reinstalled, etc.
I can add credentials but nothing shows up.
Same here:
2024-08-09 10:32:45.610 ERROR (MainThread) [custom_components.toyota] 2 validation errors for NotificationResponseModel guid field required (type=value_error.missing) payload -> 0 -> vin field required (type=value_error.missing) 2024-08-09 10:32:45.650 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setupentry for index, in enumerate(coordinator.data): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable 2024-08-09 10:32:45.652 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry for index, vehicle in enumerate(coordinator.data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable 2024-08-09 10:32:45.657 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/toyota/sensor.py", line 209, in async_setupentry for index, in enumerate(coordinator.data):
Same here. This has nothing to do with 2024.8.0 version of HA as some of us suspected. Integration just stopped working.
Same here on Core 2024.7.3 Supervisor 2024.08.0 Operating System 12.4
When I start the Toyota App in my phone I get a splash screen that I haven seen before. Maybe this is an hint to what is wrong.
I tried running the script from the mytoyota module, which is used by this integration, but that doesn't work.
I created an issue in that repository as the primary problem doesn't seem to be with the ha_toyota module.
Don't shame me.... I tried to post the error log on chat gpt, asking them to find a solution. He talks about rewriting some python files..... but I stopped because I didn't know where to put my hand. I don't know if it can be a solution to rely on gpt chat
Same error here too :/
Hi all,
there is a PR available in the mytoyota library that will fix this issue https://github.com/DurgNomis-drol/mytoyota/pull/364
Until this PR is merged you can modify the requirements in the ha-toyota manifest file in HA (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch
"requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"
]
keep in mind that as soon as this PR is merged, this branch will be deleted so you will have to change the manifest file accordingly to something like that:
"requirements": ["mytoyota>=2.1.2,<3.0", "arrow"]
You need to restart homeassistant after the manifest file is modified.
Hi I tried that, but no dice, deleted and put the username password still shows no devices? did I do something wrong: see below
{ "domain": "toyota", "name": "Toyota Connected Services", "after_dependencies": [ "cloud", "http" ], "codeowners": [ "@DurgNomis-drol" ], "config_flow": true, "documentation": "https://github.com/DurgNomis-drol/ha_toyota", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/DurgNomis-drol/ha_toyota/issues", "requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow" ], "version": "2.0.3" }
Hi I tried that, but no dice, deleted and put the username password still shows no devices? did I do something wrong: see below
{ "domain": "toyota", "name": "Toyota Connected Services", "after_dependencies": [ "cloud", "http" ], "codeowners": [ "@DurgNomis-drol" ], "config_flow": true, "documentation": "https://github.com/DurgNomis-drol/ha_toyota", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/DurgNomis-drol/ha_toyota/issues", "requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow" ], "version": "2.0.3" }
The manifest file seems fine. Make sure you restart Homeassistant after modifying the manifest file and then try to configure the Toyota integration in HA. If you have already done that, maybe it is one of the usual toyota server connection issues. Try again in a while.
ok will try in a while, I did restart but the config was already there when I restarted and then I deleted it, and tried the username and password. Will try again later and revert. Thanks for the speedy response.
Hi all, there is a PR available in the mytoyota library that will fix this issue DurgNomis-drol/mytoyota#364 Until this PR is merged you can modify the requirements in the ha-toyota manifest file in HA (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch
"requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"
]keep in mind that as soon as this PR is merged, this branch will be deleted so you will have to change the manifest file accordingly to something like that:
"requirements": ["mytoyota>=2.1.2,<3.0", "arrow"]
You need to restart homeassistant after the manifest file is modified.
I tried this, but simply restarting Home Assistant does not seem to pull the updated dependency, even after removing the integration and setting it up again. Is there any way to force Home Assistant to pull the fixed version?
Removing the mytoyota
and mytoyota-2.1.1
folders in deps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.
I run ha in docker, mytoyota folders are inside the docker instance. Instead of removing old mytoyota from inside docker instance recreating docker instance worked as well. Running fine now.
Hi all, there is a PR available in the mytoyota library that will fix this issue DurgNomis-drol/mytoyota#364 Until this PR is merged you can modify the requirements in the ha-toyota manifest file in HA (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch
"requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"
] keep in mind that as soon as this PR is merged, this branch will be deleted so you will have to change the manifest file accordingly to something like that:"requirements": ["mytoyota>=2.1.2,<3.0", "arrow"]
You need to restart homeassistant after the manifest file is modified.~I tried this, but simply restarting Home Assistant does not seem to pull the updated dependency, even after removing the integration and setting it up again. Is there any way to force Home Assistant to pull the fixed version?~
Removing the
mytoyota
andmytoyota-2.1.1
folders indeps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.
Did this and it worked...had to learn to SSH into docker etc, the learning curve continues. Thank you for the input
Hi all, there is a PR available in the mytoyota library that will fix this issue DurgNomis-drol/mytoyota#364 Until this PR is merged you can modify the requirements in the ha-toyota manifest file in HA (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch
"requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"
]keep in mind that as soon as this PR is merged, this branch will be deleted so you will have to change the manifest file accordingly to something like that:
"requirements": ["mytoyota>=2.1.2,<3.0", "arrow"]
You need to restart homeassistant after the manifest file is modified.
I tried this, but simply restarting Home Assistant does not seem to pull the updated dependency, even after removing the integration and setting it up again. Is there any way to force Home Assistant to pull the fixed version?Removing the
mytoyota
andmytoyota-2.1.1
folders indeps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.
Anyone knows where Homassistant OS, keeps python dependencies?
Removing the
mytoyota
andmytoyota-2.1.1
folders indeps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.
Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
Anyone knows where Homassistant OS, keeps python dependencies?
In my case (Home Assistant Core in a container) the deps
folder was in the config folder (where the configuration.yaml
etc. is stored as well). I'd assume it would be similar in HA OS.
Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
You need to have some kind of file system access, either through SSH, SMB, or some other solution depending on your set up. If you're running Supervisor, you can maybe use the file editor addon too, to do it from the UI itself. Note that you need to modify the manifest first like desosav mentioned.
Anyone knows where Homassistant OS, keeps python dependencies?
In my case (Home Assistant Core in a container) the
deps
folder was in the config folder (where theconfiguration.yaml
etc. is stored as well). I'd assume it would be similar in HA OS.Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
You need to have some kind of file system access, either through SSH, SMB, or some other solution depending on your set up. If you're running Supervisor, you can maybe use the file editor addon too, to do it from the UI itself. Note that you need to modify the manifest first like desosav mentioned.
I have access to the /deps folder, inside the homeassistant and/or config folder, but it is empty. SSH into the system i can find 'site-packages' in /usr/lib/python3.12/site-packages, but no toyota or mytoyota package.
Removing the
mytoyota
andmytoyota-2.1.1
folders indeps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
I'll try, but I'm most certainly not an authority, if anyone notices a mistake in what I'm suggesting please let us know. With that disclaimer, what "I think" I did, was 1. add-on install Advanced SSH & Web Terminal, make sure you switch off protection mode. for my configuration I have hassio as username and my password. Restart HA, and then check that advanced SSH & terminal is up and running, or start it if necessary type: docker exec -it homeassistant /bin/bash
➜ ~ docker exec -it homeassistant /bin/bash homeassistant:/config# cd /usr/local/lib/python3.12/site-packages homeassistant:/usr/local/lib/python3.12/site-packages# cd mytoyota homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota#
do an ls command to list the files in mytoyota
homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota# ls init.py pycache api.py client.py const.py controller.py exceptions.py models py.typed utils homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota#
next type in (please make sure you are in the mytoyota directory
rm -rf *
that will delete all the files in that directory, you can check that it's empty by doing the ls command again
next
cd /usr/local/lib/python3.12/site-packages/mytoyota-2.1.1.dist-info# again ls to see the contents of the folder
and
then while making sure you are in the mytoyota-2.1.1.dist-info directory
rm -rf *
to delete all the files
ls
to check the directory is empty.
restart HA
I deleted my login at the Toyota integration before restarting, once restarted do the Toyota integration and username password and you should be good to go.
This is the first time I try and explain anything on GitHub...so forgive the crudeness hope it helps
switch off protection mode in advanced ssh and web terminal is important, but do so at your own risk
See: https://www.home-assistant.io/faq/dependencies/
So in deps subfolder of configuration.
However, in my case (standard docker using docker pull homeassistant/home-assistant:stable) they are inside the docker instance. It is possible to delete mytoyota inside the instance by connecting a shell inside the instance, but it is easier to delete instance and create new instance with docker create.
I think I will wait for a new version. These steps are a little above my HA knowledge/skils ;-)
Anyone knows where Homassistant OS, keeps python dependencies?
In my case (Home Assistant Core in a container) the
deps
folder was in the config folder (where theconfiguration.yaml
etc. is stored as well). I'd assume it would be similar in HA OS.Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
You need to have some kind of file system access, either through SSH, SMB, or some other solution depending on your set up. If you're running Supervisor, you can maybe use the file editor addon too, to do it from the UI itself. Note that you need to modify the manifest first like desosav mentioned.
I have access to the /deps folder, inside the homeassistant and/or config folder, but it is empty. SSH into the system i can find 'site-packages' in /usr/lib/python3.12/site-packages, but no toyota or mytoyota package.
Same issue here. HA running on a VM.
Removing the
mytoyota
andmytoyota-2.1.1
folders indeps/lib/python3.12/site-packages
and restarting Home Assistant after that did the trick. Everything seems to work again now.Hi, could some good soul explain, step by step, to those like me who have limited knowledge, how to delete those two folders or recreate them?. Thank you
I'll try, but I'm most certainly not an authority, if anyone notices a mistake in what I'm suggesting please let us know. With that disclaimer, what "I think" I did, was 1. add-on install Advanced SSH & Web Terminal, make sure you switch off protection mode. for my configuration I have hassio as username and my password. Restart HA, and then check that advanced SSH & terminal is up and running, or start it if necessary type: docker exec -it homeassistant /bin/bash
➜ ~ docker exec -it homeassistant /bin/bash homeassistant:/config# cd /usr/local/lib/python3.12/site-packages homeassistant:/usr/local/lib/python3.12/site-packages# cd mytoyota homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota#
do an ls command to list the files in mytoyota
homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota# ls init.py pycache api.py client.py const.py controller.py exceptions.py models py.typed utils homeassistant:/usr/local/lib/python3.12/site-packages/mytoyota#
next type in (please make sure you are in the mytoyota directory
rm -rf *
that will delete all the files in that directory, you can check that it's empty by doing the ls command again
next
cd /usr/local/lib/python3.12/site-packages/mytoyota-2.1.1.dist-info# again ls to see the contents of the folder
and
then while making sure you are in the mytoyota-2.1.1.dist-info directory
rm -rf *
to delete all the files
ls
to check the directory is empty.
restart HA
I deleted my login at the Toyota integration before restarting, once restarted do the Toyota integration and username password and you should be good to go.
This is the first time I try and explain anything on GitHub...so forgive the crudeness hope it helps
GRAZIE grazie grazie Thank you thank you thank you
If there is a solution available, I wonder why there is not an update, then we can all enjoy this integration again, or am I thinking wrong?
If there is a solution available, I wonder why there is not an update, then we can all enjoy this integration again, or am I thinking wrong?
The maintainers of the integration do this in their free time. You have to be a little bit patient.
With the merge of DurgNomis-drol/mytoyota#364 we can adjust requirement to the following string for mytoyota
in manifest.json
"mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git"
Good morning but will it be possible to put this fix in a new integration, or is it something impossible, and for amateurs like me, there is no hope left?. I tried @HEAzem 's guide, which I thank very much, but I got stuck and I'm afraid of causing confusion in moving forward
Okay Mrtenz, thanks, then I will respect it and will calmly wait for the next update.
I will wait for the update. Too much editing and difernet info and scared to break something.
The best is to wait until PR is merged.
In Homassistant OS,
In Homassistant OS,
- install "Advanced SSH & Web Terminal". Important: Fix protection mode OFF
- In SSH terminal launch command: docker exec -it homeassistant bash
- rm -r /usr/local/lib/python3.12/site-packages/mytoyota
- rm -r /usr/local/lib/python3.12/site-packages/mytoyota-2.1.1.dist-info
- You can close ssh and edit (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch "requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"]
- restart HA
Thanks I will try that. What happens when I use this fix and there is an update later. Will that cause a problem?
In Homassistant OS,
- install "Advanced SSH & Web Terminal". Important: Fix protection mode OFF
- In SSH terminal launch command: docker exec -it homeassistant bash
- rm -r /usr/local/lib/python3.12/site-packages/mytoyota
- rm -r /usr/local/lib/python3.12/site-packages/mytoyota-2.1.1.dist-info
- You can close ssh and edit (/homeassistant/custom_components/toyota/manifest.json) to use the specific branch "requirements": [ "mytoyota @ git+https://github.com/DurgNomis-drol/mytoyota.git@Issue_363", "arrow"]
- restart HA
Thanks I will try that. What happens when I use this fix and there is an update later. Will that cause a problem?
If you in step 5 put in "requirements": ["mytoyota>=2.1.4,<3.0", "arrow"]
instead, this should cause you to catch the later updates.
If you in step 5 put in
"requirements": ["mytoyota>=2.1.4,<3.0", "arrow"]
instead, this should cause you to catch the later updates.
Did this, deleted the folders in deps
again, and restarted Home Assistant, and everything works as expected. Thanks!
Describe the bug Upgraded HA last night to 2024.8.0 and noticed this morning that all the entities were not available. Waited a few hours, still unavailable. Deleted the car, restarted HA and then added back my username and password. 1 entry successful, but the car (device) and entities didn't show up, again did a restart and reload a few times.