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

Issue with HA 2024.7 #5

Open
DiVrox opened this issue Jul 4, 2024 · 209 comments · May be fixed by #8
Open

Issue with HA 2024.7 #5

DiVrox opened this issue Jul 4, 2024 · 209 comments · May be fixed by #8

Comments

@DiVrox
Copy link

DiVrox commented Jul 4, 2024

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?

@ilwalti
Copy link

ilwalti commented Jul 4, 2024

Same here. App on smartphone works fine.

I've got this debug log:

Traceback (most recent call last):
  File "/config/custom_components/mazda/__init__.py", line 154, in async_update_data
    vehicles = await with_timeout(mazda_client.get_vehicles())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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
2024-07-04 11:31:41.672 ERROR (MainThread) [custom_components.mazda] 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 30, in get_vehicles
    vec_base_infos_response = await self.controller.get_vec_base_infos()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mazda/pymazda/controller.py", line 30, in get_vec_base_infos
    return 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 154, in async_update_data
    vehicles = await with_timeout(mazda_client.get_vehicles())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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
2024-07-04 11:32:39.381 INFO (MainThread) [custom_components.mazda.pymazda.connection] Logging in as MY_SECOND_DRIVER
2024-07-04 11:32:39.381 INFO (MainThread) [custom_components.mazda.pymazda.connection] Retrieving public key to encrypt password
2024-07-04 11:32:39.800 INFO (MainThread) [custom_components.mazda.pymazda.connection] Sending login request
2024-07-04 11:32:39.934 INFO (MainThread) [custom_components.mazda.pymazda.connection] Successfully logged in as MY_SECOND_DRIVER
2024-07-04 11:32:39.935 INFO (MainThread) [custom_components.mazda.pymazda.connection] Retrieving encryption keys
2024-07-04 11:32:39.935 DEBUG (MainThread) [custom_components.mazda.pymazda.connection] Sending POST request to service/checkVersion
2024-07-04 11:32:40.297 INFO (MainThread) [custom_components.mazda.pymazda.connection] Successfully retrieved encryption keys
2024-07-04 11:32:40.297 DEBUG (MainThread) [custom_components.mazda.pymazda.connection] Sending POST request to remoteServices/getVecBaseInfos/v4
2024-07-04 11:33:09.940 ERROR (MainThread) [custom_components.mazda] 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 30, in get_vehicles
    vec_base_infos_response = await self.controller.get_vec_base_infos()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mazda/pymazda/controller.py", line 30, in get_vec_base_infos
    return 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 154, in async_update_data
    vehicles = await with_timeout(mazda_client.get_vehicles())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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
2024-07-04 11:33:09.943 DEBUG (MainThread) [custom_components.mazda] Finished fetching mazda data in 30.009 seconds (success: False)

I'm available for further debugging...

@Grigorek
Copy link

Grigorek commented Jul 4, 2024

I can confirm, some logs like @ilwalti

@Maggus574
Copy link

Hey!

Same problem here since Update to HA2024.7.

@deherw
Copy link

deherw commented Jul 4, 2024

yep, me to.

@ghammer80
Copy link

Same here.

@oransterf
Copy link

the irony that I had installed this only a few days ago and now it doesn't work anymore

@doosterkamp
Copy link

+1
Sam issue (and log entries) since 2024.7 over here also!

@ilwalti
Copy link

ilwalti commented Jul 5, 2024

An update, but I don't know if it is somewhat related tho this issue... today I've received on the official app an advice
that says that Mymazda app isn't reachable july 9, between 0100 and 0700 CEST, due to a programmed mainteance.
Maybe they're doing something on the users' database

Bye

@ctml91
Copy link

ctml91 commented Jul 5, 2024

Same. Downgraded to 2024.6 docker.io/homeassistant/home-assistant:2024.6 and all working again. Will wait for someone to figure out a fix to upgrade HA :)

@DiVrox
Copy link
Author

DiVrox commented Jul 5, 2024

I can confirm core 2024.7.1 doesn't work either. Same error.

Downgraded to core 2024.6.4 and everything works fine again.

If I can be of any help testing something, let me know

@formiification
Copy link

shit... same story here; probably this project is not supported anymore, so downgrade to 2024.6 is not an option for longer time

@deltamikeromeo
Copy link

Same issue for me.

@townsmcp
Copy link

townsmcp commented Jul 7, 2024

