Open DiVrox opened 5 months ago
Maybe we need to take a step back here, remove HA from the equation --- has anyone been able to successfully return data using the pymazda module independently of home assistant?
The pymazda code is working --- this looks to be a HA issue ?
I'm still leaning towards the defaults having changed. Currently thinking of how to fix them to what they where before.
I'm still leaning towards the defaults having changed. Currently thinking of how to fix them to what they where before.
I think it's firmly in the something changed on HA, if the integration still works below 2024.7. The open question, to me, is whether something changed in HA to break the HA requests, or something changed in HA that causes Mazda's servers to purposefully timeout the Mazda requests.
To that end, I am curious if anyone else has had a similar experience to me, where I can intermittently run the integration on 2024.7. The comments here read like it's not working at all. For me, if I hit reload integration enough times, it will eventually connect and load, but subsequent polling updates also very frequently timeout. So the integration is effectively useless for control as entities are so frequently unavailable, but entities are still available enough that my statistics populate with gaps in the data ranging from ever other 7 minutes, to every few hours.
I'm still leaning towards the defaults having changed. Currently thinking of how to fix them to what they where before.
I think it's firmly in the something changed on HA, if the integration still works below 2024.7. The open question, to me, is whether something changed in HA to break the HA requests, or something changed in HA that causes Mazda's servers to purposefully timeout the Mazda requests.
To that end, I am curious if anyone else has had a similar experience to me, where I can intermittently run the integration on 2024.7. The comments here read like it's not working at all. For me, if I hit reload integration enough times, it will eventually connect and load, but subsequent polling updates also very frequently timeout. So the integration is effectively useless for control as entities are so frequently unavailable, but entities are still available enough that my statistics populate with gaps in the data ranging from ever other 7 minutes, to every few hours.
I'm on 2024.7 and it's working. Not using the car a lot, today not moved so the data is still the same as this morning. Btw the integration is not in error. I'm not sure that mazda ment his app to be used with real time data.. Even with the app if i press update i have to wait the new value. The gps of the car is shown only when the car is Parker, not when moving..
Btw If you need for me to run some tests just let me know what and how
Thanks!
Update: just pressed like 10 time the update button and integration is now unavailable Maybe mazda server are just cutting down when more than X Request by minute?
@crash0verride11 I can confirm I'm having intermittent successful updates, but they're sporadic. I haven't found any identifiable pattern in when the updates are successful
Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 01:37:50 (39 occurrences) Last logged: 01:38:54
[140392353039120] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/button/init.py", line 134, in _async_press_action await self.async_press() File "/config/custom_components/mazda/button.py", line 147, in async_press await self.entity_description.async_press( File "/config/custom_components/mazda/button.py", line 57, in handle_refresh_vehicle_status await handle_button_press(client, key, vehicle_id, coordinator) File "/config/custom_components/mazda/button.py", line 38, in handle_button_press await api_method(vehicle_id) File "/config/custom_components/mazda/pymazda/client.py", line 328, in refresh_vehicle_status await self.controller.refresh_vehicle_status(vehicle_id) File "/config/custom_components/mazda/pymazda/controller.py", line 389, in refresh_vehicle_status response = await self.connection.api_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mazda/pymazda/connection.py", line 191, in api_request return await self.api_request_retry( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mazda/pymazda/connection.py", line 221, in api_request_retry return await self.send_api_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mazda/pymazda/connection.py", line 329, in send_api_request response = await self._session.request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 608, in _request await resp.start(conn) File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 971, in start with self._timer: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in exit raise asyncio.TimeoutError from None TimeoutError
mine is suddenly working ... anyone else?
@SethCalkins yep, same here. No clue what caused the change though
So we can upgrade??
Mine also started working again. That's weird
Yes, really weird. But ir works.
I can confirm it suddenly started working again in 2024.7.4 ... but a few minutes ago it stopped working again and now it's oke again. Really weird.
Wonderful!! It is indeed working again! Thanks everyone for all the work and thinking to get it fixed. ;-)
It's great it works again/for now, but still curious .... what fixed it?
Mine also seems to be working again: Core 2024.7.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0
Did anyone try 2024.8.0?
Did anyone try 2024.8.0?
Yes, It works
Works for me too
Perfect!
Still curious what made it work again
I got the 60-day notice for the end of the 3-yr trial period for Mazda Connected Services. I'm assuming this will no longer work for me once the trial ends. Has anyone else's trial period finished and can confirm that this stops working (unless you pay up...)?
@Valdorama I saw this in one of the FB groups, seems like certain features are at risk rather than the entirety of connected services
I have a 2022 mx-30 and I'm in the EU, mazda connected service is included with the car, no nerd to Pay extra. But still with 2024.7 HA stopped working, so i don't think it s a €€€ problem
I have a 2022 mx-30 and I'm in the EU, mazda connected service is included with the car, no nerd to Pay extra. But still with 2024.7 HA stopped working, so i don't think it s a €€€ problem
Mx-30 2021 in Spain and working fine!
Mine just stopped working again this morning. On 2024.7.4
Unfortunately, so did mine, in the afternoon... :(
This is the traceback:
This error originated from a custom integration.
Logger: custom_components.mazda
Source: custom_components/mazda/__init__.py:159
integration: Mazda Connected Services
First occurred: 15:08:19 (111 occurrences)
Last logged: 22:28:19
Unknown error occurred during Mazda update request:
Traceback (most recent call last):
File "/config/custom_components/mazda/__init__.py", line 57, in with_timeout
return await task
^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/client.py", line 97, in get_vehicle_status
vehicle_status_response = await self.controller.get_vehicle_status(vehicle_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/controller.py", line 46, in get_vehicle_status
response = await self.connection.api_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 191, in api_request
return await self.__api_request_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 221, in __api_request_retry
return await self.__send_api_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 329, in __send_api_request
response = await self._session.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 608, in _request
await resp.start(conn)
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 976, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 640, in read
await self._waiter
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/mazda/__init__.py", line 159, in async_update_data
vehicle["status"] = await with_timeout(
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/__init__.py", line 56, in with_timeout
async with asyncio.timeout(timeout_seconds):
File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError
Core 2024.7.4 Supervisor 2024.08.0 Operating System 13.0 Frontend 20240710.0
Same story here. Died just after I upgraded mine to 2024.8
But the official app is not working either
Nope, the app is working fine (Italy)
Mazda app is stuffed here in the UK plus multiple reports on Facebook UK CX-60 group
Official app is also working fine here in Poland
For me the official app is not working (Spain)
Stop working here too on 2024.8.1
Mazda App itself is also dead in the Netherlands
2024.6.4 in italy still working
Official App in USA is not working either.
În RO don’t worked yesterday, în that morning start again official app, but in HA after upgrading at 2024.8.1, stopped working again
The official Mazda App in Germany is not working either, no update from my CX-60 since 14th of August.
For now the issue must be related to Mazda Servers, not to this Integration nor Home Assistant.
În RO factory app is working again, but in HA don't....
Official Mazda app working again in the UK. HA 2024.8.1 integration NOT working HA 2024.6.4 integration IS working
Official Mazda app working again in the UK. HA 2024.8.1 integration NOT working HA 2024.6.4 integration IS working
Yeah same here -- issue appears to back ugh.
Someone tried at 2024.8.0?
Someone tried at 2024.8.0?
I'm on : Core 2024.7.4 Supervisor 2024.08.0 Operating System 12.4 Frontend 20240710.0
And it's not working for me. The official Mazda app wasn't working for me yesterday, but it is today, but it's very slow to load compared to how it usually is.
App seems to be down again :( Last update in the app for me was 9:48am GMT. I have tried refreshing the app a few times but no updated data comes through
During the App downtime there seems to have been DNS issues, noticed both HA and my phone doing requests that were not awnsered.
Now sadly we are back to being down only on the HA side.
I'm on: Core 2024.8.1 Supervisor 2024.08.0 Operating System 12.4 Frontend 20240809.0
Located in Germany and stopped working for me too, my Mazda app has been working fine non stop.
I've downgraded to 2024.6.4 and the integration is working again. I hope magic will make it work again at newer versions but for me is important to have it working now
HA version 2024.8.2: still not working homeassistant | 2024-08-19 15:51:22.824 ERROR (MainThread) [custom_components.mazda] Unknown error occurred during Mazda update request: homeassistant | Traceback (most recent call last): homeassistant | File "/config/custom_components/mazda/init.py", line 57, in with_timeout homeassistant | return await task homeassistant | ^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/pymazda/client.py", line 30, in get_vehicles homeassistant | vec_base_infos_response = await self.controller.get_vec_base_infos() homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/pymazda/controller.py", line 30, in get_vec_base_infos homeassistant | return await self.connection.api_request( homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/pymazda/connection.py", line 191, in api_request homeassistant | return await self.api_request_retry( homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/pymazda/connection.py", line 221, in api_request_retry homeassistant | return await self.send_api_request( homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/pymazda/connection.py", line 329, in send_api_request homeassistant | response = await self._session.request( homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 684, in _request homeassistant | await resp.start(conn) homeassistant | File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 999, in start homeassistant | message, payload = await protocol.read() # type: ignore[union-attr] homeassistant | ^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 640, in read homeassistant | await self._waiter homeassistant | asyncio.exceptions.CancelledError homeassistant | homeassistant | The above exception was the direct cause of the following exception: homeassistant | homeassistant | Traceback (most recent call last): homeassistant | File "/config/custom_components/mazda/init.py", line 154, in async_update_data homeassistant | vehicles = await with_timeout(mazda_client.get_vehicles()) homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/mazda/init.py", line 56, in with_timeout homeassistant | async with asyncio.timeout(timeout_seconds): homeassistant | File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in aexit homeassistant | raise TimeoutError from exc_val homeassistant | TimeoutError
Anyone any idea what causes the problem? It worked on 2024.7 and above. Why did it stop again en why does it work on 2024.6?
tried to revert one lib by one, but get this error..
and after reverting all library to older version, ha don't even start hahaha
Who, at Mazda, should I write to, to show that I don't like the Mazda-HA takedown? Or to formulate it, in a more positive way, I would looove to see an official 3rd party/HA support..
I have been trying to troubleshoot the issue, there seems to have been a change with aiohttp timeout I believe between the updates that has seemed to cause it to stop working. I have limited python experience and limited HA integration experience. Im trying to fix it but so far it seems the API doesnt like the changes ive made and since the API is rate limited I cannot try a bunch of times. The developer really needs to chime in hopefully they havent abandoned the project.
Thanks for you work! I really love this integration. No issues so far untill last night ... upgraded HA to 2024.7.0 and since then, the integration keeps initializing. Anyone else experiencing the same problem?