Mazda connected service

wow! Thats good news, would love to test it and give you some feedback. right now i’m away from the computer. but can look at it over the weekend.

@Fuglem By the way, I made a few fixes to the integration. The above link is updated, so if you already downloaded MazdaClimateTest.zip, please use MazdaClimateTest2.zip instead. Thanks!

1 Like

See that the test2 made the climate “Unavailable”, but it did show on the first one.

Can you please check if there are any errors related to the Mazda integration in your HA logs when using the test2 version?

Hello,
I have just bought a CX-30, I have added the Mazda service integration and linked my account.
I am trying to add to my dashboard some info and command, in my case both unlock (sometimes lock works) and other button doesn’t work. I can see the sensors state, but I got errors when trying buttons:

Invocation of button / press service failed Request failed: Check the data entered and try again. (400C03)

Invocation of service lock/unlock failed. Request failed: Please wait for a while and try again.When an error continues, please contact the call center.[E400002]

Where do I wrong?

Hi @Sofa_Surfer. I know that the MX-30 model doesn’t have the unlock feature available, so I’m wondering if that may be the case for CX-30 as well. Are you able to lock and unlock your CX-30 in the MyMazda app on your phone?

Same for the CX-30

Thanks for confirming. Unfortunately if you can’t unlock your car in the MyMazda app, then the HA integration won’t be able to do it either.

@bdr9 it finally arrived! CX-60 is connected to My Mazda. I have installed the integration and can see the car in HA! I just need to play with the settings now :slightly_smiling_face:

Nice! Is it the plug-in hybrid version?

Yes, plugin hybrid :slight_smile:



Because I’m in the UK and we use miles not kilometers, apart from making a new template sensor, is there a way of making the integration user configurable to switch between miles and kilometers for the 2 distance sensors?

Also, sadly I have tried the integration for lock/unlock the car but I’m getting the following error at the bottom of the screen:

Also, although the integration show the battery level at top right, can that be added as a sensor?

Unfortunately, the electric Mazda vehicles don’t seem to support unlocking, but locking is supported. In the MyMazda app you should see the same thing: you can lock but not unlock. There is some discussion on that here: Report: `unlock_doors` throws error `[E400002]` when executed on MX-30 · Issue #19 · bdr99/pymazda · GitHub. I might change this lock entity to a button entity named “Lock” for electric vehicles, that way it will be more clear that only locking is supported.

Also, there is already a sensor entity for the battery level. It’s the one named “Charge level”, I can see it in your first screenshot above :slight_smile:

Regarding your question about miles vs km: HA 2022.10, when it is released, will include a new feature for manually overriding the unit for distance sensors. Unfortunately, each individual integration needs to be updated to take advantage of this new feature, and the Mazda integration won’t be updated in time for 2022.10. I hope to have it fixed in time for 2022.11.

🫣🫣🫣 oops, sorry about the charge level, I completely missed it.

For locking/unlocking, I didn’t have a play with the app yesterday but found that out today for not being able to unlock - I was gutted when I saw that as my previous car (Mercedes GLE) had remote locking and unlocking from the app and therefore the integration to HA had it too (I completely get that unless Mazda Services supports a function your HA integration will only surface what their APIs expose) for example the MyMazda app doesn’t appear to support turning on and off hazard lights nor start/stop the engine.
I’m not sure if this only applies to CX-60, but do you have any plans for adding/editing charging schedules or vehicle preconditioning or turning on/off heated front and back windows?

Excellent news regarding the distance sensor. Thanks for all your hard work, it is appreciated

I’ve actually already integrated climate control, which includes the front/rear window defrosters. I’ve submitted this new feature to the HA team, they just need to approve and merge it before it will be included in the next release. Here’s a link to the pull request if you want to follow the progress: Add climate platform to Mazda integration by bdr99 · Pull Request #75037 · home-assistant/core · GitHub

For charging schedules, I think this could be best accomplished through HA automations. You could easily create an automation to that uses the button entities to start/stop charging at specific times. You might even be able to use the weekly schedule helper entity that was added in 2022.9 to make this easier.

Thanks for all of this feedback, by the way. It’s helpful to know what features everyone is finding useful, and what people would like to see in the future.

1 Like

Brandon, this is outstanding work.

I have also just taken ownership of the CX-60 PHEV and was amazed to find this HA integration.

I’ve set up a few automations and I’ll keep an eye on how things perform - Looking forward to HVAC integrations being added and I’ll watch your pull request.

Once again, superb work.

1 Like

Thanks Stephen! I’m really glad to hear you are enjoying it. The HVAC integration is ready to go but just needs to be merged by the HA team… it’s been pending for a long time so hopefully that will happen soon.

1 Like

@bdr9 i have just added a chaser to the GitHub entry. Hopefully the HA team can get it reviewed and released asap as I have some automations waiting on the state of climate to turn a PodPoint on and off what with the mornings getting colder

1 Like

Yeah, unfortunately the HA team has been very slow to review this PR. In the meantime, if you’d like, you can install the proposed version of the integration from my GitHub PR as a custom integration in your HA setup. This would allow you to try out the climate entity before the PR is merged. Here are the steps in case you or anyone else wants to try this:

  1. On my pull request, at the top of the page, click bdr99:mazda_climate_platform (this is the Git branch which contains my proposed changes).
  2. Click the green “Code” button, then click “Download ZIP”. It will download a file named core-mazda_climate_platform.zip.
  3. In the zip file, navigate to the path core-mazda_climate_platform/homeassistant/components. Copy the mazda folder from here into your HA custom_components folder. If you don’t have a custom_components folder, you will need to create it. It should be located in the same folder as your configuration.yaml.
  4. In the “mazda” folder within your custom_components folder, open the manifest.json file in a text editor. You will need to add a comma at the end of the loggers line, and then add a new line after it that says "version": "1.0.0". So, after editing the file, the last few lines should look like this:
  "loggers": ["pymazda"],
  "version": "1.0.0"
}
  1. Save your changes and restart HA. After you restart, it should load the custom Mazda integration instead of the built-in one, and you should have the climate entity. The custom integration will always override the built-in one if it is present, so make sure you delete it after the HA team finally merges my PR, and you upgrade to an HA version that has the climate entity built-in. Otherwise, you won’t receive any future improvements to the Mazda integration since your custom one will always override it.
3 Likes

Amazing! Thank you for the detailed info. I have just added the custom component in :slight_smile: hopefully it wont take HA team much longer but in the mean time I can have a play around :clap:

Out of curiosity, did you manage to get round to updating the integration to allow changing odometer from kilometers to miles?

1 Like