Same issue for me. I’m not a dev but it seems like HA apis have changed. For example the following API calls exist in the code found here https://developers.home-assistant.io/blog/2024/04/13/deprecate_async_track_state_change/. Also calls exist for async_forward_entry_setups. Are there any devs here that know about the deprecated calls and how to get round them?

@ilwalti
Copy link

ilwalti commented Jul 7, 2024

Same issue for me. I’m not a dev but it seems like HA apis have changed.

This is for sure. At the moment, I can't find what is changed, unfortunately... @runDMCA , are you still on this project?

@doosterkamp
Copy link

Funny thing is that the first API requests are successful, but theres a time-out when sending a POST request to remoteServices/getVecBaseInfos/v4

INFO (MainThread)  [custom_components.mazda.pymazda.connection] Logging in as XXXXXX@XXXXXXXXXX.XXX
INFO (MainThread)  [custom_components.mazda.pymazda.connection] Retrieving public key to encrypt password
INFO (MainThread)  [custom_components.mazda.pymazda.connection] Sending login request
INFO (MainThread)  [custom_components.mazda.pymazda.connection] Successfully logged in as XXXXXX@XXXXXXXXXX.XXX
INFO (MainThread)  [custom_components.mazda.pymazda.connection] Retrieving encryption keys
DEBUG (MainThread) [custom_components.mazda.pymazda.connection] Sending POST request to service/checkVersion
INFO (MainThread)  [custom_components.mazda.pymazda.connection] Successfully retrieved encryption keys
DEBUG (MainThread) [custom_components.mazda.pymazda.connection] Sending POST request to remoteServices/getVecBaseInfos/v4
ERROR (MainThread) [custom_components.mazda] 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 30, in get_vehicles
                          vec_base_infos_response = await self.controller.get_vec_base_infos()
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        File "/config/custom_components/mazda/pymazda/controller.py", line 30, in get_vec_base_infos
                          return 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 154, in async_update_data
                          vehicles = await with_timeout(mazda_client.get_vehicles())
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        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
DEBUG (MainThread) [custom_components.mazda] Finished fetching mazda data in 120.005 seconds (success: False)

@townsmcp
Copy link

townsmcp commented Jul 8, 2024

I did try upping line 57 of file init.py timeout from 30 seconds to 60 seconds and reboot HA but it still didn’t pull in anything on 2024.07

@ilwalti
Copy link

ilwalti commented Jul 8, 2024

I did try upping line 57 of file init.py timeout from 30 seconds to 60 seconds and reboot HA but it still didn’t pull in anything on 2024.07

Did the same, no joy...

@guba91
Copy link

guba91 commented Jul 11, 2024

same problem here.. tryied to find the function that throw the error but my limited programming skill are a problem lol

@doosterkamp
Copy link

Found the cause of the issue !!!
Just not sure how to fix it, yet ...

In 2024.7.x the aiohttp-fast-zlib package was updated from 0.1.0 to 0.1.1.
After manually reverting to 0.1.0 (in a HA development container) and restarting HA the integration works again.

Now searching for a solution ...

@bdraco
Copy link

bdraco commented Jul 11, 2024

async def with_timeout(task, timeout_seconds=30):
is wrapping all the aiohttp calls with yet another timeout.

Use the built-in timeout with aiohttp instead by setting timeout= on the request so if the timeout hits it doesn't propagate cancellation to aiohttp which may get things in a bad state.

response = await self._session.request(

https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientTimeout

@eliogrin
Copy link

async def with_timeout(task, timeout_seconds=30):

is wrapping all the aiohttp calls with yet another timeout.
Use the built-in timeout with aiohttp instead by setting timeout= on the request so if the timeout hits it doesn't propagate cancellation to aiohttp which may get things in a bad state.

response = await self._session.request(

https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientTimeout

Thanks for suggestions.
I tried to did what you mentioned, but seems it doesn't help, maybe you have any other ideas?

What I did:

  1. Removed withTimeout method, and update it to do direct call, like: vehicles = await mazda_client.get_vehicles() instead of: vehicles = await with_timeout(mazda_client.get_vehicles())
  2. Update request initialization with built-in timeout of aiohttp:
        clientTimeout = ClientTimeout(total=TIMEOUT)

        async with self._session.request(
            method,
            self.base_url + uri,
            headers=headers,
            data=encrypted_body_Str,
            ssl=ssl_context,
            timeout=clientTimeout,
        ) as response:
            response_json = await response.json()

But still getting error:

2024-07-11 17:24:37.593 ERROR (MainThread) [custom_components.mazda] Unknown error occurred during Mazda update request:
Traceback (most recent call last):
File "/config/custom_components/mazda/__init__.py", line 147, in async_update_data
vehicles = await mazda_client.get_vehicles()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/client.py", line 30, in get_vehicles
vec_base_infos_response = await self.controller.get_vec_base_infos()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/controller.py", line 30, in get_vec_base_infos
return await self.connection.api_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 193, in api_request
return await self.__api_request_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 223, in __api_request_retry
return await self.__send_api_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mazda/pymazda/connection.py", line 333, in __send_api_request
async with self._session.request(
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
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

@formiification
Copy link

Anyone able to fork this project and fix the code?

@SethCalkins
Copy link

SethCalkins commented Jul 17, 2024

Sorry guys, I have limited knowledge here but looks like possibly the API calls have changed -- I probably spent 4 hours last night working on this --- debug showed it was failing on this

controller.py

    async def get_vec_base_infos(self):  # noqa: D102
        return await self.connection.api_request(
            "POST",
            "remoteServices/getVecBaseInfos/v4",
            body_dict={"internaluserid": "__INTERNAL_ID__"},
            needs_keys=True,
            needs_auth=True,
        )

Logs:

INFO:pymazda.connection:Retrieving encryption keys
DEBUG:pymazda.connection:Sending POST request to service/checkVersion
INFO:pymazda.connection:Successfully retrieved encryption keys
INFO:pymazda.connection:No access token present. Logging in.
INFO:pymazda.connection:Logging in as myemail@bla.com
INFO:pymazda.connection:Retrieving public key to encrypt password
INFO:pymazda.connection:Sending login request
INFO:pymazda.connection:Successfully logged in as sethcalkins@icloud.com
DEBUG:pymazda.connection:Sending POST request to remoteServices/getVecBaseInfos/v4

@townsmcp
Copy link

@SethCalkins if the API calls have changed I wouldnt expect previous HA version to still work? Thank you for your effort though, it is appreciated

@DiVrox
Copy link
Author

DiVrox commented Jul 19, 2024

Anyone tried this with the 2024.7.3 release?

@Valdorama
Copy link

Anyone tried this with the 2024.7.3 release?

Yes, still doesn't work. Based on the comments in here, it looks like there is a potential fix but it needs to be merged and released.

@townsmcp
Copy link

@Valdorama if you are on 2024.7.3 you can try the fix documented at main...SethCalkins:home-assistant-mazda:main. Just update the code in the file in your instance, reboot HA and see what happens

@mustafababil
Copy link

Thanks a lot, I was able to set it for the first time.

Core 2024.11.3
Supervisor 2024.11.4
Operating System 13.2
Frontend 20241106.2

@townsmcp
Copy link

@jdobes thank you very much for your efforts on this. Working perfectly on HA 2024.11.4 for me.

Any chance you can add 2 additional sensors? @fano0001 implementation has 2 additional sensors (remaining_charging_time_ac and remaining_range_bev) which is documented here: https://github.com/fano0001/home-assistant-mazda
These 2 sensors are very useful, especially the remaining BEV range to understand how much battery range is left

@jdobes
Copy link

jdobes commented Nov 24, 2024

@townsmcp I see @fano0001 is about to add the fix to his fork as well fano0001#7. It'll be probably better to wait for it than copying his BEV work to my fork.

@fano0001
Copy link

Hi, just added your fix to my fork.

thank you.

@wackla33
Copy link

Hola, acabo de agregar tu solución a mi bifurcación.

Gracias.

Hello. Thank you very much for your fork. I have installed it and it works perfect. Just a doubt. The colleague @Townsmc has mentioned that with your previous fork you had 2 new sensors to control the battery situation: remaining_charging_time_ac and remaining_range_bev, really interesting and very useful, but after installing your fork they do not appear. Thank you.

@wackla33
Copy link

Oh!!! Here's what I got now: "Mazda integration has been removed

Error ⸱ Reported by Mazda Connected Services

Mazda integration has been removed from Home Assistant.

Mazda is forcing the retirement of the library that Home Assistant uses to connect to its services.

To resolve this issue, please remove the (now defunct) integration entries from your Home Assistant settings. Click here to view your existing Mazda integration entries."

@heythisisnate
Copy link

I just installed @fano0001's fork and it's working beautifully on HA 2024.11.2

I also now see the Remaining range BEV and Remaining charging time (AC) sensors too which are quite useful (we have a new CX-90 PHEV). Thank you @jdobes and @fano0001 for this excellent work!

@townsmcp
Copy link

@fano0001 thanks for the update. It is working for me 👍
@StephenMilner worth having a look at this. lol I am keeping the old VM though (shutdown) just in case lol.

@wackla33 the entities are there:
IMG_1875

To install fano0001 integration:

  • Delete the Mazda integration in HA from Settings - Devices and Services
  • Delete the Mazda folder from custom_components
  • Reboot HA
  • Go to HACS and add custom integration. Add https://github.com/fano0001/home-assistant-mazda as type Integration
  • Reboot HA
  • Add integration Mazda Connected Services ng in Settings - Devices and Services
  • Add your email address, password and choose the location from one of 3 areas

@wackla33
Copy link

@fano0001Gracias por la actualización. A mí me está funcionando 👍 @StephenMilnerVale la pena echarle un vistazo a esto. jajaja. Sin embargo, mantengo la vieja VM (apagada) por si acaso.

@wackla33Las entidades estan ahi: Imagen_1875

Para instalar la integración fano0001:

  • Eliminar la integración de Mazda en HA desde Configuración – Dispositivos y Servicios
  • Eliminar la carpeta Mazda decustom_components
  • Reiniciar HA
  • Vaya a HACS y agregue la integración personalizada. Agregar https://github.com/fano0001/home-assistant-mazdacomo tipoIntegration
  • Reiniciar HA
  • Agregar integración Mazda Connected Services ngen Configuración – Dispositivos y servicios
  • Añade tu dirección de correo electrónico, contraseña y elige la ubicación entre una de las 3 áreas

Hi. Is your Mazda also a PHEV? That may be the issue, mine is a MHEV, that may be why the battery sensors are not showing up.

@townsmcp
Copy link

@wackla33 i guess that would be it. My CX-60 is a PHEV. If the Mazda app doesn’t show charge level this integration won’t show it

@StephenMilner
Copy link

@fano0001 thanks for the update. It is working for me 👍 @StephenMilner worth having a look at this. lol I am keeping the old VM though (shutdown) just in case lol.

@wackla33 the entities are there: IMG_1875

To install fano0001 integration:

  • Delete the Mazda integration in HA from Settings - Devices and Services
  • Delete the Mazda folder from custom_components
  • Reboot HA
  • Go to HACS and add custom integration. Add https://github.com/fano0001/home-assistant-mazda as type Integration
  • Reboot HA
  • Add integration Mazda Connected Services ng in Settings - Devices and Services
  • Add your email address, password and choose the location from one of 3 areas

Thanks, just catching up on this. I’ll redo when I have a bit of time.

Huge shoutout to all those who’ve worked to fix this

@StephenMilner
Copy link

Thank you very much everyone for all your efforts and clear technical skill in this area.

I have fano0001 integration working well.

I am still keeping my 2024.6.4 docker container image ready in case it's needed again.

@lam-parker
Copy link

I'm trying to find a work around to remote start my Mazda without subscribing to the dang app!

@CAT1210
Copy link

CAT1210 commented Nov 29, 2024

I am so confused about what I should be seeing with this integration. Full disclosure, I didn't use the integration prior to the DMCA takedown, but I used pymazda in Python on it's own server to make calls to. Thought I would give this a whirl. From what I am seeing above, it looks like I should get a device and entities but I don't appear to.

After installing the integration in HACS (fan0001) and rebooting, I add the integration and enter my email and password and it looks as though it is successful. When I click on "Mazda Connected Services ng" to look at the integration entries, this is what I see:
image

I would assume I should see the vehicle and/or entities? I also do not see anything if I search for "Mazda" in my device list (except for "mazda_cs", which if I click on, it tells me Update is Up-to-date. Am I misunderstanding what this integration is supposed to do?

@jeroendw88
Copy link

I am so confused about what I should be seeing with this integration. Full disclosure, I didn't use the integration prior to the DMCA takedown, but I used pymazda in Python on it's own server to make calls to. Thought I would give this a whirl. From what I am seeing above, it looks like I should get a device and entities but I don't appear to.

After installing the integration in HACS (fan0001) and rebooting, I add the integration and enter my email and password and it looks as though it is successful. When I click on "Mazda Connected Services ng" to look at the integration entries, this is what I see: image

I would assume I should see the vehicle and/or entities? I also do not see anything if I search for "Mazda" in my device list (except for "mazda_cs", which if I click on, it tells me Update is Up-to-date. Am I misunderstanding what this integration is supposed to do?

Could it be that you haven't registered your car in the official Mazda app?

@CAT1210
Copy link

CAT1210 commented Nov 30, 2024

Could it be that you haven't registered your car in the official Mazda app?

No, I enrolled in the app when I got the car and my pypython integration worked fine. I did check to see if there was some sort of update to the app that I missed to keep it from working, was met with an "enroll" option, which I declined because I don't care to pay for anything in the MyMazda app, and it took me to my regular screen with the information about my Mazda and unlock/lock, etc features. So, I have to assume it isn't that. Plus, this integration took my email and password for MyMazda just fine....

@MartinAirN
Copy link

MartinAirN commented Nov 30, 2024

Could it be that you haven't registered your car in the official Mazda app?

No, I enrolled in the app when I got the car and my pypython integration worked fine. I did check to see if there was some sort of update to the app that I missed to keep it from working, was met with an "enroll" option, which I declined because I don't care to pay for anything in the MyMazda app, and it took me to my regular screen with the information about my Mazda and unlock/lock, etc features. So, I have to assume it isn't that. Plus, this integration took my email and password for MyMazda just fine....

It should work exactly the same as the python integration so if that detects it something else is off.

Are you perhaps logged in using the same account? That seems to throw off the server side.
My recommendation is to create a second account and invite that user from your main account to use your car.

@CAT1210
Copy link

CAT1210 commented Nov 30, 2024

Are you perhaps logged in using the same account? That seems to throw off the server side. My recommendation is to create a second account and invite that user from your main account to use your car.

No, the pypython version I have on my server quit returning most data (except VIN, model) a couple months ago so I shut that server. Plus, when I was in the MyMazda app on my phone and I connected via this integration, I was booted out of the MyMazda app, which should happen.

All this said, I just noticed what MyMazda wants me to enroll in is “Mazda Connected Services” and noticed this integration is for “Mazda Connected Services”, I’m guessing my refusal to pay Mazda $10 per month for something I used to get for free is my roadblock here?

@fvant
Copy link

fvant commented Dec 2, 2024

As an alternative to removing one/installing another integration, you can download the merge request in this repo from github as a patch file and apply it to the existing integration in Terminal.

Done in 5..

 curl https://patch-diff.githubusercontent.com/raw/runDMCA/home-assistant-mazda/pull/8.patch  >/tmp/8patch
 cd /config
 git apply /tmp/8patch

@Ghannes
Copy link

Ghannes commented Dec 3, 2024

Thanks fvant.

@SethCalkins
Copy link

@jdobes your a hero!

@bonsaijogi
Copy link

Thank you very much for the update and the explanations on how to do it!

I was already despairing until I finally looked it up here 👍

@Crucio32000
Copy link

Thank you very much. This should be merged asap.
I can help maintain this if you give me the rights to do it.
Tested on HA in docker

@ghammer80
Copy link

ghammer80 commented Jan 11, 2025

Hey all, the integration seems to be working again randomly…anyone with the integration seeing the same? I’m on 2025.1.2

@marcus250281
Copy link

Yeah same for me, since Friday 1pm CET. Bot nothing changed in the HA installation. HA is running with 2025.1.1

@bonsaijogi
Copy link

i’m still on 2024.12.5 ... and it works :)

@marcus250281
Copy link

Since yesterday 7pm again not working. Nothing changed on my side, no update, no reboot. Not sure how often Mazda changed something on their side.

@hvanoch
Copy link

hvanoch commented Feb 2, 2025

@marcus250281 same here, frustrating...

@townsmcp
Copy link

townsmcp commented Feb 2, 2025

I think it’s a Mazda issue again. For the last week most update requests via HA integrations and even the Mazda app have failed to update. Maybe 1 request in 20 is actually updating

@sfunaro
Copy link

sfunaro commented Feb 6, 2025

Same here, stopped working since a few days. Anyone found a fix ?

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

Successfully merging a pull request may close this issue.